This unit contains basic classes for visual controls.
Modal dialog left with None button.
Modal dialog left with OK button.
Modal dialog left with Cancel button.
Modal dialog aborted.
Modal dialog left with Retry button.
Modal dialog left with Ignore button.
Modal dialog left with Yes button.
Modal dialog left with No button.
Modal dialog left with All button.
Modal dialog left with NoToAll button.
Modal dialog left with YesToAll button.
Modal dialog left with Close button.
Last (highest) value of modal results.
TWinControlClass
- class of

TWinControl
TControlClass
- class of

TControl
Date expressed in the encoded type.
Variables of this type contain both date and time, but only one of these should be used.
Time of day expressed in the encoded encoded type
Parameters of a CMMouseWheel message.

    Details held include:
              the Message associated with the wheel;
              the shift state (ie whether Shift, Alt, Control etc keys have been pressed);
              mouse position and the message Result.

The exact Message ID (WM_MOUSEWHEEL?).
State of modifier keys and mouse buttons.
inserted for alignment only.
How many notches the wheel has been turned; negative for turned backwards.
Mouse position.
Mouse X position.
Mouse Y position.
Zero indicates that the message was handled.

?

?

?

?

?

?

?

?

VK_XXX constants for TLMKeyDown/Up, ASCII for TLMChar.

?

Alignment options for a control, within its Parent control.

A control can be aligned as:

alNone
  fixed position and extent
alTop
  stacked at top, full width
alBottom
  stacked at bottom, full width
alLeft
  stacked at left, full height
alRight
  stacked at right, full height
alClient
  filling entire remaining client area
alCustom
  other alignment, in drag-dock: notebook

At most one control can have alClient alignment.

The order of multiple controls of the same (stackable) alignment is determined by their Left or Top coordinate.

The precedence of conflicting alignment requests (e.g. one at top, one at right) is resolved

how???

which provisions exist for alCustom implementation?

Control has fixed size and position
Control stacked at top, full width.
Control stacked at bottom, full width.
Control stacked at left, full height.
Control stacked at right, full height.
Control fills remaining client area.
Control has special alignment.

aligned how?

Set of alignment options.
The control side to be anchored.
With asrCenter the sides mean horizontal or vertical alignment, of the control's center.
Top side (or center vertically).
Left side (or center horizonally).
Right side (or center horizontally).
Bottom side (or center vertically).

?

?

?

?

?

?

Array of names for the elements.
The names include the 'al' prefix, e.g. alNone.
Names for the TAnchorKind elements.
The side of another control, to which this control's side is anchored.
Anchor to the top side.
Anchor to the bottom side.
Anchor to the center of the other control.
Anchor to the left side (=asrTop).
Anchor to the right side (=asrBottom).
A string type for the caption of a control: may be translated
Defines special form behaviour.
An ordinary (overlapping) form.
The form is an MDI child.
The form is an MDI parent form, containing MDI child forms.
The form is in the foreground, on top of all other application forms.
A splash form.

meaning what?

The form stays system-wide on top.

?

Set of form styles, which make a form stay on top.
Set of form styles, except those which make a form stay on top of all other forms of the system

not system-wide?

Style of a form's border.
No border at all.
Single line border, the form cannot be resized.
The form can be resized (standard).
The form is a dialog, cannot be resized.

legacy?

Single line border, small caption, not resizeable.
Small caption, form can be resized.
Possible types of borders (with or without border).

used where?

Possible types of control borders (with or without border).
A subset of TFormBorderStyle, listing only the styles available to a control that is not a form.

used where?

Possible default actions on special keys.
This control is notified when the user presses Return.
This control is notified when the user presses Escape.
Enumeration of recognized mouse buttons.

These are logical buttons, left and right physical buttons can be swapped for left handed users.

Represents the left mouse button. It might be physically the right button if the system is configured to act like that, for example for a left handled person.
Represents the right mouse button. It might be physically the left button if the system is configured to act like that, for example for a left handled person.
Represents the middle mouse button.
Represents the first extra mouse button.
Represents the second extra mouse button.
TCursor
- integer type defining range of values for cursor shapes.

Allowed values are:

    Standard cursors
      crDefault     = TCursor(0);   //current cursor unchanged
      crNone        = TCursor(-1);  //hide cursor
      crArrow       = TCursor(-2);  //normal cursor
      crCross       = TCursor(-3);  //graphics cursor, for pixel or rectangle selection
      crIBeam       = TCursor(-4);  //text cursor, for setting insertion point
    Sizing cursors
      crSize        = TCursor(-22);
      crSizeAll     = TCursor(-22);
      crSizeNESW    = TCursor(-6); // diagonal north east - south west
      crSizeNS      = TCursor(-7);
      crSizeNWSE    = TCursor(-8);
      crSizeWE      = TCursor(-9);
      crSizeNW      = TCursor(-23);
      crSizeN       = TCursor(-24);
      crSizeNE      = TCursor(-25);
      crSizeW       = TCursor(-26);
      crSizeE       = TCursor(-27);
      crSizeSW      = TCursor(-28);
      crSizeS       = TCursor(-29);
      crSizeSE      = TCursor(-30);
    DragDrop cursors
      crDrag        = TCursor(-12); //dragging, drop allowed
      crNoDrop      = TCursor(-13); //dragging, drop disallowed/rejected
      crMultiDrag   = TCursor(-16); //dragging multiple items
      crNo          = TCursor(-18);
    Splitter cursors
      crHSplit      = TCursor(-14);
      crVSplit      = TCursor(-15);
    More cursors
      crUpArrow     = TCursor(-10);
      crHourGlass   = TCursor(-11); //busy
      crSQLWait     = TCursor(-17);
      crAppStart    = TCursor(-19);
      crHelp        = TCursor(-20);
      crHandPoint   = TCursor(-21);

Highest defined cursor constant (0).
Indicates that the default cursor from the system should be utilized
Indicates that the cursor should be invisible
The Arrow cursor, which is the most common and the default one in most cases
A cursor utilized for graphics, for pixel or rectangle selection, often in the shape of a cross
A text cursor, for setting insertion point. Often used in text editors
A generic sizing cursor, to indicate that here one may drag to resize something. Is the same as crSizeAll.
A cursor for resizing which runs diagonally from NorthEast to SouthWest (-6)
A cursor for resizing which cursor runs from North to South (-7)
A cursor for resizing which cursor runs from NorthWest to SouthEast
A cursor for resizing which has an arrow with two points, one to the left and another to the right, to indicate resizing possibility in both directions.
A cursor for resizing which has an arrow pointing to the left-top corner, to indicate resizing possibility in this direction
A cursor for resizing which has an arrow pointing upwards, to indicate resizing possibility in this direction
A cursor for resizing which has an arrow pointing to the right-top corner, to indicate resizing possibility in this direction
A cursor for resizing which has an arrow pointing to the left, to indicate resizing possibility in this direction
A cursor for resizing which has an arrow pointing to the right, to indicate resizing possibility in this direction
A cursor for resizing which has an arrow pointing to the left-bottom corner, to indicate resizing possibility in this direction
A cursor for resizing which has an arrow pointing downwards, to indicate resizing possibility in this direction
A cursor for resizing which has an arrow pointing to the right-bottom corner, to indicate resizing possibility in this direction
Up Arrow cursor constant (-10)
Busy cursor constant, utilized to indicate that one should wait while an action is done
A cursor to indicate that one can drop a dragged item in this area
A cursor to indicate that one cannot drop a dragged item in this area
Horizontal Splitter cursor constant (-14)
Vertical Split cursor constant (-15)
Multiple Object dragging cursor constant (-16)
Waiting for SQL cursor constant (-17)
Shows a negative sign. See also .
Application starting cursor.

?

"What's This" Help cursor constant (-20)
Pointing hand cursor constant (-21)
All Directions sizing cursor constant (-22)
Lowest defined cursor constant (-30).
Method type for WindowProc handlers.
TControlStyleType - enumerated type describing features of the Control
Indicates that one can add child controls to this control in the form designer.

?

wants mouse events in design mode

?

?

As long as Name=Text, changing the Name will set the Caption.
When for example a button's Name and Caption have the value 'Button1' and the Name is changed to 'Button2' then the Caption is changed as well. When Name and Caption differs this flag has no effect. This flag has no effect during loading.

?

Indicates that the control understands mouse double clicks
Indicates that the control understands mouse triple clicks
Indicates that the control understands mouse quadruple clicks
Indicates that the control cannot change its width
Indicates that the control cannot change its height (e.g. combobox)
Indicates that the control is invisible in the form designer

?

?

display images from dragimagelist during drag operation over control

?

?

?

Indicates that the control cannot receive focus

?

[not implemented]
[not implemented]
no WYSIWYG resizing in designer
control can not be moved nor resized in designer
control implements useful ExecuteDefaultAction
control implements useful ExecuteCancelAction
control can not be selected at design time
child controls owned by this control are NOT selectable in the designer
if the preferred size is 0x0 then control is shrinked to 0x0
when AutoSize=true do not move children horizontally
when AutoSize=true do not move children vertically
Indicates that a control requires keyboard input to be utilized by the user. This information is utilized in Android and other platforms so that the virtual keyboard is activated when the control receives focus and the device has no hardware keyboard
Set of control styles.
Set of styles which require/provide multiple clicks on a control.
State flags of a Control

Enumerated type comprising

    csLButtonDown,
        csClicked,
        csPalette,
        csReadingState,
        csAlignmentNeeded,
        csFocusing,
        csCreating,
        csPaintCopy,
        csCustomPaint,
        csDestroyingHandle,
        csDocking,
        csVisibleSetInLoading

Set of permissible Control states
The base class for the canvas property of several graphic controls, such as TGraphicControl and TCustomControl
[provide usable links on the methods]
TGraphicControl TCustomControl TCanvas

?

The Control object for which this is the Canvas.
A list of Images used in dragging.

A drag image is shown when a DragImageList is supplied at all, and when no accepting target is under the mouse, or the source control style includes csDisplayDragImage, or AlwaysShowDragImage is set in the DragObject.

In drag-dock operations typically no drag image is shown, since the DockRect frame already gives all required visual feedback.

    This is a vague idea of the usage of this class:

    SetDragImage selects an image from the list, and defines the hotspot within this image.
      (the hotspot typically is the offset of the mouse position to the origin of the dragged control)

    BeginDrag starts dragging, the image is shown at the starting location.

    DragMove moves the image.

    EndDrag stops dragging, the image is removed from the screen.

Remember position where the image was painted.
The window whose updates are locked while dragging.
Start dragging an image; returns True if successful.
Locks window updates, remembers the current cursor shape and sets the new shape.

?

True if successful.
The associated window.
The mouse position.

?

The mouse position.

?

Show drag image during drag operation.

and lock updates of Window?

True if Dragging and image shown.
The locked window.
The mouse position.

?

The mouse position.

?

Show the image at a new location.
True if Dragging and image moved.
The new mouse position.
The new mouse position.
Hide the drag image.

and unlock window updates?

Finish dragging of the image, restore the old cursor shape.
True when dragging was started before.
Hide the dragged image without unlocking the window.
Set index of dragged image and hotspot.
Always True

?

List index of the image to use.
Offset from mouse position to image position.
Offset from mouse position to image position.
Display the drag image.
The cursor shape to use while dragging.
The position of the image HotSpot, i.e. the offset to the mouse position while dragging.
True if dragging in progress.

?

?

?

?

Type of an OnMouseWheel event handler.
The control under the mouse.
State of the modifier keys and mouse buttons.
How many notches the wheel has been turned.
The mouse position, in client coordinates.

?

Set Handled to True when the event was handled.
Type of OnMouseWheelUp/Down event handlers.
The control under the mouse.
State of the modifier keys and mouse buttons.
The mouse position, in client coordinates.

?

Set Handled to True when the event was handled.
State changes while dragging - when mouse enters, leaves or moves over a control.
These values are sent with drag messages, allowing the control to perform special actions while the mouse moves over it.
Mouse has just entered the control.
Mouse has just left the control.
Mouse is moving over the control.
Indicates whether dragging can start automatically.
Dragging can start only by explicit code.
Dragging starts when the left mouse button is pressed on the control.
Indicates whether the control performs drag-drop or drag-dock.
Control is dragged for dropping.
Control is dragged for docking.
[Delphi compatible - dropped!]

Delphi compatible - dropped!

Dragging not started.
Drag-drop started.
Drag-dock started.
DragManager message types.

All messages are sent to the target control, except dmDragDrop and dmDragCancel is sent to the source control.

    dmDragEnter: mouse enters control
    dmDragLeave: mouse leaves control
    dmDragMove: mouse moves over control (after dmDragEnter)
    dmDragDrop: control dropped
    dmDragCancel: dragging aborted
    dmFindTarget: find child control under the mouse

mouse enters control
mouse leaves control
mouse moves over control (after dmDragEnter)
control dropped
dragging aborted
find possible target control under the mouse
The type of an OnDragOver handler.

An OnDragOver event is sent by a control, when an object is dragged over it. The handler can specify whether a drop will be accepted or rejected.

