IDEIntf: DoShowSearchResultsView: using one enum instead of multi bool

git-svn-id: trunk@46856 -
This commit is contained in:
mattias 2014-11-15 12:36:41 +00:00
parent ead812fb31
commit 925368d194
2 changed files with 26 additions and 2 deletions

View File

@ -306,6 +306,13 @@ type
iwcsNormal,
iwcsDocked
);
TIWGetFormState = (
iwgfDisabled, // create if not exist with disabled autosizing
iwgfEnabled, // create if not exists
iwgfShow, // create and show
iwgfShowOnTop // create, show and bring to front
);
TIWGetFormStates = set of TIWGetFormState;
TCreateIDEWindowMethod = procedure(Sender: TObject; aFormName: string;
var AForm: TCustomForm; DoDisableAutoSizing: boolean) of object;

View File

@ -18,7 +18,7 @@ interface
uses
Classes, SysUtils, LCLProc, Forms, Controls, Dialogs, PropEdits, LazHelpHTML,
IDEOptionsIntf, CompOptsIntf, ProjectIntf,
IDEExternToolIntf, SrcEditorIntf;
IDEExternToolIntf, SrcEditorIntf, IDEWindowIntf;
type
// open file flags
@ -295,7 +295,8 @@ type
procedure AbortBuild; virtual; abstract;
// search results
procedure DoShowSearchResultsView(Show: boolean; BringToFront: boolean = False); virtual; abstract;
procedure DoShowSearchResultsView(Show: boolean; BringToFront: boolean = False); deprecated;
procedure DoShowSearchResultsView(State: TIWGetFormState = iwgfShowOnTop); virtual; abstract;
// designer
function GetDesignerForProjectEditor(AEditor: TSourceEditorInterface;
@ -495,6 +496,22 @@ begin
DoOpenIDEOptions(AEditor, ACaption, [], []);
end;
procedure TLazIDEInterface.DoShowSearchResultsView(Show: boolean;
BringToFront: boolean);
var
State: TIWGetFormState;
begin
if Show then begin
if BringToFront then
State:=iwgfShowOnTop
else
State:=iwgfShow;
end else begin
State:=iwgfEnabled;
end;
DoShowSearchResultsView(State);
end;
procedure TLazIDEInterface.RemoveAllHandlersOfObject(AnObject: TObject);
var
HandlerType: TLazarusIDEHandlerType;