mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 05:36:22 +02:00
added ComponentDeleting event
git-svn-id: trunk@3020 -
This commit is contained in:
parent
8fdcf4a5f9
commit
ef3c8ad7a5
35
ide/main.pp
35
ide/main.pp
@ -896,7 +896,7 @@ begin
|
||||
end;
|
||||
FreeThenNil(FormEditor1);
|
||||
FreeThenNil(PkgBoss);
|
||||
FreeThenNil(PropertyEditorHook1);
|
||||
FreeThenNil(GlobalHook);
|
||||
FreeThenNil(TheCompiler);
|
||||
FreeThenNil(TheOutputFilter);
|
||||
FreeThenNil(MacroList);
|
||||
@ -1200,15 +1200,15 @@ begin
|
||||
ObjectInspector1.OnSelectComponentInOI:=@OIOnSelectComponent;
|
||||
ObjectInspector1.OnShowOptions:=@OIOnShowOptions;
|
||||
|
||||
PropertyEditorHook1:=TPropertyEditorHook.Create;
|
||||
PropertyEditorHook1.AddHandlerGetMethods(@OnPropHookGetMethods);
|
||||
PropertyEditorHook1.AddHandlerMethodExists(@OnPropHookMethodExists);
|
||||
PropertyEditorHook1.AddHandlerCreateMethod(@OnPropHookCreateMethod);
|
||||
PropertyEditorHook1.AddHandlerShowMethod(@OnPropHookShowMethod);
|
||||
PropertyEditorHook1.AddHandlerRenameMethod(@OnPropHookRenameMethod);
|
||||
PropertyEditorHook1.AddHandlerComponentRenamed(@OnPropHookComponentRenamed);
|
||||
PropertyEditorHook1.AddHandlerComponentAdded(@OnPropHookComponentAdded);
|
||||
ObjectInspector1.PropertyEditorHook:=PropertyEditorHook1;
|
||||
GlobalHook:=TPropertyEditorHook.Create;
|
||||
GlobalHook.AddHandlerGetMethods(@OnPropHookGetMethods);
|
||||
GlobalHook.AddHandlerMethodExists(@OnPropHookMethodExists);
|
||||
GlobalHook.AddHandlerCreateMethod(@OnPropHookCreateMethod);
|
||||
GlobalHook.AddHandlerShowMethod(@OnPropHookShowMethod);
|
||||
GlobalHook.AddHandlerRenameMethod(@OnPropHookRenameMethod);
|
||||
GlobalHook.AddHandlerComponentRenamed(@OnPropHookComponentRenamed);
|
||||
GlobalHook.AddHandlerComponentAdded(@OnPropHookComponentAdded);
|
||||
ObjectInspector1.PropertyEditorHook:=GlobalHook;
|
||||
EnvironmentOptions.IDEWindowLayoutList.Apply(TForm(ObjectInspector1),
|
||||
DefaultObjectInspectorName);
|
||||
with EnvironmentOptions do begin
|
||||
@ -2826,7 +2826,7 @@ begin
|
||||
FDisplayState:= dsForm;
|
||||
|
||||
// select the new form (object inspector, formeditor, control selection)
|
||||
PropertyEditorHook1.LookupRoot := AForm;
|
||||
GlobalHook.LookupRoot := AForm;
|
||||
TDesigner(AForm.Designer).SelectOnlyThisComponent(AForm);
|
||||
AForm.ShowOnTop;
|
||||
end;
|
||||
@ -3549,7 +3549,7 @@ begin
|
||||
|
||||
// select the new form (object inspector, formeditor, control selection)
|
||||
if not (ofProjectLoading in Flags) then begin
|
||||
PropertyEditorHook1.LookupRoot := TempForm;
|
||||
GlobalHook.LookupRoot := TempForm;
|
||||
TDesigner(TempForm.Designer).SelectOnlyThisComponent(TempForm);
|
||||
end;
|
||||
FLastFormActivated:=TempForm;
|
||||
@ -5148,7 +5148,7 @@ begin
|
||||
|
||||
// select a form (object inspector, formeditor, control selection)
|
||||
if FLastFormActivated<>nil then begin
|
||||
PropertyEditorHook1.LookupRoot := FLastFormActivated;
|
||||
GlobalHook.LookupRoot := FLastFormActivated;
|
||||
TDesigner(FLastFormActivated.Designer).SelectOnlyThisComponent(
|
||||
FLastFormActivated);
|
||||
end;
|
||||
@ -6283,7 +6283,7 @@ begin
|
||||
AForm.ShowOnTop;
|
||||
if TheControlSelection.SelectionForm<>AForm then begin
|
||||
// select the new form (object inspector, formeditor, control selection)
|
||||
PropertyEditorHook1.LookupRoot := AForm;
|
||||
GlobalHook.LookupRoot := AForm;
|
||||
TDesigner(AForm.Designer).SelectOnlyThisComponent(AForm);
|
||||
end;
|
||||
end;
|
||||
@ -8174,8 +8174,8 @@ var i: integer;
|
||||
begin
|
||||
if (ADesigner<>nil) then
|
||||
i:=Project1.IndexOfUnitWithForm(ADesigner.Form,false,nil)
|
||||
else if PropertyEditorHook1.LookupRoot<>nil then
|
||||
i:=Project1.IndexOfUnitWithForm(PropertyEditorHook1.LookupRoot,false,nil)
|
||||
else if GlobalHook.LookupRoot<>nil then
|
||||
i:=Project1.IndexOfUnitWithForm(GlobalHook.LookupRoot,false,nil)
|
||||
else
|
||||
i:=-1;
|
||||
if (i>=0) then begin
|
||||
@ -8637,6 +8637,9 @@ end.
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.569 2003/05/19 15:53:08 mattias
|
||||
added ComponentDeleting event
|
||||
|
||||
Revision 1.568 2003/05/19 15:16:49 mattias
|
||||
implemented handler lists for property hooks
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user