mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:39:44 +02:00
IDEIntf: moved restore ide windows
git-svn-id: trunk@26226 -
This commit is contained in:
parent
e0cba9ec28
commit
ff48f9db59
15
ide/main.pp
15
ide/main.pp
@ -2225,21 +2225,10 @@ begin
|
||||
end;
|
||||
|
||||
procedure TMainIDE.RestoreIDEWindows;
|
||||
var
|
||||
i: Integer;
|
||||
ALayout: TSimpleWindowLayout;
|
||||
AForm: TCustomForm;
|
||||
begin
|
||||
DoCallNotifyHandler(lihtIDERestoreWindows);
|
||||
if IDEDockMaster<>nil then
|
||||
exit;
|
||||
for i:=0 to IDEWindowCreators.SimpleLayoutStorage.Count-1 do begin
|
||||
ALayout:=IDEWindowCreators.SimpleLayoutStorage[i];
|
||||
if not ALayout.Visible then continue;
|
||||
AForm:=IDEWindowCreators.GetForm(ALayout.FormID,true);
|
||||
if AForm=nil then continue;
|
||||
IDEWindowCreators.ShowForm(AForm,false);
|
||||
end;
|
||||
if IDEDockMaster=nil then
|
||||
IDEWindowCreators.RestoreSimpleLayout;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.FreeIDEWindows;
|
||||
|
@ -329,6 +329,7 @@ type
|
||||
property OnShowForm: TShowIDEWindowEvent read FOnShowForm write FOnShowForm; // set by the IDE to implement a default
|
||||
|
||||
property SimpleLayoutStorage: TSimpleWindowLayoutList read FSimpleLayoutStorage;
|
||||
procedure RestoreSimpleLayout;
|
||||
end;
|
||||
|
||||
var
|
||||
@ -1483,6 +1484,21 @@ begin
|
||||
TCustomForm(AForm).DisableAutoSizing;
|
||||
end;
|
||||
|
||||
procedure TIDEWindowCreatorList.RestoreSimpleLayout;
|
||||
var
|
||||
i: Integer;
|
||||
ALayout: TSimpleWindowLayout;
|
||||
AForm: TCustomForm;
|
||||
begin
|
||||
for i:=0 to SimpleLayoutStorage.Count-1 do begin
|
||||
ALayout:=SimpleLayoutStorage[i];
|
||||
if not ALayout.Visible then continue;
|
||||
AForm:=GetForm(ALayout.FormID,true);
|
||||
if AForm=nil then continue;
|
||||
ShowForm(AForm,false);
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TIDEDockMaster }
|
||||
|
||||
function TIDEDockMaster.AddableInWindowMenu(AForm: TCustomForm): boolean;
|
||||
|
@ -1927,6 +1927,8 @@ begin
|
||||
|
||||
IDEWindowCreators.Add(NonModalIDEWindowNames[nmiwPkgGraphExplorer],
|
||||
nil,@CreateIDEWindow,'250','200','+400','+300');
|
||||
IDEWindowCreators.Add('PackageEditor_',
|
||||
nil,@CreateIDEWindow,'250','200','+400','+300');
|
||||
RegisterStandardPackageEditorMenuItems;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user