mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 09:39:07 +02:00
IDE: connect source editor with simpleidewindowlayout
git-svn-id: trunk@26195 -
This commit is contained in:
parent
859bf0d396
commit
0238049950
@ -62,7 +62,7 @@
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="8"/>
|
||||
<Version Value="9"/>
|
||||
<Target>
|
||||
<Filename Value="miniide1"/>
|
||||
</Target>
|
||||
@ -70,11 +70,6 @@
|
||||
<IncludeFiles Value="$(ProjOutDir)/"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="True"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<Checks>
|
||||
<IOChecks Value="True"/>
|
||||
|
@ -296,7 +296,8 @@ type
|
||||
property Filename: string read FFilename write SetFilename;
|
||||
procedure SetLazarusDefaultFilename;
|
||||
procedure GetDefaultFPCSourceDirectory;
|
||||
procedure CreateWindowLayout(const TheFormID: string);
|
||||
function CreateWindowLayout(const TheFormID: string): TSimpleWindowLayout;
|
||||
function CreateWindowLayout(const TheForm: TCustomForm): TSimpleWindowLayout;
|
||||
function IsDebuggerClassDefined: boolean;
|
||||
function GetTestBuildDirectory: string;
|
||||
function GetFPCSourceDirectory: string;
|
||||
@ -1506,13 +1507,22 @@ begin
|
||||
CreateWindowLayout(DefaultObjectInspectorName);
|
||||
end;
|
||||
|
||||
procedure TEnvironmentOptions.CreateWindowLayout(const TheFormID: string);
|
||||
function TEnvironmentOptions.CreateWindowLayout(const TheFormID: string
|
||||
): TSimpleWindowLayout;
|
||||
begin
|
||||
if TheFormID='' then
|
||||
RaiseException('TEnvironmentOptions.CreateWindowLayout TheFormID empty');
|
||||
if IDEWindowLayoutList.ItemByFormID(TheFormID)<>nil then
|
||||
RaiseException('TEnvironmentOptions.CreateWindowLayout TheFormID exists');
|
||||
IDEWindowLayoutList.Add(TSimpleWindowLayout.Create(TheFormID));
|
||||
Result:=TSimpleWindowLayout.Create(TheFormID);
|
||||
IDEWindowLayoutList.Add(Result);
|
||||
end;
|
||||
|
||||
function TEnvironmentOptions.CreateWindowLayout(const TheForm: TCustomForm
|
||||
): TSimpleWindowLayout;
|
||||
begin
|
||||
Result:=CreateWindowLayout(TheForm.Name);
|
||||
Result.Form:=TheForm;
|
||||
end;
|
||||
|
||||
function TEnvironmentOptions.IsDebuggerClassDefined: boolean;
|
||||
|
@ -4816,6 +4816,7 @@ constructor TSourceNotebook.Create(AOwner: TComponent);
|
||||
var
|
||||
i: Integer;
|
||||
n: TComponent;
|
||||
Layout: TSimpleWindowLayout;
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FManager := TSourceEditorManager(AOwner);
|
||||
@ -4832,6 +4833,7 @@ begin
|
||||
end
|
||||
else
|
||||
Name := NonModalIDEWindowNames[nmiwSourceNoteBookName];
|
||||
|
||||
if Manager.SourceWindowCount > 0 then
|
||||
FBaseCaption := locWndSrcEditor + ' (' + IntToStr(Manager.SourceWindowCount+1) + ')'
|
||||
else
|
||||
@ -4840,9 +4842,14 @@ begin
|
||||
KeyPreview:=true;
|
||||
FProcessingCommand := false;
|
||||
|
||||
if EnvironmentOptions.IDEWindowLayoutList.ItemByFormID(self.Name) = nil then begin
|
||||
EnvironmentOptions.CreateWindowLayout(self.name);
|
||||
EnvironmentOptions.IDEWindowLayoutList.ItemByFormID(self.Name).Clear;
|
||||
Layout:=EnvironmentOptions.IDEWindowLayoutList.ItemByFormID(self.Name);
|
||||
if Layout = nil then
|
||||
begin
|
||||
Layout:=EnvironmentOptions.CreateWindowLayout(self);
|
||||
Layout.Clear;
|
||||
end else
|
||||
begin
|
||||
Layout.Form:=Self;
|
||||
end;
|
||||
|
||||
FSourceEditorList := TList.Create;
|
||||
|
Loading…
Reference in New Issue
Block a user