IDEIntf: TIDEDockMaster can now show the simple layout options

git-svn-id: trunk@31122 -
This commit is contained in:
mattias 2011-06-07 07:08:04 +00:00
parent a452810bf5
commit bca9900c3f
3 changed files with 7 additions and 3 deletions

View File

@ -215,6 +215,7 @@ begin
IDEAnchorDockMaster:=Self;
DockMaster.OnCreateControl:=@DockMasterCreateControl;
DockMaster.OnShowOptions:=@ShowAnchorDockOptions;
FHideSimpleLayoutOptions:=true;
end;
destructor TIDEAnchorDockMaster.Destroy;

View File

@ -65,6 +65,7 @@ type
private
FLayouts: TSimpleWindowLayoutList;
FLayout: TSimpleWindowLayout;
FShowSimpleLayout: boolean;
function GetPlacementRadioButtons(APlacement: TIDEWindowPlacement): TRadioButton;
procedure SetLayout(const AValue: TSimpleWindowLayout);
procedure SetWindowPositionsItem(Index: integer);
@ -122,12 +123,11 @@ begin
HideMessagesIconsCheckBox.Checked := HideMessagesIcons;
TitleStartsWithProjectCheckBox.Checked:=IDETitleStartsWithProject;
ProjectDirInIdeTitleCheckBox.Checked:=IDEProjectDirectoryInIdeTitle;
end;
FLayouts.Assign(IDEWindowCreators.SimpleLayoutStorage);
if IDEDockMaster=nil then begin
if FShowSimpleLayout then begin
// Window Positions
FLayouts.Assign(IDEWindowCreators.SimpleLayoutStorage);
WindowPositionsGroupBox.Parent:=Self;
@ -380,6 +380,7 @@ constructor TWindowOptionsFrame.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
FLayouts:=TSimpleWindowLayoutList.Create;
FShowSimpleLayout:=(IDEDockMaster=nil) or (not IDEDockMaster.HideSimpleLayoutOptions);
end;
destructor TWindowOptionsFrame.Destroy;

View File

@ -293,7 +293,6 @@ type
TIDEWindowCreatorList = class
private
fItems: TFPList; // list of TIDEWindowCreator
FOnShowForm: TShowIDEWindowEvent;
FSimpleLayoutStorage: TSimpleWindowLayoutList;
function GetItems(Index: integer): TIDEWindowCreator;
procedure ErrorIfFormExists(FormName: string);
@ -340,12 +339,15 @@ type
{ TIDEDockMaster }
TIDEDockMaster = class
protected
FHideSimpleLayoutOptions: boolean;
public
procedure MakeIDEWindowDockable(AControl: TWinControl); virtual; abstract; // make AControl dockable, it can be docked and other dockable windows can be docked to it, this does not make it visible
procedure MakeIDEWindowDockSite(AForm: TCustomForm; ASides: TDockSides = [alBottom]); virtual; abstract; // make AForm a dock site, AForm can not be docked, its Parent must be kept nil, this does not make it visible
procedure ShowForm(AForm: TCustomForm; BringToFront: boolean); virtual; abstract; // make a form visible, set BringToFront=true if form should be shown on active screen and on front of other windows, normally this focus the form
function AddableInWindowMenu(AForm: TCustomForm): boolean; virtual;
procedure CloseAll; virtual; // close all forms, called after IDE has saved all and shuts down
property HideSimpleLayoutOptions: boolean read FHideSimpleLayoutOptions;
end;
var