mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-13 17:59:32 +02:00
IDE: clean up, added saving new unit/form templates
git-svn-id: trunk@17373 -
This commit is contained in:
parent
04ac30b1eb
commit
47a79e54b2
@ -35,7 +35,8 @@ uses
|
||||
MemCheck,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, Graphics, Controls, Forms, LCLProc, FileUtil, Dialogs,
|
||||
Laz_XMLCfg, IDEProcs, LazarusIDEStrConsts, IDETranslations, LazConf,
|
||||
Laz_XMLCfg, AvgLvlTree, NewItemIntf,
|
||||
IDEProcs, LazarusIDEStrConsts, IDETranslations, LazConf,
|
||||
ObjectInspector, IDEOptionDefs, IDEWindowIntf, ExtToolDialog, TransferMacros,
|
||||
IDEOptionsIntf;
|
||||
|
||||
@ -116,12 +117,8 @@ const
|
||||
'Ignore'
|
||||
);
|
||||
|
||||
{ Environment Options }
|
||||
|
||||
type
|
||||
{ class for storing environment options }
|
||||
|
||||
{ TEnvironmentOptions }
|
||||
{ TEnvironmentOptions - class for storing environment options }
|
||||
|
||||
TEnvironmentOptions = class(TAbstractIDEOptions)
|
||||
private
|
||||
@ -225,11 +222,16 @@ type
|
||||
fCharcaseFileAction : TCharCaseFileAction;
|
||||
fAmbiguousFileAction: TAmbiguousFileAction;
|
||||
|
||||
// lazdoc
|
||||
FLazDocPaths: string;
|
||||
|
||||
// language ID (see LazarusTranslations in translations.pas)
|
||||
fLanguageID: string;
|
||||
|
||||
|
||||
// 'new items'
|
||||
FNewFormTemplate: string;
|
||||
FNewUnitTemplate: string;
|
||||
|
||||
procedure SetCompilerFilename(const AValue: string);
|
||||
procedure SetDebuggerSearchPath(const AValue: string);
|
||||
procedure SetMakeFilename(const AValue: string);
|
||||
@ -433,6 +435,10 @@ type
|
||||
property MsgViewDblClickJumps: boolean read fMsgViewDblClickJumps
|
||||
write fMsgViewDblClickJumps;
|
||||
property MsgViewFocus: boolean read fMsgViewFocus write fMsgViewFocus;
|
||||
|
||||
// default template for each 'new item' category: Name=Path, Value=TemplateName
|
||||
property NewUnitTemplate: string read FNewUnitTemplate write FNewUnitTemplate;
|
||||
property NewFormTemplate: string read FNewFormTemplate write FNewFormTemplate;
|
||||
end;
|
||||
|
||||
var
|
||||
@ -659,28 +665,29 @@ begin
|
||||
fPascalFileExtension:=petPAS;
|
||||
fCharcaseFileAction:=ccfaAutoRename;
|
||||
|
||||
// lazdoc
|
||||
FLazDocPaths:=SetDirSeparators(DefaultLazDocPath);
|
||||
end;
|
||||
|
||||
destructor TEnvironmentOptions.Destroy;
|
||||
begin
|
||||
fExternalTools.Free;
|
||||
FRecentOpenFiles.Free;
|
||||
FRecentProjectFiles.Free;
|
||||
FRecentPackageFiles.Free;
|
||||
FObjectInspectorOptions.Free;
|
||||
FLazarusDirsHistory.Free;
|
||||
FCompilerFileHistory.Free;
|
||||
FFPCSourceDirHistory.Free;
|
||||
FMakeFileHistory.Free;
|
||||
FDebuggerFileHistory.Free;
|
||||
FTestBuildDirHistory.Free;
|
||||
FreeAndNil(fExternalTools);
|
||||
FreeAndNil(FRecentOpenFiles);
|
||||
FreeAndNil(FRecentProjectFiles);
|
||||
FreeAndNil(FRecentPackageFiles);
|
||||
FreeAndNil(FObjectInspectorOptions);
|
||||
FreeAndNil(FLazarusDirsHistory);
|
||||
FreeAndNil(FCompilerFileHistory);
|
||||
FreeAndNil(FFPCSourceDirHistory);
|
||||
FreeAndNil(FMakeFileHistory);
|
||||
FreeAndNil(FDebuggerFileHistory);
|
||||
FreeAndNil(FTestBuildDirHistory);
|
||||
if IDEWindowIntf.IDEDialogLayoutList=FIDEDialogLayoutList then
|
||||
IDEWindowIntf.IDEDialogLayoutList:=nil;
|
||||
FIDEDialogLayoutList.Free;
|
||||
fIDEWindowLayoutList.Free;
|
||||
FConfigStore.Free;
|
||||
FXMLCfg.Free;
|
||||
FreeAndNil(FIDEDialogLayoutList);
|
||||
FreeAndNil(fIDEWindowLayoutList);
|
||||
FreeAndNil(FConfigStore);
|
||||
FreeAndNil(FXMLCfg);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
@ -968,7 +975,11 @@ begin
|
||||
CurPath:=Path+'AmbigiousFileAction/Value';
|
||||
fAmbiguousFileAction:=AmbiguousFileActionNameToType(XMLConfig.GetValue(
|
||||
CurPath,AmbiguousFileActionNames[fAmbiguousFileAction]));
|
||||
|
||||
|
||||
// 'new items'
|
||||
FNewUnitTemplate:=XMLConfig.GetValue(Path+'New/UnitTemplate/Value','');
|
||||
FNewFormTemplate:=XMLConfig.GetValue(Path+'New/FormTemplate/Value','');
|
||||
|
||||
// object inspector
|
||||
FObjectInspectorOptions.Load;
|
||||
FObjectInspectorOptions.SaveBounds:=false;
|
||||
@ -1173,9 +1184,13 @@ begin
|
||||
AmbiguousFileActionNames[fAmbiguousFileAction],
|
||||
AmbiguousFileActionNames[afaAsk]);
|
||||
|
||||
//lazdoc
|
||||
// lazdoc
|
||||
XMLConfig.SetDeleteValue(Path+'LazDoc/Paths',FLazDocPaths,DefaultLazDocPath);
|
||||
|
||||
// 'new items'
|
||||
XMLConfig.SetDeleteValue(Path+'New/UnitTemplate/Value',FNewUnitTemplate,'');
|
||||
XMLConfig.SetDeleteValue(Path+'New/FormTemplate/Value',FNewFormTemplate,'');
|
||||
|
||||
// object inspector
|
||||
FObjectInspectorOptions.SaveBounds:=false;
|
||||
FObjectInspectorOptions.Save;
|
||||
|
@ -1146,6 +1146,7 @@ begin
|
||||
|
||||
// create main IDE register items
|
||||
NewIDEItems:=TNewLazIDEItemCategories.Create;
|
||||
|
||||
SetupStandardProjectTypes;
|
||||
|
||||
// initialize the other IDE managers
|
||||
|
@ -1,129 +1,38 @@
|
||||
object NewOtherDialog: TNewOtherDialog
|
||||
Left = 271
|
||||
Left = 281
|
||||
Height = 395
|
||||
Top = 156
|
||||
Top = 204
|
||||
Width = 476
|
||||
HelpContext = 0
|
||||
ActiveControl = ItemsTreeView
|
||||
Align = alNone
|
||||
AllowDropFiles = False
|
||||
AutoScroll = True
|
||||
AutoSize = False
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSizeable
|
||||
Caption = 'NewOtherDialog'
|
||||
ChildSizing.LeftRightSpacing = 0
|
||||
ChildSizing.TopBottomSpacing = 0
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.ControlsPerLine = 0
|
||||
ClientHeight = 395
|
||||
ClientWidth = 476
|
||||
DockSite = False
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = 0
|
||||
Font.Style = []
|
||||
FormStyle = fsNormal
|
||||
ParentBiDiMode = True
|
||||
ParentFont = False
|
||||
Position = poScreenCenter
|
||||
ShowInTaskBar = stDefault
|
||||
UseDockManager = False
|
||||
LCLVersion = '0.9.27'
|
||||
WindowState = wsNormal
|
||||
object Panel1: TPanel
|
||||
Left = 6
|
||||
Height = 335
|
||||
Height = 333
|
||||
Top = 6
|
||||
Width = 464
|
||||
HelpContext = 0
|
||||
Align = alClient
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
BevelInner = bvNone
|
||||
BevelOuter = bvNone
|
||||
BevelWidth = 1
|
||||
BorderWidth = 0
|
||||
BorderStyle = bsNone
|
||||
ChildSizing.LeftRightSpacing = 0
|
||||
ChildSizing.TopBottomSpacing = 0
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.ControlsPerLine = 0
|
||||
ClientHeight = 335
|
||||
ClientHeight = 333
|
||||
ClientWidth = 464
|
||||
DockSite = False
|
||||
DragCursor = crDrag
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
FullRepaint = True
|
||||
ParentColor = True
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
TabOrder = 0
|
||||
TabStop = False
|
||||
Visible = True
|
||||
object ItemsTreeView: TTreeView
|
||||
Tag = 0
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 0
|
||||
Height = 335
|
||||
Top = 0
|
||||
Height = 333
|
||||
Width = 178
|
||||
HelpContext = 0
|
||||
Align = alClient
|
||||
AutoExpand = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
BackgroundColor = clWindow
|
||||
BorderStyle = bsSingle
|
||||
BorderWidth = 0
|
||||
Ctl3D = False
|
||||
DefaultItemHeight = 19
|
||||
DragKind = dkDrag
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ExpandSignType = tvestPlusMinus
|
||||
HideSelection = True
|
||||
HotTrack = False
|
||||
Indent = 15
|
||||
ParentCtl3D = True
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
ReadOnly = False
|
||||
RightClickSelect = False
|
||||
RowSelect = False
|
||||
ScrollBars = ssAutoBoth
|
||||
SelectionColor = clHighlight
|
||||
ShowButtons = True
|
||||
ShowLines = True
|
||||
ShowRoot = True
|
||||
SortType = stNone
|
||||
TabOrder = 0
|
||||
ToolTips = True
|
||||
Visible = True
|
||||
OnDblClick = OkButtonClick
|
||||
OnSelectionChanged = ItemsTreeViewSelectionChanged
|
||||
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips]
|
||||
TreeLineColor = clWindowFrame
|
||||
ExpandSignColor = clWindowFrame
|
||||
end
|
||||
object DescriptionGroupBox: TGroupBox
|
||||
AnchorSideLeft.Control = ItemsTreeView
|
||||
@ -132,150 +41,62 @@ object NewOtherDialog: TNewOtherDialog
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 183
|
||||
Height = 335
|
||||
Top = 0
|
||||
Height = 333
|
||||
Width = 281
|
||||
HelpContext = 0
|
||||
Align = alRight
|
||||
AutoSize = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'DescriptionGroupBox'
|
||||
ChildSizing.LeftRightSpacing = 0
|
||||
ChildSizing.TopBottomSpacing = 0
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.ControlsPerLine = 0
|
||||
ClientHeight = 316
|
||||
ClientHeight = 314
|
||||
ClientWidth = 277
|
||||
Ctl3D = False
|
||||
DockSite = False
|
||||
DragCursor = crDrag
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ParentBidiMode = True
|
||||
ParentColor = True
|
||||
ParentCtl3D = True
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
TabOrder = 1
|
||||
TabStop = False
|
||||
Visible = True
|
||||
object DescriptionLabel: TLabel
|
||||
Left = 6
|
||||
Height = 160
|
||||
Height = 18
|
||||
Top = 6
|
||||
Width = 265
|
||||
HelpContext = 0
|
||||
Align = alClient
|
||||
Alignment = taLeftJustify
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'DescriptionLabel'
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Layout = tlTop
|
||||
ParentBidiMode = True
|
||||
ParentColor = False
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
ShowAccelChar = True
|
||||
Transparent = True
|
||||
Visible = True
|
||||
WordWrap = True
|
||||
OptimalFill = False
|
||||
end
|
||||
object InheritableComponentsListView: TListView
|
||||
Left = 0
|
||||
Height = 144
|
||||
Top = 172
|
||||
Height = 284
|
||||
Top = 30
|
||||
Width = 277
|
||||
HelpContext = 0
|
||||
Align = alBottom
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
BorderWidth = 0
|
||||
Checkboxes = False
|
||||
Align = alClient
|
||||
Columns = <
|
||||
item
|
||||
AutoSize = False
|
||||
Caption = 'Form'
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
Caption = 'Unit'
|
||||
Width = 250
|
||||
end>
|
||||
ColumnClick = True
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
HideSelection = False
|
||||
MultiSelect = False
|
||||
ParentShowHint = True
|
||||
ReadOnly = True
|
||||
RowSelect = True
|
||||
ScrollBars = ssAutoBoth
|
||||
ShowColumnHeaders = True
|
||||
SortColumn = 0
|
||||
SortType = stNone
|
||||
TabStop = True
|
||||
TabOrder = 0
|
||||
ToolTips = True
|
||||
Visible = True
|
||||
ViewStyle = vsReport
|
||||
end
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Cursor = crHSplit
|
||||
Left = 178
|
||||
Height = 335
|
||||
Top = 0
|
||||
Height = 333
|
||||
Width = 5
|
||||
HelpContext = 0
|
||||
Align = alRight
|
||||
AutoSnap = True
|
||||
Beveled = False
|
||||
MinSize = 30
|
||||
ParentColor = True
|
||||
ParentShowHint = True
|
||||
ResizeAnchor = akRight
|
||||
ResizeStyle = rsUpdate
|
||||
Visible = True
|
||||
end
|
||||
end
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 48
|
||||
Top = 347
|
||||
Height = 50
|
||||
Top = 345
|
||||
Width = 464
|
||||
HelpContext = 0
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ButtonOrder = boDefault
|
||||
TabOrder = 1
|
||||
DefaultButton = pbOK
|
||||
ShowButtons = [pbOK, pbCancel, pbHelp]
|
||||
ShowGlyphs = [pbOK, pbCancel, pbClose, pbHelp]
|
||||
Visible = True
|
||||
end
|
||||
end
|
||||
|
@ -1,93 +1,34 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TNewOtherDialog','FORMDATA',[
|
||||
'TPF0'#15'TNewOtherDialog'#14'NewOtherDialog'#4'Left'#3#15#1#6'Height'#3#139#1
|
||||
+#3'Top'#3#156#0#5'Width'#3#220#1#11'HelpContext'#2#0#13'ActiveControl'#7#13
|
||||
+'ItemsTreeView'#5'Align'#7#6'alNone'#14'AllowDropFiles'#8#10'AutoScroll'#9#8
|
||||
+'AutoSize'#8#11'BorderIcons'#11#12'biSystemMenu'#0#11'BorderStyle'#7#10'bsSi'
|
||||
+'zeable'#7'Caption'#6#14'NewOtherDialog'#28'ChildSizing.LeftRightSpacing'#2#0
|
||||
+#28'ChildSizing.TopBottomSpacing'#2#0#29'ChildSizing.HorizontalSpacing'#2#0
|
||||
+#27'ChildSizing.VerticalSpacing'#2#0#27'ChildSizing.ControlsPerLine'#2#0#12
|
||||
+'ClientHeight'#3#139#1#11'ClientWidth'#3#220#1#8'DockSite'#8#8'DragKind'#7#6
|
||||
+'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#11'Font.Height'#2#0#10'Font.'
|
||||
+'Style'#11#0#9'FormStyle'#7#8'fsNormal'#14'ParentBiDiMode'#9#10'ParentFont'#8
|
||||
+#8'Position'#7#14'poScreenCenter'#13'ShowInTaskBar'#7#9'stDefault'#14'UseDoc'
|
||||
+'kManager'#8#10'LCLVersion'#6#6'0.9.27'#11'WindowState'#7#8'wsNormal'#0#6'TP'
|
||||
+'anel'#6'Panel1'#4'Left'#2#6#6'Height'#3'O'#1#3'Top'#2#6#5'Width'#3#208#1#11
|
||||
+'HelpContext'#2#0#5'Align'#7#8'alClient'#9'Alignment'#7#8'taCenter'#8'AutoSi'
|
||||
+'ze'#8#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing'
|
||||
+'.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!Bord'
|
||||
+'erSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVerti'
|
||||
+'cal'#7#7'ccaFill'#10'BevelInner'#7#6'bvNone'#10'BevelOuter'#7#6'bvNone'#10
|
||||
+'BevelWidth'#2#1#11'BorderWidth'#2#0#11'BorderStyle'#7#6'bsNone'#28'ChildSiz'
|
||||
+'ing.LeftRightSpacing'#2#0#28'ChildSizing.TopBottomSpacing'#2#0#29'ChildSizi'
|
||||
+'ng.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0#27'ChildSizin'
|
||||
+'g.ControlsPerLine'#2#0#12'ClientHeight'#3'O'#1#11'ClientWidth'#3#208#1#8'Do'
|
||||
+'ckSite'#8#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8
|
||||
+'dmManual'#7'Enabled'#9#11'FullRepaint'#9#11'ParentColor'#9#10'ParentFont'#9
|
||||
+#14'ParentShowHint'#9#8'TabOrder'#2#0#7'TabStop'#8#7'Visible'#9#0#9'TTreeVie'
|
||||
+'w'#13'ItemsTreeView'#3'Tag'#2#0#22'AnchorSideLeft.Control'#7#5'Owner'#21'An'
|
||||
+'chorSideTop.Control'#7#5'Owner'#4'Left'#2#0#6'Height'#3'O'#1#3'Top'#2#0#5'W'
|
||||
+'idth'#3#178#0#11'HelpContext'#2#0#5'Align'#7#8'alClient'#10'AutoExpand'#8#18
|
||||
+'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2
|
||||
+#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#0'!BorderSpacing.'
|
||||
+'CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'c'
|
||||
+'caFill'#15'BackgroundColor'#7#8'clWindow'#11'BorderStyle'#7#8'bsSingle'#11
|
||||
+'BorderWidth'#2#0#5'Ctl3D'#8#17'DefaultItemHeight'#2#19#8'DragKind'#7#6'dkDr'
|
||||
+'ag'#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#14'Ex'
|
||||
+'pandSignType'#7#14'tvestPlusMinus'#13'HideSelection'#9#8'HotTrack'#8#6'Inde'
|
||||
+'nt'#2#15#11'ParentCtl3D'#9#10'ParentFont'#9#14'ParentShowHint'#9#8'ReadOnly'
|
||||
+#8#16'RightClickSelect'#8#9'RowSelect'#8#10'ScrollBars'#7#10'ssAutoBoth'#14
|
||||
+'SelectionColor'#7#11'clHighlight'#11'ShowButtons'#9#9'ShowLines'#9#8'ShowRo'
|
||||
+'ot'#9#8'SortType'#7#6'stNone'#8'TabOrder'#2#0#8'ToolTips'#9#7'Visible'#9#10
|
||||
+'OnDblClick'#7#13'OkButtonClick'#18'OnSelectionChanged'#7#29'ItemsTreeViewSe'
|
||||
+'lectionChanged'#7'Options'#11#17'tvoAutoItemHeight'#16'tvoHideSelection'#21
|
||||
+'tvoKeepCollapsedNodes'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'
|
||||
+#11'tvoToolTips'#0#13'TreeLineColor'#7#13'clWindowFrame'#15'ExpandSignColor'
|
||||
+#7#13'clWindowFrame'#0#0#9'TGroupBox'#19'DescriptionGroupBox'#22'AnchorSideL'
|
||||
+'eft.Control'#7#13'ItemsTreeView'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21
|
||||
+'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20
|
||||
+'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#183#0#6'Height'#3'O'#1#3'Top'
|
||||
+#2#0#5'Width'#3#25#1#11'HelpContext'#2#0#5'Align'#7#7'alRight'#8'AutoSize'#8
|
||||
+#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'
|
||||
+#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#0'!BorderSpacin'
|
||||
+'g.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7
|
||||
+'ccaFill'#7'Caption'#6#19'DescriptionGroupBox'#28'ChildSizing.LeftRightSpaci'
|
||||
+'ng'#2#0#28'ChildSizing.TopBottomSpacing'#2#0#29'ChildSizing.HorizontalSpaci'
|
||||
+'ng'#2#0#27'ChildSizing.VerticalSpacing'#2#0#27'ChildSizing.ControlsPerLine'
|
||||
+#2#0#12'ClientHeight'#3'<'#1#11'ClientWidth'#3#21#1#5'Ctl3D'#8#8'DockSite'#8
|
||||
+#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'
|
||||
+#7'Enabled'#9#14'ParentBidiMode'#9#11'ParentColor'#9#11'ParentCtl3D'#9#10'Pa'
|
||||
+'rentFont'#9#14'ParentShowHint'#9#8'TabOrder'#2#1#7'TabStop'#8#7'Visible'#9#0
|
||||
+#6'TLabel'#16'DescriptionLabel'#4'Left'#2#6#6'Height'#3#160#0#3'Top'#2#6#5'W'
|
||||
+'idth'#3#9#1#11'HelpContext'#2#0#5'Align'#7#8'alClient'#9'Alignment'#7#13'ta'
|
||||
+'LeftJustify'#8'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'
|
||||
+#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpaci'
|
||||
+'ng.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSp'
|
||||
+'acing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#16'DescriptionLabel'#10
|
||||
,'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#6'Layout'#7#5
|
||||
+'tlTop'#14'ParentBidiMode'#9#11'ParentColor'#8#10'ParentFont'#9#14'ParentSho'
|
||||
+'wHint'#9#13'ShowAccelChar'#9#11'Transparent'#9#7'Visible'#9#8'WordWrap'#9#11
|
||||
+'OptimalFill'#8#0#0#9'TListView'#29'InheritableComponentsListView'#4'Left'#2
|
||||
+#0#6'Height'#3#144#0#3'Top'#3#172#0#5'Width'#3#21#1#11'HelpContext'#2#0#5'Al'
|
||||
+'ign'#7#8'alBottom'#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19
|
||||
+'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Arou'
|
||||
+'nd'#2#0'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.C'
|
||||
+'ellAlignVertical'#7#7'ccaFill'#11'BorderWidth'#2#0#10'Checkboxes'#8#7'Colum'
|
||||
+'ns'#14#1#8'AutoSize'#8#7'Caption'#6#4'Form'#5'Width'#2'd'#0#1#8'AutoSize'#8
|
||||
+#7'Caption'#6#4'Unit'#5'Width'#3#250#0#0#0#11'ColumnClick'#9#10'DragCursor'#7
|
||||
+#6'crDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#13'HideSelection'#8#11'Mul'
|
||||
+'tiSelect'#8#14'ParentShowHint'#9#8'ReadOnly'#9#9'RowSelect'#9#10'ScrollBars'
|
||||
+#7#10'ssAutoBoth'#17'ShowColumnHeaders'#9#10'SortColumn'#2#0#8'SortType'#7#6
|
||||
+'stNone'#7'TabStop'#9#8'TabOrder'#2#0#8'ToolTips'#9#7'Visible'#9#9'ViewStyle'
|
||||
+#7#8'vsReport'#0#0#0#9'TSplitter'#9'Splitter1'#6'Cursor'#7#8'crHSplit'#4'Lef'
|
||||
+'t'#3#178#0#6'Height'#3'O'#1#3'Top'#2#0#5'Width'#2#5#11'HelpContext'#2#0#5'A'
|
||||
+'lign'#7#7'alRight'#8'AutoSnap'#9#7'Beveled'#8#7'MinSize'#2#30#11'ParentColo'
|
||||
+'r'#9#14'ParentShowHint'#9#12'ResizeAnchor'#7#7'akRight'#11'ResizeStyle'#7#8
|
||||
+'rsUpdate'#7'Visible'#9#0#0#0#12'TButtonPanel'#11'ButtonPanel'#4'Left'#2#6#6
|
||||
+'Height'#2'0'#3'Top'#3'['#1#5'Width'#3#208#1#11'HelpContext'#2#0#5'Align'#7#8
|
||||
+'alBottom'#8'AutoSize'#9#11'ButtonOrder'#7#9'boDefault'#8'TabOrder'#2#1#13'D'
|
||||
+'efaultButton'#7#4'pbOK'#11'ShowButtons'#11#4'pbOK'#8'pbCancel'#6'pbHelp'#0
|
||||
+#10'ShowGlyphs'#11#4'pbOK'#8'pbCancel'#7'pbClose'#6'pbHelp'#0#7'Visible'#9#0
|
||||
+#0#0
|
||||
'TPF0'#15'TNewOtherDialog'#14'NewOtherDialog'#4'Left'#3#25#1#6'Height'#3#139#1
|
||||
+#3'Top'#3#204#0#5'Width'#3#220#1#13'ActiveControl'#7#13'ItemsTreeView'#11'Bo'
|
||||
+'rderIcons'#11#12'biSystemMenu'#0#7'Caption'#6#14'NewOtherDialog'#12'ClientH'
|
||||
+'eight'#3#139#1#11'ClientWidth'#3#220#1#10'ParentFont'#8#8'Position'#7#14'po'
|
||||
+'ScreenCenter'#10'LCLVersion'#6#6'0.9.27'#0#6'TPanel'#6'Panel1'#4'Left'#2#6#6
|
||||
+'Height'#3'M'#1#3'Top'#2#6#5'Width'#3#208#1#5'Align'#7#8'alClient'#20'Border'
|
||||
+'Spacing.Around'#2#6#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#3'M'#1#11'C'
|
||||
+'lientWidth'#3#208#1#8'TabOrder'#2#0#0#9'TTreeView'#13'ItemsTreeView'#22'Anc'
|
||||
+'horSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#6'Heig'
|
||||
+'ht'#3'M'#1#5'Width'#3#178#0#5'Align'#7#8'alClient'#17'DefaultItemHeight'#2
|
||||
+#19#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#10'OnDblClick'#7#13'OkBu'
|
||||
+'ttonClick'#18'OnSelectionChanged'#7#29'ItemsTreeViewSelectionChanged'#0#0#9
|
||||
+'TGroupBox'#19'DescriptionGroupBox'#22'AnchorSideLeft.Control'#7#13'ItemsTre'
|
||||
+'eView'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#5
|
||||
+'Owner'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9
|
||||
+'asrBottom'#4'Left'#3#183#0#6'Height'#3'M'#1#5'Width'#3#25#1#5'Align'#7#7'al'
|
||||
+'Right'#7'Caption'#6#19'DescriptionGroupBox'#12'ClientHeight'#3':'#1#11'Clie'
|
||||
+'ntWidth'#3#21#1#8'TabOrder'#2#1#0#6'TLabel'#16'DescriptionLabel'#4'Left'#2#6
|
||||
+#6'Height'#2#18#3'Top'#2#6#5'Width'#3#9#1#5'Align'#7#5'alTop'#20'BorderSpaci'
|
||||
+'ng.Around'#2#6#7'Caption'#6#16'DescriptionLabel'#11'ParentColor'#8#8'WordWr'
|
||||
+'ap'#9#0#0#9'TListView'#29'InheritableComponentsListView'#6'Height'#3#28#1#3
|
||||
+'Top'#2#30#5'Width'#3#21#1#5'Align'#7#8'alClient'#7'Columns'#14#1#7'Caption'
|
||||
+#6#4'Form'#5'Width'#2'd'#0#1#7'Caption'#6#4'Unit'#5'Width'#3#250#0#0#0#13'Hi'
|
||||
+'deSelection'#8#8'ReadOnly'#9#9'RowSelect'#9#10'ScrollBars'#7#10'ssAutoBoth'
|
||||
+#8'TabOrder'#2#0#9'ViewStyle'#7#8'vsReport'#0#0#0#9'TSplitter'#9'Splitter1'#4
|
||||
+'Left'#3#178#0#6'Height'#3'M'#1#5'Width'#2#5#5'Align'#7#7'alRight'#12'Resize'
|
||||
+'Anchor'#7#7'akRight'#0#0#0#12'TButtonPanel'#11'ButtonPanel'#4'Left'#2#6#6'H'
|
||||
+'eight'#2'2'#3'Top'#3'Y'#1#5'Width'#3#208#1#5'Align'#7#8'alBottom'#8'AutoSiz'
|
||||
+'e'#9#8'TabOrder'#2#1#11'ShowButtons'#11#4'pbOK'#8'pbCancel'#6'pbHelp'#0#0#0
|
||||
+#0
|
||||
]);
|
||||
|
@ -63,13 +63,13 @@ type
|
||||
procedure Add(ATemplate: TNewIDEItemTemplate); override;
|
||||
function LocalizedName: string; override;
|
||||
function Description: string; override;
|
||||
function IndexOfTemplate(const TemplateName: string): integer; override;
|
||||
function FindTemplateByName(const TemplateName: string): TNewIDEItemTemplate; override;
|
||||
function IndexOfCategory(const CategoryName: string): integer; override;
|
||||
function FindCategoryByName(const CategoryName: string
|
||||
): TNewIDEItemCategory; override;
|
||||
function FindCategoryByName(const CategoryName: string): TNewIDEItemCategory; override;
|
||||
public
|
||||
property Count: integer Read GetCount;
|
||||
property Items[Index: integer]: TNewIDEItemTemplate Read GetItems; default;
|
||||
property Name: string Read FName;
|
||||
end;
|
||||
|
||||
|
||||
@ -357,9 +357,9 @@ begin
|
||||
InheritableComponentsListView.Visible := false;
|
||||
if (ANode <> nil) and (ANode.Data <> nil) then
|
||||
begin
|
||||
if TObject(ANode.Data) is TNewLazIDEItemCategory then
|
||||
Desc := TNewLazIDEItemCategory(ANode.Data).Description
|
||||
else
|
||||
if TObject(ANode.Data) is TNewLazIDEItemCategory then begin
|
||||
Desc := TNewLazIDEItemCategory(ANode.Data).Description;
|
||||
end else
|
||||
begin
|
||||
aNewItemTemplate := TNewIDEItemTemplate(ANode.Data);
|
||||
Desc := aNewItemTemplate.Description;
|
||||
@ -375,8 +375,9 @@ begin
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
else begin
|
||||
Desc := '';
|
||||
end;
|
||||
DescriptionLabel.Caption := Desc;
|
||||
end;
|
||||
|
||||
@ -460,20 +461,39 @@ begin
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TNewLazIDEItemCategory.IndexOfCategory(const CategoryName: string): integer;
|
||||
function TNewLazIDEItemCategory.IndexOfTemplate(const TemplateName: string): integer;
|
||||
begin
|
||||
// TODO
|
||||
Result := -1;
|
||||
Result:=FItems.Count-1;
|
||||
while (Result>=0) and (SysUtils.CompareText(Items[Result].Name,TemplateName)<>0) do
|
||||
dec(Result);
|
||||
end;
|
||||
|
||||
function TNewLazIDEItemCategory.FindCategoryByName(
|
||||
const CategoryName: string): TNewIDEItemCategory;
|
||||
function TNewLazIDEItemCategory.FindTemplateByName(
|
||||
const TemplateName: string): TNewIDEItemTemplate;
|
||||
var
|
||||
i: longint;
|
||||
begin
|
||||
i := IndexOfTemplate(TemplateName);
|
||||
if i >= 0 then
|
||||
Result := Items[i]
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
function TNewLazIDEItemCategory.IndexOfCategory(const CategoryName: string
|
||||
): integer;
|
||||
begin
|
||||
Result:=-1; // Todo
|
||||
end;
|
||||
|
||||
function TNewLazIDEItemCategory.FindCategoryByName(const CategoryName: string
|
||||
): TNewIDEItemCategory;
|
||||
var
|
||||
i: LongInt;
|
||||
begin
|
||||
i := IndexOfCategory(CategoryName);
|
||||
if i >= 0 then
|
||||
Result := nil // TODO
|
||||
Result := nil // ToDo
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
|
@ -51,6 +51,8 @@ type
|
||||
procedure Add(ATemplate: TNewIDEItemTemplate); virtual; abstract;
|
||||
function LocalizedName: string; virtual; abstract;
|
||||
function Description: string; virtual; abstract;
|
||||
function IndexOfTemplate(const TemplateName: string): integer; virtual; abstract;
|
||||
function FindTemplateByName(const TemplateName: string): TNewIDEItemTemplate; virtual; abstract;
|
||||
function IndexOfCategory(const CategoryName: string): integer; virtual; abstract;
|
||||
function FindCategoryByName(const CategoryName: string): TNewIDEItemCategory; virtual; abstract;
|
||||
public
|
||||
|
Loading…
Reference in New Issue
Block a user