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