diff --git a/components/ideintf/idewindowintf.pas b/components/ideintf/idewindowintf.pas index bfe76e8f2c..b965cf8473 100644 --- a/components/ideintf/idewindowintf.pas +++ b/components/ideintf/idewindowintf.pas @@ -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; diff --git a/components/ideintf/lazideintf.pas b/components/ideintf/lazideintf.pas index cb6f55d16d..76cd7d9ddc 100644 --- a/components/ideintf/lazideintf.pas +++ b/components/ideintf/lazideintf.pas @@ -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;