Source
is polymorphic, can be either the DragObject or the dragged control! This depends on DragObject.AutoCreated, for no sane reason :-(
The possible drop target (control).
The object (TDragObject or TControl) being dragged.
X coordinate of the mouse on screen.
Y coordinate of the mouse on screen.
The current DragState (entering, leaving or moving over the target).
Set Accept to False to reject an drop (default is True).
The type of an OnDragDrop notification handler.
An OnDragDrop event is generated by the target control, on the drop of a dragged object.
The target control of the drop.
The dragged control.
The client coordinates of the drop.
The client coordinates of the drop.
The type of an OnStartDrag handler.
An OnStartDrag event is generated by a control when it shall be dragged and its DragKind is dkDrag. The handler can provide a specific DragDrop object, else a standard TDragDropObjectEx is automatically created by the DragManager.
The control to be dragged.
Supply your own DragObject, or leave it Nil for automatic creation.
The type of an OnEndDrag handler.

An OnEndDrag event is sent by a dragged control, when dragging is finished. This happens regardless of whether the operation was drag-drop or drag-dock, and whether the operation ended with a drop or was cancel'd.

Check Target=Nil to distinguish between a drop and a cancel'd operation (Nil).

The dragged control

or DragObject?

The drop target (control), or Nil if cancel'd.
The mouse coordinate, in client coordinates if dropped, else in screen coordinates.
The mouse coordinate, in client coordinates if dropped, else in screen coordinates.
Base class for managing drag operations and user feedback.

Every dragging operation has an associated DragObject, holding references to the source and target controls, and other parameters for the customization of the visual user feedback.

A default DragObject is created automatically when a dragging operation starts, and is destroyed when the operation has ended, so that you must not take special care on it. But an application can provide a customized DragObject in the or handlers of the source control (being dragged).

AutoCreated DragObjects imply different behaviour in the DragOver and DragDrop events, where the Source becomes the dragged control, while else the DragObject itself is passed as Source.

TDragObject is the ancestor of an whole tree of dragging objects, with the main branches supporting either drag-drop or drag-dock operations. The type of the operation is determined from the property of the source control.

In contrast to the Delphi implementation, Lazarus has moved a couple of methods into the drag performers, so that these are no more available for customization.

A Lazarus DragObject mainly supplies the cursor and images, used in visual user feedback. Drag-drop operations typically signal acceptance of an possible drop by variations of the mouse cursor, and optionally can attach to it shapes of the dragged object(s). Drag-dock operations instead show a docking rectangle, that snaps to possible target locations when the mouse moves over docksites.

[entire review DoDi 2011-09-10]

[Delphi compatible - dropped!]
[Delphi compatible - dropped!]
[Delphi compatible - dropped!]

Delphi compatible - dropped!

[Delphi compatible - dropped!]

Delphi compatible - dropped!

Returns the dragging cursor type (shape).
In drag-drop operations the cursor signals acceptance or rejection of an drop, depending on Accepted.
The cursor to show.
Which cursor to return (rejected:crNoDrop or accepted:crDrag).

?

?

Returns a list of images for dragging.
The returned provides methods for the selection and display of an image, shown while dragging. This implementation returns Nil, must be overridden (e.g. in TDragControlObject).
The ImageList to use, is Nil by default!
[Delphi compatible - dropped!]

Delphi compatible - dropped!

[Delphi compatible - dropped!]

Delphi compatible - dropped!

[Delphi compatible - dropped!]

Delphi compatible - dropped!

[Delphi compatible - dropped!]

Delphi compatible - dropped!

[Delphi compatible - dropped!]

Delphi compatible - dropped!

[Delphi compatible - dropped!]

Delphi compatible - dropped!

Remembers the dragged control.
TObject.Create
The control being dragged.
Special constructor, enforcing the destruction of the object at the end of the dragging operation.
This constructor sets the AutoCreated and AutoFree flags. AutoFree is tested by the DragManager at the end of the dragging operation.
The control being dragged.
Indicates whether the object shall be destroyed at the end of the dragging operation.
This is a Lazarus specific property, introduced to get rid of the special Delphi TDrag...Ex classes.
Should the image of dragged objects always be shown?
This is another chance for enforcing the display of a drag image, even if a drop is acceptable.

where to describe the various conditions?

The control that is dragged (source).
[Delphi compatible - dropped!] Copy information from another drag object.
Use Assign to initialize the drag object with your own default values.

Delphi compatible - dropped!

[Delphi compatible - dropped!] Returns the Name of the drag object.
This implementation returns the ClassName of the object. Override as appropriate for your drag management, this method is not called by LCL code.

Delphi compatible - dropped!

The object's name.
[Delphi compatible - dropped!]

Delphi compatible - dropped!

Zero by default.
Asks the image list to hide the drag image.
ShowDragImage
Asks the image list to show the drag image.
HideDragImage
[Delphi compatible - dropped!] Is this drag being cancelled?
Set while this drag is cancelled. Used to prevent endless loops in further processing.

Delphi compatible - dropped!

[Delphi compatible - dropped!] The Handle of the dragged object.

Delphi compatible - dropped!

Current mouse position in screen coordinates.
Mouse position in client coordinates of the DragTarget.
The control over which the object currently is dragged (target).
Indicates whether the drag object has been dropped yet.
False while dragging is in progress, or when dragging has been aborted.
[Delphi compatible - dropped!] The x offset of the DragImage or DockRect hotspot.

Delphi compatible - dropped!

[Delphi compatible - dropped!] The y offset of the DragImage or DockRect hotspot.

Delphi compatible - dropped!

Was the drag object created automatically?
This property is of little use, more important is the AutoFree property.
Called when a dragging operation ends.
The default implementation calls Control.DoEndDrag, which in turn invokes an OnEndDrag handler.
The control onto which the dragged object is dropped (can be Nil).
A class type.
A drag object that is automatically destroyed after use.
Creates a drag object that is automatically destroyed after use.
A drag object for dragging a control.
While a TDragObject can be used for dragging controls, this class knows that it drags a control, and asks it for an DragCursor and DragImages.
Asks the Control to provide an cursor.
Asks the Control to provide an ImageList.
The Image list to be used in dragging this control.
Creates an object to be destroyed after use.
The control to drag.
Orientation of DockZones and docked controls, similar to .

This is a Delphi relict, bound to TDockTree and not very useful in application code.
All DockZones in an DockTree have a unique orientation, horizontal or vertical, indicating how controls are arranged in this zone. When a control is docked into a zone, it obtains the orientation of that zone.

The control's orientation can be stored as the opposite of the zone, depending on the used DockManager.
no orientation applies (like alNone)
siblings are arranged horizontally, children top-to-bottom
siblings are arranged vertically, children left-to-right
children are pages in a tabbed control
The type of an OnDockDrop handler.
An OnDockDrop event is sent by the drop target (dock site) on the drop of a dragged object.
The drop target (docksite control).
The DragDock object, containing information about the dragged object.
The type of an OnDockOver handler.
An OnDockOver event is sent by a dock site, when an object is dragged over it. The handler can specify whether a drop will be accepted or rejected.
The possible drop target.
The type of an OnUnDock handler.
An UnDock event is sent by a dock site, before a control is undocked from it. The handler can reject undocking, by setting Allow to False.
The docksite from which the object is undocked.
The control to be undocked.
The new docksite for Client, Nil when undocked into floating state.
Set Allow to False to reject undocking.
The type of an OnStartDock handler.
An OnStartDock event is sent by a control when it shall be dragged and its DragKind is dkDock. The handler can provide a specific DragDock object, else a standard TDragDockObjectEx is automatically created by the DragManager.
The control being dragged.
Supply your own TDragDockObject, or leave it Nil to request automatic creation.
An OnGetSiteInfo handler returns information about a docksite.
An OnGetSiteInfo event is sent by the DragManager to all docksites. The handler can adjust the snapping rectangle (InfluenceRect), and can reject an drop.
The dock site near the mouse pointer.
The dragged control.
The screen rectangle within which a drop or mouse move will be directed to this docksite.
The current position of the mouse.

screen?

Set CanDock to False to reject docking.
A drag object for drag-dock.

This object type serves two main purposes: it allows to distinguish between drag-drop and drag-dock operations, and it implements docking specific information and behaviour.

The primary use is for tree docking, as assumed in the TControl and TWinControl methods.

[entire review DoDi 2011-09-10]

[dropped!]

dropped!

Adjust the DockRect relative to the dragging hotspot (DockOffset).
The parameter type is bad, should be var. Ignore it please.

The default implementation adjusts the stored FDockRect, by DockOffset. This adjustment will make the DockRect appear right over the control, when dragging starts, regardless of where the user clicked onto the control.

You'll rarely have to override this method, since the DockRect is adjusted by every target site's DockManager later.

useless, ignore!
[Delphi compatible - dropped!]

Delphi compatible - dropped!

Finish docking.
Invokes Control.DoEndDock.
The target docksite, or Nil to make the Control float.
[Delphi compatible - dropped!]

Delphi compatible - dropped!

Moves an already visible DockRect.

Checks the DockRect for changes against EraseDockRect, to prevent flicker.

Remembers the drawn frame coordinates in EraseDockRect.

Initializes the dragging coordinates.

Determines the hotspot offset for adjusting the floating DockRect.

Since the undocked extent of the control doesn't change while dragging, we fix the hotspot offset here.

Usage: OffsetRect(DockRect, FDockOffset);

Shows the DockRect, remembers the coordinates in EraseDockRect
Hides the DockRect, invalidates EraseDockRect to prevent further erases.
[Delphi compatible - dropped!]

Delphi compatible - dropped!

[Delphi compatible - dropped!]

Delphi compatible - dropped!

[Delphi compatible - dropped!]

Delphi compatible - dropped!

The hotspot offset of the dragged DockRect.
Screen coordinates of a possible drop location.
The DockRect gives feedback to the user, where the dragged control may be dropped. When no docksite signals acceptance, the DockRect reflects the floating state of the dragged control. When a drop will dock the control, the DockRect signifies the approximate position of the docked control.
How the dragged control will be docked, relative to the target control.
When the target is a DockTree, DropAlign indicates the placement of the control relative to DropOnControl. Other docking methods require a specialized (derived) DragDockObject.
The already docked control, relative to which the dragged control will be docked. Nil for an empty docksite.
The currently visible DockRect, to be removed later.
A special value indicates that the DockRect already has been removed.
The final state of the dragged control (after drop).
True when the dragged control becomes or stays floating.
[Delphi compatible - dropped!]

Delphi compatible - dropped!

Determines whether the dock site shall be enlarged.
Not normally used, perhaps a special AnchorDocking property?
A drag object for docking, that is automatically destroyed after use.
Creates an object to be destroyed after use.
The layout manager for a docksite.
Every docksite can have an DockManager, which arranges the docked controls.
Creates an DockManager for ADockSite
This is the TWinControl acting as the docksite.
Handles the messages sent to a docksite.

This handler must handle all mouse messages, related to the client area of the docksite that is not covered by docked controls (dock headers...).

Handling mouse messages while dragging is not required. Painting of the docksite has to be implemented in PaintSite.

The message to be processed.
Start updating the DockSite layout.
Finish updating the DockSite layout.
Returns True if the DockManager should be destroyed together with the docksite.

This is a Lazarus specific extension of the Delphi TDockManager. It allows multiple docksites to share the same DockManager instance.

True if the DockManager should be destroyed together with the docksite.
Returns the zone bounds of a docked control.

The TDockTree manager returns the bounds of the dockzone, including the dock header.

When the Control is not docked, an empty Rect(0,0,0,0) is returned.

The docked control.
The enclosing rectangle, in client coordinates of the docksite.
Determine the DropAlign.

ADockObject contains valid DragTarget, DragPos and DragTargetPos relative dock site. DockRect is undetermined.

DropOnControl may be Nil if nothing has been docked yet, or no target control exists at the mouse coordinates.

Returns True if ADockObject.DropAlign has been determined. If False, the DropAlign has to be determined by default procedures.

True if the DropAlign was determined.
The DragDockObject holding all information about the drag-dock operation.
Position DropCtl relative Control, using the alignment specified by InsertAt.

InsertControl determines the placement of the just docked control, forcing a repaint of the container control if necessary.

When SetReplacingControl has been called with a non-Nil Control before, the dropped control only should replace that control.

An overloaded version passes the DragDockObject to the dockmanager, allowing to pass more information about the drop. It allows to implement other than tree-style docksites.

The control relative to which insert.
How to insert relative to Control.
The control to insert.
The DragDockObject holding all information about the drag-dock operation.
Restores the layout of the docksite from Stream.
The controls to be docked can be retrieved by ReloadDockedControl from the docksite; this method returns only existing controls of the given name, owned by the owner of the docksite, by default.
The stream with the layout information.
Handles special painting of the docksite.
While the docked controls paint themselves, eventual dockheaders and other decoration have to be painted by the DockManager.
The device context, used to paint.
Determines the DockRect while dragging a control over the docksite.

This method updates DockRect for the visual feedback, when a control is dragged over the docksite.

The initial DragDockObject.DockRect spans the entire DockSite.

The Delphi compatible version only can use the parameters determined by the default processing in the docksite.

The Lazarus specific version can update the DockObject with better suited parameters. A DockManager here can implement any algorithm for the placement of a dropped control. The default implementation calls the Delphi compatible version.
When you override the Lazarus version, you may have to determine the dock sibling and DropAlign again, when the default determination (in TControl and TWinControl) is inappropriate.

The dropped control.
The control relative to which Client shall be docked. Nil for docking into the docksite.
How to dock, relative to DropCtl.
The screen rectangle of the docksite, to be adjusted by this method.
The DragDockObject holding all information about the drag-dock operation.
Removes the undocked control from the docksite layout.
When SetReplacingControl has been called with a non-Nil argument before, the layout of the docksite should not be changed. Instead the next inserted control should take the place and role of this control.
Control to remove.
ResetBounds
refreshes the layout of the docksite.

This method typically notifies the DockManager of a Resize of the docksite.

When the extent of the docksite really has changed, the DockManager should reposition and resize all docked controls accordingly.

The layout always should be refreshed when Force is True. This is required when e.g. the visibility of docked controls has changed, but not the size of the docksite.

When True, always update the layout.
Saves the docksite layout to Stream.
Write the layout information into this stream.
Specifies the control to be replaced subsequently.

This method is called by ReplaceDockedControl, to announce a pending replacement of Control by another control. The next RemoveControl should be ignored, and InsertControl should only exchange the controls, without reorganizing the layout of the docksite. When Control is Nil, this call signals the end of the exchange [obsolete].

The name "SetReplacingControl" is a misnomer, it should read "SetControlToBeReplaced".

The intended purpose of this method is the replacement of a docked control by a Notebook, preserving the DockZone. This operation should be handled by an DockManager internally, and calls to this method should be ignored.

The control to be replaced later.
The DockManager class type, for use when a DockManager is automatically created.
The default class used to create an DockManager in .
Range of the control size constraints.

?

?

?

?

?

Holds maximum and minimum values that can be used in sizing objects.
Calls an OnChange handler if assigned.
Asks the interface for constraints.
Used by the interface to set the interface constraints.
Should only be used by custom components, not by applications.
Determines the minimal applicable width, given the local and interface constraints.
Zero means no constraints.
Determines the minimal applicable height, given the local and interface constraints.
Zero means no constraints.
Determines the maximum applicable width, given the local and interface constraints.
Zero means no constraints.
Determines the maximum applicable height, given the local and interface constraints.
Zero means no constraints.
Determines the constrained Width, and transfers it to the widget.
The constrained width.
The suggested width.
Determines the constrained Height, and transfers it to the widget.
The constrained height.
The suggested height.
The maximum height allowed by the widget.
The maximum width allowed by the widget.
The minimum height allowed by the widget.
The minimum width allowed by the widget.
The Control to which these constraints apply.
Options for the determination of the constraints.

application?

Event handler for a change in the constraints.
The maximum height.
The maximum width.
The minimum height.
The minimum width.

?

?

Defines the default values for TControlBorderSpacing.
Describes the (minimum) spacing around a control.

TControlBorderSpacing defines the spacing around a control. The spacing around its children and between its children is defined in .

Left, Top, Right, Bottom: integer; minimum space left to the autosized control. For example: Control A lies left of control B. A has borderspacing Right=10 and B has borderspacing Left=5. Then A and B will have a minimum space of 10 between.

Around: integer; same as Left, Top, Right and Bottom all at once. This will be added to the effective Left, Top, Right and Bottom. Example: Left=3 and Around=5 results in a minimum spacing to the left of 8.

InnerBorder: integer; This is added to the preferred size. For example: A buttons widget returns 75x25 on GetPreferredSize. CalculatePreferredSize adds 2 times the InnerBorder to the width and height.

CellAlignHorizontal, CellAlignVertical: TControlCellAlign; Used for example when the Parents.ChildSizing.Layout defines a table layout.
Invalidates the control, and invokes the OnChange handler.
currently ignored (distinction no more required).
The associated control.
Pointer to an record with default settings; can be Nil for all zero defaults.
True if the specified spacing equals the current settings.
Returns the bounds with added Around space.
Out parameter, initial contents are ignored!
The space on a control side, including Around space.
The space value.
The requested edge.
The space to add to every side's individual space.
The space at the bottom border.
The horizontal alignment inside a table cell.
The vertical alignment inside a table cell.
The control to which this border spacing applies.
Space added to the widget's preferred size.

When calculating the preferred size of control, the LCL asks the widget first.

When the widget returns a preferred size, e.g. a TButton widget, then the InnerBorder is added twice to this size - e.g. to the Height for top and bottom space.

If the widget does not return a preferred size, the InnerBorder has no effect.

The space at the left border.
Event handler for a change in border spacing.
The space at the right border.
Kind of array access to the space at every side.
The side for which the space is requested.
The space at the top border.
Specifies how the side of a control is anchored to other controls.

    TAnchorSide

        Class holding the reference sides of the anchors of a TControl.
        Every TControl has four AnchorSides:
        AnchorSide[akLeft], AnchorSide[akRight], AnchorSide[akTop] and
        AnchorSide[akBottom].
        Normally if Anchors contain akLeft, and the Parent is resized, the LCL
        tries to keep the distance between the left side of the control and the
        right side of its parent client area.
        With AnchorSide[akLeft] you can define a different reference side. The
        kept distance is defined by the BorderSpacing.

        Example1:
           +-----+  +-----+
           |  B  |  |  C  |
           |     |  +-----+
           +-----+

          If you want to have the top of B the same as the top of C use
            B.AnchorSide[akTop].Side:=asrTop;
            B.AnchorSide[akTop].Control:=C;
          If you want to keep a distance of 10 pixels between B and C use
            B.BorderSpacing.Right:=10;
            B.AnchorSide[akRight].Side:=asrLeft;
            B.AnchorSide[akRight].Control:=C;

          Do not setup in both directions, because this will create a circle, and
          circles are not allowed.

        Example2:
                +-------+
          +---+ |       |
          | A | |   B   |
          +---+ |       |
                +-------+

          Centering A relative to B:
            A.AnchorSide[akTop].Side:=asrCenter;
            A.AnchorSide[akTop].Control:=B;
          Or use this. It's equivalent:
            A.AnchorSide[akBottom].Side:=asrCenter;
            A.AnchorSide[akBottom].Control:=B;

Make this an topic, describing *everything* related to anchoring?

Get information about the target control, side and side position.
The control we are anchored to.
The side we are anchord to.
Position of the side to anchor to.
Check for anchor cycles and invalid targets, and return information about the target side.
Can raise an exception 'TAnchorSide.CheckSidePosition invalid Side'.

False when errors have been found.

?

?

The control we are anchored to.
The side we are anchord to.
Position of the side to anchor to.
True when we are anchored to our parent, at least on ParentSide

?

?

?

Remove conflicting anchors.
With asrCenter, both sides are controlled by one anchor. Disable opposite anchor and all aligning.
The control being anchored.
For example AButton1.AnchorSide[akBottom].Owner = AButton1.
The control side being anchored.
Every control has four AnchorSide, one for each side. For example AButton1.AnchorSide[akLeft].Kind=akLeft.
The target control of the anchor.
For example if the right side of a Button1 is anchored to the left side of Edit1, then Button1.AnchorSide[akRight].Control=Edit1 and Button1.AnchorSide[akRight].Side=asrLeft.
The side of the target Control, to which we anchor.
For example if the right side of a Button1 is anchored to the left side of Edit1, then Button1.AnchorSide[akRight].Control=Edit1 and Button1.AnchorSide[akRight].Side=asrLeft.
Links an Action to a control.

An ActionLink is created by a control, when an Action is assigned to the control. TControl.Action effectively becomes control.ActionLink.Action.

The ActionLink propagates changes of Action properties to the client control. It's assumed that properties of the same value (in the Control and Action) are linked to the Action, and follow changes to the Action properties.

Linked control properties are (by default):

- Caption
- Enabled
- Hint
- HelpContext, HelpKeyword, HelpType: these are linked only if all three property values match.
- Visible
- OnClick is linked to Action.Execute

The control can update itself, when it receives a Change notification from the ActionLink .

The client control that is linked to the action.
It can be assumed that FClient is not Nil.
Called during construction, sets FClient to the given control.
The control linked to the action.
Help properties are assumed linked only when all these properties match.
Compares the HelpContext, HelpKeyword and HelpType properties.
True only if all three Control properties match the Action properties.
True if the client's OnClick is the action's OnExecute handler.
Compose the hint string, depending on HintShortCuts.
Always True.
The hint to show.
Sets the client's Caption, if the old values match.
TActionLink.SetCaption
Sets client's Enabled, if the old values match.
Sets client's Hint, if the old values match.
Sets client's HelpContext, if the old Help properties match (IsHelpLinked).
Sets client's HelpKeyword, if the old Help properties match (IsHelpLinked).
Sets client's HelpType, if the old Help properties match (IsHelpLinked).
Sets client's Visible, if the old values match.
Set client's OnClick, if the old values match.
Class of .

?

?

?

create/destroy handles

?

?

make handles visible

?

Names for TControlAutoSizePhase.
Type of .
Handler type for OnShowHint.

?

?

Handler type for OnContextPopup.
The clicked control.
Mouse position in client coordinates; (-1,-1) if the event was not generated by a click.
Set Handled to True when everything was handled; False shows the associated PopupMenu, by default.
Flags mostly for pending actions.
set by TControl.ReadState, unset by TControl.Loaded when all on form finished loading
Set when AutoSize was delayed

?

Set when Left was set during loading.
Set when Top was set during loading.
Set when Width was set during loading.
Set when Height was set during loading.
Set when ClientWidth was set during loading.
Set when ClientHeight was set during loading.
Set when BoundsRectForNewParent has been initialized.

?

Set when PreferredSize has been calculated (CalculatePreferredSize).

?

?

Set (in WndProc) while processing an LM_PAINT message.

?

?

?

Notification handler types.
Notification handlers only receive an Sender, and must know themselves why they have been invoked.
Notification request for OnResize.
Notification request for OnChangeBounds.
Notification request for OnVisibleChanging.
Notification request for OnVisibleChanged.
Notification request for OnEnabledChanging.
Notification request for OnEnabledChanged.
Notification request for OnKeyDown.
Indicates the policy for the LCL to execute automatic adjustments in the form layout
widgetset dependent
A fixed absolute layout in all platforms
Smartphone platforms use this one, the x axis is stretched to fill the screen and the y is scaled to fit the DPI
For desktops using High DPI, scale x and y to fit the DPI
Indicates the role which a accessible object takes in the user interface
An object that displays an animation
A button
A cell in a table
An object that displays a graphical representation of data
An object that can be checked or unchecked, or sometimes in an intermediary state
A clock displaying time
A control which allows selecting a color
A list of choices that the user can select from
A controls which displays and possibly allows to choose a date
A grid control which displays cells
A control which groups others, such as a TGroupBox
Something to be ignored. For example a blank space between other objects
A graphic or picture or an icon
A text label as usually placed near other widgets
A list of items, from which the user can select one or more items
An item in a list of items
A main menu bar
A item in a menu
A control which shows a progress indication
A radio button, see for example TRadioButton
A grip that the user can drag to change the size of widgets
A control to scroll another one
A control which allows to increment / decrement a value
A control with tabs, like TPageControl
A multi-line text editor (for example: TMemo, SynEdit)
A single-line text editor (for example: TEdit)
A control which allows to drag a slider
A list of items in a tree structure
An item in a tree structure
A top level window
Represents an accessible object with which the user of a accessibility tool can interact.

Every TControl has a TLazAccessibleObject instace associated with it, which means that every TControl is potentially accessible, but to actually be usable the accessible object needs to have its properties set, the most important of which are the role, description and value. Native windowed classes should already receive accessibility properties from the underlying widgetset utilized, while TCustomControl descendents will have their accessibility taken care by the LCL itself. User applications should add accessibility for their own TCustomControl descendent classes and also possibly customize the descriptions of some elements. It is also possible to make an accessible object invisible for user, which is done by setting its AccessibleRole property to larIgnored.

Accessibility support in Lazarus is also documented in the wiki in http://wiki.lazarus.freepascal.org/LCL_Accessibility

The control that this accessible object is attached to. It might be the main accessible object of this control or it might represent a sub-part of a control.

The control that this accessible object is attached to. It might be the main accessible object of this control or it might represent a sub-part of a control which does not have a corresponding TControl, like an item of TTreeView. One can verify if this is the main accessible object of the control by checking if (lAccessibleObject.OwnerControl = lAccessibleObject.OwnerControl.GetAccessibleObject())

The parent TLazAccessibleObject of this accessible object
Available to be used to connect to an object
Available for Widgetsets to use
Returns if the handle of this object was already allocated or not
Utilized to set all properties of this property via widgetset routines when creating the handle
Setter for the property AccessibleDescription
Setter for the property AccessibleValue
Setter for the property AccessibleRole
Inspect the tree of accessible objects upwards until it finds a parent which is attached directly to a windowed control, a TWinControl
Creates a new child accessible object and returns it
Inserts an already created child accessible object as a child of this one
Removes all children of this control. It will free them if they are not attached to a TControl
Removes a child accessible object
Obtains a child accessible object by its index
Obtains a child accessible object by its index
Obtains a child accessible object by its DataObject property
Returns the number of direct children that this accessible object has
Returns the currently selected child accessible object or nil if none are selected. Override this method in your sub class.
Returns the child of this control located at a particular position given as a client position of the control
The description of this accessible object
The value of this accessible object
The role of this accessible object
The position of this accessible object
The size of this accessible object
The widgetset handle of this accessible object
The base class for visible controls.

?

?

Deprecated, don't use it.
Array of the installable notification handlers.
State flags.
The cursor shape for this control.
Intended ClientSize, initialized during loading

?

?

Internal handler for a changed Action, invoked from the ActionLink.
When the action is assigned to this control, updates related properties using ActionChange.
The changed Action.
Returns the Text property.
Uses RealGetText (FCaption), instead of GetTextBuf (WM_GETTEXT), if possible.
GetTextBuf
The Text property.
Generate MouseEnter and MouseLeave events

?

Adjust the intended (given) Bounds, according to Constraints.
Message handler for mouse button going down. Calls MouseDown handler.
Message handler for mouse button going up. Calls MouseUp handler.
Setter for AnchorSideLeft...
Sets the Text property.
Uses RealSetText instead of SetTextBuf, if possible.
Text RealSetText SetTextBuf
The new Text.
implement in descendants

?

what?

For internal use only - call AdjustSize instead!

IMPORTANT: Many Delphi controls override this method and many call this method directly after setting some properties.

During handle creation not all interfaces can create complete Device Contexts which are needed to calculate things like text size.

That's why you should always call AdjustSize instead of DoAutoSize.

AutoSize topic TControl.AdjustSize
Run DoAutoSize until done.
Sets AutoSizing=true, used to prevent loops.
End of the autosizing process, resets AutoSizing to False.
Request further processing after an anchor side was changed.
Ignored.
Request further processing after an anchor side has changed, that anchors another control to this one.
Invoked when the Bounds of the control have been changed. Override as required.
Creates the default ControlBorderSpacing object. Allow descendant controls to override this default.
The created ControlBorderSpacing instance.
Reacts on a change in the control's constraints. Calls AdjustSize by default.
Reacts on a change in the control's border spacing.
Checks for a defined (non-zero) BorderSpacing.InnerBorder.
True when InnerBorder has to be taken into account.
Sends Move and Size messages through the LCL message paths.

Overridden in TWinControl, in TControl it's a NOP.

This method simulates the VCL behaviour and has no real effect.

?

Invokes the handler, allowing to modify the suggested Constraints.
Override this method to return the preferred height and width.

Calculates the preferred width and height for a control, which is used by the LCL autosizing algorithms as the default size. Negative or 0 are treated as undefined and the LCL uses other sizes instead.

TWinControl overrides this and asks the interface for theme dependent values. See

for more information.

WithThemeSpace: If true, adds space for stacking.

For example: TRadioButton has a minimum size. But for stacking multiple TRadioButtons there should be some space around. This space is theme dependent, so the parameter is passed to the widgetset.

Set this argument to the preferred width.
Set this argument to the preferred height.
True when space around stacked controls should be added.
Invokes the OnResize notification handler.
Invokes the OnChangeBounds event handler
Checks for changes and calls DoOnChangeBounds if needed.
Checks for changes and calls DoOnResize if needed.
Smart calling of Parent.AlignControls (very indirectly).
Update the rules for anchoring the control

or of anchored controls?

Sets the bounds (left, top, height, width) optionally the BaseBounds of the control.

ChangeBounds is called whenever the position or size of the control is set, either via the properties or by the layouter of the LCL.

SetBounds calls internally ChangeBounds with KeepBase=false, while the LCL layouter calls it with KeepBase=true.

Override this for code that might change the preferred size or resizes other controls.

You can call this function in your custom controls. Keep in mind that the given aLeft, aTop, aWidth, aHeight might not be valid and will be changed by the LCL before applied.

True when the BaseBounds should not be modified.
Internal function to set the control's bounds (Left, Top, Height, Width).

DoSetBounds is a low level function to set the private variables FLeft, FTop, FWidth, FHeight. Do not call this function, only the LCL calls it.

It also updates FClientWidth and FClientHeight accordingly.

Override this to update the content layout of the control, for example scroll bars. As always: do not paint here, but call Invalidate and paint in OnPaint or override Paint.

The following doesn't look correct?

Scale the minimum and maximum Width and Height.
ScaleConstraints is called during ChangeScale, you never will call it directly.
Apply scaling (multiplier and divider) to the control's coordinates and Font.
Function to determine if autosizing is possible, and if so, gets the new width and height
Override this to return different values.
TControl returns True.
Suggested width, can be adjusted in an overridden version.
Suggested height, can be adjusted in an overridden version.
Move this control to position 0 of Parent.FAlignOrder.
Affects the order in which client controls with the same alignment are positioned

?

Determine if a parent control is involved in the alignment process
Logical client area, can be bigger than the visible client area.
A has a logical client area, of which only a portion can be visible. The origin always is (0,0), regardless of an ScrollOffset.
TControl returns the ClientRect.
Get the visible part of the logical client area.

Includes the ScrollOffset in a TScrollingWinControl Parent.

TControl: When the Parent is a TScrollingWinControl, the ClientRect is offset by its ScrollOffset. This Rect can be intersected with the visible ClientArea of the Parent, to get the really visible part of the control.

TWinControl: The visible ClientRect is offset by ScrollOffset, to reflect the visible part of the logical ClientRect.

The scrolled ClientRect (TopLeft, BottomRight).
Returns the offset of the scrolled client area (in a scrolling TWinControl).
The overridden method may fail when the TScrollingWinControl has only one scrollbar

!?

The X and Y offsets of the visible client area, equal to the scrollbar positions.
Returns the origin (top left pixel) of the control, in screen coordinates.
True when both the control's left and right side are anchored.
True if the Width varies with the Parent.Width.
True when both the control's top and bottom side are anchored.
True if the Height varies with the Parent.Height.
Message handler for cancel mode request.
Message handler for context menu popup request.
Message handler for left mouse button going down.
Message handler for right mouse button going down.
Message handler for middle mouse button going down.
Message handler for left mouse button double click.
Message handler for right mouse button double click.
Message handler for middle mouse button double click.
Message handler for left mouse button triple click.
Message handler for right mouse button triple click.
Message handler for middle mouse button triple click.
Message handler for left mouse button quadruple click.
Message handler for right mouse button quadruple click.
Message handler for middle mouse button quadruple click.
Message handler for extra mouse button going down.
Message handler for extra mouse button double click.
Message handler for extra mouse button triple click.
Message handler for extra mouse button quadruple click.
Message handler for extra mouse button going up.
Message handler for mouse moved.
Message handler for left mouse button going up.
Message handler for right mouse button going up.
Message handler for middle mouse button going up.

?

Message handler for control moved.
Message handler for changed control size.
Message handler for changed control position.
Message handler for changed capture.
Message handler for BiDi mode changed.
Message handler for changed system Font.
Message handler for changed Enabled state.
Message handler for hit test.
The hit test handler determines the specific part of a control (caption, border...) at the given mouse position.
Message handler for mouse entering the control.
Message handler for mouse leaving the control.
Message handler for hint display.
Message handler for parent control's BiDi mode changed.
Message handler for changed parent Font.
Message handler for changed parent Color.
Message handler for changed parent ShowHint.
Message handler for changed visibility.
Message handler for control's Text changed.
Message handler for special character (TAB...).
Message handler for changed cursor.

?

Saves the docked and undocked extent of the control.

In floating state sets UndockWidth/Height to the current Width/Height.

In docked state sets LRDockWidth/TBDockHeight to the current Width/Height.

[Note: should save both in any case, independent from DockOrientation or host Align.
Rationale: a DockManager will either ignore these values, or use them according to the *new* alignment.
Without a DockManager both extents are required, because no (valid) alignment information applies.]
Create a floating dock site with a client area equal to the given screen coordinates.
The new dock site is owned by the control

Delphi: by Application!?

The dock site, can be Nil for a TWinControl that can float by itself.
The bounds of the client area of the floating window.
Determine the side to which the dragged control shall be docked.
Mouse position in client coordinates.
Get the list of images usable during dragging.
Guess whether the control is floating.
Floating state is assumed when the control has a HostDockSite of FloatingDockSiteClass, and is the only docked client.
Returns the class for a floating host dock site.

An instance of this class is created whenever a control shall float, but can not (or shall not) float by itself.

Only TWinControls can float on the screen (with Parent=Nil), but not ordinary TControls.

Since dockable forms are not supported by every platform, also a dockable TWinControl may need an floating host, which presents a docking handle to the user (e.g. a dock caption).

The class of a floating host dock site for this control.
For internal use: user has started dragging the control.
Handler called when the control starts floating.

Since TControls cannot float for themselves, a FloatHost site is created and the control is docked into it.

When the control already has a Parent (FloatHost site), the Parent's position and extent is adjusted to fit the DockRect as its ClientRect.

The DockObject of the current drag-dock operation.
Adjust the DockRect for floating state (no drop target under the mouse).
The dragged DockObject, containing the DockRect to adjust.
The mouse position, in screen coordinates.
Internal method, called by Dock. Adjusts the control's position and extent for the new docksite.

If NewDockSite=Nil, Parent is set to Nil (in preparation of floating the control).

Otherwise ARect is ignored (bug?), and recomputed to fit approximately into the ClientRect of the NewDockSite.

Finally the computed coordinates are stored, in BoundsRectForNewParent when the NewDockSite differs from Parent, else in BoundsRect.

A correct implementation should allow for computations in a derived class, and accept and handle the changed bounds without any further adjustments.
The site where the control will be docked, or Nil when it becomes floating.
The control's new Bounds, in screen coordinates when NewDockSite is Nil, else in client coordinates of NewDockSite.
Handler for a drag message, sent by the DragManager to the current target control.

These messages can be sent while dragging:

- On dmFindTarget: Request to determine the possible target control for an drop.
  A TControl returns itself, a TWinControl finds the child control closest to the mouse position.
- On dmDragEnter/Leave/Move: Notification of mouse moves.
  Invokes DragOver, or DockOver if docking. Result indicates acceptance of an drop.
- On dmDragDrop: The dragged object has been dropped onto this control.
  Invokes DragDrop, or DockDrop if docking.

The Source argument of the invoked methods is the DragDockObject when docking. Else if the DragObject has been AutoCreated, the dragged control is passed as the Source; otherwise the DragObject itself is passed as Source.

Result is polymorphic: On dmFindTarget the result is the target control reference, on dmDragDrop it's zero, else it indicates acceptance of an drop.
The task to perform.
The mouse position in screen coordinates.
The drag object.
The drop target, Nil if none.
Distinguishes between a drag-drop and drag-dock operation.
Invokes the OnEndDock handler.
Invokes the OnEndDrag handler.
Invokes the OnStartDock handler
Invokes the OnStartDrag handler
Notifies the control of a canceld drag.
Called when an object is dragged over this control. Determines whether a drop is acceptable, using the OnDragOver handler.

An OnDragOver handler is required, or any drop will be rejected (Accept becomes False).

When an OnDragOver handler is installed, Accept is set to True and can be changed by the handler.

Caution: Source can be either a TDragObject, or the dragged control.
The dragged object, a control or a DragObject.
The mouse position in client coordinates.
State change flag (dsDragEnter, dsDragMove, dsDragLeave).
Set to True when a drop is allowed.
Get the DockRect for an possible drop.
Either calls the DockManager.PositionDockRect of the target site, or DragDockObject.AdjustDockRect after moving the undocked control rectangle to the DragPos. AdjustDockRect takes the hotspot of the DockRect into account.
Returns the string for the dock caption, by default the control's Name.
Invokes the OnClick and ActionLink.Execute handlers.
Invokes the OnDblClick handler.
Invokes the OnTripleClick handler.
Invokes the OnQuadClick handler.
Handler for MouseDown events.

Called by the MouseDown message handler. Handles Focus changes, notifies the DragManager while dragging. Finally calls the handler.

which buttons are down
which of Ctrl, Shift or Alt keys are also pressed
Mouse position in client coordinates.
Handler for MouseMove events.

Called by the MouseMove message handler. The DragManager is notified while the control is being dragged. Finally the OnMouseMove handler is invoked.

The currently pressed mouse buttons and modifier keys.
Mouse position in client coordinates.
Invokes the OnMouseUp handler.
The currently pressed modifier keys.
The currently pressed mouse buttons.
Mouse position in client coordinates.
Invokes the OnMouseEnter handler.
Invokes the OnMouseLeave handler.
Do something useful with accelerators etc.

?

Show the Cursor shape, unless it's crDefault.

?

Call this method whenever a change has occured, to trigger further processing.
Override GetPalette to return the handle of a color palette.
The Palette handle, zero (no Palette) by default.
Returns True if the specified class is allowed for children of this control.
True when the class is acceptable.
The class type of the child control.

?

Defines which non-published properties should be streamed (none here).
TComponent.DefineProperties TPersistent.DefineProperties
Implements the assignment to an Action object, otherwise calls the inherited method.

The copied properties are:

- Enabled
- Hint
- Caption
- Visible
- OnExecute (copied to OnClick)
- HelpContext
- HelpKeyword
- HelpType

Called when the update of the containing Form has ended.
Request a repaint of the control.
Handles changes of the Font property.
[Delphi compatible] Does nothing here, all work is done in CMParentFontChanged.
Returns the Caption property.
This method is called by GetText, when GetTextBuf is not overridden.
GetTextBuf RealSetText SetTextBuf
The Caption property.
Sets the Caption property.
This method is called by SetText, when SetTextBuf is not overridden.
SetTextBuf RealGetText GetTextBuf
The string to store.
Handles changes of the Text property.
Returns the cached Text property (FCaption).
True if successful.
Here: FCaption (can be overridden).
Sets the Parent property, if NewParentComponent is a TWinControl.
The general message handler for this control.
Preprocesses several messages, then calls Dispatch to invoke the applicable message handler.
The message to handle.
Internal handler for activities after a form widget has been created.

Called by ChildHandlesCreated of parent form.

Functions like GetTextWidth require valid widgets and their device contexts. That's why AutoSizing is delayed till this moment.

Handler for mouse capture moved to a different control.
Notifies the DragManager of the changed capture control, to stop dragging this control. A very dangerous implementation, that can cause immediate abort of dragging before dragging really starts.
Notification handler for insertion or deletion of components.

First the inherited is invoked, to notify all attached notification handlers.

If Operation is removal, additional actions are performed, depending on AComponent:
PopupMenu, Action, or anchors to the removed control are detached.

The component being inserted or removed.
The action (opInsert or opRemove).
If True, the Tab key can be used to navigate to this control.
Returns a device context handle for the control, from Parent.
Initializes the device context position to the control origin, and shrinks its clipping rectangle to the control bounds.
The device context.
Returns the window handle of the device context.
Invokes the OnShowHint event handler.
Invokes the OnMouseWheel handlers, when the wheel has been turned.

Multiple wheel handlers can be implemented. First the general OnMouseWheel handler is tried, and if it doesn't report the event handled, then OnMouseWheelUp or OnMouseWheelDown are tried.

The actual WheelDelta is available only to the OnMouseWheel handler, not to the up and down handlers [Delphi compatible].

Set Result to True if handled.
State of the modifier keys and mouse buttons.
How many notches the wheel has been turned.
The mouse coordinates

client/screen?

Invokes the OnMouseWheelDown handler.
True if handled.
Invokes the OnMouseWheelUp handler.
True if handled.
Notifies all OnVisibleChanging handlers.
Notifies all OnVisibleChanged handlers.
Notifies all OnEnabledChanging handlers.
Notifies all OnEnabledChanged handlers.
Adds an notification handler.
Notification handlers allow to notify other components of certain events. When the registered event occurs, all installed (added) handlers are invoked.
Type of the event.
The handler to be added.
Unused.

If true, the handler is added before all installed handlers?

Removes the given notification handler.
Type of the notification.
The handler to be removed.
Invokes all notification handlers of the specified type.
The event that has occured.
Invokes the OnContextPopup handler.
Mouse position, used to place the menu.
To be set by the handler, when it has handled the menu display and selection.
Moves the control in front or back of all sibling controls.
Returns the default size for this class of controls (when added to a form).
The default ActionLink class (TControlActionLink).
Used when the control is linked to an Action.
Handler for a changed Action.
Several properties are copied from the new Action.
The changed Action.
When True, forces update of all properties. Otherwise only properties in default state are overwritten.
Invokes the OnDragDrop handler, when a dragged object is dropped onto this control.
The dropped object (control or DragDrop object)
The drop position in client coordinates.
The drop position in client coordinates.
Moves the control into a new docksite.

Calls DoDock to prepare for the new position of the control, when docked into an unmanaged or floating docksite.

When the old and new docksites are different, the control is removed from the DockClients of the old docksite, and added to the DockClients of the new docksite; afterwards the docksites are notified by calling their DoAddDockClient and DoRemoveDockClient methods, to adjust the control's Parent.

An exception is raised if there is already a docking process in progress for this control
The host site into which which the control is to be docked, Nil for floating.
The control's new Bounds, in screen coordinates when NewDockSite is Nil, else in client coordinates of NewDockSite.
Docks a control programmatically.

Docks this control into NewDockSite, relative to DropControl. When NewDockSite is Nil, the control becomes floating.

When the new docksite uses an DockManager, and DropControl is not Nil, the control will be docked relative to DropControl, as specified by ControlSide.

The interpretation of ControlSide depends on the DockManager of NewDockSite, or on the OnDockDrop handler in an unmanaged docksite.

A tree docking manager (TDockTree) should interpret alCustom as NoteBook docking, i.e. a tabbed notebook is created in place of DropControl, and both DropControl and this control are docked into pages of this notebook.

True if successfully docked.
The site into which the control is docked; Nil to make it float.
The sibling relative to which the control is inserted; can be Nil.
The side of DropControl on which the control is to be docked.

?

Undocks the control into floating state.
TWinControls float for themselves, for TControls a floating host dock site is created, and the control is docked into it.
True if succesfully floated.
The screen area where the floating control is moved; the client area of a float host site.

?

Replaces a previously docked control.

This method exists for use by an DockManager, for NoteBook docking. It should not be used in application code.

Delphi has introduced another method DockReplaceDockClient, which is used when the replaced Control is in an unmanaged docksite.

True if the docked control has been successfully replaced.
The control to be replaced, will be docked into NewDockSite.
The new dock site for Control, typically a docking Notebook.
The control to which Control is docked.
The side of DropControl, to which Control is docked.
Returns True if the control is being dragged
Returns True if the control is being dragged
Returns True if the control is being dragged
Creates the TLazAccessibleObject for this control. This method should just create the object and return it. It is useful for classes which desire to have a descendent of TLazAccessibleObject instead of the base class.
Returns the currently selected child accessible object. This method is provided for controls which wish to override this behavior without sub-classing TLazAccessibleObject.
Returns the child object in a given position of the control given in client coordinates. This method is provided for controls which wish to override this behavior without sub-classing TLazAccessibleObject.
Smart way to DoAutoSize.

This method does the same as Delphi TWinControl.DoAutoSize. But since DoAutoSize is commonly overriden by descendant components, it is not useful to perform all tests, which can result in too much overhead. To reduce this the LCL calls AdjustSize instead.

During loading and handle creation the calls are delayed.

?

?

Returns true if auto-sizing must be has been delayed, until some other process is complete.
True if auto-sizing has been delayed.

?

Anchor to Sibling at Side.

Setup AnchorSide to anchor a side to the side of a neighbour sibling. For example Right side to Left side, or Top side to Bottom.

The side to be anchored to Sibling.
The minimum space to Sibling.
The sibling control to which we should anchor.
Anchor parallel to Sibling, at Side.

?

The side to anchor to the sibling.
The minimum space to Sibling.
The sibling control to which we should anchor.
Setup AnchorSide to center the control horizontally relative to a sibling.
The sibling control to which we should anchor.
Setup AnchorSide to center the control vertically relative to Sibling.
The sibling control to which we should anchor.
Anchor to Sibling at Side, with the same extent.
Table or tree style anchoring, into a neighbour cell of Sibling. Obtain the row height (or column width) from Sibling.

?

The side to anchor to the sibling.
The minimum space to Sibling.
The sibling control to which we should anchor.

?

Copy Sibling's anchoring for Side.
The side to anchor like the sibling does.
The sibling control from which to inherit anchoring.
Anchor to Parent, following same rules as for Align.
Anchor to Parent's full client area.
The around space.
The number of controls anchored to this one.
Sets the bounds (left, top, height, width) of the control.

SetBounds can be used to change the left, top, width, height all at once, reducing some overhead.

Use DisableAutoSize/EnableAutoSize to reduce recomputing/moving/resizing further.

SetBounds is called when the properties Left, Top, Width, Height, or BoundsRect is set.

SetBounds updates the BaseBounds and BaseParentClientSize, which are used by anchoring to keep the distance. For example loading a Form with TMemo and the lfm contains TMemo's Left and Width, then SetBounds is called two times for the memo.

When the user maximizes a window, SetBounds is called for the form, but not for the Memo, keeping the BaseBounds of the Memo. If the Memo is anchored to the right, the Width of the Memo is changed based on the BaseBounds and BaseParentClientSize.

Keep in mind that the given aLeft, aTop, aWidth, aHeight might not be valid and will be changed by the LCL before applied.

Delphi calls SetBounds more often. SetBounds calls ChangeBounds with KeepBase=false.

The X coordinate of the left side of the control.
The Y coordinate of the top of the control
The width of the control.
The height of the control.
Sets the bounds of the control initially, when it is created.
Does nothing while the control is loaded.
SetBounds
X coordinate of top left pixel
Y coordinate of top left pixel
Width of control
Height of control
Set the bounds, keeping the base values

?

Returns default/preferred height and width, for use in autosizing.

Called during AutoSize calculations. Only positive values are valid. Negative or 0 are treated as undefined and the LCL uses other sizes instead.

WithThemeSpace: If true, adds space for stacking.

For example: TRadioButton has a minimum size. But for stacking multiple TRadioButtons there should be some space around. This space is theme dependent, so the parameter is passed to the widgetset

TWinControl overrides this and asks the interface for theme dependent values. See

for more information.

link?

If False then the values will be adjusted by the constraints, and undefined values will be replaced by GetDefaultWidth/GetDefaultHeight.
If true, adds space for stacking.
The default width for this control, independent of any calculated values like Width and GetPreferredSize.
The default height for this control, independent of any calculated values like Height and GetPreferredSize.
Get the default color for this widget, from Parent or color type.
The color type to use, as the last resort.
Returns the color of the control while resolving clDefault and ParentColor
This convenience routine will allow to obtain the Color of the control while resolving clDefault. It will never return clDefault, but it might return non-RGB color. To obtain a purely RGB result use GetRGBColorResolvingParent.
Returns a RGB value for the color of the control
This convenience routine will allow to obtain the Color of the control while resolving clDefault, ParentColor and system color indexes and returns a RGB TColor.
The client coordinate of the given side.
Message handler for preferred size changed.
Mark the preferred size no longer valid, for this control and all parents (implies that we will look for another).
Returns the sides which are anchored to the Parent.

?

Turn off automatic sizing - implies that default is accepted or sizing is done manually
Turns on (enables) automatic sizing
Update the basic boundaries of the control - essential if there has been a lot of re-sizing.

?

Used for debugging.
The owning component.
Removes the control from its Parent.

Detaches the control from Parent, removes graphics, frees memory and Operating System handles, pointers etc.

TComponent.Destroy TLCLComponent.Destroy
Invokes the OnEditingDone event handler.

Called when user has finished editing. This procedure can be used by data links to commit the changes.

For example:

- When focus switches to another control (default).
- When user selected another item.

It's totally up to the control, what events will commit.

Called when the RETURN button is pressed, signifying default action.
Called when ESCAPE is hit or the CANCEL button is clicked - signifying CANCEL.
Starts dragging the control (programmatically).
If False, start dragging only after the mouse has moved.
Minimum mouse movement before delayed dragging starts (in pixels); -1 means DragManager default; ignored if Immediate=True.
Bring the control in front of all sibling controls.
Returns True if there is a parent component responsible for streaming

This function will be called during streaming to decide if a component has to be streamed by its owner or parent

TComponent.HasParent
True if there is a Parent.
Returns Parent (implements TComponent.GetParentComponent).
The Parent property.
Determines whether this control is a parent of AControl.
The recursive search in all Parents of AControl finds not only immediate parent/child controls.
True if this control is a parent of AControl.
The control of which this control may be a parent.
Find which control is the top parent (which has no further parent itself).
Returns True if the control is visible, including all of its Parents.
True only if all Parents also are visible.
True if the control is Visible, or is in design mode.

Does not check for invisible parents.

Returns True if the control is Enabled, including all of its Parents.
True only if all Parents also are enabled.
Public read access to the protected ParentShowHint property.
True if the form is being updated
True while painting the control.
As the name says, the cfProcessingWMPaint flag in FControlFlags is set while a LM_PAINT message is processed, and IsProcessingPaintMsg checks this flag.
Hides this control, by setting Visible to False.
Immediate redraw of the control, bypassing the message queue.
Force a delayed Repaint of the control, by marking its visible area of the control as invalid.
Returns True if the class is allowed for child controls.
Only few controls restrict the class of acceptable child controls. E.g. a PageControl only accepts TTabSheet descendants as children.
An EInvalidOperation can be generated (see ExceptionOnInvalid).
True if the class is allowed for child controls.
The class of the intended child control.
When True, raise an exception when the class is not allowed.
Checks if this control can become a child of AParent.
This check is performed during SetParent. It calls CheckChildClassAllowed and whether AParent=Self.
An EInvalidOperation occurs when any test fails.
The new Parent for this control.
Moves all sibling controls in front of this control.

Use SendToBack to supply an specific background (image) for the Parent control.

Only those portions of the control will be visible, which are not covered by other controls.

Change the cursor shape temporarily, preserving the stored .
The temporary cursor shape to use.
Internal method, called by a Form when its DefaultControl or CancelControl has changed.
This method is overridden in TCustomButton, where it updates the button's Cancel and Default properties.
Notification of a changed active DefaultControl of a form.
When the user pressed ENTER in a form, its DefaultControl will receive a Click event.
Currently NewControl can be Nil, even if it should not be.
The new DefaultControl.
Copy the Text property into Buffer.

This method only exists for Delphi compatibility.

Don't use or override it, unless really necessary.

RealGetText
Length of the copied text.
Pointer to the buffer receiving the string.
Length of the buffer.
The length of Text, here: of Caption.
Updates the Text property from a PChar buffer.

This method only exists for Delphi compatibility.

Don't use or override it, unless really necessary.

RealSetText
Pointer to the buffer containing the zero-terminated text.
Direct call of an message handler, bypassing the message queue.
The parameters and result depend on the concret message.
Convert absolute screen coordinates into client-relative coordinates
Convert client-relative coordinates into absolute screen coordinates.
Convert absolute screen coordinates into control-relative coordinates.
Convert control-relative coordinates into absolute screen coordinates.
Get the visible part of a possibly scrolled client area.
If Scrolled is False, the ScrollOffset is ignored, so that the ClientRect is returned.
The visible part of the client area.
True forces scrolling taken into account.
Makes the control visible, by setting Visible to True.
Redraw invalidated parts of the control immediately.
True if the control shall be visible, unless it's being destroyed.
Returns True if any parent is destroying its Handle (and its childrens').
Returns True if all Parents have handles allocated, and are not being destroyed.
Update the action associated with this control.

?

Show the Help associated with this control.
True when a HelpKeyword or HelpContext ID is assigned.
Adds an handler for the OnResize event.
Removes an handler for the OnResize event.
Adds an handler for the OnChangeBounds event.
Removes an handler for the OnChangeBounds event.
Adds an OnVisibleChanging handler.
Removes an OnVisibleChanging handler.
Adds an OnVisibleChanged handler.
Removes an OnVisibleChanged handler.
Adds an OnEnabledChanged handler.
Removes an OnEnabledChanged handler.

The name doesn't look correct, should read RemoveHandlerOnEnabledChanged?

Adds an handler for the OnKeyDown event.
Removes an handler for the OnKeyDown event.
True when BiDiMode is bdRightToLeft.
True when BiDiMode is not bdLeftToRight.
True when scrollbars appear at the left side of the control.
True when BiDiMode is not bdLeftToRight.
The Action associated with this control.
The Action property is a shortcut to ActionLink.Action.
The accessible description of the control.This should describe the role of the control, for example for TLabel it could be "a text caption".
The accessible description of the control. This should describe the role of the control, for example for TLabel it could be "a text caption". This property is connected and synchronized with TControl.GetAccessibleObject().AccessibleDescription.
The accessible value of the control. For example, for a TLabel it would be the same as the Caption property of the label.
The accessible value of the control. For example, for a TLabel it would be the same as the Caption property of the label. This property is connected and synchronized with TControl.GetAccessibleObject().AccessibleValue.
The accessible role of the control which classifies what kind of object this is. See TLazAccessibilityRole for a list of possible values
Link to the default Action associated with this control.
Specifies the placement of the control inside its Parent.

A control can stick to one side of its Parent control.

TAlign
The list of controls anchored to this one.
The set of anchor definitions for this control.

Determines which sides of the control are anchored to other controls.

Array of anchor definitions, indexed by the control sides.

Valid anchor definitions are flagged in Anchors.

AnchorSide specifies how a side is anchored to other controls (siblings or Parent).

Various AnchorAs and AnchorTo methods simplify the establishment of anchors.

Anchors may be invalidated by cycle and other checks?

The anchored side of the control.

possibly?

Allows to automatically adjust the size of the control, according to its content.

The effect depends on the concrete control type. For example a label or button can become bigger or smaller to accommodate a longer or shorter caption.

Default is false, ie no auto-sizing

Autosize topic
True while autosizing is in progress.
Flag to prevent recursive AutoSizing (in DoAllAutoSize).
By default Parent.AutoSizingAll is read, because a mere TControl cannot have child controls.
Internal counter, in/decreased by DisableAutoSizing/EnableAutoSizing.
The rectangle of the designed bounds.
The current Bounds can change, due to scaling, anchoring or autosizing.
The Parent's client size, for which the BaseBounds are valid.

BaseBounds and BaseParentClientSize determine the distance to keep from Parent's sides, when a side is anchored to the Parent (akLeft...), and the Parent is resized.

Customization (of text controls) in bidirectional reading environments.

In "normal" reading mode (left-to-right, LTR) text entry starts at the left, text is almost left justified, and vertical scrollbars sit at the right side of the control.

In right-to-left mode text entry starts at the right, text is almost right justified, and vertical scrollbars sit at the left side of the control.

In a bidirectional environment these different placements and adjustments can be configured (swapped) in various (but not all) ways.

(Allows RTL languages such as Arabic and Hebrew to be used)

Wild guess: The default mode is established by the platform, RTL reading is not supported on all (Windows) platforms.

Determines the inner and outer border spacing for this control.

The outer border determines the minimal distance to sibling controls, the inner border is the area between the control's BoundsRect and ClientRect.

When a control sits in a cell of a table (Grid) control, its horizontal and vertical alignment inside the cell can be specified, too.

?

instead?

The TopLeft and BottomRight of the control, in client coordinates.

The BoundsRect rectangle describes the TopLeft and BottomRight coordinates of the control, relative to its parent.

The values are based on the Top, Left, Width and Height properties of the control.

Set BoundsRect to move and/or resize the control. This can reduce flicker, occuring otherwise when Top, Width etc. are set individually.

Temporary BoundsRect, used when the control e.g. is docked into a different Parent.

The rectangle describes the placement of the control when its Parent is changed later.

Setting the rectangle also sets a flag, indicating that the values are available.

The text describing the control to the user.

By default, the Caption is the same as the control's Name in the Object Inspector, and the developer must set it explicitly to some different text.

Which mouse button(s) to be used for capture? Default is the left button.

?

The height of the client area of the control.
Screen coordinates of the TopLeft pixel (of the client area) of the control.

Only TWinControls have a client area, for other controls ClientOrigin is the same as Origin.

Note that this value is the position as stored in the object, not always in sync with the widget.

Size of the client area of the control.
The origin is always (0,0). Bottom and Right reflect the ClientWidth and ClientHeight of the control.
The width of the client area of the control.
The background color of the control.

The default Color is the same as the parent window Color. If the color is clDefault then the result will need to be passed through GetDefaultColor to resolve clDefault. Convenience routines which obtains the color resolving clDefault and ParentColor are also provided as TControl.GetColorResolvingParent and TControl.GetRGBColorResolvingParent

The minimal and maximal Width and Height of this control.
The top left pixel of this control, in screen coordinates.
State flags, telling whether the control has been clicked, data being read, control being re-drawn, etc.
Style flags, specifying whether the control responds to mouse clicks, can be re-sized, has particular actions, etc.
The shape of the mouse pointer, when the mouse is over this control.
Allows to use the desktop font for text display in this control.

?

How the control is currently docked. (horizontally, vertically, in a notebook, or not at all)
The cursor shape shown while the control is dragged.
Default is crDrag. When no drop is allowed, the cursor changes temporarily to crNoDrop.
The operation when the control is dragged - Drag or Dock.
Set to dkDrag for drag-drop, or to dkDock for drag-dock operation.
Allows the user to drag the control.

Default is dmManual, meaning that dragging must be started in code.

Set to dmAutomatic to allow the user to drag this control. In this mode dragging can start immediately (on left mouse button press) or delayed, after the mouse has been moved away by a number of pixels (Threshold).

Determines whether the control reacts on mouse or keyboard input.
Disabled controls usually appear 'greyed-out'
Tries to find out whether the control is floating (not part of a form).
The class for a floating host dock site for this control.
The font to be used for text display in this control.
The vertical size of the control.
The ID for context-sensitive Help on this control.
The keyword for context-sensitive Help on this control.
Determines whether context-sensitive Help is selected by numeric ID or keyword.
The text to show in the Hint window for this control.
The host site (TWinControl) into which this control is docked. Nil if not docked.
Determines whether this object shall be streamed as a control.
Delphi compatible property, affecting only the streaming of Form properties.

Has no effect in the LCL?

The client coordinate of the left edge of the control.
The Width when last docked, with siblings to the left or right.
True when mouse messages are currently captured by this control.

In normal operation all mouse messages are sent to the control under the mouse pointer. Mouse messages also can be sent to a capturing control, e.g. when a control is dragged.

Applications should capture mouse events only for special purposes, and release the capture as soon as a the target position has been determined. Limited user feedback is possible while the mouse is captured, not all application controls will work properly so long.

True when the mouse has entered the control.
Event handler for a change of the Bounds of the control.
Notification handler for mouse clicks.

A mouse click is associated with the default action for controls, and is often the ONLY event handled in user code.

The reaction on an click can be specified by a user supplied method, and/or by selecting an action from a supplied ActionList

This handler can supply specific Constraints (size limits), when the control is resized.
Invoked when a context-sensitive pop-up menu is requested.
The handler can show and handle the menu selection itself. If so, it should set Handled to True. Otherwise the installed PopupMenu is shown.
Event Handler for double mouse clicks.

Double-clicking is much more common in a Windows environment than in Unix or Linux, where single-clicking is the default method for selecting an object. However, in all environments there could be valid use for a double-click, and a method should be supplied if appropriate.

This handler determines the action on an drop onto this control, in a drag-drop operation.

Unlike for a drag-dock operation, no default action is associated with an drag-drop; the OnDragDrop handler is the only way to do something meaningful on an drag-drop.

Event handler for a control being dragged over this control.
The handler can reject an drop, by setting Accept to False.
Event handler when editing is done.
The user definitely has finished editing, the resulting text e.g. can be validated.
Notification handler for the end of a docking operation.
Notification handler for the end of a dragging operation.
Event handler for mouse button going down.
Event handler for mouse entering the area of the control.
Event handler for mouse leaving the area of the control.
Event handler for mouse movement within the control.
Event handler for mouse button going up.
Event handler for mouse wheel turned.

By default all mouse wheel actions are translated into scroll events. Write an OnMouseWheel handler to react on turns of the mouse wheel.

The OnMouseWheelUp and OnMouseWheelDown handlers are notified only, they are not suited for customization of mouse wheel events.

Notification handler for downward movement of mouse wheel.
Notification handler for upward movement of mouse wheel.
Event handler for quadruple mouse clicks.
Notification handler for a resize of the control.

This event is triggered after the Width, Height, ClientWidth or ClientHeight of the control has changed. During autosize the size can change multiple times, but only the last change triggers the OnResize.

Use OnResize to react on size changes. To also react on moves, use the OnChangeBounds event.

If you want to customize the resize behaviour, use OnConstrainedResize instead.

Common mistake: Keep in mind that ClientWidth and ClientHeight can change even when Width, Height stays the same. For example when the theme changes, the Width and Height remain the same, but the changed frame reduces the ClientWidth and ClientHeight. This does not happen that often under Windows, but it happens quite often on other platforms.

Especially it is not sufficient to write only a TForm.OnResize handler to resize all controls on the form. This is a common bug in Delphi applications.

???

Event Handler when a hint shall be shown.

Tasks, Usage?

Event handler for the start of a docking operation.

The handler can provide a special DragDock object, otherwise a default object is created.

Event handler for the start of a dragging operation.

The handler can provide a special DragControl object, otherwise a default object is created.

Event handler for triple mouse clicks.
The control within which the control is shown.

When the Parent moves or hides, all its children move or hide together with it.

Every TControl must have a Parent, else it is never shown.

The Parent of a floating form is Nil.

Set the parent last to reduce updates. For example: Button1:=TButton.Create(Self); Button1.Name:='Button1'; Button1.Caption:='Click me'; // parent is not set, so it does not update the whole form Button1.Parent:=Form1; // set parent as last, the LCL now applies all properties

Delphi/VCL: Parent must be set first under Delphi, because many properties work differently if they are set before or after Handle creation. The LCL applies the properties when the Handle is created.

Allows to use the BiDiMode settings of Parent. Default is true.
If true, the Color of the control will be the same as the one from the Parent. Default is true.
While this property is True, all changes to the Color of the parent will be also done to the Color of the control, syncronizing them and keeping them with the same value. If the Color of the control is changed by the application, then ParentColor will be automatically set to False. The combination of ParentColor with clDefault can cause problems in resolving clDefault. To obtain the Color property of a control while taking into account clDefault and ParentColor one whould use TControl.GetColorResolvingParent. This method might return a non-RGB color, but will never return clDefault. To obtain a purely RGB result use TColor.GetRGBColorResolvingParent
If true, the Font of the control will be the same as the one from the Parent. Default is true.
While this property is True, all changes to the font of the parent will be also done to the font of the control, syncronizing them and keeping them with the same value. If the Font of the control is changed by the application, then ParentFont will be automatically set to False.
If true, the value of ShowHint for the control will be the same as the one from the Parent. Default is true.
While this property is True, all changes to the ShowHint property of the parent will be also done to the ShowHint property of the control, syncronizing them and keeping them with the same value. If the ShowHint property of the control is changed by the application, then ParentShowHint will be automatically set to False.
A context-sensitive menu that pops up when the right mouse button is clicked over this control

?

The stored (saved) properties of the current session, expressed as a string

What's 'session'?

Usage?

Enables the Hint display.

When True, the Hint text is shown when the mouse hovers over the control.

Display of the actual hint is controlled by OnShowHint.

Hint OnShowHint ParentShowHint
The Height when last docked, with siblings above or below.
The character string associated with the control.

This is the character string, shown in controls with visible text content (TEdit...).

BEWARE: In other controls it can be the Name or Caption of the control, quite tricky to use.

The Delphi VCL implementation stores Text mostly in the widgets, using the virtual Get/SetTextBuf methods to exchange text between widgets and VCL. This means a lot of text copies and message handling in WM_GETTEXT and WM_SETTEXT.

The LCL instead (typically) stores Text in a field of the control, and transfers it from/to the widgets only when required.

To maintain VCL compatibility, the virtual RealGet/SetText methods have been introduced, which read or write the Caption string directly.

The default Get/SetTextBuf implementation calls the RealGet/SetText methods, resulting in a string-to-PCHAR and another PCHAR-to-string conversion. But as long as Get/SetTextBuf is not overridden, Get/SetText can (and does) safely call RealGet/SetText immediately, to avoid beforementioned conversions.

To keep things optimal, LCL components should always override RealGet/SetText; Get/SetTextBuf is only kept for compatibility.

The client coordinate of the top edge of the control.
The height of the control in floating state.
The width of the control in floating state.
Allows to show or hide the control, and all of its children.

Visible is set to True by Show, or to False by Hide. Calling these methods is equivalent to setting the Visible property.

Reading the Visible property does not take into account control's parent visibility. Use the IsVisible method to get the real visibility.
The horizontal extent of the control.
The handler for all messages.

WindowProc is set to by default.

When you ever change WindowProc, then remember the previous setting and delegate all unhandled messages to that method.

TWndMethod TLMessage Perform
Integer type for .
Type of a callback method, to be called for all children of a control.
The child control.
How Child controls are to be sized relative to parent.
{ LeftRightSpacing, TopBottomSpacing: integer; minimum space between client border and nearest child control. For example: ClientLeftRight=5 means leftmost child's Left position is at least 5.

HorizontalSpacing, VerticalSpacing: integer; minimum space between each child control. }

{ Defines how child controls are resized/aligned.

cesAnchorAligning, cssAnchorAligning Anchors and Align work like Delphi. For example if Anchors property of the control is [akLeft], it means fixed distance between left border of parent's client area. [akRight] means fixed distance between right border of the control and the right border of the parent's client area. When the parent is resized the child is moved to keep the distance. [akLeft,akRight] means fixed distance to left border and fixed distance to right border. When the parent is resized, the controls width is changed (resized) to keep the left and right distance. Same for akTop,akBottom.

Align=alLeft for a control means set Left leftmost, Top topmost and maximize Height. The width is kept, if akRight is not set. If akRight is set in the Anchors property, then the right distance is kept and the control's width is resized. If there several controls with Align=alLeft, they will not overlapp and be put side by side. Same for alRight, alTop, alBottom. (Always expand 3 sides).

Align=alClient. The control will fill the whole remaining space. Setting two children to Align=alClient does only make sense, if you set maximum Constraints.

Order: First all alTop children are resized, then alBottom, then alLeft, then alRight and finally alClient.

cesScaleChilds, cssScaleChilds Scale children, keep space between them fixed. Children are resized to their normal/advised size. If there is some space left in the client area of the parent, then the children are scaled to fill the space. You can set maximum Constraints. Then the other children are scaled more. For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and C.Width=30 (total=60). If the Parent's client area has a ClientWidth of 120, then the children are scaled with Factor 2. If B has a maximum constraint width of 30, then first the children will be scaled with 1.5 (A.Width=15, B.Width=30, C.Width=45). Then A and C (15+45=60 and 30 pixel space left) will be scaled by 1.5 again, to a final result of: A.Width=23, B.Width=30, C.Width=67 (23+30+67=120).

cesHomogenousChildGrowth, cssHomogenousChildDecrease Enlarge children equally. Children are resized to their normal/advised size. If there is some space left in the client area of the parent, then the remaining space is distributed equally to each child. For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and C.Width=30 (total=60). If the Parent's client area has a ClientWidth of 120, then 60/3=20 is added to each Child. If B has a maximum constraint width of 30, then first 10 is added to all children (A.Width=20, B.Width=30, C.Width=40). Then A and C (20+40=60 and 30 pixel space left) will get 30/2=15 additional, resulting in: A.Width=35, B.Width=30, C.Width=55 (35+30+55=120).

cesHomogenousSpaceGrowth Enlarge space between children equally. Children are resized to their normal/advised size. If there is some space left in the client area of the parent, then the space between the children is expanded. For example: 3 child controls A, B, C with A.Width=10, B.Width=20 and C.Width=30 (total=60). If the Parent's client area has a ClientWidth of 120, then there will be 60/2=30 space between A and B and between B and C. }

???

Notifies Control and invokes the OnChange handler.
True if the specified sizing is equal to this one.
Set all spaceing to the same value.
The Control to which childsizing applies.
number of controls per line
Various ways to fit controls into the available Width.
Various ways to fit controls into the available Height.
Minimum space between children.
Allows to also arrange the child controls in rows or columns.
Minimum distance between children and client border.
Event handler for any change in the data.
Various ways to fit controls into the available Width.
Various ways to fit controls into the available Height.
Minimum distance between children and client border.
Minimum space between children.
Class of TWinControlActionLink
State flags of TWinControl.

?

?

Set if font was changed before handle creation.
Set during DoAllAutosize.
Set during

?

Set while constructing the handle of this control.
Set while initializing during handle creation.
Set while constructing the handles of the children.
Set inside RealizeBoundsRecursive.
Set before bounds are sent to the widget. Used to suppress consequential size messages, sent by the widget.

?

?

Set when the adjusted ClientRect is valid.

?

Set of TWinControlFlag.
Used in custom alignment (alCustom).
This record was added only after D7. It's used in CustomInsertBefore and CustomAlignPosition methods and handlers.
The list of controls currently being aligned.
Index of current control.

in AlignList?

The kind of alignment currently processed (always alCustom).
For internal use.
Type of an OnAlignInsertBefore handler.
The handler determines the order, in which both controls are aligned later.
True if Control2 shall be placed before Control1 is placed.
The Parent control

?

Type of an OnAlignPosition handler.
The handler positions Control by changing the given coordinates.
The Parent control

?

The control to place.
The remaining ClientRect

?

Information about the current align process

?

The base class for controls which can contain other (child) controls.
The name reflects the fact that (on Windows) these controls are based on OS provided widgets, which have window Handles.
valid if wcfAdjustClientRectValid

what?

The bounds as sent to the widget. Used to suppress according feedback messages from the widget.
Various control state flags.
Override this method when the ClientRect of a control differs from the default value.
It's called often, so don't put expensive code here, or cache the result.

Returns the adjusted ClientRect, cached value if available.
Fills the list with the controls which must be realigned.
The list is initialized with all child controls, which have the given alignment and are visible.
List all controls with this alignment.
Aligns all child controls.

?

The available space, becomes remaining space on exit.
Returns the placement order of custom-aligned child controls, using the OnAlignInsertBefore handler.
True if Control2 shall be placed before Control1 is placed.
Returns the aligned position of a custom-aligned child control, using the OnAlignPosition handler.

The given coordinates take into account the anchoring of AControl.

The handler updates the coordinates as required.

The control to be placed.
The remaining client area, within which the control can be placed.

?

Information about the current align process

?

Override this method to place all given controls.
True when all controls have been placed.
The alignment of all given controls.
The controls to be placed.
Call this after a change in the ChildSizing information, to trigger further processing.
Flags the preferred sizes of all child controls as invalid (recursively).
Sends the new Visible state to the widgetset.
Called by TWinControl.CMShowingChanged.
Called by AlignControls after aligning controls.

to do what?

Sends the control's new bounds to the widget.
Called by RealizeBounds.
Checks for BoundsRect changes and sends changed bounds to the widget, using DoSendBoundsToInterface.
Sends eventually changed BoundsRects to the widgets, for this and all child controls.
TODO: Check if we need this method

?

Updates the size and extent of the control and ClientRect.

Changing the ClientRect here, to the most probable size, reduces unneccessary resizes.

Normally the clientwidth/clientheight is adjusted automatically by the widget, but it is up to widget when this will be done. The gtk for example just puts resize requests into a queue. The LCL would resize the child components just after this procedure due to the clientrect. On complex forms with lots of nested controls, this would result in thousands of resizes.

Shrink or enlarge the control to fit children.

Because this method is frequently overridden, the LCL calls the added instead, which checks whether DoAutoSize really should be called right now.

DoAutoSize does roughly this:

- Checks whether Autosize is in fact permitted
- Checks for unaligned child components and fits them in as best it can
- Moves the constrained (aligned) child components to the correct position
- Adjusts the size of the client rectangle
- Adjusts the bounds of the whole control

Deprecated, don't use it.
Called by DoAllAutoSize after all bounds are computed.
Override this method to return a different preferred height and width for autosizing.

Calls the inherited method to calculate the default/preferred width and height for a TWinControl, which is used by the LCL autosizing algorithms as default size. Only positive values are valid. Negative or 0 are treated as undefined and the LCL uses other sizes instead.

TWinControl overrides this:

- If there are child components, their total preferred size is calculated
- If this value can not be computed (e.g. the children depend too much on their parent clientrect), then the interface is asked for the preferred size

For example the preferred size of a TButton is the size, where the label fits exactly. This depends heavily on the current theme and widgetset.

This value is independent of constraints and siblings, only the inner parts are relevant.

WithThemeSpace: If true, adds space for stacking. For example:

TRadioButton has a minimum size. But for stacking multiple TRadioButtons there should be some space around. This space is theme dependent, so it is passed as a parameter to the widgetset.

Calls Proc with every child control, owned by Root.
TComponent.GetChildren
The callback procedure.
The Owner of the reported controls.
Returns True if the given class is allowed for child controls.
Paint all child controls which don't have a Handle.
Controls that are not TWinControl, have no handle of their own, and so they are repainted as part of the parent.
The device context usable for painting child controls.
First of the controls in Controls[], which remain to paint.
Handler for TLMPaint, manages the painting of child controls.
Paints an clipped part (child control) of the DC.
Creates the Brush, if not already created.
Scales (resizes) all child controls.
Scales (resizes) the control and all child controls.
Handler for changed BiDiMode message. Notifies the widget and all child controls.
Handler for changed Border properties message. Adjusts and invalidates the control.
Handler for changed Enabled message. Notifies the widgetset.
Handler for changed Showing message. Notifies the widgetset.
Handler for changed ShowHint message. Notifies all child controls.
Handler for changed Visible message. Handles Focus, forces UpdateControlState.

?

?

Handler for an ContextMenu event. Eventually delegates handling to the affected child control.
Erases the background, if required.
Handles (dispatches) notification messages.
Handler for receiving Focus event.

do what?

Handler for loosing Focus event. Eventually triggers .
Handler for changed visibility notification

?

?

?

Event handler for key pressed, not handled by the widget. Tries .
Event handler for sys key pressed, not handled by the widget. Tries .

what's this?

Event handler for key released, not handled by the widget. Tries .
Event handler for system key released, not handled by the widget. Tries .
Handler for message sent by the widget, after it has handled the keypress itself.
Handler for message sent by the widget, after it has handled the keypress itself.
Manages paint requests, handles double buffering.
Handler for widget destroyed message. Clears the Handle.
Handler for widget moved message. Updates the Bounds.
Event handler for size messages.

This method is called whenever width, height, clientwidth or clientheight have changed.

If the source of the message is the interface, the new size is stored in FBoundsRealized to avoid sending a size message back to the interface.

Event handler for size/move messages.

This method is called whenever left, top, width, height, clientwidth or clientheight have changed.

If the source of the message is the interface, the new size is stored in FBoundsRealized to avoid sending a size message back to the interface.

Handler for a key pushed notification. The message is handled by DoKeyDownBeforeInterface by default.
Handler for a system key pushed notification. The message is handled by DoKeyDownBeforeInterface by default.
Handler for a key released notification. The message is handled by DoKeyUpBeforeInterface by default.
Handler for a system key released notification. The message is handled by DoKeyUpBeforeInterface by default.
Handler for a key pressed notification. CNChar is sent by the widget before it has handled the keypress itself.
Dispatches a drag message, sent by the DragManager.

On dmFindTarget a TWinControl returns the child control under the mouse, or Self if none is found.

All other messages are handled by inherited .

Handles a dmDragDock message, when a control has been docked to this site.

Called when a control is dropped for docking.

Asks the dropped control to Dock itself into this control (adjust HostDockSite etc.).
Calls an installed DockManager to adjust the coordinates of the docked control.

The Result is always True (unless overridden).

Notifies the DockManager of the undock of a client control.
Always True.
Adjust the Parent of a newly docked Client.
The default action is to set the Parent to the new docksite (this control), so that the client is displayed within the new site.
Called to check whether this control allows docking and where.

Called on dragmanager messages dmEnter/Leave/Move, to get the DockRect to show.

Positions the DockRect, invokes OnDockOver (via DoDockOver)

Everything can be overridden by the OnDockOver handler, if installed.

Initially True, set to False to reject an drop.
Invoke the OnDockOver handler.
Override this method to take special actions on removal of an docked client.
The default implementation does nothing.
Notifies an OnUnDock handler and DockManager of an undocked client control.
The OnUnDock handler can deny to undock the control. This can cause trouble, the control better should not be draggable instead.
Set to False to deny undocking.
The new docksite, Nil for floating.
The control being undocked.

?

Return information about this dock site (InfluenceRect).
The InfluenceRect determines the screen coordinates, within which a drop is accepted.
The InfluenceRect is the slightly inflated WindowRect of the dock site, adjustable in an OnGetSiteInfo handler.
The dragged control

?

The screen rectangle within which a drop is allowed.
The current mouse position.
Can be set to False to reject an drop.
Returns the docked control of the specified name.

This method is used during the restore of the layout of a docksite.

The control is searched in the controls owned by the owner of the docksite.

Override to search other places, or to create a control of the requested name.

The name of the control to be docked.
The matching control.
Returns the DockManager for this control.
If DockManager is nil, and UseDockManager is True, a new default DockManager is created.
The dockmanager for this site, can be Nil for an unmanaged site.
Handler called when the control starts floating.
TWinControls can float for themselves, unless they request a special FloatingDockSiteClass.

Bug: when no FloatingDockSiteClass was assigned, a default floating site is created?

Returns the dock caption of AControl.

Asks the control for its default dock caption, then allows the OnGetDockCaption handler to adjust this string.

The control whose dock caption string is requested.
The dock caption to use.
Invokes the OnEnter event handler.
Invoke the OnExit event handler.
Handles a KeyDown event before the widget processes the key.

A number of handlers is invoked, until one handles the key.

First all application wide handlers are invoked ().

Then the form's handler is invoked, when KeyPreview is requested.

Then the DragManager is asked, when dragging. It interprets ESC to cancel dragging, and CTRL to ignore drag targets.

Finally the user handler is invoked.

If no handler accepts the key, the widget continues to interpret it itself.

Set to True when the key was handled.

?

Handles keys which are not handled by the widget.
True if the key was handled.

?

True if the key was handled.
Tries all OnKeyPress handlers, of Parents first.
True if the key was handled.
True if the key was handled.
Handles a KeyUp event before the widget processes the key.
For details see the equivalent method .
True if the key was handled.

?

True if the key was handled.

?

True if the key was handled.
True if the key was handled.
Lets the Application handle an navigation key.
Lets the Application handle an navigation key.
Invokes the OnKeyDown handler.
Invokes the OnKeyDown handler.

?

Invokes the OnKeyPress handler.
Invokes the OnKeyUp handler.
Invokes the OnKeyUp handler.

?

Invokes the OnUTF8KeyPress handler.
Returns the preceding or next control in tab order.
When CurrentControl is Nil, the first control (forward) or last control (backward) in TabOrder is returned, depending on GoForward.
The (next) control.
The control which has the focus. If Nil, the first control (forward) or last control (backward) in TabOrder is returned, depending on GoForward.
False to find the preceding control.
When True: only find controls with TabStop=True.
When True: only find controls with Parent=Self.
Returns the first control in tab order.
The screen coordinates of the control.

Returns the screen coordinates of the topleft pixel of the control on the screen.

Note that this value is the position as stored in the interface and is not always in sync with the LCL. When a control is moved, the LCL sets the bounds to the wanted position and sends a move message to the interface. It is up to the interface to handle moves instantly or queued.
Sends the mouse message to a child control.
True if a child control was found at the mouse coordinates.
Creates the Handle ( = widget) if not already done.
Initializes the window creation parameter record with the settings of the control.

Definition of parameters:

    TCreateParams = record
        Caption: PChar;
        Style: Cardinal;
        ExStyle: Cardinal;
        X, Y: Integer;
        Width, Height: Integer;
        WndParent: HWnd;
        Param: Pointer;
        WindowClass: TWndClass;
        WinClassName: array[0..63] of Char;
    End;

Creates the interface object (widget) and assigns it to Handle.
Destroys this and all child widgets.
Destroys the interface object (widget).
Flip children horizontally. That means mirroring the Left position.
Child controls arranged in left-to-right order appear in right-to-left order after flipping. All anchors are adjusted accordingly.
Prepare to remove the window (gets called before the Handle is destroyed).
Assigns strictly sequential TabOrder values to all child windows.
Copies cached control properties to the just created widget.

Gets called after the Handle is created and before the child handles are created.

Called when the control has been loaded from a resource, transfers the loaded property values to the widget.
TControl.Loaded
Realizes all cached changes after a bulk update of the form. Calls inherited FormEndUpdated, then informs each child control.
TControl.FormEndUpdated
This method allows handling messages in Windows

?

This method does nothing, and cannot be overridden???

Called after all children handles of the ParentForm are created. Notifies all children of the end of the handle creation phase.
TControl.ParentFormHandleInitialized
Called after all child handles have been created. Resets wcfCreatingChildHandles.
Notifies the parent form of the focus loss.
Updates the position of the child control in the Z plane (ie front-to-back).
Asks the parent to show ourself.
The control to show, here: ignored!
Essentially updates the visible state of the control, and of the widget if already created.
When the widget should be visible and has not yet been created, it's created along with all children.
Adds special handling for focus and input messages, notifies an DockManager.

LM_SETFOCUS: gets parent form and show this control as focused

LM_KILLFOCUS: removes focus fromthis control

LM_NCHITTEST: check transparency etc

Mouse messages: send to DockManager.

TControl.WndProc
Sends text to the widget (from WM_SETTEXT?).
The text to send.
Translates state flags into AutoSizePhases

?

Checks for a parent control or widget.
True when a parent exists.
Start of Bounds updates. Disables SetBounds by incrementing BoundsLockCount.
End of Bounds update. Decrements BoundsLockCount and eventually calls SetBounds.
Disables sending bounds to the widget, by incrementing FRealizeBoundsLockCount.
Enables sending bounds to the widget again, eventually updates the widget.
Get the child control at the given client position.

WinControls are found before Controls (if overlapping).

The found control, Nil if none found.
The client coordinates.
Allow finding disabled controls.
Allow finding TWinControls, in addition to TControls.
Only search in client areas.
Encoded Allow... conditions.
Returns True if this is a parent of the given control.
True when we are a parent of Control.
The (possible) child control.
Asks the widget if clientrect has changed since last AlignControl, and calls AdjustSize on change.
The ClientRect is cached. Call this procedure to invalidate the cache, so that next time the ClientRect is fetched from the widget.
Also invalidate all child controls, if True.
The ClientRect is cached - check if the cache is valid.
True if update needed.
Sets the control bounds and adjusts child and docked controls.
Move all child controls.
Increment for Left.
Increment for Top
Constructor for a control that is the child of the given widget.
Handler for a DragManager dmDragDrop message, sent when a dragged control has been dropped onto this docksite.

Asks the dropped control to dock itself into this docksite, updating its Parent, HostDockSite, and the DockClients of the old and new DockSite.

When a DockManager is installed, asks the DockManager to position the docked control (InsertControl).

Finally creates an OnDockDrop event.

Is this control allowed to receive the focus?
A control can get the focus only when all of its Parents except the form are Visible and Enabled. While CanFocus checks all control parents it does not check whether a form control is placed on can have focus.
Finds the index value for the given control, in Controls[].
The index in Controls, -1 if not found.
The (possible) child control.
Checks whether the control has the focus.
True when we have the focus.
Sets the focus to the next (or preceding) control.
True when the focus has been transferred.
The direction of transfer: True for the next control in the TabOrder, False for the preceding control.
Finds a child control by name.
True when the control has been found.
The Name of the control to find.
Transfers the focus to the next child control.

The search wraps around on the boundaries of the TabOrder array.

When no next control can be found, the focus remains unchanged.

The control which is assumed to have the focus.
False when the control preceding CurControl shall be found.
When True, only select a control that can receive the focus.
Sends a message to all child controls.
The message to send.
Sends a message to all child controls.
The message ID.
Handles all messages that the control doesn't fully handle itself.

This implementation sends the message to the widget's message handler.

Override this method to implement your own message handling. If the message Result is nonzero, the message already has been handled; otherwise set the Result to nonzero (depending on the message ID), when the message has been handled.

TObject.DefaultHandler
The message to process.
Schedule an repaint request.
This implementation invokes the Invalidate method of the widget.
Tell widgetset to add Handle object to parent's Handle object.

?

Insert control into Controls[].
The control to insert.
Insert at index (optional).
Remove control from Controls[].
The control to remove.
Flip children horizontally. That means mirroring the Left position and anchoring.
Child controls arranged in left-to-right order appear in right-to-left order after flipping. All anchors are adjusted accordingly.
Flip recursive?
Returns the caption for the docked control.
Updates the Caption to reflect the names of the docked clients.

Called when this is a hostdocksite and either the list of docked clients have changed, or one of their captions.

When a control is currently being undocked, but still is in the DockClients list, Exclude is set to this control.

Control to exclude from the DockCaption.
Fill the list with all TabStop controls, recursing into child controls.
The list to which the controls shall be added.
Check whether a widget has been assigned to this control.
True when a widget exists (Handle is not Nil).
Call this method when your code requires a valid Handle for this control.

An attempt is made to create a widget, when not already done.

In certain situations it may be impossible to create a widget right now!
Has a Brush been created for this control?
True when a Brush has been created.
Fills the entire control with the designed background color and pattern.

This method can be called during Paint requests only, which provide an valid DC.

The background may be transparent or non-rectangular as well!

?

The device context to use; may be clipped to a certain shape.

?

Called by the interface after the navigation and specials keys are handled; i.e. after KeyDown but before KeyPress.
Essentially expands an repeat count into multiple keystrokes, but not for SysKeys.

?

True when multiple keystrokes have been processed.
The UTF-8 encoding of the character.
Must be greater than zero, the exact value is ignored

?

Must be False, else nothing happens.

?

Paints only when a widget exists.

what?

Specifies the (non-rectangular) shape of the widget.
Allows to show a border (line) around the control,
Width of the Border around the control; default is zero.
For internal use: When greater zero, updates of the BoundsRect are blocked.
The Brush used to paint the background of the control.
The intended ClientHeight, as sent to the widget.
The intended ClientWidth, as sent to the widget.
Parameters for child control arrangement and spacing.
The number of immediate child controls.
The indexed list of immediate child controls.
The index also indicates the Z-order of the children, zero for topmost

?

Index of the requested control.
The default WndProc on Windows widgetset and platforms.

Usage?

The number of clients docked into this control.

The docked controls can be accessed inDockClients[].

DockClientCount is equivalent to DockClients.Count, but handles the special case when DockClients is Nil.

The indexed list of controls docked into this control.
Index of the requested docked client.
The docking layout manager for this control.

A docksite can be managed (using an DockManager) or unmanaged (positioning docked controls in the event handlers). The DockManager determines the placement of docked controls, by setting DropOnControl and DropAlign before the drop, and by resizing and positioning the control when it's dropped.

A DockManager is used only when UseDockManager also is True. Setting UseDockManager to True creates an DockManager of the DefaultDockManagerClass for this docksite, if none was previously installed.

An unmanaged docksite, without an DockManager, can handle the placement of dropped controls in the OnDockOver and OnDockDrop event handlers.

Allows to drag-dock other controls into this control.

A DockSite reacts on controls dragged over this control, signals acceptance and where a dragged control would be dropped.

A DockSite should initially be empty, not containing any child controls.
Allows to reduce flicker in the painting of the control.

Paint requests typically are buffered in the message queue. When a paint message arrives, all elements of the control are drawn onto the screen, according to their type, style, state and content.

This can cause flicker, when stacked controls wipe out preceding paintings, e.g. when unchanged text is erased from the screen before it is painted again, when it takes some time to retrieve the text of list entries, or wrapping long text at the current control boundaries. Owner-drawing also can cause noticeable flicker.

To reduce such flicker, DoubleBuffered controls use a buffer bitmap into which all painting is redirected. When the bitmap has been updated, a paint request is queued for the control. When that paint request is received again, the prepared bitmap is output in one fast BitBlt transfer, eliminating any flicker.

All this happens automatically, when DoubleBuffered is set to True, no further changes are required in application or custom control code.

A reference to the widget, associated with this control.
Check IsResizing and drop or delay changes to the control, until the new size has been determined.
Handler for custom-aligned child controls, determines the order of control placement.
Handler for custom-aligned child controls, determines the position of the child control.
Notification handler for the drop of a control to be docked.
Event handler for moves of a control over this docksite. Determines acceptance or rejection of an possible drop.
Handler for control receiving the focus.
Handler for control loosing the focus. This is a good place for checking the finished user input.
This handler can provide a special DockCaption, different from the Caption default.
Provides information about the DockSite.

The handler can adjust the InfluenceRect, within which mouse moves are recognized by this control.

The handler also can deny any drops, depending on the type of the dragged control.

This event occurs before OnDockOver.

Handler for keyboard key pressed.

This handler can filter keys, for special use in e.g. non-textual controls.

The handler receives all keystrokes, including control and other non-visual keys. Keys are encoded as virtual keys, with separate active modifier keys.

Text input instead should be checked in an OnKeyPress handler.

Handler for a character entered by the user.

This handler only receives characters, not control or other special keycodes. Control keys should be handled by an OnKeyDown handler instead.

The handler can convert the character into a different one.

We recommend you to use OnUTF8KeyPress to prevent data loss. Characters are converted from UTF8 to the system encoding in OnKeyPressEvent, with possible loss of characters outside the Ansi codepage.
Handler for keyboard key released.

Unlike OnKeyDown, this event occurs only once for auto-repeated keys.

For details see .

Event handler for control being undocked from this DockSite.

The handler can disallow undocking.

Handler for a character entered by the user.

This handler only receives characters, not control or other special keycodes. Control keys should be handled by an OnKeyDown handler instead.

The handler can convert the character into a different one.

While OnKeyPress only receives Ansi characters, with possible loss of characters outside the Ansi codepage, the OnUTF8KeyPress handler receives the UTF-8 character code.

The Handle of the parent widget.

Usage?

Cached widget visibility, not necessarily in sync with the widget.
Determines the sequence of controls, reachable when the user presses the Tab key.
Allows the user to navigate to this control, by pressing the Tab key.
Determines whether a DockManager is used for this DockSite.

When this property becomes True, and DockSite also is True, a DockManager is created automatically.

When False an eventually existing DockManager is ignored.

If you want to use an special DockManager, install it before setting UseDockManager to True.

The number of visible docked controls.
For internal use: allows direct access to Handle, bypassing any getter/setter methods.
TGraphicControl
is the base class for all lightweight controls.

TGraphicControl supports simple lightweight controls that do not need the ability to accept keyboard input or contain other controls.

If you want to accept keyboard input, or need to support child controls, use a TCustomControl instead.

Since lightweight controls do not wrap GUI widgets, they use fewer resources than controls based on TWinControl.

TGraphicControl provides a

Canvas property for access to the control's drawing surface and a virtual

Paint method and an

OnPaint handler, called in response to paint requests received by the parent control.

Override the Paint method or supply your own OnPaint handler, to do the actual drawing of the control.

Event handler for paint messages.
Override this method with your own painting code.
The default implementation invokes the OnPaint handler.
A clipped window into the parent Canvas.

Don't paint on the entire Canvas! Instead use the dimensions of the TGraphicControl stored in the ClientRect.

If you ask for the Canvas.Width or Canvas.Height, you are actually getting the Parent control's Canvas dimensions.

TCanvas
Supply your own OnPaint handler for painting the control.
The base class for windowed controls which paint themselves.

In contrast to TGraphicControl, a TCustomControl can accept keyboard input (get the Focus) and can have child controls.

Override the Paint method or supply your own OnPaint handler, to do the actual drawing of the control.

Event handler for paint messages.
The Paint handler plug-in, intercepting paint requests.
PaintWindow prepares the Canvas for painting, and invokes the Paint method to do the actual painting.
The Device Context in which to paint.
Override this method in your derived class with your own paint handler.
The drawing surface for the control, see TCanvas for details.
TCanvas
Supply your own OnPaint handler for painting the control.

?

Parses the string into the given list.
Represents an node in an TDockTree.

It encapsulates a dock zone, containing either other zones or a single control.

This implementation is specific to /LDockTree. Every DockManager can (should!) use its own class instead.

The number of visible children.
The next visible zone.
The zone, or Nil if none found.
The dock tree to which this zone belongs.
The control in this zone (may be Nil).
Returns the Dockzone containing the given control.
The zone containing AControl as ChildControl.
Adds the given zone as the first child.
The zone to add.
Adds the given zone as the last child.
The zone to add.
Replace the OldChild zone by NewChild.
The zone to unlink.
The zone to link in place of OldChild.
The last child zone.
Calculates the index of the zone within its parent zone.
Unlinks the given child zone.
Inserts NewZone as preceding or following sibling.
The zone to add.
How to add the zone.
The next sibling zone.
The preceding sibling zone.
The first visible child zone.
The next visible zone.
The preceding visible zone.
The dock tree of which this dock zone is a part.
The control docked in this zone.
A zone can contain nothing, a control, or child zones.
The number of child zones.
The first child zone.
The height of the zone.
The left coordinate of the zone.
The free coordinate of the DockZone (Left or Top).
The free size of the DockZone (Width or Height).
Whether docking is oriented vertically, horizontally, in pages, or not at all

- doNoOrient: zone contains a TControl and no child zones.
- doHorizontal: zone's children are stacked top-to-bottom.
- doVertical: zone's children are arranged left-to-right.
- doPages: zone's children are pages arranged left-to-right.

The parent zone in the DockTree.
The top coordinate of this zone.
A zone is visible if it contains a visible control, or if any child zone is visible.
The number of visible child zones.
The width of this zone.
Class of .
The type of an ForEachZone callback procedure, currently unused.

unused?

The iterated zone.

?

?

A docking manager for tree-style layouts.

A tree-style layout is organized in layers of a specific (horizontal or vertical) orientation. Every node in the tree is either a container for other nodes, or represents a zone with a single docked control. All child zones of an node have the same DockOrientation.

The following documentation is copied from the Controls unit. It is of historical interest only, since it effectively describes the AnchorDocking, implemented in TCustomAnchoredDockManager. AnchorDocking is not related to visual drag-dock procedures, it merely is an attempt to implement just an layout manager.
[todo: make this description an topic]

The TLazDockTree implementation never was finished, due to problems with the anchor "docking" mechanism. Use the EasyDockManager (examples/dockmanager) instead.

    This is an abstract class. A real implementation is e.g. in ldocktree.pas.

        Docking means here: Combining several windows to one. A window can here be
        a TCustomForm or a floating control (undocked) or a TDockForm.
        A window can be docked to another to the left, right, top, bottom or "into".
        The docking source window will be resized, to fit to the docking target
        window.

        Example1: Docking "A" (source window) left to "B" (target window)

           +---+    +----+
           | A | -> | B  |
           +---+    |    |
                    +----+
          Result: A new docktree will be created. Height of "A" will be resized to
                  the height of "B".
                  A splitter will be inserted between "A" and "B".
                  And all three are children of the newly created TLazDockForm of the
                  newly created TDockTree.

           +------------+
           |+---+|+----+|
           || A ||| B  ||
           ||   |||    ||
           |+---+|+----+|
           +------------+

          If "A" or "B" were floating controls, the floating dock sites are freed.
          If "A" or "B" were forms, their decorations (title bars and borders) are
          replaced by docked decorations.
          If "A" had a TDockTree, it is freed and its child dockzones are merged to
          the docktree of "B". Analog for docking "C" left to "A":

           +------------------+
           |+---+|+---+|+----+|
           || C ||| A ||| B  ||
           ||   |||   |||    ||
           |+---+|+---+|+----+|
           +------------------+

        Example2: Docking A into B
                    +-----+
           +---+    |     |
           | A | ---+-> B |
           +---+    |     |
                    +-----+

          Result: A new docktree will be created. "A" will be resized to the size
                  of "B". Both will be put into a TLazDockPages control which is the
                  child of the newly created TDockTree.

           +-------+
           |[B][A] |
           |+-----+|
           ||     ||
           || A   ||
           ||     ||
           |+-----+|
           +-------+

        Every DockZone has siblings and children. Siblings can either be
        - horizontally (left to right, splitter),
        - vertically (top to bottom, splitter)
        - or upon each other (as notebook pages).

        InsertControl - undock control and dock it into the dock site. For example
                        dock Form1 left to a Form2:
                        InsertControl(Form1,alLeft,Form2);
                        To dock "into", into a TDockPage, use Align=alCustom.
        PositionDockRect - calculates where a control would be placed, if it would
                           be docked via InsertControl.
        RemoveControl - removes a control from the dock site.

        GetControlBounds - TODO for Delphi compatibility
        ResetBounds - TODO for Delphi compatibility
        SetReplacingControl - TODO for Delphi compatibility
        PaintSite - TODO for Delphi compatibility

The width of the border around a dock zone.

?

The root zone of the DockTree.
Destroys the zone and its child zones.
Adjusts the zone rectangle for AControl.

ARect initially describes the dockzone into which the control is docked. From that area the zone decoration is excluded, so that ARect describes the area reserved for the docked control.

AdjustDockRect is not part of the general docking model. It can implemented and used for any purpose in a dock tree manager. Most docking managers will replace it by a method with more arguments, that allow to identify the zone and its properties immediately.

Returns the control and the part of the dockzone, at the given coordinates.
The docked control.
The client coordinates.

?

Returns the zone part at MousePos.
Positions DropCtl relative Control, using the alignment specified by InsertAt.

InsertControl determines the layout and appearance of the just docked control, forcing a repaint of the container control if necessary.

When SetReplacingControl has been called with a non-Nil Control before, the dropped control only should replace that control.

A tree docking manager organizes the docksite into layers of horizontol or vertical orientation. As long as no more than one control is docked into a docksite, the tree has no orientation at all. The second docked control determines the orientation of the docksite and the dock tree. All further drops are either isogonal (in direction of the zone orientation) or orthogonal (opposite to the zone orientation). On an isogonal drop a new leaf zone is created for the dropped control, as a sibling of the already existing child zones. On an orthogonal drop the zone containing the DropControl becomes the root of another subtree, whose initial members are the leaf zones for Control and DropCtl.

One value of InsertAt (alCustom) is reserved for notebook docking, where DropCtl is replaced by a tabbed notebook, and Control and DropCtl are moved into pages of the notebook. The notebook is a docksite of its own, further drops into the notebook are handled by the notebook itself, the DockManager of the host docksite is not involved.

The control beneath which to place DropControl.
How to insert DropControl.
The control to add.
Stores the layout in an file.
Paints the dock header of the zone containing AControl.

to do what?

The parent control whose docked clients are managed.
The window control to be managed.
The class of all dock zones in this tree.
Some properties of the Mouse.
Contains information about current mouse position, whether messages are captured by a window, whether it is dragging an object, and how far the mouse must move before a control starts dragging.
Handle of the capturing control.
The screen position of the cursor.
Does dragging start immediately (True), or only after a mouse move?
The minimum distance the mouse must move before dragging starts (in delayed mode).
Default is 5 pixels
True while dragging an object.
The number of lines to scroll with every notch of the mouse wheel.
Get control at screen position.
Disabled controls should be excluded, but are not due to an bug in FindControlAtPosition.
The control at Position; Nil if none.
The screen position.
Also find disabled controls, if True.
Get control at screen position.
When AllowDisabled is True, also a disabled control will be found. In the current implementation AllowDisabled is ignored (assumed to be True). First a window at the given screen position is searched, then a control within it.
The control at Position; Nil if none.
The screen position.
Also find disabled controls, if True.
Find the window and its owning control at the given screen coordinates.
The control at the ScreenPos; Nil if none was found.
Return the TWinControl of the given Handle.

The result is very interface specific. Use FindOwnerControl when Handle may be a non-TWinControl handle.

Returns the TWinControl for the given Handle; the parent control for a non-TWinControl Handle.

Handle can also be a child handle (of a TControl), in which case the returned control is the parent of the desired control. Parent, not Owner as suggested by the function name!

[Remark] The function recursively tries GetParent(Handle), so the result depends on the implementation (meaning) of a parent handle.

?

Returns the TControl that currently is visible at a screen position.
The result is not reliable during resizing.

?

Create the widget for a TWinControl

This function was originally member of TWincontrol.

From a VCL point of view that made perfectly sense since the VCL knows when a win32 widget has to be recreated when properties have changed.

The LCL however doesn't know, the widgetset does. To avoid old VCL behaviour and to provide a central function to the widgetset, it is moved here.

?

Set the mouse capture to AWinControl or its child at the given coordinates

?

Returns the current capturing TControl.
Note: For the interface only a Handle = TWinControl can capture. The LCL extends this to allow TControl capture the mouse.
[Delphi compatible, dropped!]

Delphi compatible, dropped!

Returns a string for the name of the cursor as identified by an integer constant
Calls CursorToIdent to find correct entry in look-up table
Returns a string with the name of the cursor type corresponding to the integer constant
StringToCursor
- returns the cursor value corresponding to the name supplied

StringToCursor - returns the cursor value corresponding to the name supplied

Finds the numeric cursor value corresponding to the name S in the cursor look-up table

The numeric cursor value from the look-up table
The name of the cursor for which the numeric value is sought
Uses look-up table to find cursor identifier corresponding to integer cursor constant
Returns true if a valid entry is found in the look-up table
Searches the Cursor name table for the given cursor name; returns True if found.
If found, the cursor value (handle) is returned in Cursor.

?

Returns True if a valid entry was found in the look-up table.
The name of the cursor for which the numeric value is sought.
The numeric value of the named cursor.
Adjust space round border of this control

RemainingClientRect: remaining clientrect without CurBorderSpace

CurBorderSpace: current borderspace around RemainingClientRect

Left, Top, Right, Bottom: apply these borderspaces to CurBorderSpace

CurBorderSpace will be set to the maximum of CurBorderSpace and Left, Top, Right, Bottom.

RemainingClientRect will shrink.

RemainingClientRect will not shrink to negative size.

Register the components provided by this unit or package, so that they can be instantiated.
Also can be used to register the controls required by an application.

?

Implementation of TDragManager.
The abstract base class for managing the dragging of controls (to be dropped or docked).

This is the OO version of the Delphi drag manager, implemented in TDragManagerDefault.

The registered dock sites should be stored in a persistent list, not in a DragManager instance.

[entire review DoDi 2010-02-16]

Handler for keyboard key released.
When the Ctrl key is released, a drop is enabled again.
Handler for keyboard key pressed.

When (and while) the Ctrl key is pressed, dropping is disabled.

The Esc key aborts the current dragging operation immediately.

Aborts the dragging operation, when the capturing control really has changed.
Generates the visual feedback when the mouse moves.
Ends dragging.
Nop.
Initializes the Delphi default dragging parameters.

The Delphi VCL sets DragImmediate=True and DragThreshold=5.

A docking operation never should start immediately.
Check if dragging is in progress.
True if dragging.
True if the specified control is being dragged.
Adds the control to the list of registered docking sites.
This should become a class method, maintaining the list of registered docking sites outside any DragManager instance.
The DockSite to register.
True for adding, False for removing the site.
Starts dragging a control.
A DragObject must be created, depending on the Control.DragKind. The mouse has to be captured, and visual feedback must be initialized.
The control that initiates the drag operation.
False when dragging should start only when the mouse is moved (delayed).
How much the mouse must move before delayed dragging starts.
Updates the visual dragging feedback.
Mouse position in screen coordinates.
Ends dragging.

The visual feedback is reset.

All related controls are notified of the outcome of the operation (drop, dock, abort).

Finally all temporary objects are destroyed.

False when dragging was aborted.
Start dragging immediately, on MouseDown?
This is the default value for e.g. BeginDrag.
The threshold amount by which the mouse must move before delayed dragging starts. (default 5 pixels)
sends to AControl a drag message at specified position for nominated object; returns an integer Result for success
SendCmDragMsg
- sends to DragTarget a drag message at specified position for nominated object; returns True for success
The Result is used to select the DragCursor (deny/accept drop).
Find a DockSite under the current mouse position.

The list of registered docksites is searched. Sites are excluded when they are invisible or disabled, or when the site is (a child of) the dragged control.

The Z-order of the docksites should be taken into account. Currently the first site found is returned.

Determine the target control within the target DockSite.

Do nothing (return Nil) unless a DockManager is installed in the target site and something has already been docked.

When the dragged control is the only client of the docksite, Nil is returned.

[ToDo: The check for an drop of a control onto itself should be done in every case, after the target control has been determined.]

Modes for aligning a control in a table cell.

?

?

?

?

Operations in .
AnchorSide added.
AnchorSide removed.
AnchorSide changed.
Modes for resizing child controls.
Using (Delphi compatible).
Scale children, keep space between children fixed.
Enlarge children equally, i.e. by the same amount of pixels.
Enlarge space between children equally.
Modes for wrapping controls.
No wrapping

?

Arrange in rows If BiDiMode not bdLeftToRight then it becomes RightToLeft.

?

Arrange in columns

?

Flags for finding a control at given (client) position.
capfAllowDisabled: include disabled controls. capfAllowWinControls: do not find WinControls if False. capfOnlyClientAreas: hit client areas only. capfRecursive: search into child controls. capfHasScrollOffset: scroll offset is already included in the coordinates.
If set: include disabled controls.
If set: include TWinControls, in addition to TControls.
If set: hit client areas only.
If set: recurse into grand children.
If set: scroll offset is already included in the coordinates.
Converts items of several data types into strings, for debug output.
[The parameters should have unique names, for every type]
The string representing the given parameter(s).
All elements in this set will be shown as a comma-separated list.

?

?

?

Hidden reference to the currently capturing control.
The interface knows, which TWinControl has the capture. This stores what child control of this TWinControl has actually the capture.
The default DockManager to create for a DockSite.

?

The current DragManager (always TDragManagerDefault).
A DragManager can be implemented only in the Controls unit, because it must access private elements of the other classes, declared in this unit.
The global Mouse object.

?

AutoSize
- boolean property that permits the size of a control to be adjusted automatically

[deverses an review!!!] AutoSize is a boolean property found in many classes; it permits the size of a control to be adjusted automatically to accommodate differences in the text or graphic contained therein, and allows most efficient use of available space

Many controls call TControl.DoAutoSize to perform the actual auto-sizing.

IMPORTANT: Many Delphi controls override this method and many call this method directly after setting some properties.

During handle creation not all interfaces can create complete Device Contexts which are needed to calculate things like text size.

That's why you should always call AdjustSize instead of DoAutoSize.

TControl.AdjustSize calls

DoAutoSize in a smart fashion.

During loading and handle creation the calls are delayed.

This method initially does the same as TWinControl.DoAutoSize. But since DoAutoSize is commonly overriden by descendant components, it is not useful to perform all tests, which can result in too much overhead. To reduce this the LCL calls AdjustSize instead.

When setting AutoSize = true the LCL autosizes the control in width and height. This is one of the most complex parts of the LCL, because the result depends on nearly a hundred properties. Let's start simple:

The LCL will only autosize the Width or Height if it is free to resize. In other words - the width is not autosized if:

- the left and right side is anchored. You can anchor the sides with the Anchors property or by setting the Align property to alTop, alBottom or alClient
- the Width and Height are bound by the Constraints properties. The Contraints can also be overriden by the widgetset. For example the winapi does not allow resizing the height of a combobox. And the gtk widgetset does not allow resizing the width of a vertical scrollbar

The new size is calculated by the protected method TControl.CalculatePreferredSize. This method asks the widgetset for an appropriate Width and Height. For example a TButton has preferred Width and Height. A TComboBox has only a preferred Height. The preferred Width is returned as 0 and so the LCL does not autosize the Width - it keeps the width unaltered. Finally a TMemo has no preferred Width or Height. Therefore AutoSize has no effect on a TMemo.

Some controls override this method. For example the TGraphicControl descendants like TLabel have no window handle and so cannot query the widgetset. They must calculate their preferred Width and Height themselves.

The widgetsets must override the GetPreferredSize method for each widget class that has a preferred size (Width or Height or both).

Parent.AutoSize

The above described the simple explanation. The real algorithm provides far more possibilities and is therefore far more complex.

Properties / Methods

- Left
- Top

If Parent is not nil then Left, Top are the pixel distance to the top, left pixel of the parent's client area (not scrolled). Remember the client area is always without the frame and scrollbars of the parent. For Delphi users: Some VCL controls like TGroupbox define the client area as the whole control including the frame and some not - the LCL is more consistent, and therefore Delphi incompatible. Left and Top can be negative or bigger than the client area. Some widgetsets define a minimum/maximum somewhere around 10.000 or more.

When the client area is scrolled the Left and Top are kept unchanged.

During resizing/moving Left and Top are not always in sync with the coordinates of the Handle object.

If Parent=nil then Left, Top depend on the widgetset and the window manager. Till Lazarus 0.9.25 this is typically the screen coordinate of the left,top of the client area of the form. This is Delphi incompatible. It is planned to change this to the Left, Top of the window.

Hint:

Each time you change Left and Top the LCL moves instantly. If you want to change both Left and Top use instead:

with Button1 do SetBounds(NewLeft,NewTop,Width,Height);

- Width
- Height

The Size in pixels must not be negative, and most widgetsets do not allow Width=0 and/or Height=0. Some controls on some platforms define a bigger minimum constraint. Instead of sizing a control to Width=0 and/or Height=0, set Visible=false. During resizing/moving Width and Height are not always in sync with the size of the Handle object.

- BoundsRect

Same as Bounds(Left,Top,Width,Height).

Common newbie mistake:

BoundsRect.Left:=3; // WRONG: common newbie mistake

This has no effect, because reading BoundsRect is a function. It creates a temporary TRect on the stack.

- ClientRect

Left and Top are always 0,0. Width and Height are the visible size in pixels of the client area. Remember the client area is without the frame and without scrollbars. In a scrollable client area the logical client area can be bigger than the visible.

- ClientOrigin

Returns the screen coordinate of the top left coordinate 0,0 of the client area. Note that this value is the position as stored in the interface and is not always in sync with the LCL. When a control is moved, the LCL sets the bounds to the desired position and sends a move message to the interface. It is up to the interface to handle moves instantly or queued.

- LCLIntf.GetClientBounds

Returns the client bounds of a control. Like ClientRect, but Left and Top are the pixel distances to the control's left, top. For example on a TGroupBox the Left, Top are the width and height of the left and top frame border. Scrolling has no effect on GetClientBounds.

- LCLIntf.GetWindowRect

After the call, ARect will be the control area in screen coordinates. That means, Left and Top will be the screen coordinate of the TopLeft pixel of the Handle object and Right and Bottom will be the screen coordinate of the BottomRight pixel.

- FBaseBoundsLock: integer

Increased/Decreased by LockBaseBounds/UnlockBaseBounds. Used to keep FBaseBounds during SetBounds calls.

- FBaseParentClientSize: TPoint

The Parent.ClientRect size valid for the FBaseBounds. FBaseBounds and FBaseParentClientSize are used to calculate the distance for akRight (akBottom). When the parent is resized, the LCL knows what distance to keep.

- FBoundsRectForNewParent: TRect

When changing the Parent of a control the Handle is recreated and many things can happen. Especially for docking forms the process is too unreliable. Therefore the BoundsRect is saved. The VCL uses a similar mechanism.

- FLastDoChangeBounds: TRect

Used to avoid calling OnChangeBounds with the same coordinates. This reduces user defined autosizing.

- FLastResizeClientHeight: integer
- FLastResizeClientWidth: integer
- FLastResizeHeight: integer
- FLastResizeWidth: integer

Used to avoid calling OnResize with the same coordinates. This reduces user defined autosizing.

- FLoadedClientSize: TPoint

During loading many things are delayed and many things are set and worse: in the wrong order. That's why SetClientWidth/SetClientHeight calls are stored and set at end of loading again. This way the LCL can restore the distances (e.g. akRight) used during designing.

- FReadBounds: TRect

Same as FLoadedClientSize, but for SetLeft, SetTop, SetWidth, SetHeight.

- procedure SetBoundsRectForNewParent(const AValue: TRect);

Used to set FBoundsRectForNewParent. See above.

- procedure SetInitialBounds(aLeft, aTop, aWidth, aHeight: integer); virtual;

A smart version of SetBounds, reducing overhead during creation and loading.

- procedure UpdateBaseBounds(StoreBounds, StoreParentClientSize, UseLoadedValues: boolean); virtual;

Commit current bounds to base bounds.

- procedure SetClientHeight(Value: Integer);
- procedure SetClientSize(Value: TPoint);
- procedure SetClientWidth(Value: Integer);

Exists for Delphi compatibility too. Resizes the control, to get the wanted ClientRect size.

- procedure ChangeBounds(ALeft, ATop, AWidth, AHeight: integer); virtual;

This is the internal SetBounds. Applies constraints, updates base bounds, calls OnChangeBound, OnResize, locks bounds.

- procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: integer); virtual;

This really sets the FLeft, FTop, FWidth, FHeight private variables.

- procedure SetBounds(aLeft, aTop, aWidth, aHeight: integer); virtual;

This is the standard procedure overriden by many Delphi controls. TWinControl overrides it too.

Ignores calls when bounds are locked; lock the FBoundsRealized to avoid overhead to the interface during auto sizing.

ChangeBounds is not locked this way.

- Function GetClientOrigin: TPoint; virtual;

Screen coordinate of Left, Top of client area.

- Function GetClientRect: TRect; virtual;

Size of client area. (always Left=0, Top=0)

- Function GetScrolledClientRect: TRect; virtual;

Visible client area in ClientRect.

- function GetChildsRect(Scrolled: boolean): TRect; virtual;

Returns the Client rectangle relative to the control's Left, Top. If Scrolled is true, the rectangle is moved by the current scrolling values (for an example see TScrollingWincontrol).

- function GetClientScrollOffset: TPoint; virtual;

Returns the scrolling offset of the client area.

- function GetControlOrigin: TPoint; virtual;

Returns the screen coordinate of the topleft coordinate 0,0 of the control area. (The topleft pixel of the control on the screen) Note that this value is the position as stored in the interface and is not always in sync with the LCL. When a control is moved, the LCL sets the bounds to the wanted position and sends a move message to the interface. It is up to the interface to handle moves instantly or queued.

deverses an review!!!

The coordinates of a control can be specified or retrieved in various ways.

The following description applies to members of TControl and TWinControl.

Every control has an origin (Top, Left) and extent (Width, Height). The origin is relative to its Parent control (client coordinates) or, for floating controls (forms) with Parent=Nil, relative to the screen.

The BoundsRect describes the TopLeft and BottomRight coordinates of the control, relative to its Parent.

The BoundsRectForNewParent holds the new coordinates, to be used when the Parent of the control is changed later.

The ClientRect describes the internal (client) area of a container control (TWinControl), excluding borders. Its Top and Left are always zero. In a TScrollingWinControl...

BaseBounds holds the designed Bounds, to be used e.g. when a scale factor is set later.

GetControlOrigin returns the origin in screen coordinates. These values are not always in sync with the true screen position, managed by the widgetset.

ScreenToClient returns the client coordinates of an point given in the screen coordinates, i.e. the coordinates relative to the control's client origin.

ClientToScreen returns the screen coordinats for an point in client coordinates.

?

right?

How multiple controls can be aligned and resized together, at runtime.

The tree-style layout of a form allows to specify table-style areas, with a common width or height of all controls in the same area (using container controls like e.g. TPanel).

Delphi introduced control anchoring to the sides of the Parent control. This means when a control in a form has Anchors[akRight]=True, its right side keeps its distance from the right side of its Parent, when its Parent is resized.

The default anchors [akLeft,akTop] keep every control anchored to the origin (TopLeft) of their Parent control (of form). This will cause controls to disappear when the form is shrinked, or the user has to scroll through the form's client area.

When a control shall e.g. use the available space, left over to its right, Anchors=[akLeft,akRight] will result in a variable-width control.

The Align property allows to stack controls at their Parent's sides, e.g. all controls with Align=alTop are stacked at the top of their Parent. The remaining space in the Parent can be occupied by a single control, of Align=alClient.

Both Anchors and Align are tightly coupled, changing one property will affect the other one. This is harmless in so far, as the IDE (form designer) keeps all adjustments in sync, free of conflicts.

Some people found this approved layout method too restrictive, and too complicated to use, and now LCL controls also can be anchored freely to each other. This layout management is traditionally referred to as "Anchor Docking", even if it is not related to docking at all.

This freedom requires that the GUI designer is responsible for consistent anchor specifications, which do not result in unresolvable cyclic references or other contradictions.

Anchor docking allows to anchor every side of a control to an arbitrary side of another control, i.e. the left side of an Edit control can be anchored to the right side of its associated Label.

Example1 -------- If you want to have the top of B the same as the top of C: +-----+ +-----+ | B | | C | | | +-----+ +-----+ use B.AnchorSide[akTop].Control:=C; B.AnchorSide[akTop].Side:=asrTop;

When you want to have a gap between both controls, set e.g. B.Borderspacing.Right to the desired amount. Setting C.Borderspacing.Left will have the same effect, and both can be used together; the resulting gap then reflects the maximum value of both properties.

BorderSpacing is in effect even for controls without special anchoring, when AutoSize is used.

Anchor docking also allows to center a control relative to another control.

Example2 -------- For centering A relative to B: +-------+ +---+ | | | A | | B | +---+ | | +-------+ use A.AnchorSide[akTop].Side:=asrCenter; A.AnchorSide[akTop].Control:=B; Or use this, it's equivalent: A.AnchorSide[akBottom].Side:=asrCenter; A.AnchorSide[akBottom].Control:=B;

TControlChildSizing and TControlChildrenLayout offers additional means for aligning and separating controls.

?

todo!?

Returns true if AutoSize should be skipped / delayed because of its handle.
Default enumerator for the children