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