implemented auto loading forms on open

git-svn-id: trunk@3911 -
This commit is contained in:
mattias 2003-03-11 11:00:08 +00:00
parent 5d4cf435f6
commit b0caf8f20a

View File

@ -159,7 +159,7 @@ type
FGuideLineColorRightBottom: TColor; FGuideLineColorRightBottom: TColor;
FShowComponentCaptions: boolean; FShowComponentCaptions: boolean;
FShowEditorHints: boolean; FShowEditorHints: boolean;
FAutoCreateForms: boolean; FAutoCreateFormsOnOpen: boolean;
FGrabberColor: TColor; FGrabberColor: TColor;
FMarkerColor: TColor; FMarkerColor: TColor;
FRubberbandSelectionColor: TColor; FRubberbandSelectionColor: TColor;
@ -225,23 +225,23 @@ type
procedure SetLazarusDefaultFilename; procedure SetLazarusDefaultFilename;
procedure GetDefaultFPCSourceDirectory; procedure GetDefaultFPCSourceDirectory;
property OnApplyWindowLayout: TOnApplyIDEWindowLayout property OnApplyWindowLayout: TOnApplyIDEWindowLayout
read FOnApplyWindowLayout write SetOnApplyWindowLayout; read FOnApplyWindowLayout write SetOnApplyWindowLayout;
// auto save // auto save
property AutoSaveEditorFiles: boolean property AutoSaveEditorFiles: boolean read FAutoSaveEditorFiles
read FAutoSaveEditorFiles write FAutoSaveEditorFiles; write FAutoSaveEditorFiles;
property AutoSaveProject: boolean property AutoSaveProject: boolean read FAutoSaveProject
read FAutoSaveProject write FAutoSaveProject; write FAutoSaveProject;
property AutoSaveIntervalInSecs: integer property AutoSaveIntervalInSecs: integer read FAutoSaveIntervalInSecs
read FAutoSaveIntervalInSecs write FAutoSaveIntervalInSecs; write FAutoSaveIntervalInSecs;
// windows // windows
property IDEWindowLayoutList: TIDEWindowLayoutList property IDEWindowLayoutList: TIDEWindowLayoutList
read FIDEWindowLayoutList write FIDEWindowLayoutList; read FIDEWindowLayoutList write FIDEWindowLayoutList;
property IDEDialogLayoutList: TIDEDialogLayoutList property IDEDialogLayoutList: TIDEDialogLayoutList
read FIDEDialogLayoutList write FIDEDialogLayoutList; read FIDEDialogLayoutList write FIDEDialogLayoutList;
property MinimizeAllOnMinimizeMain: boolean property MinimizeAllOnMinimizeMain: boolean read FMinimizeAllOnMinimizeMain
read FMinimizeAllOnMinimizeMain write FMinimizeAllOnMinimizeMain; write FMinimizeAllOnMinimizeMain;
// form editor // form editor
property ShowGrid: boolean read FShowGrid write FShowGrid; property ShowGrid: boolean read FShowGrid write FShowGrid;
@ -250,93 +250,98 @@ type
property GridSizeX: integer read FGridSizeX write FGridSizeX; property GridSizeX: integer read FGridSizeX write FGridSizeX;
property GridSizeY: integer read FGridSizeY write FGridSizeY; property GridSizeY: integer read FGridSizeY write FGridSizeY;
property ShowGuideLines: boolean read FShowGuideLines write FShowGuideLines; property ShowGuideLines: boolean read FShowGuideLines write FShowGuideLines;
property SnapToGuideLines: boolean read FSnapToGuideLines write FSnapToGuideLines; property SnapToGuideLines: boolean
property GuideLineColorLeftTop: TColor read FSnapToGuideLines write FSnapToGuideLines;
read FGuideLineColorLeftTop write FGuideLineColorLeftTop; property GuideLineColorLeftTop: TColor read FGuideLineColorLeftTop
property GuideLineColorRightBottom: TColor write FGuideLineColorLeftTop;
read FGuideLineColorRightBottom write FGuideLineColorRightBottom; property GuideLineColorRightBottom: TColor read FGuideLineColorRightBottom
write FGuideLineColorRightBottom;
property ShowComponentCaptions: boolean property ShowComponentCaptions: boolean
read FShowComponentCaptions write FShowComponentCaptions; read FShowComponentCaptions write FShowComponentCaptions;
property ShowEditorHints: boolean read FShowEditorHints write FShowEditorHints; property ShowEditorHints: boolean read FShowEditorHints
property AutoCreateForms: boolean read FAutoCreateForms write FAutoCreateForms; write FShowEditorHints;
property AutoCreateFormsOnOpen: boolean read FAutoCreateFormsOnOpen
write FAutoCreateFormsOnOpen;
property GrabberColor: TColor read FGrabberColor write FGrabberColor; property GrabberColor: TColor read FGrabberColor write FGrabberColor;
property MarkerColor: TColor read FMarkerColor write FMarkerColor; property MarkerColor: TColor read FMarkerColor write FMarkerColor;
property RubberbandSelectionColor: TColor property RubberbandSelectionColor: TColor read FRubberbandSelectionColor
read FRubberbandSelectionColor write FRubberbandSelectionColor; write FRubberbandSelectionColor;
property RubberbandCreationColor: TColor property RubberbandCreationColor: TColor read FRubberbandCreationColor
read FRubberbandCreationColor write FRubberbandCreationColor; write FRubberbandCreationColor;
property RubberbandSelectsGrandChilds: boolean property RubberbandSelectsGrandChilds: boolean
read FRubberbandSelectsGrandChilds write FRubberbandSelectsGrandChilds; read FRubberbandSelectsGrandChilds
write FRubberbandSelectsGrandChilds;
// object inspector // object inspector
property ObjectInspectorOptions: TOIOptions property ObjectInspectorOptions: TOIOptions read FObjectInspectorOptions
read FObjectInspectorOptions write FObjectInspectorOptions; write FObjectInspectorOptions;
// hints // hints
property ShowHintsForComponentPalette: boolean property ShowHintsForComponentPalette: boolean
read FShowHintsForComponentPalette write FShowHintsForComponentPalette; read FShowHintsForComponentPalette
write FShowHintsForComponentPalette;
property ShowHintsForMainSpeedButtons: boolean property ShowHintsForMainSpeedButtons: boolean
read FShowHintsForMainSpeedButtons write FShowHintsForMainSpeedButtons; read FShowHintsForMainSpeedButtons
write FShowHintsForMainSpeedButtons;
// files // files
property LazarusDirectory: string property LazarusDirectory: string read FLazarusDirectory
read FLazarusDirectory write FLazarusDirectory; write FLazarusDirectory;
property LazarusDirHistory: TStringList property LazarusDirHistory: TStringList read FLazarusDirsHistory
read FLazarusDirsHistory write FLazarusDirsHistory; write FLazarusDirsHistory;
property CompilerFilename: string property CompilerFilename: string read FCompilerFilename
read FCompilerFilename write FCompilerFilename; write FCompilerFilename;
property CompilerFileHistory: TStringList property CompilerFileHistory: TStringList read FCompilerFileHistory
read FCompilerFileHistory write FCompilerFileHistory; write FCompilerFileHistory;
property FPCSourceDirectory: string property FPCSourceDirectory: string read FFPCSourceDirectory
read FFPCSourceDirectory write FFPCSourceDirectory; write FFPCSourceDirectory;
property FPCSourceDirHistory: TStringList property FPCSourceDirHistory: TStringList read FFPCSourceDirHistory
read FFPCSourceDirHistory write FFPCSourceDirHistory; write FFPCSourceDirHistory;
property DebuggerFilename: string property DebuggerFilename: string read FDebuggerFilename
read FDebuggerFilename write FDebuggerFilename; write FDebuggerFilename;
property DebuggerFileHistory: TStringList property DebuggerFileHistory: TStringList read FDebuggerFileHistory
read FDebuggerFileHistory write FDebuggerFileHistory; write FDebuggerFileHistory;
property DebuggerType: TDebuggerType property DebuggerType: TDebuggerType read FDebuggerType write FDebuggerType;
read FDebuggerType write FDebuggerType; property TestBuildDirectory: string read FTestBuildDirectory
property TestBuildDirectory: string write FTestBuildDirectory;
read FTestBuildDirectory write FTestBuildDirectory; property TestBuildDirHistory: TStringList read FTestBuildDirHistory
property TestBuildDirHistory: TStringList write FTestBuildDirHistory;
read FTestBuildDirHistory write FTestBuildDirHistory;
// recent files and directories // recent files and directories
property RecentOpenFiles: TStringList property RecentOpenFiles: TStringList read FRecentOpenFiles
read FRecentOpenFiles write FRecentOpenFiles; write FRecentOpenFiles;
property MaxRecentOpenFiles: integer property MaxRecentOpenFiles: integer read FMaxRecentOpenFiles
read FMaxRecentOpenFiles write FMaxRecentOpenFiles; write FMaxRecentOpenFiles;
procedure AddToRecentOpenFiles(const AFilename: string); procedure AddToRecentOpenFiles(const AFilename: string);
procedure RemoveFromRecentOpenFiles(const AFilename: string); procedure RemoveFromRecentOpenFiles(const AFilename: string);
property RecentProjectFiles: TStringList property RecentProjectFiles: TStringList read FRecentProjectFiles
read FRecentProjectFiles write FRecentProjectFiles; write FRecentProjectFiles;
property MaxRecentProjectFiles: integer property MaxRecentProjectFiles: integer read FMaxRecentProjectFiles
read FMaxRecentProjectFiles write FMaxRecentProjectFiles; write FMaxRecentProjectFiles;
procedure AddToRecentProjectFiles(const AFilename: string); procedure AddToRecentProjectFiles(const AFilename: string);
procedure RemoveFromRecentProjectFiles(const AFilename: string); procedure RemoveFromRecentProjectFiles(const AFilename: string);
property LastSavedProjectFile: string property LastSavedProjectFile: string read FLastSavedProjectFile
read FLastSavedProjectFile write FLastSavedProjectFile; write FLastSavedProjectFile;
property OpenLastProjectAtStart: boolean property OpenLastProjectAtStart: boolean read FOpenLastProjectAtStart
read FOpenLastProjectAtStart write FOpenLastProjectAtStart; write FOpenLastProjectAtStart;
// backup // backup
property BackupInfoProjectFiles: TBackupInfo property BackupInfoProjectFiles: TBackupInfo read FBackupInfoProjectFiles
read FBackupInfoProjectFiles write FBackupInfoProjectFiles; write FBackupInfoProjectFiles;
property BackupInfoOtherFiles: TBackupInfo property BackupInfoOtherFiles: TBackupInfo read FBackupInfoOtherFiles
read FBackupInfoOtherFiles write FBackupInfoOtherFiles; write FBackupInfoOtherFiles;
// external tools // external tools
property ExternalTools: TExternalToolList property ExternalTools: TExternalToolList read fExternalTools
read fExternalTools write fExternalTools; write fExternalTools;
// naming conventions // naming conventions
property PascalFileExtension: TPascalExtType property PascalFileExtension: TPascalExtType read fPascalFileExtension
read fPascalFileExtension write fPascalFileExtension; write fPascalFileExtension;
property PascalFileLowerCase: boolean property PascalFileLowerCase: boolean read fPascalFileLowerCase
read fPascalFileLowerCase write fPascalFileLowerCase; write fPascalFileLowerCase;
property AmbigiousFileAction: TAmbigiousFileAction property AmbigiousFileAction: TAmbigiousFileAction read fAmbigiousFileAction
read fAmbigiousFileAction write fAmbigiousFileAction; write fAmbigiousFileAction;
// language // language
property Language: TLazarusLanguage read fLanguage write fLanguage; property Language: TLazarusLanguage read fLanguage write fLanguage;
@ -404,7 +409,7 @@ type
FormEditMiscGroupBox: TGroupBox; FormEditMiscGroupBox: TGroupBox;
ShowComponentCaptionsCheckBox: TCheckBox; ShowComponentCaptionsCheckBox: TCheckBox;
ShowEditorHintsCheckBox: TCheckBox; ShowEditorHintsCheckBox: TCheckBox;
AutoCreateFormsCheckBox: TCheckBox; AutoCreateFormsOnOpenCheckBox: TCheckBox;
GrabberColorLabel: TLabel; GrabberColorLabel: TLabel;
GrabberColorButton: TColorButton; GrabberColorButton: TColorButton;
MarkerColorLabel: TLabel; MarkerColorLabel: TLabel;
@ -656,7 +661,7 @@ begin
FGuideLineColorRightBottom:=clGreen; FGuideLineColorRightBottom:=clGreen;
FShowComponentCaptions:=false; FShowComponentCaptions:=false;
FShowEditorHints:=true; FShowEditorHints:=true;
FAutoCreateForms:=true; FAutoCreateFormsOnOpen:=true;
FGrabberColor:=clBlack; FGrabberColor:=clBlack;
FMarkerColor:=clDkGray; FMarkerColor:=clDkGray;
FRubberbandSelectionColor:=clNavy; FRubberbandSelectionColor:=clNavy;
@ -867,8 +872,8 @@ begin
'EnvironmentOptions/FormEditor/ShowComponentCaptions',FShowComponentCaptions); 'EnvironmentOptions/FormEditor/ShowComponentCaptions',FShowComponentCaptions);
FShowEditorHints:=XMLConfig.GetValue( FShowEditorHints:=XMLConfig.GetValue(
'EnvironmentOptions/FormEditor/ShowEditorHints',FShowEditorHints); 'EnvironmentOptions/FormEditor/ShowEditorHints',FShowEditorHints);
FAutoCreateForms:=XMLConfig.GetValue( FAutoCreateFormsOnOpen:=XMLConfig.GetValue(
'EnvironmentOptions/FormEditor/AutoCreateForms',FAutoCreateForms); 'EnvironmentOptions/FormEditor/AutoCreateFormsOnOpen',FAutoCreateFormsOnOpen);
FGrabberColor:=XMLConfig.GetValue( FGrabberColor:=XMLConfig.GetValue(
'EnvironmentOptions/FormEditor/GrabberColor/Value',FGrabberColor); 'EnvironmentOptions/FormEditor/GrabberColor/Value',FGrabberColor);
FMarkerColor:=XMLConfig.GetValue( FMarkerColor:=XMLConfig.GetValue(
@ -1073,7 +1078,7 @@ begin
XMLConfig.SetValue( XMLConfig.SetValue(
'EnvironmentOptions/FormEditor/ShowEditorHints',FShowEditorHints); 'EnvironmentOptions/FormEditor/ShowEditorHints',FShowEditorHints);
XMLConfig.SetValue( XMLConfig.SetValue(
'EnvironmentOptions/FormEditor/AutoCreateForms',FAutoCreateForms); 'EnvironmentOptions/FormEditor/AutoCreateFormsOnOpen',FAutoCreateFormsOnOpen);
XMLConfig.SetValue( XMLConfig.SetValue(
'EnvironmentOptions/FormEditor/GrabberColor/Value',FGrabberColor); 'EnvironmentOptions/FormEditor/GrabberColor/Value',FGrabberColor);
XMLConfig.SetValue( XMLConfig.SetValue(
@ -2268,9 +2273,9 @@ procedure TEnvironmentOptionsDialog.SetupFormEditorPage(Page: integer);
Caption:=dlgShowEdrHints; Caption:=dlgShowEdrHints;
end; end;
AutoCreateFormsCheckBox:=TCheckBox.Create(Self); AutoCreateFormsOnOpenCheckBox:=TCheckBox.Create(Self);
with AutoCreateFormsCheckBox do begin with AutoCreateFormsOnOpenCheckBox do begin
Name:='AutoCreateFormsCheckBox'; Name:='AutoCreateFormsOnOpenCheckBox';
Parent:=FormEditMiscGroupBox; Parent:=FormEditMiscGroupBox;
Top:=ShowEditorHintsCheckBox.Top+ShowEditorHintsCheckBox.Height+5; Top:=ShowEditorHintsCheckBox.Top+ShowEditorHintsCheckBox.Height+5;
Left:=ShowEditorHintsCheckBox.Left; Left:=ShowEditorHintsCheckBox.Left;
@ -2968,7 +2973,7 @@ begin
ShowComponentCaptionsCheckBox.Width,Height); ShowComponentCaptionsCheckBox.Width,Height);
end; end;
with AutoCreateFormsCheckBox do begin with AutoCreateFormsOnOpenCheckBox do begin
SetBounds(ShowEditorHintsCheckBox.Left, SetBounds(ShowEditorHintsCheckBox.Left,
ShowEditorHintsCheckBox.Top+ShowEditorHintsCheckBox.Height+5, ShowEditorHintsCheckBox.Top+ShowEditorHintsCheckBox.Height+5,
ShowEditorHintsCheckBox.Width,Height); ShowEditorHintsCheckBox.Width,Height);
@ -3253,7 +3258,7 @@ begin
GuideLineColorRightBottomButton.ButtonColor:=GuideLineColorRightBottom; GuideLineColorRightBottomButton.ButtonColor:=GuideLineColorRightBottom;
ShowComponentCaptionsCheckBox.Checked:=ShowComponentCaptions; ShowComponentCaptionsCheckBox.Checked:=ShowComponentCaptions;
ShowEditorHintsCheckBox.Checked:=ShowEditorHints; ShowEditorHintsCheckBox.Checked:=ShowEditorHints;
AutoCreateFormsCheckBox.Checked:=AutoCreateForms; AutoCreateFormsOnOpenCheckBox.Checked:=AutoCreateFormsOnOpen;
GrabberColorButton.ButtonColor:=GrabberColor; GrabberColorButton.ButtonColor:=GrabberColor;
MarkerColorButton.ButtonColor:=MarkerColor; MarkerColorButton.ButtonColor:=MarkerColor;
RubberbandSelectColorButton.ButtonColor:=RubberbandSelectionColor; RubberbandSelectColorButton.ButtonColor:=RubberbandSelectionColor;
@ -3379,7 +3384,7 @@ begin
GuideLineColorRightBottom:=GuideLineColorRightBottomButton.ButtonColor; GuideLineColorRightBottom:=GuideLineColorRightBottomButton.ButtonColor;
ShowComponentCaptions:=ShowComponentCaptionsCheckBox.Checked; ShowComponentCaptions:=ShowComponentCaptionsCheckBox.Checked;
ShowEditorHints:=ShowEditorHintsCheckBox.Checked; ShowEditorHints:=ShowEditorHintsCheckBox.Checked;
AutoCreateForms:=AutoCreateFormsCheckBox.Checked; AutoCreateFormsOnOpen:=AutoCreateFormsOnOpenCheckBox.Checked;
GrabberColor:=GrabberColorButton.ButtonColor; GrabberColor:=GrabberColorButton.ButtonColor;
MarkerColor:=MarkerColorButton.ButtonColor; MarkerColor:=MarkerColorButton.ButtonColor;
RubberbandSelectionColor:=RubberbandSelectColorButton.ButtonColor; RubberbandSelectionColor:=RubberbandSelectColorButton.ButtonColor;