Difference between revisions of "LCL Internals - Resizing, Moving"

From Lazarus wiki
Jump to navigationJump to search
(New page: = Overview = The LCL has a lot of resizing properties (Left, Width, Anchors, Align, AnchorSide, AutoSize, Constraints, ChildSizing, ...) and hooks where applications can alter the behavio...)
 
Line 4: Line 4:
  
 
= How the LCL tells the interface to resize/move a handle =
 
= How the LCL tells the interface to resize/move a handle =
 +
 +
In TWinControl.DoSendBoundsToInterface the widget function SetBounds is called
 +
  TWSWinControlClass(WidgetSetClass).SetBounds(Self, Left, Top, Width, Height);
  
 
= How the Interface tells the LCL to resize/move a handle =
 
= How the Interface tells the LCL to resize/move a handle =
  
 
= How the LCL gets the current size / position of a LCL interface handle =
 
= How the LCL gets the current size / position of a LCL interface handle =

Revision as of 20:28, 31 July 2007

Overview

The LCL has a lot of resizing properties (Left, Width, Anchors, Align, AnchorSide, AutoSize, Constraints, ChildSizing, ...) and hooks where applications can alter the behavior (OnResize, OnChangeBounds, ...). All these things can not be calculated in one step, so controls can move quite a lot before the final coordinates come out. To reduce flickering the LCL does not send every move/resize to the LCL interface. For example during Begin/EndAlign and csLoading no move/resize is sent to the interface. The widgetset will try to follow the advices of the LCL, but there are some cases, where it does not follow. For example forms (top level windows) are limited by the window manager policies. And TPage completely depends on the size and theme of the TNotebook.

How the LCL tells the interface to resize/move a handle

In TWinControl.DoSendBoundsToInterface the widget function SetBounds is called

 TWSWinControlClass(WidgetSetClass).SetBounds(Self, Left, Top, Width, Height);

How the Interface tells the LCL to resize/move a handle

How the LCL gets the current size / position of a LCL interface handle