IDEIntf: moved restore ide windows

git-svn-id: trunk@26226 -
This commit is contained in:
mattias 2010-06-21 10:05:23 +00:00
parent e0cba9ec28
commit ff48f9db59
3 changed files with 20 additions and 13 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;