mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 05:09:10 +02:00
IDEIntf: added handler IDEClose
git-svn-id: trunk@25944 -
This commit is contained in:
parent
02573ad6a6
commit
0e14f732e0
@ -35,37 +35,57 @@ unit RegisterEasyDockMgr;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Math, Classes, SysUtils, LCLProc, Forms, Controls, IDEWindowIntf,
|
Math, Classes, SysUtils, LCLProc, Forms, Controls, FileUtil,
|
||||||
|
LazIDEIntf, IDEWindowIntf,
|
||||||
uMakeSite;
|
uMakeSite;
|
||||||
|
|
||||||
|
const
|
||||||
|
DefaultConfigFileName = 'easydocklayout.lyt';
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TIDEEasyDockMaster }
|
{ TIDEEasyDockMaster }
|
||||||
|
|
||||||
TIDEEasyDockMaster = class(TIDEDockMaster)
|
TIDEEasyDockMaster = class(TIDEDockMaster)
|
||||||
|
function DockMasterRestore(const CtrlName: string; ASite: TWinControl
|
||||||
|
): TControl;
|
||||||
private
|
private
|
||||||
procedure GetDefaultBounds(AForm: TCustomForm; out Creator: TIDEWindowCreator;
|
procedure GetDefaultBounds(AForm: TCustomForm; out Creator: TIDEWindowCreator;
|
||||||
out NewBounds: TRect; out DockSiblingName: string; out DockAlign: TAlign);
|
out NewBounds: TRect; out DockSiblingName: string; out DockAlign: TAlign);
|
||||||
public
|
public
|
||||||
|
constructor Create;
|
||||||
|
destructor Destroy; override;
|
||||||
procedure MakeIDEWindowDockSite(AForm: TCustomForm); override;
|
procedure MakeIDEWindowDockSite(AForm: TCustomForm); override;
|
||||||
procedure MakeIDEWindowDockable(AControl: TWinControl); override;
|
procedure MakeIDEWindowDockable(AControl: TWinControl); override;
|
||||||
function IsDockSite(AForm: TCustomForm): boolean;
|
function IsDockSite(AForm: TCustomForm): boolean;
|
||||||
function IsDockable(AForm: TCustomForm): boolean;
|
function IsDockable(AForm: TCustomForm): boolean;
|
||||||
|
function GetDefaultLayoutFilename: string;
|
||||||
procedure LoadDefaultLayout; override;
|
procedure LoadDefaultLayout; override;
|
||||||
|
procedure SaveDefaultLayout;
|
||||||
procedure ShowForm(AForm: TCustomForm; BringToFront: boolean); override;
|
procedure ShowForm(AForm: TCustomForm; BringToFront: boolean); override;
|
||||||
|
procedure CloseAll; override;
|
||||||
|
procedure OnIDEClose(Sender: TObject);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
IDEEasyDockMaster: TIDEEasyDockMaster = nil;
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
// ToDo: register menu items, events and options
|
LazarusIDE.AddHandlerOnIDEClose(@IDEEasyDockMaster.OnIDEClose);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TIDEEasyDockMaster }
|
{ TIDEEasyDockMaster }
|
||||||
|
|
||||||
|
function TIDEEasyDockMaster.DockMasterRestore(const CtrlName: string;
|
||||||
|
ASite: TWinControl): TControl;
|
||||||
|
begin
|
||||||
|
Result:=IDEWindowCreators.GetForm(CtrlName,true);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TIDEEasyDockMaster.GetDefaultBounds(AForm: TCustomForm; out
|
procedure TIDEEasyDockMaster.GetDefaultBounds(AForm: TCustomForm; out
|
||||||
Creator: TIDEWindowCreator; out NewBounds: TRect; out DockSiblingName: string;
|
Creator: TIDEWindowCreator; out NewBounds: TRect; out DockSiblingName: string;
|
||||||
out DockAlign: TAlign);
|
out DockAlign: TAlign);
|
||||||
@ -88,6 +108,18 @@ begin
|
|||||||
NewBounds.Bottom:=Max(NewBounds.Top+100,NewBounds.Bottom);
|
NewBounds.Bottom:=Max(NewBounds.Top+100,NewBounds.Bottom);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
constructor TIDEEasyDockMaster.Create;
|
||||||
|
begin
|
||||||
|
IDEEasyDockMaster:=Self;
|
||||||
|
DockMaster.OnRestore:=@DockMasterRestore;
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TIDEEasyDockMaster.Destroy;
|
||||||
|
begin
|
||||||
|
IDEEasyDockMaster:=nil;
|
||||||
|
inherited Destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TIDEEasyDockMaster.MakeIDEWindowDockSite(AForm: TCustomForm);
|
procedure TIDEEasyDockMaster.MakeIDEWindowDockSite(AForm: TCustomForm);
|
||||||
var
|
var
|
||||||
Creator: TIDEWindowCreator;
|
Creator: TIDEWindowCreator;
|
||||||
@ -131,9 +163,25 @@ begin
|
|||||||
Result:=true;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEEasyDockMaster.LoadDefaultLayout;
|
function TIDEEasyDockMaster.GetDefaultLayoutFilename: string;
|
||||||
begin
|
begin
|
||||||
// ToDo: load the users default layout
|
Result:=AppendPathDelim(LazarusIDE.GetPrimaryConfigPath)+DefaultConfigFileName;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TIDEEasyDockMaster.LoadDefaultLayout;
|
||||||
|
var
|
||||||
|
Filename: String;
|
||||||
|
begin
|
||||||
|
// load the users default layout
|
||||||
|
Filename:=GetDefaultLayoutFilename;
|
||||||
|
if FileExistsUTF8(Filename) then
|
||||||
|
DockMaster.LoadFromFile(Filename);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TIDEEasyDockMaster.SaveDefaultLayout;
|
||||||
|
begin
|
||||||
|
// load the users default layout
|
||||||
|
DockMaster.SaveToFile(GetDefaultLayoutFilename);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEEasyDockMaster.ShowForm(AForm: TCustomForm; BringToFront: boolean
|
procedure TIDEEasyDockMaster.ShowForm(AForm: TCustomForm; BringToFront: boolean
|
||||||
@ -146,12 +194,16 @@ var
|
|||||||
DockAlign: TAlign;
|
DockAlign: TAlign;
|
||||||
DockSibling: TCustomForm;
|
DockSibling: TCustomForm;
|
||||||
NewDockSite: TWinControl;
|
NewDockSite: TWinControl;
|
||||||
|
AControl: TControl;
|
||||||
begin
|
begin
|
||||||
debugln(['TIDEEasyDockMaster.ShowForm ',DbgSName(AForm),' BringToFront=',BringToFront,' IsDockSite=',IsDockSite(AForm),' IsDockable=',IsDockable(AForm)]);
|
debugln(['TIDEEasyDockMaster.ShowForm ',DbgSName(AForm),' BringToFront=',BringToFront,' IsDockSite=',IsDockSite(AForm),' IsDockable=',IsDockable(AForm)]);
|
||||||
try
|
try
|
||||||
if not (IsDockSite(AForm) or IsDockable(AForm)) then
|
AForm.DisableAlign;
|
||||||
|
if AForm.HostDockSite<>nil then
|
||||||
|
begin
|
||||||
|
// already docked
|
||||||
|
end else if not (IsDockSite(AForm) or IsDockable(AForm)) then
|
||||||
begin
|
begin
|
||||||
AForm.DisableAlign;
|
|
||||||
// this form was not yet docked
|
// this form was not yet docked
|
||||||
// place it at a default position and make it dockable
|
// place it at a default position and make it dockable
|
||||||
GetDefaultBounds(AForm,Creator,NewBounds,DockSiblingName,DockAlign);
|
GetDefaultBounds(AForm,Creator,NewBounds,DockSiblingName,DockAlign);
|
||||||
@ -186,21 +238,39 @@ begin
|
|||||||
MakeIDEWindowDockable(AForm);
|
MakeIDEWindowDockable(AForm);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
AForm.EnableAlign;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
Parent:=GetParentForm(AForm);
|
AControl:=AForm;
|
||||||
// ToDo switch pageindex of all parent note books
|
while AControl<>nil do begin
|
||||||
if Parent<>nil then
|
// ToDo: if this is a page switch pageindex of parent
|
||||||
if BringToFront then
|
if AControl is TCustomForm then
|
||||||
Parent.ShowOnTop
|
TCustomForm(AControl).Show
|
||||||
else
|
else
|
||||||
Parent.Show;
|
AControl.Visible:=true;
|
||||||
|
AControl:=AControl.Parent;
|
||||||
|
end;
|
||||||
|
AForm.EnableAlign;
|
||||||
|
|
||||||
|
if BringToFront then begin
|
||||||
|
Parent:=GetParentForm(AForm);
|
||||||
|
if Parent<>nil then
|
||||||
|
Parent.ShowOnTop;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
debugln(['TIDEEasyDockMaster.ShowForm END ',DbgSName(AForm),' ',dbgs(AForm.BoundsRect)]);
|
debugln(['TIDEEasyDockMaster.ShowForm END ',DbgSName(AForm),' ',dbgs(AForm.BoundsRect)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TIDEEasyDockMaster.CloseAll;
|
||||||
|
begin
|
||||||
|
inherited CloseAll;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TIDEEasyDockMaster.OnIDEClose(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SaveDefaultLayout;
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
// create the dockmaster in the initialization section, so that is ready
|
// create the dockmaster in the initialization section, so that is ready
|
||||||
// when the Register procedures of the packages are called.
|
// when the Register procedures of the packages are called.
|
||||||
|
17
ide/main.pp
17
ide/main.pp
@ -1700,6 +1700,7 @@ end;
|
|||||||
procedure TMainIDE.MainIDEFormClose(Sender: TObject;
|
procedure TMainIDE.MainIDEFormClose(Sender: TObject;
|
||||||
var CloseAction: TCloseAction);
|
var CloseAction: TCloseAction);
|
||||||
begin
|
begin
|
||||||
|
DoCallNotifyHandler(lihtIDEClose);
|
||||||
SaveEnvironment;
|
SaveEnvironment;
|
||||||
CloseIDEWindows;
|
CloseIDEWindows;
|
||||||
SaveIncludeLinks;
|
SaveIncludeLinks;
|
||||||
@ -9656,7 +9657,7 @@ begin
|
|||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
finally
|
finally
|
||||||
// call handlers
|
// call handlers
|
||||||
HandlerResult:=DoCallProjectChangedHandler(lihtOnProjectOpened,Project1);
|
HandlerResult:=DoCallProjectChangedHandler(lihtProjectOpened,Project1);
|
||||||
if not (HandlerResult in [mrOk,mrCancel,mrAbort]) then
|
if not (HandlerResult in [mrOk,mrCancel,mrAbort]) then
|
||||||
HandlerResult:=mrCancel;
|
HandlerResult:=mrCancel;
|
||||||
if (Result=mrOk) then
|
if (Result=mrOk) then
|
||||||
@ -9777,7 +9778,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// call handlers
|
// call handlers
|
||||||
Result:=DoCallProjectChangedHandler(lihtOnProjectClose,Project1);
|
Result:=DoCallProjectChangedHandler(lihtProjectClose,Project1);
|
||||||
if Result=mrAbort then exit;
|
if Result=mrAbort then exit;
|
||||||
|
|
||||||
// close all loaded files
|
// close all loaded files
|
||||||
@ -10022,7 +10023,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
// call handlers
|
// call handlers
|
||||||
HandlerResult:=DoCallProjectChangedHandler(lihtOnProjectOpened,Project1);
|
HandlerResult:=DoCallProjectChangedHandler(lihtProjectOpened,Project1);
|
||||||
if not (HandlerResult in [mrOk,mrCancel,mrAbort]) then
|
if not (HandlerResult in [mrOk,mrCancel,mrAbort]) then
|
||||||
HandlerResult:=mrCancel;
|
HandlerResult:=mrCancel;
|
||||||
if (Result=mrOk) then
|
if (Result=mrOk) then
|
||||||
@ -10684,7 +10685,7 @@ begin
|
|||||||
DoArrangeSourceEditorAndMessageView(false);
|
DoArrangeSourceEditorAndMessageView(false);
|
||||||
|
|
||||||
// now building can start: call handler
|
// now building can start: call handler
|
||||||
Result:=DoCallModalFunctionHandler(lihtOnProjectBuilding);
|
Result:=DoCallModalFunctionHandler(lihtProjectBuilding);
|
||||||
if Result<>mrOk then exit;
|
if Result<>mrOk then exit;
|
||||||
|
|
||||||
// get main source filename
|
// get main source filename
|
||||||
@ -10698,7 +10699,7 @@ begin
|
|||||||
|
|
||||||
// compile required packages
|
// compile required packages
|
||||||
if not (pbfDoNotCompileDependencies in Flags) then begin
|
if not (pbfDoNotCompileDependencies in Flags) then begin
|
||||||
Result:=DoCallModalFunctionHandler(lihtOnProjectDependenciesCompiling);
|
Result:=DoCallModalFunctionHandler(lihtProjectDependenciesCompiling);
|
||||||
if Result<>mrOk then exit;
|
if Result<>mrOk then exit;
|
||||||
PkgFlags:=[pcfDoNotSaveEditorFiles];
|
PkgFlags:=[pcfDoNotSaveEditorFiles];
|
||||||
if pbfCompileDependenciesClean in Flags then
|
if pbfCompileDependenciesClean in Flags then
|
||||||
@ -10709,7 +10710,7 @@ begin
|
|||||||
CompileProgress.Ready(lisInfoBuildError);
|
CompileProgress.Ready(lisInfoBuildError);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Result:=DoCallModalFunctionHandler(lihtOnProjectDependenciesCompiled);
|
Result:=DoCallModalFunctionHandler(lihtProjectDependenciesCompiled);
|
||||||
if Result<>mrOk then exit;
|
if Result<>mrOk then exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -10976,7 +10977,7 @@ var
|
|||||||
CurResult: TModalResult;
|
CurResult: TModalResult;
|
||||||
begin
|
begin
|
||||||
Result:=mrOk;
|
Result:=mrOk;
|
||||||
CurResult:=DoCallModalFunctionHandler(lihtOnSavingAll);
|
CurResult:=DoCallModalFunctionHandler(lihtSavingAll);
|
||||||
if CurResult=mrAbort then exit(mrAbort);
|
if CurResult=mrAbort then exit(mrAbort);
|
||||||
if CurResult<>mrOk then Result:=mrCancel;
|
if CurResult<>mrOk then Result:=mrCancel;
|
||||||
CurResult:=DoSaveProject(Flags);
|
CurResult:=DoSaveProject(Flags);
|
||||||
@ -10986,7 +10987,7 @@ begin
|
|||||||
InputHistories.Save;
|
InputHistories.Save;
|
||||||
if CurResult=mrAbort then exit(mrAbort);
|
if CurResult=mrAbort then exit(mrAbort);
|
||||||
if CurResult<>mrOk then Result:=mrCancel;
|
if CurResult<>mrOk then Result:=mrCancel;
|
||||||
CurResult:=DoCallModalFunctionHandler(lihtOnSavedAll);
|
CurResult:=DoCallModalFunctionHandler(lihtSavedAll);
|
||||||
if CurResult=mrAbort then exit(mrAbort);
|
if CurResult=mrAbort then exit(mrAbort);
|
||||||
if CurResult<>mrOk then Result:=mrCancel;
|
if CurResult<>mrOk then Result:=mrCancel;
|
||||||
UpdateSaveMenuItemsAndButtons(true);
|
UpdateSaveMenuItemsAndButtons(true);
|
||||||
|
@ -204,11 +204,11 @@ type
|
|||||||
|
|
||||||
TIDEDockMaster = class
|
TIDEDockMaster = class
|
||||||
public
|
public
|
||||||
// ToDo: save/restore layout
|
|
||||||
procedure MakeIDEWindowDockable(AControl: TWinControl); virtual; abstract;
|
procedure MakeIDEWindowDockable(AControl: TWinControl); virtual; abstract;
|
||||||
procedure MakeIDEWindowDockSite(AForm: TCustomForm); virtual; abstract;
|
procedure MakeIDEWindowDockSite(AForm: TCustomForm); virtual; abstract;
|
||||||
procedure LoadDefaultLayout; virtual; abstract; // called before opening the first project
|
procedure LoadDefaultLayout; virtual; abstract; // called before opening the first project
|
||||||
procedure ShowForm(AForm: TCustomForm; BringToFront: boolean); virtual; abstract;
|
procedure ShowForm(AForm: TCustomForm; BringToFront: boolean); virtual; abstract;
|
||||||
|
procedure CloseAll; virtual;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -719,6 +719,23 @@ begin
|
|||||||
AForm.Show;
|
AForm.Show;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TIDEDockMaster }
|
||||||
|
|
||||||
|
procedure TIDEDockMaster.CloseAll;
|
||||||
|
var
|
||||||
|
i: Integer;
|
||||||
|
AForm: TCustomForm;
|
||||||
|
begin
|
||||||
|
i:=Screen.CustomFormCount-1;
|
||||||
|
while i>=0 do begin
|
||||||
|
AForm:=Screen.CustomForms[i];
|
||||||
|
if AForm<>Application.MainForm then
|
||||||
|
AForm.Close;
|
||||||
|
dec(i);
|
||||||
|
if i>=Screen.CustomFormCount then i:=Screen.CustomFormCount-1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
IDEWindowCreators:=TIDEWindowCreatorList.Create;
|
IDEWindowCreators:=TIDEWindowCreatorList.Create;
|
||||||
finalization
|
finalization
|
||||||
|
@ -127,13 +127,14 @@ type
|
|||||||
AProject: TLazProject): TModalResult of object;
|
AProject: TLazProject): TModalResult of object;
|
||||||
|
|
||||||
TLazarusIDEHandlerType = (
|
TLazarusIDEHandlerType = (
|
||||||
lihtOnSavingAll, // called before IDE saves everything
|
lihtSavingAll, // called before IDE saves everything
|
||||||
lihtOnSavedAll, // called after IDE saved everything
|
lihtSavedAll, // called after IDE saved everything
|
||||||
lihtOnProjectOpened,// called after IDE opened a project
|
lihtIDEClose, // called when IDE is shutting down (after closequery, so no more interactivity)
|
||||||
lihtOnProjectClose, // called before IDE closes a project
|
lihtProjectOpened,// called after IDE opened a project
|
||||||
lihtOnProjectBuilding, // called before IDE builds the project
|
lihtProjectClose, // called before IDE closes a project
|
||||||
lihtOnProjectDependenciesCompiling, // called before IDE compiles dependencies of project
|
lihtProjectBuilding, // called before IDE builds the project
|
||||||
lihtOnProjectDependenciesCompiled // called after IDE compiled dependencies of project
|
lihtProjectDependenciesCompiling, // called before IDE compiles dependencies of project
|
||||||
|
lihtProjectDependenciesCompiled // called after IDE compiled dependencies of project
|
||||||
);
|
);
|
||||||
|
|
||||||
{ TLazIDEInterface }
|
{ TLazIDEInterface }
|
||||||
@ -284,6 +285,9 @@ type
|
|||||||
procedure AddHandlerOnSavedAll(const OnSaveAllEvent: TModalResultFunction;
|
procedure AddHandlerOnSavedAll(const OnSaveAllEvent: TModalResultFunction;
|
||||||
AsLast: boolean = false);
|
AsLast: boolean = false);
|
||||||
procedure RemoveHandlerOnSavedAll(const OnSaveAllEvent: TModalResultFunction);
|
procedure RemoveHandlerOnSavedAll(const OnSaveAllEvent: TModalResultFunction);
|
||||||
|
procedure AddHandlerOnIDEClose(const OnIDECloseEvent: TNotifyEvent;
|
||||||
|
AsLast: boolean = false);
|
||||||
|
procedure RemoveHandlerOnIDEClose(const OnIDECloseEvent: TNotifyEvent);
|
||||||
procedure AddHandlerOnProjectOpened(
|
procedure AddHandlerOnProjectOpened(
|
||||||
const OnProjectOpenedEvent: TLazProjectChangedFunction;
|
const OnProjectOpenedEvent: TLazProjectChangedFunction;
|
||||||
AsLast: boolean = false);
|
AsLast: boolean = false);
|
||||||
@ -408,74 +412,86 @@ end;
|
|||||||
procedure TLazIDEInterface.AddHandlerOnSavingAll(
|
procedure TLazIDEInterface.AddHandlerOnSavingAll(
|
||||||
const OnSaveAllEvent: TModalResultFunction; AsLast: boolean);
|
const OnSaveAllEvent: TModalResultFunction; AsLast: boolean);
|
||||||
begin
|
begin
|
||||||
AddHandler(lihtOnSavingAll,TMethod(OnSaveAllEvent));
|
AddHandler(lihtSavingAll,TMethod(OnSaveAllEvent),AsLast);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.RemoveHandlerOnSavingAll(
|
procedure TLazIDEInterface.RemoveHandlerOnSavingAll(
|
||||||
const OnSaveAllEvent: TModalResultFunction);
|
const OnSaveAllEvent: TModalResultFunction);
|
||||||
begin
|
begin
|
||||||
RemoveHandler(lihtOnSavingAll,TMethod(OnSaveAllEvent));
|
RemoveHandler(lihtSavingAll,TMethod(OnSaveAllEvent));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.AddHandlerOnSavedAll(
|
procedure TLazIDEInterface.AddHandlerOnSavedAll(
|
||||||
const OnSaveAllEvent: TModalResultFunction; AsLast: boolean);
|
const OnSaveAllEvent: TModalResultFunction; AsLast: boolean);
|
||||||
begin
|
begin
|
||||||
AddHandler(lihtOnSavedAll,TMethod(OnSaveAllEvent));
|
AddHandler(lihtSavedAll,TMethod(OnSaveAllEvent),AsLast);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.RemoveHandlerOnSavedAll(
|
procedure TLazIDEInterface.RemoveHandlerOnSavedAll(
|
||||||
const OnSaveAllEvent: TModalResultFunction);
|
const OnSaveAllEvent: TModalResultFunction);
|
||||||
begin
|
begin
|
||||||
RemoveHandler(lihtOnSavedAll,TMethod(OnSaveAllEvent));
|
RemoveHandler(lihtSavedAll,TMethod(OnSaveAllEvent));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TLazIDEInterface.AddHandlerOnIDEClose(
|
||||||
|
const OnIDECloseEvent: TNotifyEvent; AsLast: boolean);
|
||||||
|
begin
|
||||||
|
AddHandler(lihtIDEClose,TMethod(OnIDECloseEvent),AsLast);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TLazIDEInterface.RemoveHandlerOnIDEClose(
|
||||||
|
const OnIDECloseEvent: TNotifyEvent);
|
||||||
|
begin
|
||||||
|
RemoveHandler(lihtIDEClose,TMethod(OnIDECloseEvent));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.AddHandlerOnProjectOpened(
|
procedure TLazIDEInterface.AddHandlerOnProjectOpened(
|
||||||
const OnProjectOpenedEvent: TLazProjectChangedFunction; AsLast: boolean);
|
const OnProjectOpenedEvent: TLazProjectChangedFunction; AsLast: boolean);
|
||||||
begin
|
begin
|
||||||
AddHandler(lihtOnProjectOpened,TMethod(OnProjectOpenedEvent));
|
AddHandler(lihtProjectOpened,TMethod(OnProjectOpenedEvent),AsLast);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.RemoveHandlerOnProjectOpened(
|
procedure TLazIDEInterface.RemoveHandlerOnProjectOpened(
|
||||||
const OnProjectOpenedEvent: TLazProjectChangedFunction);
|
const OnProjectOpenedEvent: TLazProjectChangedFunction);
|
||||||
begin
|
begin
|
||||||
RemoveHandler(lihtOnProjectOpened,TMethod(OnProjectOpenedEvent));
|
RemoveHandler(lihtProjectOpened,TMethod(OnProjectOpenedEvent));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.AddHandlerOnProjectClose(
|
procedure TLazIDEInterface.AddHandlerOnProjectClose(
|
||||||
const OnProjectCloseEvent: TLazProjectChangedFunction; AsLast: boolean);
|
const OnProjectCloseEvent: TLazProjectChangedFunction; AsLast: boolean);
|
||||||
begin
|
begin
|
||||||
AddHandler(lihtOnProjectClose,TMethod(OnProjectCloseEvent));
|
AddHandler(lihtProjectClose,TMethod(OnProjectCloseEvent),AsLast);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.RemoveHandlerOnProjectClose(
|
procedure TLazIDEInterface.RemoveHandlerOnProjectClose(
|
||||||
const OnProjectCloseEvent: TLazProjectChangedFunction);
|
const OnProjectCloseEvent: TLazProjectChangedFunction);
|
||||||
begin
|
begin
|
||||||
RemoveHandler(lihtOnProjectClose,TMethod(OnProjectCloseEvent));
|
RemoveHandler(lihtProjectClose,TMethod(OnProjectCloseEvent));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.AddHandlerOnProjectBuilding(
|
procedure TLazIDEInterface.AddHandlerOnProjectBuilding(
|
||||||
const OnProjBuildingEvent: TModalResultFunction; AsLast: boolean);
|
const OnProjBuildingEvent: TModalResultFunction; AsLast: boolean);
|
||||||
begin
|
begin
|
||||||
AddHandler(lihtOnProjectBuilding,TMethod(OnProjBuildingEvent));
|
AddHandler(lihtProjectBuilding,TMethod(OnProjBuildingEvent),AsLast);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.RemoveHandlerOnProjectBuilding(
|
procedure TLazIDEInterface.RemoveHandlerOnProjectBuilding(
|
||||||
const OnProjBuildingEvent: TModalResultFunction);
|
const OnProjBuildingEvent: TModalResultFunction);
|
||||||
begin
|
begin
|
||||||
RemoveHandler(lihtOnProjectBuilding,TMethod(OnProjBuildingEvent));
|
RemoveHandler(lihtProjectBuilding,TMethod(OnProjBuildingEvent));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.AddHandlerOnProjectDependenciesCompiling(
|
procedure TLazIDEInterface.AddHandlerOnProjectDependenciesCompiling(
|
||||||
const OnProjDependenciesCompilingEvent: TModalResultFunction; AsLast: boolean);
|
const OnProjDependenciesCompilingEvent: TModalResultFunction; AsLast: boolean);
|
||||||
begin
|
begin
|
||||||
AddHandler(lihtOnProjectDependenciesCompiling,
|
AddHandler(lihtProjectDependenciesCompiling,
|
||||||
TMethod(OnProjDependenciesCompilingEvent));
|
TMethod(OnProjDependenciesCompilingEvent),AsLast);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.RemoveHandlerOnProjectDependenciesCompiling(
|
procedure TLazIDEInterface.RemoveHandlerOnProjectDependenciesCompiling(
|
||||||
const OnProjDependenciesCompilingEvent: TModalResultFunction);
|
const OnProjDependenciesCompilingEvent: TModalResultFunction);
|
||||||
begin
|
begin
|
||||||
RemoveHandler(lihtOnProjectDependenciesCompiling,
|
RemoveHandler(lihtProjectDependenciesCompiling,
|
||||||
TMethod(OnProjDependenciesCompilingEvent));
|
TMethod(OnProjDependenciesCompilingEvent));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -483,14 +499,14 @@ procedure TLazIDEInterface.AddHandlerOnProjectDependenciesCompiled(
|
|||||||
const OnProjDependenciesCompiledEvent: TModalResultFunction; AsLast: boolean
|
const OnProjDependenciesCompiledEvent: TModalResultFunction; AsLast: boolean
|
||||||
);
|
);
|
||||||
begin
|
begin
|
||||||
AddHandler(lihtOnProjectDependenciesCompiled,
|
AddHandler(lihtProjectDependenciesCompiled,
|
||||||
TMethod(OnProjDependenciesCompiledEvent));
|
TMethod(OnProjDependenciesCompiledEvent),AsLast);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazIDEInterface.RemoveHandlerOnProjectDependenciesCompiled(
|
procedure TLazIDEInterface.RemoveHandlerOnProjectDependenciesCompiled(
|
||||||
const OnProjDependenciesCompiledEvent: TModalResultFunction);
|
const OnProjDependenciesCompiledEvent: TModalResultFunction);
|
||||||
begin
|
begin
|
||||||
RemoveHandler(lihtOnProjectDependenciesCompiled,
|
RemoveHandler(lihtProjectDependenciesCompiled,
|
||||||
TMethod(OnProjDependenciesCompiledEvent));
|
TMethod(OnProjDependenciesCompiledEvent));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user