|
@@ -40,15 +40,15 @@ type
|
|
|
procedure GetBounds(AComponent: TComponent; out CurBounds: TRect); override;
|
|
|
procedure SetBounds(AComponent: TComponent; NewBounds: TRect); override;
|
|
|
procedure GetClientArea(AComponent: TComponent; out
|
|
|
- CurClientArea: TRect; out ScrollOffset: TPoint); override;
|
|
|
+ CurClientArea: TRect; out ScrollOffset: TPoint); override;
|
|
|
function GetComponentOriginOnForm(AComponent: TComponent): TPoint; override;
|
|
|
procedure Paint; override;
|
|
|
function ComponentIsIcon(AComponent: TComponent): boolean; override;
|
|
|
function ComponentIsVisible(AComponent: TComponent): Boolean; override;
|
|
|
function ComponentAtPos(p: TPoint; MinClass: TComponentClass;
|
|
|
- Flags: TDMCompAtPosFlags): TComponent; override;
|
|
|
+ Flags: TDMCompAtPosFlags): TComponent; override;
|
|
|
function ParentAcceptsChild(Parent: TComponent;
|
|
|
- Child: TComponentClass): boolean; override;
|
|
|
+ ChildClass: TComponentClass): boolean; override;
|
|
|
public
|
|
|
// needed by Fresnel
|
|
|
procedure InvalidateRect(Sender: TObject; ARect: TRect; Erase: boolean);
|
|
@@ -144,12 +144,10 @@ end;
|
|
|
procedure TFresnelFormMediator.SetBounds(AComponent: TComponent;
|
|
|
NewBounds: TRect);
|
|
|
begin
|
|
|
- debugln(['TFresnelFormMediator.SetBounds ',DbgSName(AComponent),' ',dbgs(NewBounds)]);
|
|
|
+ //debugln(['TFresnelFormMediator.SetBounds ',DbgSName(AComponent),' ',dbgs(NewBounds)]);
|
|
|
if AComponent=FDsgnForm then
|
|
|
begin
|
|
|
FDsgnForm.FormBoundsRect:=NewBounds;
|
|
|
- if LCLForm<>nil then
|
|
|
- debugln(['TFresnelFormMediator.SetBounds lclform=',dbgs(LCLForm.BoundsRect)]);
|
|
|
end else if AComponent is TFresnelElement then
|
|
|
begin
|
|
|
// bounds are controlled by CSS
|
|
@@ -227,21 +225,21 @@ begin
|
|
|
end;
|
|
|
|
|
|
function TFresnelFormMediator.ParentAcceptsChild(Parent: TComponent;
|
|
|
- Child: TComponentClass): boolean;
|
|
|
+ ChildClass: TComponentClass): boolean;
|
|
|
begin
|
|
|
- debugln(['AAA1 TFresnelFormMediator.ParentAcceptsChild Parent=',DbgSName(Parent),' Child=',DbgSName(Child)]);
|
|
|
- if Child.InheritsFrom(TControl) then
|
|
|
+ //debugln(['TFresnelFormMediator.ParentAcceptsChild START Parent=',DbgSName(Parent),' Child=',DbgSName(ChildClass)]);
|
|
|
+ if ChildClass.InheritsFrom(TControl) then
|
|
|
Result:=false
|
|
|
- else if Child.InheritsFrom(TFresnelViewport) then
|
|
|
+ else if ChildClass.InheritsFrom(TFresnelViewport) then
|
|
|
Result:=false
|
|
|
else if Parent is TFresnelElement then
|
|
|
begin
|
|
|
if Parent is TFresnelReplacedElement then
|
|
|
exit(false);
|
|
|
- Result:=Child.InheritsFrom(TFresnelElement);
|
|
|
+ Result:=ChildClass.InheritsFrom(TFresnelElement);
|
|
|
end else
|
|
|
- Result:=inherited ParentAcceptsChild(Parent, Child);
|
|
|
- debugln(['AAA2 TFresnelFormMediator.ParentAcceptsChild Parent=',DbgSName(Parent),' Child=',DbgSName(Child),' Result=',Result]);
|
|
|
+ Result:=inherited ParentAcceptsChild(Parent, ChildClass);
|
|
|
+ //debugln(['TFresnelFormMediator.ParentAcceptsChild END Parent=',DbgSName(Parent),' Child=',DbgSName(ChildClass),' Result=',Result]);
|
|
|
end;
|
|
|
|
|
|
constructor TFresnelFormMediator.Create(AOwner: TComponent);
|