mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 13:28:59 +01:00
implemented ProjectOpt: AutoCreateNewForms, added designer Show Options
git-svn-id: trunk@3910 -
This commit is contained in:
parent
6abca254c5
commit
5d4cf435f6
@ -95,7 +95,7 @@ var
|
|||||||
TheProcess : TProcess;
|
TheProcess : TProcess;
|
||||||
begin
|
begin
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
if AProject.MainUnit<0 then exit;
|
if AProject.MainUnitID<0 then exit;
|
||||||
OldCurDir:=GetCurrentDir;
|
OldCurDir:=GetCurrentDir;
|
||||||
if AProject.IsVirtual then
|
if AProject.IsVirtual then
|
||||||
ProjectFilename:=DefaultFilename
|
ProjectFilename:=DefaultFilename
|
||||||
@ -189,6 +189,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.39 2003/03/11 09:57:51 mattias
|
||||||
|
implemented ProjectOpt: AutoCreateNewForms, added designer Show Options
|
||||||
|
|
||||||
Revision 1.38 2003/01/06 10:51:40 mattias
|
Revision 1.38 2003/01/06 10:51:40 mattias
|
||||||
freeing stopped external tools
|
freeing stopped external tools
|
||||||
|
|
||||||
|
|||||||
@ -463,7 +463,7 @@ begin
|
|||||||
WriteLN('[TDebugManager.DoInitDebugger] A');
|
WriteLN('[TDebugManager.DoInitDebugger] A');
|
||||||
|
|
||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
if Project1.MainUnit < 0 then Exit;
|
if Project1.MainUnitID < 0 then Exit;
|
||||||
|
|
||||||
LaunchingCmdLine:=MainIDE.GetRunCommandLine;
|
LaunchingCmdLine:=MainIDE.GetRunCommandLine;
|
||||||
SplitCmdLine(LaunchingCmdLine,LaunchingApplication,LaunchingParams);
|
SplitCmdLine(LaunchingCmdLine,LaunchingApplication,LaunchingParams);
|
||||||
@ -671,6 +671,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.11 2003/03/11 09:57:51 mattias
|
||||||
|
implemented ProjectOpt: AutoCreateNewForms, added designer Show Options
|
||||||
|
|
||||||
Revision 1.10 2002/12/09 16:48:34 mattias
|
Revision 1.10 2002/12/09 16:48:34 mattias
|
||||||
added basic file handling functions to filectrl
|
added basic file handling functions to filectrl
|
||||||
|
|
||||||
|
|||||||
@ -470,9 +470,23 @@ type
|
|||||||
OkButton: TButton;
|
OkButton: TButton;
|
||||||
CancelButton: TButton;
|
CancelButton: TButton;
|
||||||
|
|
||||||
|
procedure BackupOtherGroupBoxResize(Sender: TObject);
|
||||||
|
procedure BackupProjectGroupBoxResize(Sender: TObject);
|
||||||
procedure BakTypeRadioGroupClick(Sender: TObject);
|
procedure BakTypeRadioGroupClick(Sender: TObject);
|
||||||
|
procedure FormEditMiscGroupBoxResize(Sender: TObject);
|
||||||
|
procedure GridGroupBoxResize(Sender: TObject);
|
||||||
|
procedure GuideLinesGroupBoxResize(Sender: TObject);
|
||||||
|
procedure OIMiscGroupBoxResize(Sender: TObject);
|
||||||
|
procedure ObjectInspectorColorsGroupBoxResize(Sender: TObject);
|
||||||
procedure OkButtonClick(Sender: TObject);
|
procedure OkButtonClick(Sender: TObject);
|
||||||
procedure CancelButtonClick(Sender: TObject);
|
procedure CancelButtonClick(Sender: TObject);
|
||||||
|
procedure OnBackupPageResize(Sender: TObject);
|
||||||
|
procedure OnDesktopPageResize(Sender: TObject);
|
||||||
|
procedure OnFilesPageResize(Sender: TObject);
|
||||||
|
procedure OnFormEditorPageResize(Sender: TObject);
|
||||||
|
procedure OnNamingPageResize(Sender: TObject);
|
||||||
|
procedure OnObjectInspectorPageResize(Sender: TObject);
|
||||||
|
procedure RubberbandGroupBoxResize(Sender: TObject);
|
||||||
procedure SaveDesktopSettingsToFileButtonClick(Sender: TObject);
|
procedure SaveDesktopSettingsToFileButtonClick(Sender: TObject);
|
||||||
procedure LoadDesktopSettingsFromFileButtonClick(Sender: TObject);
|
procedure LoadDesktopSettingsFromFileButtonClick(Sender: TObject);
|
||||||
procedure WindowPositionsListBoxMouseUp(Sender:TObject;
|
procedure WindowPositionsListBoxMouseUp(Sender:TObject;
|
||||||
@ -1316,6 +1330,8 @@ procedure TEnvironmentOptionsDialog.SetupDesktopPage(Page: integer);
|
|||||||
var MaxX:integer;
|
var MaxX:integer;
|
||||||
l: TLazarusLanguage;
|
l: TLazarusLanguage;
|
||||||
begin
|
begin
|
||||||
|
NoteBook.Page[Page].OnResize:=@OnDesktopPageResize;
|
||||||
|
|
||||||
MaxX:=ClientWidth-5;
|
MaxX:=ClientWidth-5;
|
||||||
|
|
||||||
// language
|
// language
|
||||||
@ -1350,7 +1366,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// auto save
|
// auto save
|
||||||
@ -1412,7 +1427,6 @@ begin
|
|||||||
Left:=AutoSaveIntervalInSecsLabel.Left+AutoSaveIntervalInSecsLabel.Width+5;
|
Left:=AutoSaveIntervalInSecsLabel.Left+AutoSaveIntervalInSecsLabel.Width+5;
|
||||||
Top:=AutoSaveIntervalInSecsLabel.Top+2;
|
Top:=AutoSaveIntervalInSecsLabel.Top+2;
|
||||||
Width:=AutoSaveGroupBox.ClientWidth-Left-10;
|
Width:=AutoSaveGroupBox.ClientWidth-Left-10;
|
||||||
Height:=23;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add('1200');
|
Add('1200');
|
||||||
@ -1422,7 +1436,6 @@ begin
|
|||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Enabled:=false;
|
Enabled:=false;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// desktop files
|
// desktop files
|
||||||
@ -1546,6 +1559,8 @@ end;
|
|||||||
procedure TEnvironmentOptionsDialog.SetupBackupPage(Page: integer);
|
procedure TEnvironmentOptionsDialog.SetupBackupPage(Page: integer);
|
||||||
var MaxX:integer;
|
var MaxX:integer;
|
||||||
begin
|
begin
|
||||||
|
NoteBook.Page[Page].OnResize:=@OnBackupPageResize;
|
||||||
|
|
||||||
MaxX:=ClientWidth-5;
|
MaxX:=ClientWidth-5;
|
||||||
|
|
||||||
BackupHelpLabel:=TLabel.Create(Self);
|
BackupHelpLabel:=TLabel.Create(Self);
|
||||||
@ -1557,7 +1572,6 @@ begin
|
|||||||
Width:=MaxX-Left*2;
|
Width:=MaxX-Left*2;
|
||||||
Height:=23;
|
Height:=23;
|
||||||
Caption:=dlgEnvBackupHelpNote;
|
Caption:=dlgEnvBackupHelpNote;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
BackupProjectGroupBox:=TGroupBox.Create(Self);
|
BackupProjectGroupBox:=TGroupBox.Create(Self);
|
||||||
@ -1569,7 +1583,7 @@ begin
|
|||||||
Width:=(MaxX div 2) - 11;
|
Width:=(MaxX div 2) - 11;
|
||||||
Height:=260;
|
Height:=260;
|
||||||
Caption:=dlgProjFiles;
|
Caption:=dlgProjFiles;
|
||||||
Visible:=true;
|
OnResize:=@BackupProjectGroupBoxResize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
BakProjTypeRadioGroup:=TRadioGroup.Create(Self);
|
BakProjTypeRadioGroup:=TRadioGroup.Create(Self);
|
||||||
@ -1614,14 +1628,12 @@ begin
|
|||||||
Left:=BakProjAddExtLabel.Left+BakProjAddExtLabel.Width+2;
|
Left:=BakProjAddExtLabel.Left+BakProjAddExtLabel.Width+2;
|
||||||
Top:=BakProjAddExtLabel.Top;
|
Top:=BakProjAddExtLabel.Top;
|
||||||
Width:=60;
|
Width:=60;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add('bak');
|
Add('bak');
|
||||||
Add('old');
|
Add('old');
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
BakProjMaxCounterLabel:=TLabel.Create(Self);
|
BakProjMaxCounterLabel:=TLabel.Create(Self);
|
||||||
@ -1643,7 +1655,6 @@ begin
|
|||||||
Left:=BakProjMaxCounterLabel.Left+BakProjMaxCounterLabel.Width+2;
|
Left:=BakProjMaxCounterLabel.Left+BakProjMaxCounterLabel.Width+2;
|
||||||
Top:=BakProjMaxCounterLabel.Top;
|
Top:=BakProjMaxCounterLabel.Top;
|
||||||
Width:=100;
|
Width:=100;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add('1');
|
Add('1');
|
||||||
@ -1654,7 +1665,6 @@ begin
|
|||||||
Add(BakMaxCounterInfiniteTxt);
|
Add(BakMaxCounterInfiniteTxt);
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
BakProjSubDirLabel:=TLabel.Create(Self);
|
BakProjSubDirLabel:=TLabel.Create(Self);
|
||||||
@ -1676,14 +1686,12 @@ begin
|
|||||||
Left:=BakProjSubDirLabel.Left+BakProjSubDirLabel.Width+2;
|
Left:=BakProjSubDirLabel.Left+BakProjSubDirLabel.Width+2;
|
||||||
Top:=BakProjSubDirLabel.Top;
|
Top:=BakProjSubDirLabel.Top;
|
||||||
Width:=100;
|
Width:=100;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add(BakNoSubDirTxt);
|
Add(BakNoSubDirTxt);
|
||||||
Add('backup');
|
Add('backup');
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
BackupOtherGroupBox:=TGroupBox.Create(Self);
|
BackupOtherGroupBox:=TGroupBox.Create(Self);
|
||||||
@ -1695,7 +1703,7 @@ begin
|
|||||||
Width:=(MaxX div 2) - 11;
|
Width:=(MaxX div 2) - 11;
|
||||||
Height:=260;
|
Height:=260;
|
||||||
Caption:=dlgEnvOtherFiles;
|
Caption:=dlgEnvOtherFiles;
|
||||||
Visible:=true;
|
OnResize:=@BackupOtherGroupBoxResize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
BakOtherTypeRadioGroup:=TRadioGroup.Create(Self);
|
BakOtherTypeRadioGroup:=TRadioGroup.Create(Self);
|
||||||
@ -1740,14 +1748,12 @@ begin
|
|||||||
Left:=BakOtherAddExtLabel.Left+BakOtherAddExtLabel.Width+2;
|
Left:=BakOtherAddExtLabel.Left+BakOtherAddExtLabel.Width+2;
|
||||||
Top:=BakOtherAddExtLabel.Top;
|
Top:=BakOtherAddExtLabel.Top;
|
||||||
Width:=60;
|
Width:=60;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add('bak');
|
Add('bak');
|
||||||
Add('old');
|
Add('old');
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
BakOtherMaxCounterLabel:=TLabel.Create(Self);
|
BakOtherMaxCounterLabel:=TLabel.Create(Self);
|
||||||
@ -1769,7 +1775,6 @@ begin
|
|||||||
Left:=BakOtherMaxCounterLabel.Left+BakOtherMaxCounterLabel.Width+2;
|
Left:=BakOtherMaxCounterLabel.Left+BakOtherMaxCounterLabel.Width+2;
|
||||||
Top:=BakOtherMaxCounterLabel.Top;
|
Top:=BakOtherMaxCounterLabel.Top;
|
||||||
Width:=100;
|
Width:=100;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add('1');
|
Add('1');
|
||||||
@ -1780,7 +1785,6 @@ begin
|
|||||||
Add(BakMaxCounterInfiniteTxt);
|
Add(BakMaxCounterInfiniteTxt);
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
BakOtherSubDirLabel:=TLabel.Create(Self);
|
BakOtherSubDirLabel:=TLabel.Create(Self);
|
||||||
@ -1802,14 +1806,12 @@ begin
|
|||||||
Left:=BakOtherSubDirLabel.Left+BakOtherSubDirLabel.Width+2;
|
Left:=BakOtherSubDirLabel.Left+BakOtherSubDirLabel.Width+2;
|
||||||
Top:=BakOtherSubDirLabel.Top;
|
Top:=BakOtherSubDirLabel.Top;
|
||||||
Width:=100;
|
Width:=100;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add(dlgBakDirectory);
|
Add(dlgBakDirectory);
|
||||||
Add('backup');
|
Add('backup');
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1817,6 +1819,8 @@ procedure TEnvironmentOptionsDialog.SetupFilesPage(Page: integer);
|
|||||||
var MaxX:integer;
|
var MaxX:integer;
|
||||||
ADebuggerType: TDebuggerType;
|
ADebuggerType: TDebuggerType;
|
||||||
begin
|
begin
|
||||||
|
NoteBook.Page[Page].OnResize:=@OnFilesPageResize;
|
||||||
|
|
||||||
MaxX:=ClientWidth-5;
|
MaxX:=ClientWidth-5;
|
||||||
|
|
||||||
MaxRecentOpenFilesLabel:=TLabel.Create(Self);
|
MaxRecentOpenFilesLabel:=TLabel.Create(Self);
|
||||||
@ -1838,7 +1842,6 @@ begin
|
|||||||
Left:=MaxRecentOpenFilesLabel.Left+MaxRecentOpenFilesLabel.Width+2;
|
Left:=MaxRecentOpenFilesLabel.Left+MaxRecentOpenFilesLabel.Width+2;
|
||||||
Top:=MaxRecentOpenFilesLabel.Top;
|
Top:=MaxRecentOpenFilesLabel.Top;
|
||||||
Width:=60;
|
Width:=60;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add('5');
|
Add('5');
|
||||||
@ -1849,7 +1852,6 @@ begin
|
|||||||
Add('30');
|
Add('30');
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
MaxRecentProjectFilesLabel:=TLabel.Create(Self);
|
MaxRecentProjectFilesLabel:=TLabel.Create(Self);
|
||||||
@ -1871,7 +1873,6 @@ begin
|
|||||||
Left:=MaxRecentProjectFilesLabel.Left+MaxRecentProjectFilesLabel.Width+2;
|
Left:=MaxRecentProjectFilesLabel.Left+MaxRecentProjectFilesLabel.Width+2;
|
||||||
Top:=MaxRecentProjectFilesLabel.Top;
|
Top:=MaxRecentProjectFilesLabel.Top;
|
||||||
Width:=60;
|
Width:=60;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add('5');
|
Add('5');
|
||||||
@ -1882,7 +1883,6 @@ begin
|
|||||||
Add('30');
|
Add('30');
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OpenLastProjectAtStartCheckBox:=TCheckBox.Create(Self);
|
OpenLastProjectAtStartCheckBox:=TCheckBox.Create(Self);
|
||||||
@ -1917,13 +1917,11 @@ begin
|
|||||||
Left:=LazarusDirLabel.Left;
|
Left:=LazarusDirLabel.Left;
|
||||||
Top:=LazarusDirLabel.Top+LazarusDirLabel.Height+2;
|
Top:=LazarusDirLabel.Top+LazarusDirLabel.Height+2;
|
||||||
Width:=LazarusDirLabel.Width;
|
Width:=LazarusDirLabel.Width;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add(ProgramDirectory);
|
Add(ProgramDirectory);
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
CompilerPathLabel:=TLabel.Create(Self);
|
CompilerPathLabel:=TLabel.Create(Self);
|
||||||
@ -1945,14 +1943,12 @@ begin
|
|||||||
Left:=LazarusDirLabel.Left;
|
Left:=LazarusDirLabel.Left;
|
||||||
Top:=CompilerPathLabel.Top+CompilerPathLabel.Height+2;
|
Top:=CompilerPathLabel.Top+CompilerPathLabel.Height+2;
|
||||||
Width:=LazarusDirLabel.Width;
|
Width:=LazarusDirLabel.Width;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add('/usr/bin/ppc386');
|
Add('/usr/bin/ppc386');
|
||||||
Add('/opt/fpc/ppc386');
|
Add('/opt/fpc/ppc386');
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FPCSourceDirLabel:=TLabel.Create(Self);
|
FPCSourceDirLabel:=TLabel.Create(Self);
|
||||||
@ -1974,13 +1970,11 @@ begin
|
|||||||
Left:=LazarusDirLabel.Left;
|
Left:=LazarusDirLabel.Left;
|
||||||
Top:=FPCSourceDirLabel.Top+FPCSourceDirLabel.Height+2;
|
Top:=FPCSourceDirLabel.Top+FPCSourceDirLabel.Height+2;
|
||||||
Width:=LazarusDirLabel.Width;
|
Width:=LazarusDirLabel.Width;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add('');
|
Add('');
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
DebuggerPathLabel:=TLabel.Create(Self);
|
DebuggerPathLabel:=TLabel.Create(Self);
|
||||||
@ -2002,14 +1996,12 @@ begin
|
|||||||
Left:=FPCSourceDirLabel.Left;
|
Left:=FPCSourceDirLabel.Left;
|
||||||
Top:=DebuggerPathLabel.Top+DebuggerPathLabel.Height+2;
|
Top:=DebuggerPathLabel.Top+DebuggerPathLabel.Height+2;
|
||||||
Width:=LazarusDirLabel.Width div 2;
|
Width:=LazarusDirLabel.Width div 2;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
for ADebuggerType:=Low(TDebuggerType) to High(TDebuggerType) do
|
for ADebuggerType:=Low(TDebuggerType) to High(TDebuggerType) do
|
||||||
Add(DebuggerName[ADebuggerType]);
|
Add(DebuggerName[ADebuggerType]);
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
DebuggerPathComboBox:=TComboBox.Create(Self);
|
DebuggerPathComboBox:=TComboBox.Create(Self);
|
||||||
@ -2019,14 +2011,12 @@ begin
|
|||||||
Left:=DebuggerTypeComboBox.Left+DebuggerTypeComboBox.Width+10;
|
Left:=DebuggerTypeComboBox.Left+DebuggerTypeComboBox.Width+10;
|
||||||
Top:=DebuggerTypeComboBox.Top;
|
Top:=DebuggerTypeComboBox.Top;
|
||||||
Width:=LazarusDirLabel.Width-DebuggerTypeComboBox.Width-10;
|
Width:=LazarusDirLabel.Width-DebuggerTypeComboBox.Width-10;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add(DebuggerName[dtNone]);
|
Add(DebuggerName[dtNone]);
|
||||||
Add('/opt/fpc/gdb');
|
Add('/opt/fpc/gdb');
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TestBuildDirLabel:=TLabel.Create(Self);
|
TestBuildDirLabel:=TLabel.Create(Self);
|
||||||
@ -2048,7 +2038,6 @@ begin
|
|||||||
Left:=LazarusDirLabel.Left;
|
Left:=LazarusDirLabel.Left;
|
||||||
Top:=TestBuildDirLabel.Top+TestBuildDirLabel.Height+2;
|
Top:=TestBuildDirLabel.Top+TestBuildDirLabel.Height+2;
|
||||||
Width:=LazarusDirLabel.Width;
|
Width:=LazarusDirLabel.Width;
|
||||||
Height:=25;
|
|
||||||
with Items do begin
|
with Items do begin
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
Add('/tmp');
|
Add('/tmp');
|
||||||
@ -2057,7 +2046,6 @@ begin
|
|||||||
Add('c:/windows/temp');
|
Add('c:/windows/temp');
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
Visible:=true;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2160,7 +2148,7 @@ procedure TEnvironmentOptionsDialog.SetupFormEditorPage(Page: integer);
|
|||||||
Name:='GridSizeYLabel';
|
Name:='GridSizeYLabel';
|
||||||
Parent:=GridGroupBox;
|
Parent:=GridGroupBox;
|
||||||
Left:=GridSizeXLabel.Left;
|
Left:=GridSizeXLabel.Left;
|
||||||
Top:=GridSizeXComboBox.Top+GridSizeXComboBox.Height+3;
|
Top:=GridSizeXComboBox.Top+GridSizeXComboBox.Height+5;
|
||||||
Width:=GridSizeXLabel.Width;
|
Width:=GridSizeXLabel.Width;
|
||||||
Caption:=dlgGridY;
|
Caption:=dlgGridY;
|
||||||
end;
|
end;
|
||||||
@ -2294,7 +2282,7 @@ procedure TEnvironmentOptionsDialog.SetupFormEditorPage(Page: integer);
|
|||||||
with GrabberColorButton do begin
|
with GrabberColorButton do begin
|
||||||
Name:='GrabberColorButton';
|
Name:='GrabberColorButton';
|
||||||
Parent:=FormEditMiscGroupBox;
|
Parent:=FormEditMiscGroupBox;
|
||||||
Left:=200;
|
Left:=250;
|
||||||
Top:=0;
|
Top:=0;
|
||||||
Width:=50;
|
Width:=50;
|
||||||
Height:=25;
|
Height:=25;
|
||||||
@ -2305,7 +2293,7 @@ procedure TEnvironmentOptionsDialog.SetupFormEditorPage(Page: integer);
|
|||||||
Name:='GrabberColorLabel';
|
Name:='GrabberColorLabel';
|
||||||
Parent:=FormEditMiscGroupBox;
|
Parent:=FormEditMiscGroupBox;
|
||||||
Left:=GrabberColorButton.Left+GrabberColorButton.Width+5;
|
Left:=GrabberColorButton.Left+GrabberColorButton.Width+5;
|
||||||
Top:=GrabberColorButton.Top+2;
|
Top:=GrabberColorButton.Top+5;
|
||||||
Width:=110;
|
Width:=110;
|
||||||
Caption:=dlgGrabberColor;
|
Caption:=dlgGrabberColor;
|
||||||
end;
|
end;
|
||||||
@ -2325,7 +2313,7 @@ procedure TEnvironmentOptionsDialog.SetupFormEditorPage(Page: integer);
|
|||||||
Name:='MarkerColorLabel';
|
Name:='MarkerColorLabel';
|
||||||
Parent:=FormEditMiscGroupBox;
|
Parent:=FormEditMiscGroupBox;
|
||||||
Left:=MarkerColorButton.Left+MarkerColorButton.Width+5;
|
Left:=MarkerColorButton.Left+MarkerColorButton.Width+5;
|
||||||
Top:=MarkerColorButton.Top+2;
|
Top:=MarkerColorButton.Top+5;
|
||||||
Width:=110;
|
Width:=110;
|
||||||
Caption:=dlgMarkerColor;
|
Caption:=dlgMarkerColor;
|
||||||
end;
|
end;
|
||||||
@ -2386,6 +2374,8 @@ procedure TEnvironmentOptionsDialog.SetupFormEditorPage(Page: integer);
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
// form editor page
|
// form editor page
|
||||||
|
NoteBook.Page[Page].OnResize:=@OnFormEditorPageResize;
|
||||||
|
|
||||||
GridGroupBox:=TGroupBox.Create(Self);
|
GridGroupBox:=TGroupBox.Create(Self);
|
||||||
with GridGroupBox do begin
|
with GridGroupBox do begin
|
||||||
Name:='GridGroupBox';
|
Name:='GridGroupBox';
|
||||||
@ -2394,7 +2384,8 @@ begin
|
|||||||
Top:=5;
|
Top:=5;
|
||||||
Width:=((Parent.ClientWidth-3*Left) div 2);
|
Width:=((Parent.ClientWidth-3*Left) div 2);
|
||||||
Height:=170;
|
Height:=170;
|
||||||
Caption:=dlgEnvGrid ;
|
Caption:=dlgEnvGrid;
|
||||||
|
OnResize:=@GridGroupBoxResize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SetupGridGroupBox;
|
SetupGridGroupBox;
|
||||||
@ -2408,6 +2399,7 @@ begin
|
|||||||
Width:=GridGroupBox.Width;
|
Width:=GridGroupBox.Width;
|
||||||
Height:=GridGroupBox.Height;
|
Height:=GridGroupBox.Height;
|
||||||
Caption:=dlgEnvLGuideLines;
|
Caption:=dlgEnvLGuideLines;
|
||||||
|
OnResize:=@GuideLinesGroupBoxResize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SetupGuideLinesGroupBox;
|
SetupGuideLinesGroupBox;
|
||||||
@ -2421,6 +2413,7 @@ begin
|
|||||||
Width:=Parent.ClientWidth-2*Left;
|
Width:=Parent.ClientWidth-2*Left;
|
||||||
Height:=100;
|
Height:=100;
|
||||||
Caption:=dlgEnvMisc;
|
Caption:=dlgEnvMisc;
|
||||||
|
OnResize:=@FormEditMiscGroupBoxResize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SetupMiscGroupBox;
|
SetupMiscGroupBox;
|
||||||
@ -2434,6 +2427,7 @@ begin
|
|||||||
Width:=GridGroupBox.Width;
|
Width:=GridGroupBox.Width;
|
||||||
Height:=120;
|
Height:=120;
|
||||||
Caption:=dlgRubberBandGroup;
|
Caption:=dlgRubberBandGroup;
|
||||||
|
OnResize:=@RubberbandGroupBoxResize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SetupRubberbandBox;
|
SetupRubberbandBox;
|
||||||
@ -2443,6 +2437,8 @@ procedure TEnvironmentOptionsDialog.SetupNamingPage(Page: integer);
|
|||||||
var
|
var
|
||||||
pe: TPascalExtType;
|
pe: TPascalExtType;
|
||||||
begin
|
begin
|
||||||
|
NoteBook.Page[Page].OnResize:=@OnNamingPageResize;
|
||||||
|
|
||||||
PascalFileExtRadiogroup:=TRadioGroup.Create(Self);
|
PascalFileExtRadiogroup:=TRadioGroup.Create(Self);
|
||||||
with PascalFileExtRadiogroup do begin
|
with PascalFileExtRadiogroup do begin
|
||||||
Name:='PascalFileExtRadiogroup';
|
Name:='PascalFileExtRadiogroup';
|
||||||
@ -2598,126 +2594,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEnvironmentOptionsDialog.ResizeFormEditorPage;
|
procedure TEnvironmentOptionsDialog.ResizeFormEditorPage;
|
||||||
|
|
||||||
procedure SetupGridGroupBox;
|
|
||||||
begin
|
|
||||||
with ShowGridCheckBox do begin
|
|
||||||
SetBounds(6,2,200,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with GridColorButton do begin
|
|
||||||
SetBounds(ShowGridCheckBox.Left,
|
|
||||||
ShowGridCheckBox.Top+ShowGridCheckBox.Height+5,
|
|
||||||
50,25);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with GridColorLabel do begin
|
|
||||||
SetBounds(GridColorButton.Left+GridColorButton.Width+5,
|
|
||||||
GridColorButton.Top+2,80,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with SnapToGridCheckBox do begin
|
|
||||||
SetBounds(ShowGridCheckBox.Left,
|
|
||||||
GridColorLabel.Top+GridColorLabel.Height+10,
|
|
||||||
ShowGridCheckBox.Width,
|
|
||||||
ShowGridCheckBox.Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with GridSizeXLabel do begin
|
|
||||||
SetBounds(ShowGridCheckBox.Left,
|
|
||||||
SnapToGridCheckBox.Top+SnapToGridCheckBox.Height+5,80,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with GridSizeXComboBox do begin
|
|
||||||
SetBounds(GridSizeXLabel.Left+GridSizeXLabel.Width+5,
|
|
||||||
GridSizeXLabel.Top-2,60,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with GridSizeYLabel do begin
|
|
||||||
SetBounds(GridSizeXLabel.Left,
|
|
||||||
GridSizeXLabel.Top+GridSizeXLabel.Height+5,
|
|
||||||
GridSizeXLabel.Width,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with GridSizeYComboBox do begin
|
|
||||||
SetBounds(GridSizeYLabel.Left+GridSizeYLabel.Width+5,
|
|
||||||
GridSizeYLabel.Top-2,
|
|
||||||
GridSizeXComboBox.Width,Height);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure SetupGuideLinesGroupBox;
|
|
||||||
begin
|
|
||||||
with ShowGuideLinesCheckBox do begin
|
|
||||||
SetBounds(5,5,Parent.ClientWidth-2*Left,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with SnapToGuideLinesCheckBox do begin
|
|
||||||
SetBounds(ShowGuideLinesCheckBox.Left,
|
|
||||||
ShowGuideLinesCheckBox.Top+ShowGuideLinesCheckBox.Height+5,
|
|
||||||
ShowGuideLinesCheckBox.Width,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with GuideLineColorLeftTopButton do begin
|
|
||||||
SetBounds(SnapToGuideLinesCheckBox.Left,
|
|
||||||
SnapToGuideLinesCheckBox.Top+SnapToGuideLinesCheckBox.Height+5,
|
|
||||||
50,25);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with GuideLineColorLeftTopLabel do begin
|
|
||||||
SetBounds(GuideLineColorLeftTopButton.Left+GuideLineColorLeftTopButton.Width+5,
|
|
||||||
GuideLineColorLeftTopButton.Top+2,150,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with GuideLineColorRightBottomButton do begin
|
|
||||||
SetBounds(GuideLineColorLeftTopButton.Left,
|
|
||||||
GuideLineColorLeftTopButton.Top
|
|
||||||
+GuideLineColorLeftTopButton.Height+5,50,25);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with GuideLineColorRightBottomLabel do begin
|
|
||||||
SetBounds(GuideLineColorLeftTopLabel.Left,
|
|
||||||
GuideLineColorRightBottomButton.Top+2,
|
|
||||||
GuideLineColorLeftTopLabel.Width,Height);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure SetupMiscGroupBox;
|
|
||||||
begin
|
|
||||||
with ShowComponentCaptionsCheckBox do begin
|
|
||||||
SetBounds(5,5,Parent.ClientWidth-2*Left,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with ShowEditorHintsCheckBox do begin
|
|
||||||
SetBounds(ShowComponentCaptionsCheckBox.Left,
|
|
||||||
ShowComponentCaptionsCheckBox.Top
|
|
||||||
+ShowComponentCaptionsCheckBox.Height+5,
|
|
||||||
ShowComponentCaptionsCheckBox.Width,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with AutoCreateFormsCheckBox do begin
|
|
||||||
SetBounds(ShowEditorHintsCheckBox.Left,
|
|
||||||
ShowEditorHintsCheckBox.Top+ShowEditorHintsCheckBox.Height+5,
|
|
||||||
ShowEditorHintsCheckBox.Width,Height);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
// form editor page
|
// form editor page
|
||||||
with GridGroupBox do begin
|
with GridGroupBox do begin
|
||||||
SetBounds(5,5,((Parent.ClientWidth-3*Left) div 2),170);
|
SetBounds(5,5,((Parent.ClientWidth-3*Left) div 2),170);
|
||||||
end;
|
end;
|
||||||
SetupGridGroupBox;
|
|
||||||
with GuideLinesGroupBox do begin
|
with GuideLinesGroupBox do begin
|
||||||
SetBounds(GridGroupBox.Left+GridGroupBox.Width+5,GridGroupBox.Top,
|
SetBounds(GridGroupBox.Left+GridGroupBox.Width+5,GridGroupBox.Top,
|
||||||
GridGroupBox.Width,GridGroupBox.Height);
|
GridGroupBox.Width,GridGroupBox.Height);
|
||||||
end;
|
end;
|
||||||
SetupGuideLinesGroupBox;
|
|
||||||
with FormEditMiscGroupBox do begin
|
with FormEditMiscGroupBox do begin
|
||||||
SetBounds(5,GridGroupBox.Top+GridGroupBox.Height+5,
|
SetBounds(5,GridGroupBox.Top+GridGroupBox.Height+5,
|
||||||
Max(Parent.ClientWidth-2*Left,10),100);
|
Max(Parent.ClientWidth-2*Left,10),100);
|
||||||
end;
|
end;
|
||||||
SetupMiscGroupBox;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEnvironmentOptionsDialog.ResizeObjectInspectorPage;
|
procedure TEnvironmentOptionsDialog.ResizeObjectInspectorPage;
|
||||||
@ -2730,38 +2619,12 @@ begin
|
|||||||
Height:=55;
|
Height:=55;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
with OIBackgroundColorButton do begin
|
|
||||||
Left:=6;
|
|
||||||
Top:=6;
|
|
||||||
Width:=50;
|
|
||||||
Height:=25;
|
|
||||||
end;
|
|
||||||
|
|
||||||
with OIBackgroundColorLabel do begin
|
|
||||||
Left:=OIBackgroundColorButton.Left+OIBackgroundColorButton.Width+5;
|
|
||||||
Top:=OIBackgroundColorButton.Top;
|
|
||||||
Width:=Max(ObjectInspectorColorsGroupBox.ClientWidth-Left-5,10);
|
|
||||||
Height:=23;
|
|
||||||
end;
|
|
||||||
|
|
||||||
with OIMiscGroupBox do begin
|
with OIMiscGroupBox do begin
|
||||||
Left:=ObjectInspectorColorsGroupBox.Left;
|
Left:=ObjectInspectorColorsGroupBox.Left;
|
||||||
Top:=ObjectInspectorColorsGroupBox.Top+ObjectInspectorColorsGroupBox.Height+5;
|
Top:=ObjectInspectorColorsGroupBox.Top+ObjectInspectorColorsGroupBox.Height+5;
|
||||||
Width:=200;
|
Width:=200;
|
||||||
Height:=55;
|
Height:=55;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
with OIDefaultItemHeightSpinEdit do begin
|
|
||||||
Left:=6;
|
|
||||||
Top:=4;
|
|
||||||
Width:=50;
|
|
||||||
end;
|
|
||||||
|
|
||||||
with OIDefaultItemHeightLabel do begin
|
|
||||||
Left:=OIDefaultItemHeightSpinEdit.Left+OIDefaultItemHeightSpinEdit.Width+5;
|
|
||||||
Top:=OIDefaultItemHeightSpinEdit.Top+2;
|
|
||||||
Width:=OIMiscGroupBox.ClientWidth-Left-5;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEnvironmentOptionsDialog.ResizeFilesPage;
|
procedure TEnvironmentOptionsDialog.ResizeFilesPage;
|
||||||
@ -2902,6 +2765,94 @@ begin
|
|||||||
Height:=260;
|
Height:=260;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
with BackupOtherGroupBox do begin
|
||||||
|
Left:=BackupProjectGroupBox.Left+BackupProjectGroupBox.Width+10;
|
||||||
|
Top:=BackupHelpLabel.Top+BackupHelpLabel.Height+4;
|
||||||
|
Width:=Max(10,(MaxX div 2) - 11);
|
||||||
|
Height:=260;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.ResizeNamingPage;
|
||||||
|
begin
|
||||||
|
with PascalFileExtRadiogroup do begin
|
||||||
|
Left:=5;
|
||||||
|
Top:=4;
|
||||||
|
Width:=200;
|
||||||
|
Height:=80;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with PascalFileLowercaseCheckBox do begin
|
||||||
|
Left:=PascalFileExtRadiogroup.Left;
|
||||||
|
Top:=PascalFileExtRadiogroup.Top+PascalFileExtRadiogroup.Height+10;
|
||||||
|
Width:=300;
|
||||||
|
end;
|
||||||
|
|
||||||
|
with AmbigiousFileActionRadioGroup do begin
|
||||||
|
Left:=PascalFileLowercaseCheckBox.Left;
|
||||||
|
Top:=PascalFileLowercaseCheckBox.Top+PascalFileLowercaseCheckBox.Height+15;
|
||||||
|
Width:=200;
|
||||||
|
Height:=130;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.EnvironmentOptionsDialogResize(
|
||||||
|
Sender: TObject);
|
||||||
|
begin
|
||||||
|
with NoteBook do begin
|
||||||
|
SetBounds(0,0,Max(100,Self.ClientWidth),Max(100,Self.ClientHeight-50));
|
||||||
|
end;
|
||||||
|
|
||||||
|
with CancelButton do begin
|
||||||
|
Width:=70;
|
||||||
|
Height:=23;
|
||||||
|
Left:=Max(0,Self.ClientWidth-Width-15);
|
||||||
|
Top:=Max(0,Self.ClientHeight-Height-15);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with OkButton do begin
|
||||||
|
Width:=CancelButton.Width;
|
||||||
|
Height:=CancelButton.Height;
|
||||||
|
Left:=Max(0,CancelButton.Left-15-Width);
|
||||||
|
Top:=CancelButton.Top;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.WindowPositionsGroupBoxResize(
|
||||||
|
Sender: TObject);
|
||||||
|
begin
|
||||||
|
with WindowPositionsListBox do begin
|
||||||
|
SetBounds(2,2,Max(Parent.ClientWidth-2*2,100),Max(100,Parent.Height div 4));
|
||||||
|
end;
|
||||||
|
|
||||||
|
with WindowPositionsBox do begin
|
||||||
|
Left:=2;
|
||||||
|
Top:=WindowPositionsListBox.Top+WindowPositionsListBox.Height+5;
|
||||||
|
Width:=WindowPositionsListBox.Width;
|
||||||
|
Height:=Parent.ClientHeight-Top-2;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.BakTypeRadioGroupClick(Sender: TObject);
|
||||||
|
var i: integer;
|
||||||
|
begin
|
||||||
|
i:=TRadioGroup(Sender).ItemIndex;
|
||||||
|
if Sender=BakProjTypeRadioGroup then begin
|
||||||
|
BakProjAddExtComboBox.Enabled:=(i=4);
|
||||||
|
BakProjAddExtLabel.Enabled:=BakProjAddExtComboBox.Enabled;
|
||||||
|
BakProjMaxCounterComboBox.Enabled:=(i=3);
|
||||||
|
BakProjMaxCounterLabel.EnableD:=BakProjMaxCounterComboBox.Enabled;
|
||||||
|
end else begin
|
||||||
|
BakOtherAddExtComboBox.Enabled:=(i=4);
|
||||||
|
BakOtherAddExtLabel.Enabled:=BakOtherAddExtComboBox.Enabled;
|
||||||
|
BakOtherMaxCounterComboBox.Enabled:=(i=3);
|
||||||
|
BakOtherMaxCounterLabel.EnableD:=BakOtherMaxCounterComboBox.Enabled;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.BackupProjectGroupBoxResize(Sender: TObject
|
||||||
|
);
|
||||||
|
begin
|
||||||
with BakProjTypeRadioGroup do begin
|
with BakProjTypeRadioGroup do begin
|
||||||
Left:=5;
|
Left:=5;
|
||||||
Top:=4;
|
Top:=4;
|
||||||
@ -2950,14 +2901,10 @@ begin
|
|||||||
Width:=100;
|
Width:=100;
|
||||||
Height:=25;
|
Height:=25;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
with BackupOtherGroupBox do begin
|
procedure TEnvironmentOptionsDialog.BackupOtherGroupBoxResize(Sender: TObject);
|
||||||
Left:=BackupProjectGroupBox.Left+BackupProjectGroupBox.Width+10;
|
begin
|
||||||
Top:=BackupHelpLabel.Top+BackupHelpLabel.Height+4;
|
|
||||||
Width:=Max(10,(MaxX div 2) - 11);
|
|
||||||
Height:=260;
|
|
||||||
end;
|
|
||||||
|
|
||||||
with BakOtherTypeRadioGroup do begin
|
with BakOtherTypeRadioGroup do begin
|
||||||
Left:=5;
|
Left:=5;
|
||||||
Top:=4;
|
Top:=4;
|
||||||
@ -3008,87 +2955,139 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEnvironmentOptionsDialog.ResizeNamingPage;
|
procedure TEnvironmentOptionsDialog.FormEditMiscGroupBoxResize(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
with PascalFileExtRadiogroup do begin
|
with ShowComponentCaptionsCheckBox do begin
|
||||||
Left:=5;
|
SetBounds(5,5,Parent.ClientWidth-2*Left,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ShowEditorHintsCheckBox do begin
|
||||||
|
SetBounds(ShowComponentCaptionsCheckBox.Left,
|
||||||
|
ShowComponentCaptionsCheckBox.Top
|
||||||
|
+ShowComponentCaptionsCheckBox.Height+5,
|
||||||
|
ShowComponentCaptionsCheckBox.Width,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with AutoCreateFormsCheckBox do begin
|
||||||
|
SetBounds(ShowEditorHintsCheckBox.Left,
|
||||||
|
ShowEditorHintsCheckBox.Top+ShowEditorHintsCheckBox.Height+5,
|
||||||
|
ShowEditorHintsCheckBox.Width,Height);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.GridGroupBoxResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with ShowGridCheckBox do begin
|
||||||
|
SetBounds(6,2,200,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with GridColorButton do begin
|
||||||
|
SetBounds(ShowGridCheckBox.Left,
|
||||||
|
ShowGridCheckBox.Top+ShowGridCheckBox.Height+5,
|
||||||
|
50,25);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with GridColorLabel do begin
|
||||||
|
SetBounds(GridColorButton.Left+GridColorButton.Width+5,
|
||||||
|
GridColorButton.Top+2,80,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with SnapToGridCheckBox do begin
|
||||||
|
SetBounds(ShowGridCheckBox.Left,
|
||||||
|
GridColorLabel.Top+GridColorLabel.Height+10,
|
||||||
|
ShowGridCheckBox.Width,
|
||||||
|
ShowGridCheckBox.Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with GridSizeXLabel do begin
|
||||||
|
SetBounds(ShowGridCheckBox.Left,
|
||||||
|
SnapToGridCheckBox.Top+SnapToGridCheckBox.Height+5,80,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with GridSizeXComboBox do begin
|
||||||
|
SetBounds(GridSizeXLabel.Left+GridSizeXLabel.Width+5,
|
||||||
|
GridSizeXLabel.Top-2,60,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with GridSizeYLabel do begin
|
||||||
|
SetBounds(GridSizeXLabel.Left,
|
||||||
|
GridSizeXComboBox.Top+GridSizeXComboBox.Height+5,
|
||||||
|
GridSizeXLabel.Width,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with GridSizeYComboBox do begin
|
||||||
|
SetBounds(GridSizeYLabel.Left+GridSizeYLabel.Width+5,
|
||||||
|
GridSizeYLabel.Top-2,
|
||||||
|
GridSizeXComboBox.Width,Height);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.GuideLinesGroupBoxResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with ShowGuideLinesCheckBox do begin
|
||||||
|
SetBounds(5,5,Parent.ClientWidth-2*Left,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with SnapToGuideLinesCheckBox do begin
|
||||||
|
SetBounds(ShowGuideLinesCheckBox.Left,
|
||||||
|
ShowGuideLinesCheckBox.Top+ShowGuideLinesCheckBox.Height+5,
|
||||||
|
ShowGuideLinesCheckBox.Width,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with GuideLineColorLeftTopButton do begin
|
||||||
|
SetBounds(SnapToGuideLinesCheckBox.Left,
|
||||||
|
SnapToGuideLinesCheckBox.Top+SnapToGuideLinesCheckBox.Height+5,
|
||||||
|
50,25);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with GuideLineColorLeftTopLabel do begin
|
||||||
|
SetBounds(GuideLineColorLeftTopButton.Left+GuideLineColorLeftTopButton.Width+5,
|
||||||
|
GuideLineColorLeftTopButton.Top+2,150,Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with GuideLineColorRightBottomButton do begin
|
||||||
|
SetBounds(GuideLineColorLeftTopButton.Left,
|
||||||
|
GuideLineColorLeftTopButton.Top
|
||||||
|
+GuideLineColorLeftTopButton.Height+5,50,25);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with GuideLineColorRightBottomLabel do begin
|
||||||
|
SetBounds(GuideLineColorLeftTopLabel.Left,
|
||||||
|
GuideLineColorRightBottomButton.Top+2,
|
||||||
|
GuideLineColorLeftTopLabel.Width,Height);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.OIMiscGroupBoxResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
with OIDefaultItemHeightSpinEdit do begin
|
||||||
|
Left:=6;
|
||||||
Top:=4;
|
Top:=4;
|
||||||
Width:=200;
|
Width:=50;
|
||||||
Height:=80;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
with PascalFileLowercaseCheckBox do begin
|
with OIDefaultItemHeightLabel do begin
|
||||||
Left:=PascalFileExtRadiogroup.Left;
|
Left:=OIDefaultItemHeightSpinEdit.Left+OIDefaultItemHeightSpinEdit.Width+5;
|
||||||
Top:=PascalFileExtRadiogroup.Top+PascalFileExtRadiogroup.Height+10;
|
Top:=OIDefaultItemHeightSpinEdit.Top+2;
|
||||||
Width:=300;
|
Width:=OIMiscGroupBox.ClientWidth-Left-5;
|
||||||
end;
|
|
||||||
|
|
||||||
with AmbigiousFileActionRadioGroup do begin
|
|
||||||
Left:=PascalFileLowercaseCheckBox.Left;
|
|
||||||
Top:=PascalFileLowercaseCheckBox.Top+PascalFileLowercaseCheckBox.Height+15;
|
|
||||||
Width:=200;
|
|
||||||
Height:=130;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEnvironmentOptionsDialog.EnvironmentOptionsDialogResize(
|
procedure TEnvironmentOptionsDialog.ObjectInspectorColorsGroupBoxResize(
|
||||||
Sender: TObject);
|
Sender: TObject);
|
||||||
begin
|
begin
|
||||||
with NoteBook do begin
|
with OIBackgroundColorButton do begin
|
||||||
SetBounds(0,0,Max(100,Self.ClientWidth),Max(100,Self.ClientHeight-50));
|
Left:=6;
|
||||||
|
Top:=6;
|
||||||
|
Width:=50;
|
||||||
|
Height:=25;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ResizeDesktopPage;
|
with OIBackgroundColorLabel do begin
|
||||||
ResizeFormEditorPage;
|
Left:=OIBackgroundColorButton.Left+OIBackgroundColorButton.Width+5;
|
||||||
ResizeObjectInspectorPage;
|
Top:=OIBackgroundColorButton.Top;
|
||||||
ResizeFilesPage;
|
Width:=Max(ObjectInspectorColorsGroupBox.ClientWidth-Left-5,10);
|
||||||
ResizeBackupPage;
|
|
||||||
ResizeNamingPage;
|
|
||||||
|
|
||||||
with CancelButton do begin
|
|
||||||
Width:=70;
|
|
||||||
Height:=23;
|
Height:=23;
|
||||||
Left:=Max(0,Self.ClientWidth-Width-15);
|
|
||||||
Top:=Max(0,Self.ClientHeight-Height-15);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with OkButton do begin
|
|
||||||
Width:=CancelButton.Width;
|
|
||||||
Height:=CancelButton.Height;
|
|
||||||
Left:=Max(0,CancelButton.Left-15-Width);
|
|
||||||
Top:=CancelButton.Top;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TEnvironmentOptionsDialog.WindowPositionsGroupBoxResize(
|
|
||||||
Sender: TObject);
|
|
||||||
begin
|
|
||||||
with WindowPositionsListBox do begin
|
|
||||||
SetBounds(2,2,Max(Parent.ClientWidth-2*2,100),Max(100,Parent.Height div 4));
|
|
||||||
end;
|
|
||||||
|
|
||||||
with WindowPositionsBox do begin
|
|
||||||
Left:=2;
|
|
||||||
Top:=WindowPositionsListBox.Top+WindowPositionsListBox.Height+5;
|
|
||||||
Width:=WindowPositionsListBox.Width;
|
|
||||||
Height:=Parent.ClientHeight-Top-2;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TEnvironmentOptionsDialog.BakTypeRadioGroupClick(Sender: TObject);
|
|
||||||
var i: integer;
|
|
||||||
begin
|
|
||||||
i:=TRadioGroup(Sender).ItemIndex;
|
|
||||||
if Sender=BakProjTypeRadioGroup then begin
|
|
||||||
BakProjAddExtComboBox.Enabled:=(i=4);
|
|
||||||
BakProjAddExtLabel.Enabled:=BakProjAddExtComboBox.Enabled;
|
|
||||||
BakProjMaxCounterComboBox.Enabled:=(i=3);
|
|
||||||
BakProjMaxCounterLabel.EnableD:=BakProjMaxCounterComboBox.Enabled;
|
|
||||||
end else begin
|
|
||||||
BakOtherAddExtComboBox.Enabled:=(i=4);
|
|
||||||
BakOtherAddExtLabel.Enabled:=BakOtherAddExtComboBox.Enabled;
|
|
||||||
BakOtherMaxCounterComboBox.Enabled:=(i=3);
|
|
||||||
BakOtherMaxCounterLabel.EnableD:=BakOtherMaxCounterComboBox.Enabled;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3105,6 +3104,42 @@ begin
|
|||||||
ModalResult:=mrCancel;
|
ModalResult:=mrCancel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.OnBackupPageResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ResizeBackupPage;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.OnDesktopPageResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ResizeDesktopPage;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.OnFilesPageResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ResizeFilesPage;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.OnFormEditorPageResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ResizeFormEditorPage;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.OnNamingPageResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ResizeNamingPage;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.OnObjectInspectorPageResize(Sender: TObject
|
||||||
|
);
|
||||||
|
begin
|
||||||
|
ResizeObjectInspectorPage;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TEnvironmentOptionsDialog.RubberbandGroupBoxResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TEnvironmentOptionsDialog.SaveDesktopSettingsToFileButtonClick(
|
procedure TEnvironmentOptionsDialog.SaveDesktopSettingsToFileButtonClick(
|
||||||
Sender: TObject);
|
Sender: TObject);
|
||||||
var AnEnvironmentOptions: TEnvironmentOptions;
|
var AnEnvironmentOptions: TEnvironmentOptions;
|
||||||
@ -3455,6 +3490,8 @@ end;
|
|||||||
procedure TEnvironmentOptionsDialog.SetupObjectInspectorPage(Page: integer);
|
procedure TEnvironmentOptionsDialog.SetupObjectInspectorPage(Page: integer);
|
||||||
var MaxX: integer;
|
var MaxX: integer;
|
||||||
begin
|
begin
|
||||||
|
NoteBook.Page[Page].OnResize:=@OnObjectInspectorPageResize;
|
||||||
|
|
||||||
MaxX:=ClientWidth-5;
|
MaxX:=ClientWidth-5;
|
||||||
|
|
||||||
// object inspector
|
// object inspector
|
||||||
@ -3467,6 +3504,7 @@ begin
|
|||||||
Width:=(MaxX div 2) - 15;
|
Width:=(MaxX div 2) - 15;
|
||||||
Height:=55;
|
Height:=55;
|
||||||
Caption:=dlgEnvColors;
|
Caption:=dlgEnvColors;
|
||||||
|
OnResize:=@ObjectInspectorColorsGroupBoxResize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OIBackgroundColorButton:=TColorButton.Create(Self);
|
OIBackgroundColorButton:=TColorButton.Create(Self);
|
||||||
@ -3499,6 +3537,7 @@ begin
|
|||||||
Width:=200;
|
Width:=200;
|
||||||
Height:=55;
|
Height:=55;
|
||||||
Caption:=dlgOIMiscellaneous;
|
Caption:=dlgOIMiscellaneous;
|
||||||
|
OnResize:=@OIMiscGroupBoxResize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OIDefaultItemHeightSpinEdit:=TSpinEdit.Create(Self);
|
OIDefaultItemHeightSpinEdit:=TSpinEdit.Create(Self);
|
||||||
@ -3508,6 +3547,7 @@ begin
|
|||||||
Left:=6;
|
Left:=6;
|
||||||
Top:=4;
|
Top:=4;
|
||||||
Width:=50;
|
Width:=50;
|
||||||
|
Height:=25;
|
||||||
Decimal_Places:=0;
|
Decimal_Places:=0;
|
||||||
MinValue:=0;
|
MinValue:=0;
|
||||||
MaxValue:=100;
|
MaxValue:=100;
|
||||||
|
|||||||
@ -358,7 +358,7 @@ resourcestring
|
|||||||
dlgRightBottomClr = 'color for right, bottom';
|
dlgRightBottomClr = 'color for right, bottom';
|
||||||
dlgShowCaps = 'Show component captions';
|
dlgShowCaps = 'Show component captions';
|
||||||
dlgShowEdrHints = 'Show editor hints';
|
dlgShowEdrHints = 'Show editor hints';
|
||||||
dlgAutoForm = 'Auto create forms';
|
dlgAutoForm = 'Auto create form when opening unit';
|
||||||
dlgGrabberColor = 'Grabber color';
|
dlgGrabberColor = 'Grabber color';
|
||||||
dlgMarkerColor = 'Marker color';
|
dlgMarkerColor = 'Marker color';
|
||||||
dlgEnvGrid = 'Grid';
|
dlgEnvGrid = 'Grid';
|
||||||
@ -620,7 +620,7 @@ resourcestring
|
|||||||
dlgPOTargetFileName = 'Target file name:';
|
dlgPOTargetFileName = 'Target file name:';
|
||||||
dlgAutoCreateForms = 'Auto-create forms:';
|
dlgAutoCreateForms = 'Auto-create forms:';
|
||||||
dlgAvailableForms = 'Available forms:';
|
dlgAvailableForms = 'Available forms:';
|
||||||
dlgAutoCreateNewForms = 'Auto create new forms';
|
dlgAutoCreateNewForms = 'When creating new forms, add them to auto-created forms';
|
||||||
dlgSaveEditorInfo = 'Save editor info for closed files';
|
dlgSaveEditorInfo = 'Save editor info for closed files';
|
||||||
dlgSaveEditorInfoProject = 'Save editor info only for project files';
|
dlgSaveEditorInfoProject = 'Save editor info only for project files';
|
||||||
dlgRunParameters = 'Run parameters';
|
dlgRunParameters = 'Run parameters';
|
||||||
@ -716,6 +716,7 @@ resourcestring
|
|||||||
fdmDeleteSelection='Delete selection';
|
fdmDeleteSelection='Delete selection';
|
||||||
fdmSnapToGridOption='Option: Snap to grid';
|
fdmSnapToGridOption='Option: Snap to grid';
|
||||||
fdmSnapToGuideLinesOption='Option: Snap to guide lines';
|
fdmSnapToGuideLinesOption='Option: Snap to guide lines';
|
||||||
|
fdmShowOptions='Show Options for form editing';
|
||||||
|
|
||||||
//-----------------------
|
//-----------------------
|
||||||
// keyMapping
|
// keyMapping
|
||||||
|
|||||||
120
ide/project.pp
120
ide/project.pp
@ -77,7 +77,6 @@ type
|
|||||||
|
|
||||||
TUnitInfo = class(TObject)
|
TUnitInfo = class(TObject)
|
||||||
private
|
private
|
||||||
{ Variables }
|
|
||||||
fAutoRevertLockCount: integer;
|
fAutoRevertLockCount: integer;
|
||||||
fBookmarks: TFileBookmarks;
|
fBookmarks: TFileBookmarks;
|
||||||
fBreakpoints: TProjectBreakPointList;
|
fBreakpoints: TProjectBreakPointList;
|
||||||
@ -178,33 +177,33 @@ type
|
|||||||
public
|
public
|
||||||
property Bookmarks: TFileBookmarks read FBookmarks write FBookmarks;
|
property Bookmarks: TFileBookmarks read FBookmarks write FBookmarks;
|
||||||
property Breakpoints: TProjectBreakPointList
|
property Breakpoints: TProjectBreakPointList
|
||||||
read fBreakpoints write fBreakpoints;
|
read fBreakpoints write fBreakpoints;
|
||||||
property CursorPos: TPoint read fCursorPos write fCursorPos;
|
property CursorPos: TPoint read fCursorPos write fCursorPos;
|
||||||
property CustomHighlighter: boolean
|
property CustomHighlighter: boolean
|
||||||
read fCustomHighlighter write fCustomHighlighter;
|
read fCustomHighlighter write fCustomHighlighter;
|
||||||
property EditorIndex:integer read fEditorIndex write SetEditorIndex;
|
property EditorIndex:integer read fEditorIndex write SetEditorIndex;
|
||||||
property Filename: String read GetFilename;
|
property Filename: String read GetFilename;
|
||||||
property FileReadOnly: Boolean read fFileReadOnly write SetFileReadOnly;
|
property FileReadOnly: Boolean read fFileReadOnly write SetFileReadOnly;
|
||||||
property Form: TComponent read fForm write SetForm;
|
property Form: TComponent read fForm write SetForm;
|
||||||
property FormName: string read fFormName write fFormName;
|
property FormName: string read fFormName write fFormName;
|
||||||
property FormResourceName: string
|
property FormResourceName: string
|
||||||
read fFormResourceName write fFormResourceName;
|
read fFormResourceName write fFormResourceName;
|
||||||
property HasResources: boolean read GetHasResources write fHasResources;
|
property HasResources: boolean read GetHasResources write fHasResources;
|
||||||
property IsPartOfProject: boolean
|
property IsPartOfProject: boolean
|
||||||
read fIsPartOfProject write SetIsPartOfProject;
|
read fIsPartOfProject write SetIsPartOfProject;
|
||||||
property Loaded: Boolean read fLoaded write SetLoaded;
|
property Loaded: Boolean read fLoaded write SetLoaded;
|
||||||
property Modified: boolean read fModified write fModified;
|
property Modified: boolean read fModified write fModified;
|
||||||
property OnFileBackup: TOnFileBackup read fOnFileBackup write fOnFileBackup;
|
property OnFileBackup: TOnFileBackup read fOnFileBackup write fOnFileBackup;
|
||||||
property OnLoadSaveFilename: TOnLoadSaveFilename
|
property OnLoadSaveFilename: TOnLoadSaveFilename
|
||||||
read fOnLoadSaveFilename write fOnLoadSaveFilename;
|
read fOnLoadSaveFilename write fOnLoadSaveFilename;
|
||||||
property OnUnitNameChange: TOnUnitNameChange
|
property OnUnitNameChange: TOnUnitNameChange
|
||||||
read fOnUnitNameChange write fOnUnitNameChange;
|
read fOnUnitNameChange write fOnUnitNameChange;
|
||||||
property Project: TProject read FProject write SetProject;
|
property Project: TProject read FProject write SetProject;
|
||||||
property ResourceFileName: string
|
property ResourceFileName: string
|
||||||
read FResourceFilename write FResourceFilename;
|
read FResourceFilename write FResourceFilename;
|
||||||
property Source: TCodeBuffer read fSource write SetSource;
|
property Source: TCodeBuffer read fSource write SetSource;
|
||||||
property SyntaxHighlighter: TLazSyntaxHighlighter
|
property SyntaxHighlighter: TLazSyntaxHighlighter
|
||||||
read fSyntaxHighlighter write fSyntaxHighlighter;
|
read fSyntaxHighlighter write fSyntaxHighlighter;
|
||||||
property TopLine: integer read fTopLine write fTopLine;
|
property TopLine: integer read fTopLine write fTopLine;
|
||||||
property UnitName: String read fUnitName write SetUnitName;
|
property UnitName: String read fUnitName write SetUnitName;
|
||||||
property UserReadOnly: Boolean read fUserReadOnly write SetUserReadOnly;
|
property UserReadOnly: Boolean read fUserReadOnly write SetUserReadOnly;
|
||||||
@ -231,13 +230,14 @@ type
|
|||||||
|
|
||||||
{ Variables }
|
{ Variables }
|
||||||
fActiveEditorIndexAtStart: integer;
|
fActiveEditorIndexAtStart: integer;
|
||||||
|
FAutoCreateForms: boolean;
|
||||||
fBookmarks: TProjectBookmarkList;
|
fBookmarks: TProjectBookmarkList;
|
||||||
fCompilerOptions: TCompilerOptions;
|
fCompilerOptions: TCompilerOptions;
|
||||||
fIconPath: String;
|
fIconPath: String;
|
||||||
fJumpHistory: TProjectJumpHistory;
|
fJumpHistory: TProjectJumpHistory;
|
||||||
fLastReadLPIFilename: string;
|
fLastReadLPIFilename: string;
|
||||||
fLastReadLPIFileDate: TDateTime;
|
fLastReadLPIFileDate: TDateTime;
|
||||||
fMainUnit: Integer; // only for ptApplication
|
fMainUnitID: Integer; // only for ptApplication
|
||||||
fModified: boolean;
|
fModified: boolean;
|
||||||
fOnFileBackup: TOnFileBackup;
|
fOnFileBackup: TOnFileBackup;
|
||||||
fOutputDirectory: String;
|
fOutputDirectory: String;
|
||||||
@ -256,7 +256,7 @@ type
|
|||||||
function GetTargetFilename: string;
|
function GetTargetFilename: string;
|
||||||
function GetUnits(Index: integer): TUnitInfo;
|
function GetUnits(Index: integer): TUnitInfo;
|
||||||
procedure SetFlags(const AValue: TProjectFlags);
|
procedure SetFlags(const AValue: TProjectFlags);
|
||||||
procedure SetMainUnit(const AValue: Integer);
|
procedure SetMainUnitID(const AValue: Integer);
|
||||||
procedure SetUnits(Index:integer; AUnitInfo: TUnitInfo);
|
procedure SetUnits(Index:integer; AUnitInfo: TUnitInfo);
|
||||||
procedure SetProjectInfoFile(const NewFilename: string);
|
procedure SetProjectInfoFile(const NewFilename: string);
|
||||||
procedure SetTargetFilename(const NewTargetFilename: string);
|
procedure SetTargetFilename(const NewTargetFilename: string);
|
||||||
@ -264,10 +264,10 @@ type
|
|||||||
function OnUnitFileBackup(const Filename: string;
|
function OnUnitFileBackup(const Filename: string;
|
||||||
IsPartOfProject:boolean): TModalResult;
|
IsPartOfProject:boolean): TModalResult;
|
||||||
procedure OnUnitNameChange(AnUnitInfo: TUnitInfo;
|
procedure OnUnitNameChange(AnUnitInfo: TUnitInfo;
|
||||||
const OldUnitName, NewUnitName: string; CheckIfAllowed: boolean;
|
const OldUnitName, NewUnitName: string;
|
||||||
var Allowed: boolean);
|
CheckIfAllowed: boolean; var Allowed: boolean);
|
||||||
function JumpHistoryCheckPosition(
|
function JumpHistoryCheckPosition(
|
||||||
APosition:TProjectJumpHistoryPosition): boolean;
|
APosition:TProjectJumpHistoryPosition): boolean;
|
||||||
procedure SetSrcPath(const NewSrcPath: string);
|
procedure SetSrcPath(const NewSrcPath: string);
|
||||||
protected
|
protected
|
||||||
procedure AddToEditorWithIndexList(AnUnitInfo: TUnitInfo);
|
procedure AddToEditorWithIndexList(AnUnitInfo: TUnitInfo);
|
||||||
@ -286,7 +286,7 @@ type
|
|||||||
|
|
||||||
function ReadProject(const LPIFilename: string): TModalResult;
|
function ReadProject(const LPIFilename: string): TModalResult;
|
||||||
function WriteProject(ProjectWriteFlags: TProjectWriteFlags;
|
function WriteProject(ProjectWriteFlags: TProjectWriteFlags;
|
||||||
const OverrideProjectInfoFile: string): TModalResult;
|
const OverrideProjectInfoFile: string): TModalResult;
|
||||||
|
|
||||||
property Units[Index: integer]:TUnitInfo read GetUnits write SetUnits;
|
property Units[Index: integer]:TUnitInfo read GetUnits write SetUnits;
|
||||||
function UnitCount:integer;
|
function UnitCount:integer;
|
||||||
@ -296,11 +296,11 @@ type
|
|||||||
procedure RemoveUnit(Index: integer);
|
procedure RemoveUnit(Index: integer);
|
||||||
function IndexOf(AUnitInfo: TUnitInfo): integer;
|
function IndexOf(AUnitInfo: TUnitInfo): integer;
|
||||||
function IndexOfUnitWithName(const AnUnitName: string;
|
function IndexOfUnitWithName(const AnUnitName: string;
|
||||||
OnlyProjectUnits:boolean; IgnoreUnit: TUnitInfo): integer;
|
OnlyProjectUnits:boolean; IgnoreUnit: TUnitInfo): integer;
|
||||||
function IndexOfUnitWithForm(AForm: TComponent;
|
function IndexOfUnitWithForm(AForm: TComponent;
|
||||||
OnlyProjectUnits:boolean; IgnoreUnit: TUnitInfo): integer;
|
OnlyProjectUnits:boolean; IgnoreUnit: TUnitInfo): integer;
|
||||||
function IndexOfUnitWithFormName(const AFormName: string;
|
function IndexOfUnitWithFormName(const AFormName: string;
|
||||||
OnlyProjectUnits:boolean; IgnoreUnit: TUnitInfo): integer;
|
OnlyProjectUnits:boolean; IgnoreUnit: TUnitInfo): integer;
|
||||||
function IndexOfFilename(const AFilename: string): integer;
|
function IndexOfFilename(const AFilename: string): integer;
|
||||||
function ProjectUnitWithFilename(const AFilename: string): TUnitInfo;
|
function ProjectUnitWithFilename(const AFilename: string): TUnitInfo;
|
||||||
function ProjectUnitWithUnitname(const AnUnitName: string): TUnitInfo;
|
function ProjectUnitWithUnitname(const AnUnitName: string): TUnitInfo;
|
||||||
@ -322,7 +322,7 @@ type
|
|||||||
// Application.CreateForm statements
|
// Application.CreateForm statements
|
||||||
function AddCreateFormToProjectFile(const AClassName, AName:string):boolean;
|
function AddCreateFormToProjectFile(const AClassName, AName:string):boolean;
|
||||||
function RemoveCreateFormFromProjectFile(const AClassName,
|
function RemoveCreateFormFromProjectFile(const AClassName,
|
||||||
AName: string):boolean;
|
AName: string):boolean;
|
||||||
function FormIsCreatedInProjectFile(const AClassname, AName:string):boolean;
|
function FormIsCreatedInProjectFile(const AClassname, AName:string):boolean;
|
||||||
|
|
||||||
// uses section
|
// uses section
|
||||||
@ -344,11 +344,13 @@ type
|
|||||||
procedure SetBookmark(AnUnitInfo: TUnitInfo; X,Y,ID: integer);
|
procedure SetBookmark(AnUnitInfo: TUnitInfo; X,Y,ID: integer);
|
||||||
procedure MergeBookmarks(AnUnitInfo: TUnitInfo);
|
procedure MergeBookmarks(AnUnitInfo: TUnitInfo);
|
||||||
public
|
public
|
||||||
property ActiveEditorIndexAtStart: integer
|
property ActiveEditorIndexAtStart: integer read fActiveEditorIndexAtStart
|
||||||
read fActiveEditorIndexAtStart write fActiveEditorIndexAtStart;
|
write fActiveEditorIndexAtStart;
|
||||||
|
property AutoCreateForms: boolean
|
||||||
|
read FAutoCreateForms write FAutoCreateForms;
|
||||||
property Bookmarks: TProjectBookmarkList read fBookmarks write fBookmarks;
|
property Bookmarks: TProjectBookmarkList read fBookmarks write fBookmarks;
|
||||||
property CompilerOptions: TCompilerOptions
|
property CompilerOptions: TCompilerOptions
|
||||||
read fCompilerOptions write fCompilerOptions;
|
read fCompilerOptions write fCompilerOptions;
|
||||||
property FirstAutoRevertLockedUnit: TUnitInfo read fFirstAutoRevertLockedUnit;
|
property FirstAutoRevertLockedUnit: TUnitInfo read fFirstAutoRevertLockedUnit;
|
||||||
property FirstLoadedUnit: TUnitInfo read fFirstLoadedUnit;
|
property FirstLoadedUnit: TUnitInfo read fFirstLoadedUnit;
|
||||||
property FirstUnitWithEditorIndex: TUnitInfo read fFirstUnitWithEditorIndex;
|
property FirstUnitWithEditorIndex: TUnitInfo read fFirstUnitWithEditorIndex;
|
||||||
@ -358,27 +360,26 @@ type
|
|||||||
property Flags: TProjectFlags read FFlags write SetFlags;
|
property Flags: TProjectFlags read FFlags write SetFlags;
|
||||||
property IconPath: String read fIconPath write fIconPath;
|
property IconPath: String read fIconPath write fIconPath;
|
||||||
property JumpHistory: TProjectJumpHistory
|
property JumpHistory: TProjectJumpHistory
|
||||||
read fJumpHistory write fJumpHistory;
|
read fJumpHistory write fJumpHistory;
|
||||||
property MainUnit: Integer //this is the unit index of the program file
|
property MainUnitID: Integer read fMainUnitID write SetMainUnitID;
|
||||||
read fMainUnit write SetMainUnit;
|
|
||||||
property MainUnitInfo: TUnitInfo read GetMainUnitInfo;
|
property MainUnitInfo: TUnitInfo read GetMainUnitInfo;
|
||||||
property Modified: boolean read fModified write fModified;
|
property Modified: boolean read fModified write fModified;
|
||||||
property OnFileBackup: TOnFileBackup read fOnFileBackup write fOnFileBackup;
|
property OnFileBackup: TOnFileBackup read fOnFileBackup write fOnFileBackup;
|
||||||
property OutputDirectory: String read fOutputDirectory write fOutputDirectory;
|
property OutputDirectory: String read fOutputDirectory write fOutputDirectory;
|
||||||
property MainFilename: String read GetMainFilename;
|
property MainFilename: String read GetMainFilename;
|
||||||
property ProjectInfoFile: string
|
property ProjectInfoFile: string
|
||||||
read GetProjectInfoFile write SetProjectInfoFile;
|
read GetProjectInfoFile write SetProjectInfoFile;
|
||||||
property ProjectType: TProjectType read fProjectType write fProjectType;
|
property ProjectType: TProjectType read fProjectType write fProjectType;
|
||||||
property PublishOptions: TPublishProjectOptions
|
property PublishOptions: TPublishProjectOptions
|
||||||
read fPublishOptions write fPublishOptions;
|
read fPublishOptions write fPublishOptions;
|
||||||
property RunParameterOptions: TRunParamsOptions read fRunParameterOptions;
|
property RunParameterOptions: TRunParamsOptions read fRunParameterOptions;
|
||||||
property SrcPath: string read fSrcPath write fSrcPath;
|
property SrcPath: string read fSrcPath write fSrcPath;
|
||||||
property TargetFileExt: String read fTargetFileExt write fTargetFileExt;
|
property TargetFileExt: String read fTargetFileExt write fTargetFileExt;
|
||||||
property TargetFilename: string
|
property TargetFilename: string
|
||||||
read GetTargetFilename write SetTargetFilename;
|
read GetTargetFilename write SetTargetFilename;
|
||||||
property Title: String read fTitle write fTitle;
|
property Title: String read fTitle write fTitle;
|
||||||
property UnitOutputDirectory: String
|
property UnitOutputDirectory: String
|
||||||
read fUnitOutputDirectory write fUnitOutputDirectory;
|
read fUnitOutputDirectory write fUnitOutputDirectory;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -426,8 +427,10 @@ const
|
|||||||
function ProjectTypeNameToType(const s:string): TProjectType;
|
function ProjectTypeNameToType(const s:string): TProjectType;
|
||||||
function ProjectFlagsToStr(Flags: TProjectFlags): string;
|
function ProjectFlagsToStr(Flags: TProjectFlags): string;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
function ProjectFlagsToStr(Flags: TProjectFlags): string;
|
function ProjectFlagsToStr(Flags: TProjectFlags): string;
|
||||||
var f: TProjectFlag;
|
var f: TProjectFlag;
|
||||||
begin
|
begin
|
||||||
@ -1047,7 +1050,7 @@ begin
|
|||||||
fJumpHistory:=TProjectJumpHistory.Create;
|
fJumpHistory:=TProjectJumpHistory.Create;
|
||||||
fJumpHistory.OnCheckPosition:=@JumpHistoryCheckPosition;
|
fJumpHistory.OnCheckPosition:=@JumpHistoryCheckPosition;
|
||||||
fJumpHistory.OnLoadSaveFilename:=@OnLoadSaveFilename;
|
fJumpHistory.OnLoadSaveFilename:=@OnLoadSaveFilename;
|
||||||
fMainUnit := -1;
|
fMainUnitID := -1;
|
||||||
fModified := false;
|
fModified := false;
|
||||||
fOutputDirectory := '.';
|
fOutputDirectory := '.';
|
||||||
fProjectInfoFile := '';
|
fProjectInfoFile := '';
|
||||||
@ -1071,7 +1074,7 @@ begin
|
|||||||
PrgUnitInfo.SyntaxHighlighter:=
|
PrgUnitInfo.SyntaxHighlighter:=
|
||||||
ExtensionToLazSyntaxHighlighter(ProjectDefaultExt[fProjectType]);
|
ExtensionToLazSyntaxHighlighter(ProjectDefaultExt[fProjectType]);
|
||||||
AddUnit(PrgUnitInfo,false);
|
AddUnit(PrgUnitInfo,false);
|
||||||
MainUnit:=0;
|
MainUnitID:=0;
|
||||||
with NewSource do begin
|
with NewSource do begin
|
||||||
Add('program Project1;');
|
Add('program Project1;');
|
||||||
Add('');
|
Add('');
|
||||||
@ -1217,9 +1220,11 @@ begin
|
|||||||
xmlconfig.SetDeleteValue('ProjectOptions/General/ProjectType/Value',
|
xmlconfig.SetDeleteValue('ProjectOptions/General/ProjectType/Value',
|
||||||
ProjectTypeNames[ProjectType],'');
|
ProjectTypeNames[ProjectType],'');
|
||||||
SaveFlags;
|
SaveFlags;
|
||||||
xmlconfig.SetDeleteValue('ProjectOptions/General/MainUnit/Value', MainUnit,-1);
|
xmlconfig.SetDeleteValue('ProjectOptions/General/MainUnit/Value', MainUnitID,-1);
|
||||||
xmlconfig.SetDeleteValue('ProjectOptions/General/ActiveEditorIndexAtStart/Value'
|
xmlconfig.SetDeleteValue('ProjectOptions/General/ActiveEditorIndexAtStart/Value'
|
||||||
,ActiveEditorIndexAtStart,-1);
|
,ActiveEditorIndexAtStart,-1);
|
||||||
|
xmlconfig.SetDeleteValue('ProjectOptions/General/AutoCreateForms/Value'
|
||||||
|
,AutoCreateForms,true);
|
||||||
xmlconfig.SetDeleteValue('ProjectOptions/General/IconPath/Value',
|
xmlconfig.SetDeleteValue('ProjectOptions/General/IconPath/Value',
|
||||||
IconPath,'');
|
IconPath,'');
|
||||||
xmlconfig.SetValue('ProjectOptions/General/TargetFileExt/Value'
|
xmlconfig.SetValue('ProjectOptions/General/TargetFileExt/Value'
|
||||||
@ -1307,9 +1312,11 @@ begin
|
|||||||
ProjectType := ProjectTypeNameToType(xmlconfig.GetValue(
|
ProjectType := ProjectTypeNameToType(xmlconfig.GetValue(
|
||||||
'ProjectOptions/General/ProjectType/Value', ''));
|
'ProjectOptions/General/ProjectType/Value', ''));
|
||||||
LoadFlags;
|
LoadFlags;
|
||||||
MainUnit := xmlconfig.GetValue('ProjectOptions/General/MainUnit/Value', -1);
|
MainUnitID := xmlconfig.GetValue('ProjectOptions/General/MainUnit/Value', -1);
|
||||||
ActiveEditorIndexAtStart := xmlconfig.GetValue(
|
ActiveEditorIndexAtStart := xmlconfig.GetValue(
|
||||||
'ProjectOptions/General/ActiveEditorIndexAtStart/Value', -1);
|
'ProjectOptions/General/ActiveEditorIndexAtStart/Value', -1);
|
||||||
|
AutoCreateForms := xmlconfig.GetValue(
|
||||||
|
'ProjectOptions/General/AutoCreateForms/Value', true);
|
||||||
IconPath := xmlconfig.GetValue('ProjectOptions/General/IconPath/Value', './');
|
IconPath := xmlconfig.GetValue('ProjectOptions/General/IconPath/Value', './');
|
||||||
TargetFileExt := xmlconfig.GetValue(
|
TargetFileExt := xmlconfig.GetValue(
|
||||||
'ProjectOptions/General/TargetFileExt/Value', DefaultTargetFileExt);
|
'ProjectOptions/General/TargetFileExt/Value', DefaultTargetFileExt);
|
||||||
@ -1373,10 +1380,10 @@ begin
|
|||||||
AUnit.OnUnitNameChange:=@OnUnitNameChange;
|
AUnit.OnUnitNameChange:=@OnUnitNameChange;
|
||||||
|
|
||||||
// check if this is the new Main Unit
|
// check if this is the new Main Unit
|
||||||
if MainUnit=NewIndex then
|
if MainUnitID=NewIndex then
|
||||||
MainUnitInfo.IncreaseAutoRevertLock;
|
MainUnitInfo.IncreaseAutoRevertLock;
|
||||||
|
|
||||||
if AddToProjectFile and (MainUnit>=0) and (MainUnit<>NewIndex) then begin
|
if AddToProjectFile and (MainUnitID>=0) and (MainUnitID<>NewIndex) then begin
|
||||||
// add unit to uses section
|
// add unit to uses section
|
||||||
ShortUnitName:=AUnit.UnitName;
|
ShortUnitName:=AUnit.UnitName;
|
||||||
if (ShortUnitName<>'') and (not UnitIsUsed(ShortUnitName)) then
|
if (ShortUnitName<>'') and (not UnitIsUsed(ShortUnitName)) then
|
||||||
@ -1396,20 +1403,20 @@ begin
|
|||||||
if (Index<0) or (Index>=UnitCount) then begin
|
if (Index<0) or (Index>=UnitCount) then begin
|
||||||
raise Exception.Create('ERROR: TProject.RemoveUnit index out of bounds');
|
raise Exception.Create('ERROR: TProject.RemoveUnit index out of bounds');
|
||||||
end;
|
end;
|
||||||
if (Index=MainUnit) then begin
|
if (Index=MainUnitID) then begin
|
||||||
raise Exception.Create('ERROR: TProject.RemoveUnit index = MainUnit');
|
raise Exception.Create('ERROR: TProject.RemoveUnit index = MainUnit');
|
||||||
end;
|
end;
|
||||||
OldUnitInfo:=Units[Index];
|
OldUnitInfo:=Units[Index];
|
||||||
Modified:=true;
|
Modified:=true;
|
||||||
|
|
||||||
if (MainUnit>=0) then begin
|
if (MainUnitID>=0) then begin
|
||||||
// remove unit from uses section and from createforms in program file
|
// remove unit from uses section and from createforms in program file
|
||||||
if (OldUnitInfo.IsPartOfProject) then begin
|
if (OldUnitInfo.IsPartOfProject) then begin
|
||||||
if (OldUnitInfo.UnitName<>'') then
|
if (OldUnitInfo.UnitName<>'') then
|
||||||
CodeToolBoss.RemoveUnitFromAllUsesSections(Units[MainUnit].Source,
|
CodeToolBoss.RemoveUnitFromAllUsesSections(Units[MainUnitID].Source,
|
||||||
OldUnitInfo.UnitName);
|
OldUnitInfo.UnitName);
|
||||||
if (OldUnitInfo.FormName<>'') then
|
if (OldUnitInfo.FormName<>'') then
|
||||||
CodeToolBoss.RemoveCreateFormStatement(Units[MainUnit].Source,
|
CodeToolBoss.RemoveCreateFormStatement(Units[MainUnitID].Source,
|
||||||
OldUnitInfo.FormName);
|
OldUnitInfo.FormName);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1419,7 +1426,7 @@ begin
|
|||||||
Bookmarks.DeleteAllWithEditorIndex(OldUnitInfo.EditorIndex);
|
Bookmarks.DeleteAllWithEditorIndex(OldUnitInfo.EditorIndex);
|
||||||
|
|
||||||
// adjust MainUnit
|
// adjust MainUnit
|
||||||
if MainUnit>=Index then dec(fMainUnit);
|
if MainUnitID>=Index then dec(fMainUnitID);
|
||||||
|
|
||||||
// delete unitinfo instance
|
// delete unitinfo instance
|
||||||
OldUnitInfo.Free;
|
OldUnitInfo.Free;
|
||||||
@ -1445,7 +1452,7 @@ begin
|
|||||||
fCompilerOptions.Clear;
|
fCompilerOptions.Clear;
|
||||||
fIconPath := '';
|
fIconPath := '';
|
||||||
fJumpHistory.Clear;
|
fJumpHistory.Clear;
|
||||||
fMainUnit := -1;
|
fMainUnitID := -1;
|
||||||
fModified := false;
|
fModified := false;
|
||||||
fOutputDirectory := '.';
|
fOutputDirectory := '.';
|
||||||
fProjectInfoFile := '';
|
fProjectInfoFile := '';
|
||||||
@ -1466,14 +1473,14 @@ begin
|
|||||||
FFlags:=AValue;
|
FFlags:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProject.SetMainUnit(const AValue: Integer);
|
procedure TProject.SetMainUnitID(const AValue: Integer);
|
||||||
begin
|
begin
|
||||||
if fMainUnit=AValue then exit;
|
if fMainUnitID=AValue then exit;
|
||||||
if (fMainUnit>=0) and (fMainUnit<UnitCount) then begin
|
if (fMainUnitID>=0) and (fMainUnitID<UnitCount) then begin
|
||||||
MainUnitInfo.DecreaseAutoRevertLock;
|
MainUnitInfo.DecreaseAutoRevertLock;
|
||||||
end;
|
end;
|
||||||
fMainUnit:=AValue;
|
fMainUnitID:=AValue;
|
||||||
if (fMainUnit>=0) and (fMainUnit<UnitCount) then begin
|
if (fMainUnitID>=0) and (fMainUnitID<UnitCount) then begin
|
||||||
MainUnitInfo.IncreaseAutoRevertLock;
|
MainUnitInfo.IncreaseAutoRevertLock;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1561,7 +1568,7 @@ end;
|
|||||||
function TProject.AddCreateFormToProjectFile(
|
function TProject.AddCreateFormToProjectFile(
|
||||||
const AClassName,AName:string):boolean;
|
const AClassName,AName:string):boolean;
|
||||||
begin
|
begin
|
||||||
Result:=CodeToolBoss.AddCreateFormStatement(Units[MainUnit].Source,
|
Result:=CodeToolBoss.AddCreateFormStatement(MainUnitInfo.Source,
|
||||||
AClassName,AName);
|
AClassName,AName);
|
||||||
if Result then Modified:=true;
|
if Result then Modified:=true;
|
||||||
end;
|
end;
|
||||||
@ -1569,7 +1576,7 @@ end;
|
|||||||
function TProject.RemoveCreateFormFromProjectFile(
|
function TProject.RemoveCreateFormFromProjectFile(
|
||||||
const AClassName,AName:string):boolean;
|
const AClassName,AName:string):boolean;
|
||||||
begin
|
begin
|
||||||
Result:=CodeToolBoss.RemoveCreateFormStatement(Units[MainUnit].Source,
|
Result:=CodeToolBoss.RemoveCreateFormStatement(MainUnitInfo.Source,
|
||||||
AName);
|
AName);
|
||||||
if Result then Modified:=true;
|
if Result then Modified:=true;
|
||||||
end;
|
end;
|
||||||
@ -1578,7 +1585,7 @@ function TProject.FormIsCreatedInProjectFile(
|
|||||||
const AClassname,AName:string):boolean;
|
const AClassname,AName:string):boolean;
|
||||||
var p: integer;
|
var p: integer;
|
||||||
begin
|
begin
|
||||||
Result:=(CodeToolBoss.FindCreateFormStatement(Units[MainUnit].Source,
|
Result:=(CodeToolBoss.FindCreateFormStatement(MainUnitInfo.Source,
|
||||||
1,AClassName,AName,p)=0);
|
1,AClassName,AName,p)=0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1641,7 +1648,7 @@ end;
|
|||||||
function TProject.UnitIsUsed(const ShortUnitName:string):boolean;
|
function TProject.UnitIsUsed(const ShortUnitName:string):boolean;
|
||||||
var NamePos, InPos: integer;
|
var NamePos, InPos: integer;
|
||||||
begin
|
begin
|
||||||
Result:=CodeToolBoss.FindUnitInAllUsesSections(Units[MainUnit].Source,
|
Result:=CodeToolBoss.FindUnitInAllUsesSections(MainUnitInfo.Source,
|
||||||
ShortUnitName,NamePos,InPos);
|
ShortUnitName,NamePos,InPos);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1701,7 +1708,7 @@ end;
|
|||||||
|
|
||||||
function TProject.IsVirtual: boolean;
|
function TProject.IsVirtual: boolean;
|
||||||
begin
|
begin
|
||||||
Result:=(MainUnit>=0) and Units[MainUnit].IsVirtual;
|
Result:=(MainUnitID>=0) and MainUnitInfo.IsVirtual;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TProject.IndexOf(AUnitInfo: TUnitInfo):integer;
|
function TProject.IndexOf(AUnitInfo: TUnitInfo):integer;
|
||||||
@ -1861,14 +1868,14 @@ end;
|
|||||||
|
|
||||||
function TProject.GetMainFilename: String;
|
function TProject.GetMainFilename: String;
|
||||||
begin
|
begin
|
||||||
if MainUnit>=0 then Result:=Units[MainUnit].Filename
|
if MainUnitID>=0 then Result:=MainUnitInfo.Filename
|
||||||
else Result:='';
|
else Result:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TProject.GetMainUnitInfo: TUnitInfo;
|
function TProject.GetMainUnitInfo: TUnitInfo;
|
||||||
begin
|
begin
|
||||||
if (MainUnit>=0) and (MainUnit<UnitCount) then
|
if (MainUnitID>=0) and (MainUnitID<UnitCount) then
|
||||||
Result:=Units[MainUnit]
|
Result:=Units[MainUnitID]
|
||||||
else
|
else
|
||||||
Result:=nil;
|
Result:=nil;
|
||||||
end;
|
end;
|
||||||
@ -2031,7 +2038,7 @@ begin
|
|||||||
if (OldUnitName<>'') and (ProjectType in [ptProgram, ptApplication]) then
|
if (OldUnitName<>'') and (ProjectType in [ptProgram, ptApplication]) then
|
||||||
begin
|
begin
|
||||||
// rename unit in program uses section
|
// rename unit in program uses section
|
||||||
CodeToolBoss.RenameUsedUnit(Units[MainUnit].Source
|
CodeToolBoss.RenameUsedUnit(MainUnitInfo.Source
|
||||||
,OldUnitName,NewUnitName,'');
|
,OldUnitName,NewUnitName,'');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -2245,6 +2252,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.98 2003/03/11 09:57:51 mattias
|
||||||
|
implemented ProjectOpt: AutoCreateNewForms, added designer Show Options
|
||||||
|
|
||||||
Revision 1.97 2003/03/08 21:51:57 mattias
|
Revision 1.97 2003/03/08 21:51:57 mattias
|
||||||
make resource string dialog nearly complete
|
make resource string dialog nearly complete
|
||||||
|
|
||||||
|
|||||||
@ -335,10 +335,9 @@ begin
|
|||||||
Parent:=NoteBook.Page[1];
|
Parent:=NoteBook.Page[1];
|
||||||
Left:=FormsAutoCreatedListBox.Left+5;
|
Left:=FormsAutoCreatedListBox.Left+5;
|
||||||
Top:=FormsAutoCreatedListBox.Top+FormsAutoCreatedListBox.Height+5;
|
Top:=FormsAutoCreatedListBox.Top+FormsAutoCreatedListBox.Height+5;
|
||||||
Width:=200;
|
Width:=300;
|
||||||
Height:=25;
|
Height:=25;
|
||||||
Caption:=dlgAutoCreateNewForms ;
|
Caption:=dlgAutoCreateNewForms;
|
||||||
Enabled:= false;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -425,7 +424,7 @@ begin
|
|||||||
with FormsAutoCreateNewFormsCheckBox do begin
|
with FormsAutoCreateNewFormsCheckBox do begin
|
||||||
Left:=FormsMoveAutoCreatedFormUpBtn.Left;
|
Left:=FormsMoveAutoCreatedFormUpBtn.Left;
|
||||||
Top:=FormsAutoCreatedListBox.Top+FormsAutoCreatedListBox.Height+5;
|
Top:=FormsAutoCreatedListBox.Top+FormsAutoCreatedListBox.Height+5;
|
||||||
Width:=200;
|
Width:=300;
|
||||||
Height:=25;
|
Height:=25;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -445,6 +444,7 @@ begin
|
|||||||
SaveClosedUnitInfoCheckBox.Checked:=(pfSaveClosedUnits in AProject.Flags);
|
SaveClosedUnitInfoCheckBox.Checked:=(pfSaveClosedUnits in AProject.Flags);
|
||||||
SaveOnlyProjectUnitInfoCheckBox.Checked:=
|
SaveOnlyProjectUnitInfoCheckBox.Checked:=
|
||||||
(pfSaveOnlyProjectUnits in AProject.Flags);
|
(pfSaveOnlyProjectUnits in AProject.Flags);
|
||||||
|
FormsAutoCreateNewFormsCheckBox.Checked:=Project.AutoCreateForms;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectOptionsDialog.ProjectOptionsClose(Sender: TObject; var Action: TCloseAction);
|
procedure TProjectOptionsDialog.ProjectOptionsClose(Sender: TObject; var Action: TCloseAction);
|
||||||
@ -469,6 +469,8 @@ begin
|
|||||||
Exclude(NewFlags,pfSaveOnlyProjectUnits);
|
Exclude(NewFlags,pfSaveOnlyProjectUnits);
|
||||||
Project.Flags:=NewFlags;
|
Project.Flags:=NewFlags;
|
||||||
|
|
||||||
|
Project.AutoCreateForms:=FormsAutoCreateNewFormsCheckBox.Checked;
|
||||||
|
|
||||||
SetAutoCreateForms;
|
SetAutoCreateForms;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -478,7 +480,7 @@ end;
|
|||||||
function TProjectOptionsDialog.GetAutoCreatedFormsList: TStrings;
|
function TProjectOptionsDialog.GetAutoCreatedFormsList: TStrings;
|
||||||
var i, j: integer;
|
var i, j: integer;
|
||||||
begin
|
begin
|
||||||
if (FProject<>nil) and (FProject.MainUnit>=0) then begin
|
if (FProject<>nil) and (FProject.MainUnitID>=0) then begin
|
||||||
Result:=CodeToolBoss.ListAllCreateFormStatements(
|
Result:=CodeToolBoss.ListAllCreateFormStatements(
|
||||||
FProject.MainUnitInfo.Source);
|
FProject.MainUnitInfo.Source);
|
||||||
if Result<>nil then begin
|
if Result<>nil then begin
|
||||||
@ -675,7 +677,7 @@ procedure TProjectOptionsDialog.SetAutoCreateForms;
|
|||||||
var i: integer;
|
var i: integer;
|
||||||
OldList: TStrings;
|
OldList: TStrings;
|
||||||
begin
|
begin
|
||||||
if (Project.MainUnit < 0) or (Project.ProjectType in [ptCustomProgram]) then
|
if (Project.MainUnitID < 0) or (Project.ProjectType in [ptCustomProgram]) then
|
||||||
exit;
|
exit;
|
||||||
OldList:= GetAutoCreatedFormsList;
|
OldList:= GetAutoCreatedFormsList;
|
||||||
if (OldList = nil) then exit;
|
if (OldList = nil) then exit;
|
||||||
@ -691,7 +693,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if not CodeToolBoss.SetAllCreateFromStatements(
|
if not CodeToolBoss.SetAllCreateFromStatements(
|
||||||
Project.Units[Project.MainUnit].Source, FormsAutoCreatedListBox.Items) then
|
Project.MainUnitInfo.Source, FormsAutoCreatedListBox.Items) then
|
||||||
begin
|
begin
|
||||||
MessageDlg('Error',
|
MessageDlg('Error',
|
||||||
'Unable to change the auto create form list in the program source.' + LineEnding +
|
'Unable to change the auto create form list in the program source.' + LineEnding +
|
||||||
|
|||||||
@ -199,11 +199,7 @@ msgid "Ask"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautoform
|
#: lazarusidestrconsts:dlgautoform
|
||||||
msgid "Auto create forms"
|
msgid "Auto create form when opening unit"
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautocreatenewforms
|
|
||||||
msgid "Auto create new forms"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautodel
|
#: lazarusidestrconsts:dlgautodel
|
||||||
@ -2406,6 +2402,10 @@ msgstr ""
|
|||||||
msgid "Show Options"
|
msgid "Show Options"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: lazarusidestrconsts:fdmshowoptions
|
||||||
|
msgid "Show Options for form editing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgshowscrollhint
|
#: lazarusidestrconsts:dlgshowscrollhint
|
||||||
msgid "Show Scroll Hint"
|
msgid "Show Scroll Hint"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -2930,6 +2930,10 @@ msgstr ""
|
|||||||
msgid "Watches"
|
msgid "Watches"
|
||||||
msgstr "Watches"
|
msgstr "Watches"
|
||||||
|
|
||||||
|
#: lazarusidestrconsts:dlgautocreatenewforms
|
||||||
|
msgid "When creating new forms, add them to auto-created forms"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgwholewordsonly
|
#: lazarusidestrconsts:dlgwholewordsonly
|
||||||
msgid "Whole Words Only"
|
msgid "Whole Words Only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@ -199,12 +199,8 @@ msgid "Ask"
|
|||||||
msgstr "Preguntar"
|
msgstr "Preguntar"
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautoform
|
#: lazarusidestrconsts:dlgautoform
|
||||||
msgid "Auto create forms"
|
msgid "Auto create form when opening unit"
|
||||||
msgstr "Crear formas automáticamente"
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautocreatenewforms
|
|
||||||
msgid "Auto create new forms"
|
|
||||||
msgstr "Automáticamente crear nuevas formas"
|
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautodel
|
#: lazarusidestrconsts:dlgautodel
|
||||||
msgid "Auto delete file"
|
msgid "Auto delete file"
|
||||||
@ -2406,6 +2402,10 @@ msgstr "Mostrar nada (s
|
|||||||
msgid "Show Options"
|
msgid "Show Options"
|
||||||
msgstr "Mostrar Opciones"
|
msgstr "Mostrar Opciones"
|
||||||
|
|
||||||
|
#: lazarusidestrconsts:fdmshowoptions
|
||||||
|
msgid "Show Options for form editing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgshowscrollhint
|
#: lazarusidestrconsts:dlgshowscrollhint
|
||||||
msgid "Show Scroll Hint"
|
msgid "Show Scroll Hint"
|
||||||
msgstr "Mostrar desplazar sugerencia"
|
msgstr "Mostrar desplazar sugerencia"
|
||||||
@ -2930,6 +2930,10 @@ msgstr "Advertir sobre compilar"
|
|||||||
msgid "Watches"
|
msgid "Watches"
|
||||||
msgstr "Vigilantes"
|
msgstr "Vigilantes"
|
||||||
|
|
||||||
|
#: lazarusidestrconsts:dlgautocreatenewforms
|
||||||
|
msgid "When creating new forms, add them to auto-created forms"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgwholewordsonly
|
#: lazarusidestrconsts:dlgwholewordsonly
|
||||||
msgid "Whole Words Only"
|
msgid "Whole Words Only"
|
||||||
msgstr "Sólo palabras completas"
|
msgstr "Sólo palabras completas"
|
||||||
|
|||||||
@ -208,12 +208,8 @@ msgid "Ask"
|
|||||||
msgstr "Demander"
|
msgstr "Demander"
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautoform
|
#: lazarusidestrconsts:dlgautoform
|
||||||
msgid "Auto create forms"
|
msgid "Auto create form when opening unit"
|
||||||
msgstr "Création auto des fiches"
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautocreatenewforms
|
|
||||||
msgid "Auto create new forms"
|
|
||||||
msgstr "Auto créer les nouvelles fiches"
|
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautodel
|
#: lazarusidestrconsts:dlgautodel
|
||||||
msgid "Auto delete file"
|
msgid "Auto delete file"
|
||||||
@ -2415,6 +2411,10 @@ msgstr "Affiche rien (sauf les erreurs)"
|
|||||||
msgid "Show Options"
|
msgid "Show Options"
|
||||||
msgstr "Voir les options"
|
msgstr "Voir les options"
|
||||||
|
|
||||||
|
#: lazarusidestrconsts:fdmshowoptions
|
||||||
|
msgid "Show Options for form editing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgshowscrollhint
|
#: lazarusidestrconsts:dlgshowscrollhint
|
||||||
msgid "Show Scroll Hint"
|
msgid "Show Scroll Hint"
|
||||||
msgstr "Afficher les scroll de conseils"
|
msgstr "Afficher les scroll de conseils"
|
||||||
@ -2939,6 +2939,10 @@ msgstr "Erreur de compilation"
|
|||||||
msgid "Watches"
|
msgid "Watches"
|
||||||
msgstr "Points de suivi"
|
msgstr "Points de suivi"
|
||||||
|
|
||||||
|
#: lazarusidestrconsts:dlgautocreatenewforms
|
||||||
|
msgid "When creating new forms, add them to auto-created forms"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgwholewordsonly
|
#: lazarusidestrconsts:dlgwholewordsonly
|
||||||
msgid "Whole Words Only"
|
msgid "Whole Words Only"
|
||||||
msgstr "Mots entiers seulement"
|
msgstr "Mots entiers seulement"
|
||||||
|
|||||||
@ -919,7 +919,7 @@ msgid "Show editor hints"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautoform
|
#: lazarusidestrconsts:dlgautoform
|
||||||
msgid "Auto create forms"
|
msgid "Auto create form when opening unit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlggrabbercolor
|
#: lazarusidestrconsts:dlggrabbercolor
|
||||||
@ -1907,7 +1907,7 @@ msgid "Available forms:"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautocreatenewforms
|
#: lazarusidestrconsts:dlgautocreatenewforms
|
||||||
msgid "Auto create new forms"
|
msgid "When creating new forms, add them to auto-created forms"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgsaveeditorinfo
|
#: lazarusidestrconsts:dlgsaveeditorinfo
|
||||||
@ -2254,6 +2254,10 @@ msgstr ""
|
|||||||
msgid "Option: Snap to guide lines"
|
msgid "Option: Snap to guide lines"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: lazarusidestrconsts:fdmshowoptions
|
||||||
|
msgid "Show Options for form editing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:srkmeditkeys
|
#: lazarusidestrconsts:srkmeditkeys
|
||||||
msgid "Edit Keys"
|
msgid "Edit Keys"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@ -199,12 +199,8 @@ msgid "Ask"
|
|||||||
msgstr "óÐÒÏÓÉÔØ"
|
msgstr "óÐÒÏÓÉÔØ"
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautoform
|
#: lazarusidestrconsts:dlgautoform
|
||||||
msgid "Auto create forms"
|
msgid "Auto create form when opening unit"
|
||||||
msgstr "á×ÔÏÓÏÚÄÁÎÉÅ ÆÏÒÍ"
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautocreatenewforms
|
|
||||||
msgid "Auto create new forms"
|
|
||||||
msgstr "óÏÚÄÁ×ÁÔØ Á×ÔÏÍÁÔÉÞÅÓËÉ ÎÏ×ÙÅ ÆÏÒÍÙ"
|
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgautodel
|
#: lazarusidestrconsts:dlgautodel
|
||||||
msgid "Auto delete file"
|
msgid "Auto delete file"
|
||||||
@ -2406,6 +2402,10 @@ msgstr "
|
|||||||
msgid "Show Options"
|
msgid "Show Options"
|
||||||
msgstr "ðÏËÁÚÁÔØ ÏÐÃÉÉ"
|
msgstr "ðÏËÁÚÁÔØ ÏÐÃÉÉ"
|
||||||
|
|
||||||
|
#: lazarusidestrconsts:fdmshowoptions
|
||||||
|
msgid "Show Options for form editing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgshowscrollhint
|
#: lazarusidestrconsts:dlgshowscrollhint
|
||||||
msgid "Show Scroll Hint"
|
msgid "Show Scroll Hint"
|
||||||
msgstr "ðÏËÁÚÁÔØ ÐÏÄÓËÁÚËÉ ÐÒÏËÒÕÔËÉ"
|
msgstr "ðÏËÁÚÁÔØ ÐÏÄÓËÁÚËÉ ÐÒÏËÒÕÔËÉ"
|
||||||
@ -2930,6 +2930,10 @@ msgstr "
|
|||||||
msgid "Watches"
|
msgid "Watches"
|
||||||
msgstr "ïËÎÏ ÎÁÂÌÀÄÅÎÉÊ"
|
msgstr "ïËÎÏ ÎÁÂÌÀÄÅÎÉÊ"
|
||||||
|
|
||||||
|
#: lazarusidestrconsts:dlgautocreatenewforms
|
||||||
|
msgid "When creating new forms, add them to auto-created forms"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: lazarusidestrconsts:dlgwholewordsonly
|
#: lazarusidestrconsts:dlgwholewordsonly
|
||||||
msgid "Whole Words Only"
|
msgid "Whole Words Only"
|
||||||
msgstr "ôÏÌØËÏ ÃÅÌÙÅ ÓÌÏ×Á"
|
msgstr "ôÏÌØËÏ ÃÅÌÙÅ ÓÌÏ×Á"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user