mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 13:28:04 +02:00
LCL: added TWSControl.ConstraintWidth/Height
git-svn-id: trunk@26513 -
This commit is contained in:
parent
0b3a7661b0
commit
927577f78d
@ -140,6 +140,8 @@ begin
|
||||
if (Result<MinW) then Result:=MinW;
|
||||
MaxW:=EffectiveMaxWidth;
|
||||
if (MaxW>0) and (Result>MaxW) then Result:=MaxW;
|
||||
if (Control is TWinControl) and TWinControl(Control).HandleAllocated then
|
||||
TWSControlClass(Control.WidgetSetClass).ConstraintWidth(Control, Self, Result);
|
||||
end;
|
||||
|
||||
function TSizeConstraints.MinMaxHeight(Height: integer): integer;
|
||||
@ -152,6 +154,8 @@ begin
|
||||
if (Result<MinH) then Result:=MinH;
|
||||
MaxH:=EffectiveMaxHeight;
|
||||
if (MaxH>0) and (Result>MaxH) then Result:=MaxH;
|
||||
if (Control is TWinControl) and TWinControl(Control).HandleAllocated then
|
||||
TWSControlClass(Control.WidgetSetClass).ConstraintHeight(Control, Self, Result);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
@ -73,6 +73,8 @@ type
|
||||
published
|
||||
class procedure AddControl(const AControl: TControl); virtual;
|
||||
class function GetConstraints(const AControl: TControl; const AConstraints: TObject): Boolean; virtual;
|
||||
class procedure ConstraintWidth(const AControl: TControl; const AConstraints: TObject; var aWidth: integer); virtual;
|
||||
class procedure ConstraintHeight(const AControl: TControl; const AConstraints: TObject; var aHeight: integer); virtual;
|
||||
end;
|
||||
|
||||
TWSControlClass = class of TWSControl;
|
||||
@ -160,6 +162,18 @@ begin
|
||||
Result := WidgetSet.GetControlConstraints(AConstraints);
|
||||
end;
|
||||
|
||||
class procedure TWSControl.ConstraintWidth(const AControl: TControl;
|
||||
const AConstraints: TObject; var aWidth: integer);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
class procedure TWSControl.ConstraintHeight(const AControl: TControl;
|
||||
const AConstraints: TObject; var aHeight: integer);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
{ TWSWinControl }
|
||||
|
||||
class procedure TWSWinControl.AdaptBounds(const AWinControl: TWinControl;
|
||||
|
Loading…
Reference in New Issue
Block a user