mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 14:37:48 +02:00
Designer: IDEComponentsMaster class proposition for manipulating components (now with single method). r49372 from free-sparta branch by Maciej Izak.
git-svn-id: trunk@49529 -
This commit is contained in:
parent
2ca8f21e64
commit
2f54ed431e
@ -431,6 +431,12 @@ type
|
||||
TPropertyEditorFilterFunc =
|
||||
function(const ATestEditor: TPropertyEditor): Boolean of object;
|
||||
|
||||
TIDEComponentsMaster = class
|
||||
function DrawNonVisualComponents(ALookupRoot: TComponent): Boolean; virtual; abstract;
|
||||
end;
|
||||
|
||||
var
|
||||
IDEComponentsMaster: TIDEComponentsMaster = nil;
|
||||
|
||||
procedure RegisterEditorForm(const AEditorForm: TObject; const AReference: TPersistent);
|
||||
procedure UnregisterEditorForm(const AEditorForm: TObject);
|
||||
|
@ -2812,6 +2812,9 @@ var
|
||||
ARight:=ALeft+TControl(AComponent).Width;
|
||||
ABottom:=ATop+TControl(AComponent).Height;
|
||||
end else begin
|
||||
if Assigned(IDEComponentsMaster) then
|
||||
if not IDEComponentsMaster.DrawNonVisualComponents(ALookupRoot) then
|
||||
Exit;
|
||||
ARight:=ALeft+NonVisualCompWidth;
|
||||
ABottom:=ATop+NonVisualCompWidth;
|
||||
end;
|
||||
|
@ -475,6 +475,10 @@ begin
|
||||
else
|
||||
IsNonVisual := DesignerProcs.ComponentIsNonVisual(Child);
|
||||
|
||||
if IsNonVisual and Assigned(IDEComponentsMaster) then
|
||||
if not IDEComponentsMaster.DrawNonVisualComponents(Root) then
|
||||
Exit;
|
||||
|
||||
if Child.InheritsFrom(MinClass) and (IsNonVisual or not OnlyNonVisual) then
|
||||
begin
|
||||
Best := Child;
|
||||
@ -2014,6 +2018,13 @@ begin
|
||||
|
||||
if ComponentIsIcon(MouseDownComponent) then
|
||||
begin
|
||||
if Assigned(IDEComponentsMaster) then
|
||||
if not IDEComponentsMaster.DrawNonVisualComponents(FLookupRoot) then
|
||||
begin
|
||||
MouseDownComponent := nil;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
NonVisualComp := MouseDownComponent;
|
||||
MoveNonVisualComponentIntoForm(NonVisualComp);
|
||||
end;
|
||||
@ -3572,7 +3583,10 @@ begin
|
||||
ControlSelection.DrawMarkers(DDC);
|
||||
end;
|
||||
// non visual component icons
|
||||
DrawNonVisualComponents(DDC);
|
||||
if not Assigned(IDEComponentsMaster)
|
||||
or IDEComponentsMaster.DrawNonVisualComponents(FLookupRoot) then
|
||||
DrawNonVisualComponents(DDC);
|
||||
|
||||
// guidelines and grabbers
|
||||
if (ControlSelection.SelectionForm=Form) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user