Contains types, constants, classes, and routines used to implement visual controls.

controls.pp contains classes, types, constants, and routines used to implement visual controls used in the Lazarus Component Library (LCL). Most of the classes are base classes, or used in the implementation of controls defined in others units.

The following components are added to the Common Controls tab in the Lazarus IDE Component Palette:

- TImageList

The following components are registered but not displayed on the Lazarus IDE Component Palette:

- TCustomControl
- TGraphicControl

Starting value for control message constants defined in the LCL.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Control message constant.
Starting value for control notification messages in the LCL.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
Control notification message constant.
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.
Deprecated; Use the ModalResultStr array from the UITypes unit directly.
Gets the string representation for a modal result value.

ModalResultStr is an indexed ShortString property used to get the string representation for the specified TModalResult constant. The read access specifier for the property has been deprecated; Use the ModalResultStr array from the UITypes unit directly.

ModalResultStr TModalResult
Alias to the fsSurface constant in the GraphType unit.
Alias to the fsBorder constant in the GraphType unit.
Alias to the bvNone constant in the GraphType unit.
Alias to the bvLowered constant in the GraphType unit.
Alias to the bvRaised constant in the GraphType unit.
Alias to the bvSpace constant in the GraphType unit.
Defines the key used for shortcuts on different platforms.

ssModifier is a constant which defines the modifier for keyboard shortcuts, like Ctrl+C (Copy), Ctrl+Z (UnDo), Ctrl+X (Cut), and Ctrl+V (paste). Mac and iOS use the Meta key (instead of the Ctrl key) for those shortcuts.

GUID for the Object Inspector in the Lazaurus IDE.
Value is '{37417989-8C8F-4A2D-9D26-0FA377E8D8CC}'
Defines an interface used in the Lazarus Object Inspector.
TWinControlClass
- class of TWinControl.
TControlClass
- class of TControl.
Defines a structure used for mouse wheel control messages.

Holds mouse wheel details that include:

- the Message associated with the wheel
- the shift state (i.e. whether Shift, Alt, Control keys have been pressed)
- the mouse position
- the message Result

The exact Message ID (WM_MOUSEWHEEL?).
State of the modifier for keys and mouse buttons.
Inserted for alignment only.
Number of notches or units the mouse wheel was turned. Negative for mouse wheel up movements.
Mouse position as a TSmallPoint value.
Mouse X position as a SmallInt value.
Mouse Y position as a SmallInt value.
Result for the mouse wheel message. Zero (0) indicates the message was handled.
Alias for the TLMNCHitTest type.
Alias for the TLMMouse type.
Contains values representing a Control Change Message.

TCMControlChange is a record type which contains values representing the arguments and the result for a Control Change Message. TCMControlChange is the type passed to the CMControlChange method in TCustomFlowPanel.

TCustomFlowPanel.CMControlChange
Mouse message constant for the change notification.
Control to receive the change message.
Indicates if the control message is an insert operation.
Result for the control change message.
Not used in the current LCL implementation.
Not used in the current LCL implementation.
Alias for the TLMKey type.

Used in LazReport controls.

Alias for the TLMKey type.

Used in the jvcllaz package.

Alias for the TLMEnter type.
TLMEnter
Alias for the TLMExit type.
Contains information representing a CM_CANCELMODE control message.

Used in the jvcllaz package.

Not used in the current LCL implementation.
VK_XXX constants for TLMKeyDown/Up, ASCII for TLMChar.
Alignment options for a control, within its Parent control.

TAlign is an enumeration type with values that indicate the alignment for a control within its Parent. The enumeration includes the following values and meanings:

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 for a given form or container.

The order of multiple controls with the same (stackable) alignment is determined by their Left and/or Top coordinate. The precedence of conflicting alignment requests (e.g. one at top, one at right) is resolved.

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.
Set of alignment options.
TAlign
The control side to be anchored.
With the TAnchorSideReference value asrCenter, the sides mean horizontal or vertical alignment of the control's center.
Top side (or center vertically).
Left side (or center horizontally).
Right side (or center horizontally).
Bottom side (or center vertically).
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 used for the caption on a control: may be translated.
Defines the range of values used for cursor shapes.

TCursor is an Integer type which defines the range of values used for cursor shapes. TCursor includes the following values:

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)

Drag and Drop 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)

Other Cursors

crUpArrow
  TCursor(-10)
crHourGlass
  TCursor(-11) - busy
crSQLWait
  TCursor(-17)
crAppStart
  TCursor(-19)
crHelp
  TCursor(-20)
crHandPoint
  TCursor(-21)

Defines special form behavior.
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.
The form is used as a Splash form.

Signifies that the form cannot become the main form in an application. Implies that the form responds to fewer messages; generally, paint messages and little else. May affect the border style and even the window class used for the form on some widget sets.

The form stays system-wide on top.

Used in forms for a modal system dialogs Prevents another form from having a higher Z-order value than the current one. Generally treated the same as fsStayOnTop except for MacOS Cocoa, because... you know, Mac! Think different!

Represents border styles available for a Form.
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.
Single line border, small caption, not resizable.
Small caption, form can be resized.
Possible types of borders (with or without border).
TFormBorderStyle
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.
TFormBorderStyle
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; the 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.
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.
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).
Set type used to store TMouseButton values.

TCaptureMouseButtons is a set type used to store TMouseButton enumeration values. TCaptureMouseButtons is the type used to implement the CaptureMouseButtons property in TControl.

Method type for WindowProc handlers.
Message with the command constant and key code processed in the handler.
TControlStyleType - enumerated type describing features of the Control.
Indicates that one can add child controls to this control in the form designer.
Control focus and style changes when under the mouse cursor.
wants mouse events in design mode.
Control responds to single mouse clicks.
Control has a 3D frame; used on scroll bars in the current LCL version.
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 differ, this flag has no effect. This flag has no effect when loading the control using the LCL component streaming mechanism.

Control is drawn with a non-transparent background; implementation is widgetset-specific.
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.
Control can be drawn using the TWinControl.PaintTo method.
Key messages are handler by widgetset classes instead of control events.
Display images from the drag imagelist during drag operation over control.
Control responds to size, focus, and dialog messages and can be used as an ActiveX control (Windows).
Control includes support for TBasicAction.
Control responds to menu and menu item events.
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 shrunk 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.

Indicates that a control requires keyboard input to be utilized by the user. This information is utilized in Android and other platforms to activate the virtual keyboard when the control receives. Used primarily for devices that do not have a hardware keyboard.

Set of control styles.
Set of styles which require/provide multiple clicks on a control.
State flags of a Control.

TControlStateType is an enumeration type which contains values that represent state information for control class instances, including:

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

Values from the TControlStateType enumeration are stored in the TControlState type, and used to implement the ControlState property in TControl.

Indicates the Left mouse button was down for the control.
Indicates the control was clicked; occurs after button down/up processing.
Palettes are not currently implemented in LCL.
Indicates the ReadState method has been called for the control.
Indicates the focus for the control has been changed.
Introduced for Delphi compatibility; not used in LCL.
Indicates a device context was copied in PaintControls.
Indicates a custom paint method is used to draw the control; determines the handler called to paint the control.
Used to suppress message processing when the control is freed.
Indicates the Dock method has been called for a control.
Indicates the control is being loaded using the LCL component streaming mechanism.
Set of Control States allowed in a control.
Base class which provides a canvas property used in graphic controls.

TControlCanvas is a TCanvas descendant that implements the base class which provides a canvas used in graphic controls. TControlCanvas extends the ancestor class by including a property representing the TControl associated with the canvas, a window handle for the associated control, and the device context for the handle.

TControlCanvas is used in the implementation of classes like TGraphicControl and TCustomControl, and other visual controls.

TCanvas
New value for the property.
Gets the color value used for clDefault.

GetDefaultColor is overridden in TControlCanvas to ensure that the Control is used (when assigned) to retrieve the default color. If Control is not assigned, the inherited method is called to get the default color value.

TCanvas.GetDefaultColor TControl.GetDefaultColor
Constructor for the class instance.

Create is the overridden constructor for the class instance. Create calls the inherited constructor, and sets the default unassigned values for the device context, window handle, and control used in the class instance. The device context and window handle are maintained in methods which use the respective members. Use the Control property to set the owner for the class instance.

Destructor for the class instance.

Destroy is the overridden destructor for the class instance. Destroy ensures that a device context allocated for the window handle in Control is freed prior calling the inherited destructor.

Frees the Handle for the control canvas, and its device context when assigned.

FreeHandle is an overridden method in TControlCanvas. It calls the inherited method on entry to set the value in Handle to 0 (the unassigned value). If a device context (DC) has been allocated for the window handle (HWND), the ReleaseDC routine is called to release the device context.

FreeHandle is called when a new value is assigned to the Control property, or when the class instance is freed.

TCanvas.Handle TCanvas.FreeHandle ReleaseDC
Indicates if the Control has called but not completed its Paint method.

ControlIsPainting is a Boolean function which indicates if the Control has called but not completed its Paint method. ControlIsPainting returns True when the Control has been assigned (contains a non-Nil value) and its IsProcessingPaintMsg method returns True.

ControlIsPainting is used in the implementation of the CreateHandle method.

True when the Control has been assigned is repainting.
The Control object for which the Canvas is used.

Control is a TControl property which represents the control associated with the canvas in the class instance. Setting the value in Control causes an existing Window handle (and its device context) in the class instance to be freed. The handle and its context are recreated (eventually) when the control is displayed.

Pointer to a THintInfo instance.

PHintInfo is a Pointer to a THintInfo instance. PHintInfo is the type passed as an argument to the TControlShowHintEvent event handler procedure, and the DoOnShowHint method in TControl.

Contains content and state information for Hints displayed for a window or control.
Control for the hint display.
Window class for the hint display.
TPoint with the screen coordinates for the hint display.
Maximum width for the hint.
Color for the hint window.
Rectangle with the coordinates and size for the cursor.
TPoint with the location for the mouse cursor.
If set to a value greater than Zero (0), call after value milliseconds OnShowHint again.
Used to update the hint text display after the specified delay while it is showing.
Duration in milliseconds for the hint display.
String value displayed as a hint for the associated control.
Pointer to the data used to derive the hint text.
Helper class for TCustomImageList useful for images on TControl instances.

TImageListHelper is a helper class for TCustomImageList. TImageListHelper extends TCustomImageList to provide additional properties and methods that are useful when working with TControl class instances.

Use the overloaded DrawForControl method to render an image from the multiple resolution image list to a control canvas.

Use the ResolutionForControl property to access a scaled image resolution with images of a specified width used on a control instance.

TCustomImageList
Gets the value for the ResolutionForControl property.
Value for the property.
ImageWidth desired in the scaled image resolution.
Control which provides the PPI display density for scaled images in the resolution.
Draws an image scaled to the display density (PPI) for the specified control.

DrawForControl is an overloaded procedure used to draw the specified image scaled to the display density (PPI) for the specified control. DrawForControl calls the DrawForPPI method in the image list to render the selected image using the display density and drawing effect required.

ACanvas contains the control canvas where the image is drawn. AX and AY contains the left and top coordinates on the canvas where the image is drawn.

AIndex specifies the ordinal position in the scaled image list for the image drawn in the method.

AImageWidthAt96PPI contains the width for the image at 96 PPI. The actual image width is scaled to the display density using scaling factor required for the control.

AControl contains the TControl instance that provides the display density and canvas scaling factor required for the image.

When AEnabled is True, the image is drawn using its Enabled state. Otherwise, it is rendered using the disabled state.

ADrawEffect contains the TGraphicsDrawEffect used when rendering the image to the control canvas.

TCustomImageList.DrawForPPI
Canvas where the image is drawn.
Horizontal position on the canvas where the image is drawn.
Vertical position on the canvas where the image is drawn.
Ordinal position for the image drawn in the method.
Image width using the standard display density.
Control with the display density (Font PPI) and canvas scaling factor used in the method.
Indicates the image is drawn in the enabled state when True.
Indicates the TGraphicsDrawEffect applied to the image.
Provides access to an image resolution with the specified width scaled to the display density for a control.

ResolutionForControl is a read-only TScaledImageListResolution property which provides access to a scaled image resolution suitable for the control in AControl. AImageWidth contains the image width requested from the multi-resolution image list. AControl contains the TControl instance which provides the display density (PPI) and the scaling factor used to generate the scaled image resolution.

TScaledImageListResolution
Image width requested in the image list
Control which provides the display density and scaling factor for the scaled image resolution.
Implements an image list resolution with features used in Drag and Drop operations.

TDragImageListResolution is a TCustomImageListResolution descendant which implements an image list resolution with features used in Drag and Drop operations. TDragImageListResolution is used in the implementation of TDragImageList.

Gets the value for the ImageList property.
Value for the property.
List with images used in Drag and Drop operations.

ImageList is a read-only TDragImageList property which provides access to the images used for Drag and Drag operations, and methods used to render the images.

"
Constructor for the class instance.

Create is the overridden constructor for TDragImageListResolution. Create calls the inherited constructor using TheOwner as the owner for the class instance. Create sets the initial the values for internal members in the class instance.

TComponent.Create
Owner of the new class instance.
Gets the HotSpot for the image resolution.

GetHotSpot is an overridden TPoint function which gets the HotSpot for the image list resolution. GetHotSpot uses the value from the DragHotspot property. It contains the screen coordinates where the Drag and Drop operation was started. X is is the horizontal position, and Y is the vertical position in the TPoint type.

Value for the HotSpot.
Starts display of images in the resolution for a Drag and Drop operation.

BeginDrag is a Boolean function used to start display of images in the resolution for a Drag and Drop operation. The return value is True if the widgetset successfully received the BeginDrag notification.

Please note: No actions are performed in the method if the widgetset class does note successfully start the drag operation.

BeginDrag calls the DragLock method to lock the window handle for the control, and to start displaying the drag image for the operation. The current screen cursor is captured, and the DragCursor in ImageList is displayed for the operation.

True if the Drag operation was successfully started.
Window handle where images are displayed for the operation.
Horizontal screen position where the operation was started.
Vertical screen position where the operation was started.
Shows the Drag image and optionally locks the Window handle during the Drag operation.
True if the drag operation was started or the drag image position was updated.
Window handle used as the lock handle when not already assigned.
Horizontal coordinate for the drag image.
Vertical coordinate for the drag image.
Moves the dragging image to the specified position.
Hides the Drag image and removes the update lock for the Window.
Removes the drag lock and restores the saved cursor when the drag operation has ended.
Notifies the widgetset class to hide the drag image.
Notifies the widgetset class to display the drag image.
Contains the mouse position for the drag image.
DragHotspot is a TPoint property which contains the mouse position for the Drag hostspot. The value in DragHotspot is updated when TDragImageList sets the image used for the resolution, and in the BeginDrag method.
Indicates that BeginDrag has been called for the image resolution.
A list of Images used during Drag operations.

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 general overview 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 a window for updates, remembers the current cursor shape, and sets the new cursor shape.
True if successful.
The associated window.
The mouse position.
The mouse position.
Show drag image during drag operation.
True if Dragging and image shown.
The locked window.
The mouse position.
The mouse position.
Shows the drag image at a new location.
True if Dragging and image moved.
The new mouse position.
The new mouse position.
Hide the drag image.
Finish dragging of the image, restore the old cursor shape.
True when dragging was started before.
Hides the drag image without unlocking the window.

Calls the HideDragImage method in DraggingResolution. No actions are performed in the method when an image resolution is not available in the DraggingResolution property.

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.
Displays the drag image.

Calls the ShowDragImage method in DraggingResolution. No actions are performed in the method when an image resolution is not available in the DraggingResolution property.

The cursor shape to use while dragging.
The position of the HotSpot image, i.e. the offset to the mouse position while dragging.
True if dragging in progress.
Gets the scaled image resolution with the drag images for the list.
Gets the image resolution for the specified image width.

Resolution is a read-only indexed TDragImageListResolution property which provides the image resolution for images with the width specified in AImageWidth. Reading the property value causes the image resolution to be cast to the required TDragImageListResolution type.

Image width requested in the image resolution.
Defines an event handler for key events.

TKeyEvent is an object procedure type which specifies a handler for key events.

TKeyEvent is the type used to implement the OnKeyDown and OnKeyUp event handlers in TWinControl. Applications must implement an object procedure using the signature for the event, and assign it to the event handler to respond to the notification.

See for the handler used to implement OnKeyPress events.

TObject for the key event.
ScanCode for the key in the event.
TShiftState modifier for the specified key.
Specifies an event handler for key press events.

TKeyPressEvent is an object procedure type that defines an event handler for key press events.

TKeyPressEvent is the type used to implement the OnKeyPress event handler in TWinControl. Applications must implement an object procedure using the signature for the event handler, and assign it to the property to respond to the event notification.

TObject for the event notification.
Character value for the key press in the event notification.
Specifies an event handler for UTF-8-encoded key press events.

TUTF8KeyPressEvent is an object procedure type which specifies an event handler for UTF-8-encoded key press events.

TUTF8KeyPressEvent is the type used to implement the OnUTF8KeyPress event handler in TWinControl. Applications must implement an object procedure using the signature for the event handler, and assign it to the property to respond to the event notification.

TObject for the event notification.
Value for the UTF-8-encoded character in the key press event.
Specifies an event handler used to respond to mouse button events.

TMouseEvent is an object procedure type which specifies an event handler for mouse button events.

TMouseEvent is the type used to implement the OnMouseDown and OnMouseUp event handlers in TControl. Applications must implement an object procedure using the signature for the event handler, and assign it to the property to respond to the event notification.

TObject for the event notification.
Mouse button for the event notification.
Modifier applied to the mouse button.
Horizontal position for the mouse cursor in the button event.
Vertical position for the mouse cursor in the button event.
Specifies an event handler used to respond to mouse movement events.
TObject for the event notification.
Key modifier in effect for the event.
Horizontal mouse coordinates.
Vertical mouse coordinates.
Specifies an event handler used to respond to mouse wheel events.
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.
Specifies an event handler used to get the caption for a docked control.

TGetDockCaptionEvent is an object procedure type which specifies an event handler used to get the caption for a docked control. It allows a value other than the Caption for a control to be displayed when a control is docked.

Use AControl to examine properties for the docked control. Assign a value to the ACaption argument to set the docking caption for the control.

TGetDockCaptionEvent is the type used to implement the OnGetDockCaption event handler in TWinControl. Applications must implement an object procedure using the signature for the type, and assign it to the property to allow responding to the event notification.

TObject for the event notification.
Control with the default caption value.
Caption to use for the docked control.
Indicates whether the control performs drag-drop or drag-dock.
Control is dragged for dropping.
Control is dragged for docking.
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.
Values representing State changes while dragging.
These values are sent in drag messages, allowing the control to perform special actions when the mouse moves over, enters, or leaves the control.
Mouse has just entered the control.
Mouse has just left the control.
Mouse is moving over the control.
Message types used in DragManager.

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 for a control when it is dragged and its DragKind is dkDrag. The handler can provide a specific DragDrop object. Otherwise, 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 for a dragged control, when the drag operation 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 cancelled.

Check for an unassigned value in Target to distinguish between a drop and a cancelled operation (Nil).

The dragged control.
The drop target (control), or Nil if cancelled.
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; you do not need to maintain it. But an application can provide a customized DragObject in the or handlers for the source control (the one being dragged).

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

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

In contrast to the Delphi implementation, Lazarus has moved a couple of methods into the drag performers; these methods are no longer 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.

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).
Horizontal mouse coordinate when the method is called.
Vertical mouse coordinate when the method is called.
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, and must be overridden (e.g. in TDragControlObject).

The ImageList to use, is Nil by default!
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).
Remembers the dragged control.
TObject.Create
The control being dragged.
Special constructor which enforces 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.
Asks the image list to hide the drag image.
Asks the image list to show the drag image.
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.
Was the drag object created automatically?
This property is of little use, more important is the AutoFree property.
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.
The control that is dragged (source).
Current mouse position in screen coordinates.
The control over which the object currently is dragged (target).
Mouse position in client coordinates of the DragTarget.
Indicates whether the drag object has been dropped yet.
Contains False while dragging is in progress, or when dragging has been aborted.
A class type.
A drag object that is automatically destroyed after use.
Extends TDragObject to automatically free itself in the DragManager.

TDragObjectEx is a TDragObject descendant. It provides an overridden constructor which sets the AutoFree property to True.

Constructor for the class instance.

Create is the overridden constructor for the class instance. Create sets the value in AutoFree to True. AutoFree is tested by the DragManager at the end of a dragging operation.

Control for the class instance.
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 a DragCursor and DragImages.

Asks the Control to provide a drag 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 relic, bound to TDockTree and not very useful in application code. All DockZones in a DockTree have an orientation, horizontal or vertical, indicating how controls are arranged in the dock zone. When a control is docked into a zone, it obtains the orientation of that zone.

The orientation for the control can be stored as the opposite for the dock zone, depending on the DockManager used.
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 used for OnUnDock event 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 where a drop or mouse move is directed to this docksite.
The current position of the mouse.
Set CanDock to False to reject docking.
Event handler used to draw the docking image in a drag and dock operation.

TDrawDockImageEvent is an object procedure type which specifies an event handler used to draw the docking image for TDragDockObject instances. TDrawDockImageEvent is the type used to implement the OnDrawDockImage variable in the Controls unit.

Routine used to draw dock images in drag/dock operations

OnDrawDockImage is a TDrawDockImageEvent variable which contains the default routine used to draw the docking image in a drag/dock operation. It is used in TDragDockObject methods which draw docking images likes HideDockImage, ShowDockImage, and MoveDockInage.

A drag object for drag-dock.

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

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

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, please ignore it!
Finish docking.
Invokes Control.DoEndDock.
The target docksite, or Nil to make the Control float.
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.
Moves an already visible DockRect.

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

Remembers the drawn frame coordinates in EraseDockRect.

Checks for an assigned OnDrawDockImage event handler.

HasOnDrawImage is a Boolean function used to determine if an event handler has been assigned to the OnDrawDockImage property. The return value is True if a routine has been assigned to the property. If an event handler has not been supplied, the HintDockImage routine is assigned to the event handler, and the return value is set to True.

For platforms where the Alpha blending is not enabled for Forms, the return value is always False (determined by calling GetSystemMetrics for the SM_LCLHasFormAlphaBlend metric in the widget set class).

HasOnDrawImage is used in methods like ShowDockImage, HideDockImage, and MoveDockImage.

True when an event handler has been assigned to OnDrawDockImage.
The hotspot offset of the dragged DockRect.
Screen coordinates for a possible drop location.

DockRect gives feedback to the user where the dragged control may be dropped. When no docksite signals acceptance, the DockRect uses the floating state of the dragged control. When a drop will dock the control, the DockRect signifies the approximate position for 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 final state of the dragged control (after drop).
True when the dragged control becomes or stays floating.
Determines whether the dock site shall be enlarged.
Not normally used, perhaps a special AnchorDocking property?
Area to be erased when refreshing the display for the docking rectangle.

EraseDockRect is a TRect property that represents the area to be erased when redrawing the docking rectangle. The value in EraseDockRect is assigned in InitDock, and updated to contain the value from DockRect when the docking rectangle has been altered in methods like ShowDockImage, HideDockImage, and MoveDockImage.

EraseDockRect is passed as an argument to OnDrawDockImage, and to the underlying widget set class.

A drag object for docking that is automatically destroyed after use.
Creates an object to be destroyed after use.
The abstract base class used to manage dragging of controls (for drop or dock operations).

TDragManager specifies an object-oriented version of the Delphi drag manager. It is implemented by the TDragManagerDefault descendant.

The registered dock sites should be stored in a persistent list, not in a DragManager instance.
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 has changed.
Generates visual feedback for mouse movement in a drag operation.
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.
Indicates if the mouse coordinates are within the drag threshold for the specified control.

CanStartDragging is an abstract virtual Boolean function used to determine if the mouse has been moved beyond the threshold that initiates a drag operation. The result is True when the mouse coordinates in X and Y are located within the client rectangle and threshold for the specified control in Site.

CanStartDragging must be implemented in a descendent class, like TDragManagerDefault.

Start dragging immediately, on MouseDown?
This is the default value for e.g. BeginDrag.
The threshold amount for mouse movement before delayed dragging starts (default is 5 pixels).
The current DragManager (always TDragManagerDefault).
A DragManager must be implemented in the Controls unit; it requires access to private members in the classes declared in the unit.
The layout manager for a docksite.

TDockManager is an abstract class for managing the controls on a dock site. Every docksite can have a DockManager, which arranges the docked controls. See TDockTree for more info.

Creates an DockManager for ADockSite.
This is the TWinControl acting as the docksite.
Starts updating the DockSite layout.
Finishes updating the DockSite layout.
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 one 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 the specified stream.

The controls to be docked can be retrieved by using ReloadDockedControl in 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 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, et. al.).

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

The message to be processed.
Handles special painting of the docksite.

While the docked controls paint themselves, the eventual dockheaders and other decorations 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 to provide 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 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 when the DockSite calls its Resize method. When the extent of the docksite 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.
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.
Determines whether the specified control is a windowed control using the current dock manager.
When the return value is True, the Control can be docked using the dock manager.
True when Control can be docked using the dock manager.
Control examined in the method.
The DockManager class type, for use when a DockManager is automatically created.
Range for control size constraints.
Enumerated type with options used in TSizeConstraints.
Not used in the current LCL Implementation.
Holds maximum and minimum values that can be used in sizing objects.
Sets the value for the Options property.
New value for the property.
Calls an OnChange handler if assigned.
Copies property values to the specified persistent object.
TPersistent.Assign
Persistent object where property values are stored.
Constructor for the class instance.
TControl instance where the size constraints are applied.
Asks the interface for size constraints.
Used by the interface to set the interface constraints.
Should only be used by custom components, not by applications.
Determines the minimum applicable width, given the local and interface constraints.
Zero means no constraints.
Determines the minimum 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.
Adjusts width and height values in the class using the specified scaling factors.
Scaling factor applied to width values.
Scaling factor applied to height values.
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 used to determine the size constraints.
Event handler for a change in the constraints.
The maximum height.
The maximum width.
The minimum height.
The minimum width.
Specifies an event handler signalled to resize a control to the specified size constraints.

TConstrainedResizeEvent is an object procedure type that specifies an event handler signalled to resize a control to the specified size constraints. Used to implement the OnConstrainedResize event in TControl.

TObject for the event notification.
Alias to the Integer type.

TSpacingSize is an alias to the Integer type. TSpacingSize is used for values that represent spacing around or between controls. TSpacingSize is the type used to implement properties in TControlBorderSpacingDefault and TControlBorderSpacing.

Modes for aligning a control in a table cell.
Cause the cell to fill the available space for the cell.
Cell is aligned to the Left and Top coordinates.
Cell is aligned to the Right and Bottom coordinates.
Cell is aligned to the center of the its width and height.
Defines the default values for TControlBorderSpacing.

TControlBorderSpacingDefault is a record type which defines the default values for properties in TControlBorderSpacing. It allows derived TControl classes to define their own default values.

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;
  Defines the space available to the auto-sized 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 but specified 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.

Gets the value for the AroundBottom property.
Value for the property.
Gets the value for the AroundLeft property.
Value for the property.
Gets the value for the AroundRight property.
Value for the property.
Gets the value for the AroundTop property.
Value for the property.
Gets the value for the ControlRight property.
Value for the property.
Gets the value for the ControlTop property.
Value for the property.
Gets the value for the ControlWidth property.
Value for the property.
Sets the value for the Around property.
New value for the property.
Sets the value for the Bottom property.
New value for the property.
Invalidates the control, and invokes the OnChange handler.
currently ignored (distinction no more required).
Constructor for the class instance.
The associated control which owns the class instance.
Pointer to an record with default settings; can be Nil for all zero defaults.
Copies property values from the specified persistent object.
TPersistent
Persistent object with the values copied in the method.
Copies property value from the class instance to the specified persistent object.
TPersistent
Persistent object where property values are stored.
True when the specified spacing is the same as 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.
Automatically adjusts the size of the control using the specified proportions.

AutoAdjustLayout is a procedure used to automatically adjust the size of the control using the specified proportions.

AXProportion and AYProportion are Double values which contain the scaling factor applied to width and height values in corresponding properties. For example, 1.25 indicates an increase to 125% of the original value, and 0.5 indicates a 50% decrease in the original value.

AutoAdjustLayout scales the value in width and height for properties, including:

- Around
- InnerBorder
- Left
- Top
- Right
- Bottom

When property values are altered in the scaling operation, the InvalidatePreferredSize method is called to recalculate the dimensions for the control. The Change method is called when value(s) in InnerBorder have been altered.

Scaling factor applied to width values.
Scaling factor applied to height values.
The control to which this border spacing applies.
Kind of array access to the space at every side.
The side for which the space is requested.
Spacing used around and on the left-hand side of the control.

AroundLeft is a read-only Integer property which indicates the spacing used around and on the left-hand side of the control.

AroundLeft represents the total space reserved on all sides of the control, plus any additional space reserved on it left-hand edge. The value for the property is calculated as the sum of the values from the Around and Left properties. Updates must be performed to the Around and Left properties.

Space reserved around and on the top edge of the control.
Space reserved around and on the right-hand side of the control.
Space reserved around and on the bottom edge of the control.
Space reserved on the left-hand edge of the control relative to the position for the control.

ControlLeft is a read-only Integer property that indicates the space reserved on the left-hand edge of the control relative to the position for the control class instance. The value in ControlLeft is calculated as the difference between the Left position for the control and the values in the Around and Left properties. For example:

FControl.Left-Around-Left

If a TControl instance is not available in Control, the value for the property is 0 (zero).

Space reserved on the top edge of the control relative to the position for the control.
Total width for the control including spacing values in Around, Left, and Right.

ControlWidth is a read-only Integer property that contains the total width for the control including spacing values in the Around, Left, and Right properties. The property value is calculated using the following formula:

TControl.Width + (2 * Around) + Left + Right

If a TControl instance is not available in Control, the value for the property is 0 (zero).

Total height for the control including spacing values in Around, Top, and Bottom.
Space reserved on the right-hand edge of the control relative to the position for the control.
Space reserved on the bottom edge of the control relative to the position for the control.
Event handler for a change in border spacing.
The space at the left border.
The space at the top border.
The space at the right border.
The space at the bottom border.
The space to add on each side of a control.
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 horizontal alignment inside a table cell.
The vertical alignment inside a table cell.
Operations in
AnchorSide added.
AnchorSide removed.
AnchorSide changed.
Specifies how the side of a control is anchored to other controls.

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. For example:

+-----+ +-----+ | 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.

Another example:

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

Centering A relative to B:

A.AnchorSide[akTop].Side:=asrCenter; A.AnchorSide[akTop].Control:=B;

Or use this equivalent:

A.AnchorSide[akBottom].Side:=asrCenter; A.AnchorSide[akBottom].Control:=B;
Determines if the Control uses an anchor on the side specified in Kind.
Sets the value for the Control property.
New value for the property.
Sets the value for the Side property.
New value for the property.
Gets the owner of the persistent object.
TPersistent
Owner of the persistent object.
Constructor for the class instance.

Create is the constructor for the class instance.

Create calls the inherited constructor, and sets the values in the Owner, Kind, and Side properties. The default value for Side is asrTop.

Owner of the class instance.
TAnchorKind value for the Kind property.
Destructor for the class instance.
Get information about the target control, side and side position.
The control we are anchored to.
The side we are anchored to.
Position of the side to anchor to.
Checks for anchor cycles and invalid targets, and returns information about the target side.
Can raise an exception with the message: 'TAnchorSide.CheckSidePosition invalid Side'.
False when errors have been found.
The control we are anchored to.
The side we are anchored to.
Position of the side to anchor to.
Copies properties from the specified persistent object into the current class instance.

Assign is an overridden method in TAnchorSide used to copy property values from the persistent object in Source into the current class instance. When Source is derived from TAnchorSide, the following properties are copied:

- Side
- Control

If Source is not derived from TAnchorSide, the inherited method is called using Source as an argument.

TPersistent
Persistent object with the properties copied in the method.
True when we are anchored to our parent, at least on the 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 elements, 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 // contains Edit1

and

Button1.AnchorSide[akRight].Side // contains 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 when an Action is assigned to the control. TControl.Action effectively becomes TControl.ActionLink.Action.

An ActionLink propagates changes in 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.
TBasicActionLink
The control linked to the action.
Sets the client's Caption, if the old values match.
TActionLink.SetCaption
Sets the client's Enabled property, if the old values match.
Sets client's Hint, if the old values match.
Sets the HelpContext, if the old Help properties match (IsHelpLinked).
Sets the HelpKeyword, if the old Help properties match (IsHelpLinked).
Sets the HelpType, if the old Help properties match (IsHelpLinked).
Sets the Visible property in the client, if the old values match.
Set OnClick handler for the client, if the old values match.
True if the client's OnClick is the action's OnExecute handler.
Compose the hint string, depending on HintShortCuts.
TApplication.HintShortCuts
Always True.
The hint to show.
Help properties are assumed linked only when all these properties match.
Compares the HelpContext, HelpKeyword and HelpType properties.
TActionLink.IsHelpLinked
True only if all three Control properties match the Action properties.
Class of
Exception raised when a loop is detected when adjusting the size for controls.

ELayoutException is an Exception descendant that implements the exception raised when a loop is detected when adjusting the size for controls, or when an invalid value is assigned to the control width or height.

Represents AutoSizing phases for controls.

TControlAutoSizePhase is an enumerated type with values that represent phases or steps in the auto-sizing process for controls. Values from TControlAutoSizePhase are stored in the TControlAutoSizePhases set type.

Create/Destroy handles.
Makes a handle visible.
Type used for
Type used to implement an OnShowHint event handler.
TObject for the event notification.
Hint information used to derive hint value.
Handler type for OnContextPopup.
The clicked control.
Mouse position in client coordinates; (-1,-1) if the event was not generated by a mouse 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, and unset by TControl.Loaded when all controls for the form have 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.
Indicates if the rectangle in the base bounds for a control is valid.
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 on all platforms.
Smartphone platforms use this one, the x axis is stretched to fill the screen and the y axis 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.
Something to be ignored. For example a blank space between other objects.
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 generic column in a table.
A list of choices that the user can select from.
A controls which displays and possibly allows one to choose a date.
A grid control which displays cells.
A control which groups others, such as a TGroupBox.
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 generic row in a table.
A control to scroll another one.
A control which allows one to increment / decrement a value.
A control with tabs, like TPageControl.
Text inside of a control, like text in a row cell.
A multi-line text editor (for example: TMemo, SynEdit).
A single-line text editor (for example: TEdit).
A control that holds ToolButtons.
A button on a ToolBar.
A control which allows one to drag a slider.
A list of items in a tree structure.
An item in a tree structure.
An item that doesn't fit any of the other categories.
A top level window.
Implements an enumerator for a list of TLazAccessibleObject instances.
Gets the value for the Current property.
Value for the property.
Current value for the enumerator.
Represents an accessibility object for user or accessibility tool interactions.

Every TControl has a TLazAccessibleObject instance 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, while TCustomControl descendants will use the accessibility properties provided by LCL itself.

User applications should add accessibility for their own TCustomControl descendant classes, and possibly customize the descriptions of some elements. It is also possible to make an accessible object invisible to the user, which is done by setting its AccessibleRole property to larIgnored.

Accessibility support in Lazarus is also documented on the Wiki at: .

Gets the value for the Position property.
Value for the property.
Gets the value for the Size property.
Value for the property.
Sets the value for the Handle property.
New value for the property.
Sets the value for the Position property.
New value for the Position property.
Sets the value for the Size property.
New value for the property.
Member with the Handle for the accessibility object.
Member with the AVL tree for the sorted child objects.
Member with the value for AccessibleName.
Member with the value for AccessibleDescription.
Member with the value for AccessibleValue.
Member with the value for AccessibleRole.
Gets the value for the AccessibleValue property.
Value for the property.
Gets the value for the Handle property.
Value for the property.
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.
Constructor for the class instance.
Destructor for the class instance.
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.
Sets the value for AccessibleName.
New value for the AccessibleName property.
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 and returns a new child accessiblity object.
Child accessibility object created in the method.
Inserts an already created child accessible object as a child of this one.
Removes all children of this control; freed if they are not attached to a TControl instance.
Removes a child accessible object.
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.
Searches in sub-controls for the first child accessibility object.
Searches in sub-controls for the next child accessibility object.
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 for the control.
The name for this accessible object.
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.
Default enumerator for the children.
The base class for visible controls.
Array of the installable notification handlers.
Intended ClientSize, initialized during loading.
Internal handler for a changed Action, invoked from the ActionLink.

When an action is assigned to the control, related properties are updated using ActionChange.

The changed Action.
Gets the value for the AccessibleDescription property.
Value for the property.
Gets the value for the AccessibleValue property.
Value for the property.
Gets the value for the AccessibleRole property.
Value for the property.
Value for the AutoSizingAll property.
Returns the value for the Text property.

Uses RealGetText (which reads the Caption member), instead of GetTextBuf (which calls WM_GETTEXT), when possible.

The value for the Text property.
Generate MouseEnter and MouseLeave events.
Adjust the intended (given) Bounds, according to Constraints.
Performs the message handler for mouse button down messages; calls the MouseDown handler.
Performs the message handler for mouse button up messages; calls the MouseUp handler.
Sets the value for the AccessibleDescription property.
New value for the property.
Sets the value for the AccessibleValue property.
New value for the property.
Sets the value for the AccessibleRole property.
New value for the property.
Sets the value for the indexed AnchorSide property.
Index for the element updated in the method.
New value for the AnchorSize property.
Sets the value for the BorderSpacing property.
New value for the BorderSpacing property.
Sets the value for the Constraints property.
New value for the Constraints property.
Sets the value for the Text property.
Uses the RealSetText method instead of SetTextBuf, when possible.
The new value for the Text property.
Member with the accessibility object for the control.
Sets the value for the Visible property.
New value for the Visible property.
Performs actions when the handle for the parent control is freed.

Has an empty implementation in TControl. Must be implement in descendents classes.

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.

Run DoAutoSize until done.
Sets AutoSizing=true, used to prevent loops.
End of the auto-sizing process, resets AutoSizing to False.
Request further processing after an anchor side was changed.
Ignored.
Requests further processing after an anchor side has changed, that anchors another control to this one.
Sets the value for the AutoSize property.
TControl.AutoSize
New value for the AutoSize property.
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 to 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.
Implements the storage specifier for the Caption property.

Returns True if ActionLink has not been assigned, or its IsCaptionLinked property is set to False.

Returns True if ActionLink has not been assigned, or its IsCaptionLinked property is set to False.
Sends Move and Size messages through the LCL message paths.

Overridden in TWinControl; in TControl it's a NOP. This method simulates the VCL behavior and has no real effect.

Invokes the OnConstrainedResize handler.
Override this method to return the preferred height and width for the control.

Calculates the preferred width and height for a control, which is used by the LCL auto-sizing algorithms as the default size. Negative or zero (0) values 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.

When WithThemeSpace contains True, space is added for stacking.

For example: TRadioButton has a minimum size. But for stacking multiple TRadioButtons there should be some space around the controls. 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.
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 layout engine in the LCL.

SetBounds calls ChangeBounds internally with KeepBase set to False, while the LCL layout engine calls it with KeepBase set to 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.

Scale the minimum and maximum Width and Height.
ScaleConstraints is called during ChangeScale, you never will call it directly.
Applies scaling (multiplier and divider) to the coordinates and Font in a control.
Function to determine if auto-sizing 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.
Determine if a parent control is involved in the alignment process.
Gets the value for the ClientRect property.

Returns the size for the visual client area in the control. For example, the inner size of a TGroupBox. For a TScrollBox it is the visual size, and not the logical size.

The return value is a TRect instance with the Top and Left members set to 0, and the Height and Width members set to the corresponding property values for the control.

TControl.ClientRect
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.

For 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 actual visible part of the control.

For 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.
TScrollingWinControl.GetClientScrollOffset
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.
Value for the property.
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.
True while auto-sizing 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.
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.
Handles mouse wheel messages for the control.
Mouse wheel message handled in the method.
Handles horizontal mouse wheel messages for the control.
Mouse wheel message handled in the method.
Message handler for control moved.
Message handler for changed control size.
Message handler for changed control position.
Handles CM_CHANGED control messages for the control.

Calls the WindowProc method in the Parent control (when assigned) to handle the control message in Message.

Control message handled in the method.
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...).
Handles the CM_CURSORCHANGED message for the control.

At run-time, the SetTempCursor method is called to apply the temporary cursor shape in the Cursor property. No actions are performed in the method at design-time.

Control message handled in the method.
Saves the docked and undocked extent of the control.

In the floating state, it sets UndockWidth/Height to the current Width/Height. In docked state, it sets LRDockWidth/TBDockHeight to the current Width/Height.

Please 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.
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.
Determines 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, a dockable TWinControl may need a 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.
Not implemented in TControl.
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.
Adjusts the control's position and extent for the new docksite.

DoDock is an Internal method, called by Dock, to performs actions needed when a control is docked to a docksite.

If NewDockSite=Nil, Parent is set to Nil (in preparation of floating the control). Otherwise ARect is ignored, 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:

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.
dmDragEnter, dmDragLeave, dmDragMove
  Notification of mouse moves. Invokes DragOver, or DockOver if docking. Result indicates acceptance of a drop.
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. If the DragObject has been AutoCreated, the dragged control is passed as the Source. Otherwise, the DragObject itself is passed as Source.

Contains the result for the Drag message.

The Result member is polymorphic:

For dmFindTarget, the result is a reference to the the target control. For dmDragDropm the result is zero (0). For other drag messages, the result indicates acceptance of the drop message.

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 cancelled 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.

Please note: 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.

Calls the DockManager.PositionDockRect in 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.
Converts the coordinates in the specified mouse message from SmallInt to LongInt.
TPoint instance with the LongInt values for the mouse cursor position.
TSmallPoint instance with the values converted in the method.
Handler for MouseDown events.

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

Which buttons are down.
Which of Ctrl, Shift or Alt keys are also pressed.
Horizontal Mouse position in client coordinates.
Vertical 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.
Horizontal Mouse position in client coordinates.
Vertical Mouse position in client coordinates.
Invokes the OnMouseUp handler.
The currently pressed modifier keys.
The currently pressed mouse buttons.
Horizontal Mouse position in client coordinates.
Vertical Mouse position in client coordinates.
Invokes the OnMouseEnter handler.
Invokes the OnMouseLeave handler.
Do something useful with accelerators etc.
This method is called even if the control is disabled or hidden. Provided for VCL compatibility.
Show the Cursor shape, unless it's crDefault.
Call this method whenever a change has occurred, 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.
Updates control flags and reads the data for the component.
TComponent
TReader instance used to read the component data.
Performs actions needed when LCL component streaming has been completed.
TComponent
Called when the control and its child controls have been loaded, and their control state is changed.

LoadedAll is a procedure called when the control (and its child controls) have been loaded using the LCL component streaming mechanism, and csLoading is removed from their control state. LoadedAll is called from the Loaded method.

Defines which non-published properties should be streamed (none here).
Implements assignment of the control to an Action object, or calls the inherited method.

Properties copied in the method include:

- Enabled
- Hint
- Caption
- Visible
- OnExecute (copied to OnClick in the destination object)
- HelpContext
- HelpKeyword
- HelpType

TPersistent.Assign
Destination object which receives values copied in the method.
Called when the update of the containing Form has ended.
Request a repaint of the control.
Handles changes to the Font property.

FontChanged is a procedure used to perform actions needed when the value in the Font property has been changed for the control. FontChanged ensures that values in ParentFont and DesktopFont are set to False to reflect the font assignment.

FontChanged calls the Invalidate method to force the control to be redrawn when it is Visible. The CM_FONTCHANGED control change message is performed to reflect the change in the control state. When AutoSize contains True, the InvalidatePreferredSize and AdjustSize methods are called to update the control dimensions using the new font.

FontChanged is assigned to the OnChange event handler for the Font property in the constructor for the class instance.

Class instance generating the change notification.
[Delphi compatible] Does nothing here, all work is done in CMParentFontChanged.
Returns the Caption property.
This method is called by GetText, when GetTextBuf has not been overridden.
Value for the Caption property.
Sets the value for the Caption property.

RealSetText is a method used to apply the TCaption value in AValue to the text or caption for the control. RealSetText is called by the private SetText method, when SetTextBuf has not been overridden.

Notes on TControl.Caption, TControl.Text, et. al.

The Delphi VCL implementation relies on the virtual GetTextBuf and SetTextBuf methods to exchange text for controls.. This requires a lot of (unnecessary) copies to move values between Text and Caption.

The LCL uses strings to exchange text values because it is more efficient. To maintain VCL compatibility, the virtual RealGetText and RealSetText methods were introduced. These functions use the LCLInterface. The default GetTextBuf and SetTextBuf implementations calls the RealGetText and RealSetText methods as needed. As long as the GetTextBuf and/or SetTextBuf aren't overridden, GetText and SetText call RealGetText and RealSetText to avoid copying PChar values.

To keep things optimal, LCL implementations should always override RealGetText and RealSetText. GetTextBuf and SetTextBuf are only kept for compatibility with Delphi code.

The string value to store in the Text / Caption properties.
Handles changes of the Text property.
Returns the cached Text property (FCaption).
True if successful.
Here: FCaption (can be overridden).
Sets the value for the Action property.

Ensures that ActionLink is updated when the value for the property is updated. When Value is unassigned (Nil), ActionLink is freed and set to Nil. The control style flags are also updated to remove the value csActionClient. Otherwise, a new ActionLink class instance is created for ActionLink and Value is assigned to its Action property. Its OnChange handler is assigned, and the ActionChange method is called to apply values from the action to the control.

New value for the Action property.
Sets the value for the Color property.

SetColor is a method used to set the value for the Color property to the specified TColor value. Assigning a value to Color causes the ParentColor property to be set to False.

SetColor calls Perform to send a CM_COLORCHANGED control message to the widgetset class. Invalidate is called to force the control to be redrawn.

New value for the Color property.
Sets the value for the Enabled property.

Calls EnabledChanging to notify handlers for the chtOnEnabledChanged type. Stores the new value for the property, and performs a CM_ENABLEDCHANGED control message. Calls EnabledChanged to notify handlers for the chtOnEnabledChanged type.

New value for the Enabled property.
Sets the value for the Hint property.

Value is a TTranslateString type which allows it be recognized and processed in the LCL translation facilities.

New value for the Hint property.
Sets the value for the Name property.
TComponent.Name
New value for the Name property.
Sets the value for the Parent property.
New value for the the Parent property.
Sets the Parent property, if NewParentComponent is a TWinControl.
Internal handler for activities after a form widget has been created.

Called by ChildHandlesCreated of parent form.

Functions like GetTextWidth require a valid widget and a device context. That is why AutoSizing is delayed until the handle in a parent Form is allocated.

Gets the value for the MouseCapture property.

Indicates if the class instance is the current CaptureControl for the LCL framework. The property value is True when the following condition are satisfied:

- Parent is assigned (not Nil).
- Parent has an allocated window handle.
- The value in the LCL CaptureContol variable is the current class instance.

True when the current class instance is the LCL CaptureControl.
Handler for mouse capture moved to a different control.

Notifies the DragManager of a change to the capture control, and to stop dragging this control. A very dangerous implementation; it can cause an immediate abort of dragging before dragging really starts.

Notification handler for insertion or deletion of components.

First, the inherited TComponent.Notification is called to notify all attached notification handlers.

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

TComponent.Notification
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 bounds for the control.

The device context.
Returns the window handle of the device context.
Gets the value for the Enabled property.
Value for the Enabled property.
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.
Invokes the OnMouseWheelDown handler.
True if handled.
Invokes the OnMouseWheelUp handler.
True if handled.
Performs actions needed to handle horizontal mouse wheel events.
True when the mouse wheel event has been handled for the control.
Shift state for the mouse wheel event.
Number of units (or clicks) the mouse wheel was moved.
TPoint with the mouse coordinates for the event.
Performs the OnMouseWheelLeft event handler.
Performs the OnMouseWheelRight event handler.
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.
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 occurred.
Passes key events for the specified type to the handlers added to the control.
Passes mouse wheel events to the handlers added to the control.
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).
Applies layout changes using the specified policies and proportions to the control.
Applies the design-time PPI and resizes the specified control font.

Performs actions needed to restore the design-time PPI (Pixels Per Inch) for controls when they are loaded using the LCL component streaming mechanism. The design-time PPI for fonts is not stored in .LFM files, and could result in invalid scaling operations when loaded on a machine with a different display density. DoFixDesignFontPPI ensures that the font is resized to the specified design-time PPI.

Adjusts the height for a Font to the specified pixels per inch.
Font examined and updated in the method.
Pixels per inch setting adjusted in the method.
Scaling factor a applied to the font.
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.
Link to the default Action associated with this control.
Allows to use the desktop font for text display in this control.
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).

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.

Use the Color from the Parent control, when enabled.

ParentColor determines if the control should use the Color from the Parent control, when enabled. The default value is True.

When this property is True, all changes to the Color of the parent will also be applied to the Color of the control, ensuring that they both contain same value. If the Color of the control is changed by the application, then ParentColor will be automatically set to False.

Using ParentColor when the Color value is clDefault can cause problems in resolving the actual color value. To obtain the Color property of a control while taking into account clDefault and ParentColor, use the GetColorResolvingParent method. This method might return a non-RGB color, but will never return clDefault. To obtain a purely RGB result use the GetRGBColorResolvingParent method.

If true, the Font of the control will be the same as the one from the Parent. Default is true.

While ParentFont is True, all changes to the font of the parent will also be applied to the font for the control. This synchronizes them, keeping them set to the same value. If the Font for the control is changed by the application, then ParentFont will automatically be 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 ParentShowHint is True, all changes to the ShowHint property of the parent will also be applied to the ShowHint property for the control. This synchronizes them, keeping them with the same value. If the ShowHint property for the control is changed by the application, then ParentShowHint will automatically be set to False.

The stored (saved) properties of the current session, expressed as a string.
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 the mentioned conversions.

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

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.

Event handler for triple mouse clicks.
Event handler for quadruple mouse clicks.
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.
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 movement within the control.
Event handler for mouse button going up.
Event handler for mouse entering the area of the control.
Event handler for mouse leaving the area of the control.
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.

Event handler for downward movement of mouse wheel.
Event handler for upward movement of the mouse wheel.
Event handler for horizontal movements of the mouse wheel.
Event handler for left movements of the mouse wheel.
Event handler for right movements of the mouse wheel.
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 signalled when editing is done.

The user has finished editing the value for the control, and the resulting text can be validated. It is called (when assigned) from the EditingDone method, which occurs when focus changes to another control.

Deprecated.
DEPRECATED. Enables valid use of the 'IN' operator (this is a hack for speed). It will be replaced by the use of the widgetset classes. So, don't use it anymore.
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 new Bounds for the control. Expressed in screen coordinates when NewDockSite is Nil. Otherwise, client coordinates for 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 successfully floated.
The screen area where the floating control is moved; or the client area for a floating host site.
Replaces a previously docked control.

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

Delphi introduced a different 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.
Indicates if the control has a host dock site.

Docked is a Boolean function which indicates if the control instance is docked to a host docking site. The return value is True when all of the following conditions are met:

- Parent is assigned (not Nil).
- Parent has the same value as the HostDockSite property.
- Parent has a parent form with a different value than Parent itsself.

GetParentForm
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 a TLazAccessibleObject instance for this control.

CreateAccessibleObject should just create and return the object instance. It is useful for classes derived from a descendant of TLazAccessibleObject (instead of the base class).

Returns the currently selected child accessible object.

GetSelectedChildAccessibleObject is provided for controls which wish to override this behavior without sub-classing TLazAccessibleObject.

Returns the child accessibility object at the given position for the control.

GetChildAccessibleObjectAtPos returns the accesibility object at the position expressed in client coordinates. This method is provided for controls which wish to override this behavior without sub-classing TLazAccessibleObject.

Scales a size value from the design-time PPI to the run-time PPI for the parent form.
Scaled sized value.
Original size value scaled in the method.
Scales a size value from the run-time PPI for the parent form to the design-time PPI.
Scaled sized value.
Original size value scaled in the method.
Scales a size value from 96 PPI to the run-time PPI for the Screen.
Scaled size value.
Original size value scaled in the method.
Scales a size value from the PPI for the Parent form (or designer control) to 96 PPI.
Scaled size value.
Original size value scaled in the method.
Scales a size value from 96 PPI to the PPI setting for the Font in the control.
Scaled sized value.
Original size value scaled in the method.
Scales a size value from the PPI setting in the Font for the control to 96 PPI.
Scaled size value.
Original size value scaled in the method.
Scales a size value from the PPI setting for the Screen to the PPI setting for the Font in the control.
Scaled size value.
Original size value scaled in the method.
Scales a size value from the PPI setting for the Font to the PPI setting for the Screen.
Scaled size value.
Size value scaled in the method.
Scales a size value from 96 PPI to the PPI setting for the Screen.
Scaled size value.
Size value scaled in the method.
Scales a size value from the PPI setting for the Screen to 96 PPI.
Scaled size value.
Size value scaled in the method.
Smart way to DoAutoSize.

AdjustSize is the same as Delphi the TWinControl.DoAutoSize method. But since DoAutoSize is commonly overridden in descendent 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.

Auto-sizing phases enabled for the control.

AutoSizePhases is a TControlAutoSizePhases function used to get the Autosizing phases enabled for the control. In general, the values in AutoSizePhases depend on the TWinControlFlag values enabled for the control.

For TControl, the values from the Parent control are used. If the Parent control is unassigned, the value is an empty set ([]).

For TWinControl, the value from the Parent control are used (when a Parent has been assigned). Otherwise, the windows control flags are used to get the return value. For example:

wcfCreatingHandle,wcfCreatingChildHandles
  Includes caspCreatingHandles in the set
wcfRealizingBounds
  Includes caspRealizingBounds in the set
wcfUpdateShowing
  Includes caspShowing in the set

In addition, AutoSizingAll forces caspComputingBounds to be included in the set. caspChangingProperties is included when the internal auto-sizing lock count has a value greater than zero (0).

Set with the TControlAutoSizePhase values.
Returns true if auto-sizing must be has been delayed, until some other process is complete.
True if auto-sizing has been delayed.
Returns a string with a debugging message for delayed auto-size requests.
Returns true if AutoSize should be skipped or delayed because of its handle.

A TControl instance does not have a handle, so it needs a parent control.

Anchor to Sibling at Side.

Setup AnchorSide to anchor a side to a neighboring sibling control. 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 neighbor 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.
The list of controls anchored to this one.
Sets the bounds (Left, Top, Width, Height) of the control.

SetBounds can be used to change the Left, Top, Width, and Height properties as a single action. This reduces the overhead required for the common operation. Use DisableAutoSize and EnableAutoSize to reduce the overhead for recomputing/moving/resizing even further.

SetBounds is also called when any one of these properties, or the BoundsRect property is set. SetBounds updates BaseBounds and BaseParentClientSize, which are used by the anchoring mechanism to keep the spacing between controls. 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 the KeepBase argument set to 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.
X coordinate for the top, left pixel.
Y coordinate for the top, left pixel.
Width of control.
Height of control.
Set the bounds, keeping the base values.

SetBoundsKeepBase is a procedure used to set the bounds for a Control to the specified values without affecting the bounds in a Parent control.

SetBoundsKeepBase calls the ChangeBounds method to update the sized and position for the control to the specified values. If you use this in a custom control, disable LCL auto-sizing for this control prior to calling the method.

SetBoundsKeepBase is used in the implementation for several methods, including:

- WMSize
- WMMove
- WMWindowPosChanged
- DoAutoSize
- DoAutoAdjustLayout
- DoUndock
- Loaded

New Left coordinate for the control.
New Right coordinate for the control.
New Width for the control.
New Height for the control.
Returns default/preferred height and width, for use in auto-sizing.

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.

When False, the values will be adjusted by the constraints, and undefined values will be replaced by GetDefaultWidth/GetDefaultHeight.
If true, adds space for stacking.
Gets the scaling factor for the canvas used to render the control.
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.
GetColorResolvingParent is a convenience routine used to obtain the Color for the control while resolving clDefault. It will never return clDefault, but it might return a 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 TColor value.
The client coordinate of the given side.
Message handler for preferred size changed.
Marks the preferred size as invalid for this control and all parents (implies that we will look for another).
Returns the sides which are anchored to the Parent.
Disables automatic sizing; implies that the default size 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.
The rectangle of the designed bounds.
The current Bounds can change, due to scaling, anchoring or auto-sizing.
Reflects the Bounds for the Control read during LCL component streaming.

ReadBounds is a read-only TRect property used when the values for the Top, Left, Height and Width properties are set during LCL component streaming. When ComponentState contains csLoading, changes to these properties cause the new values to be applied to ReadBounds prior to calling the SetBounds method. The internal ControlFlags are also updated to indicate that the property value has been loaded using LCL component streaming.

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.

Used for debugging.
Applies an automatic adjustment layout policy to the control.

AutoAdjustLayout can be used to alter PPI settings, scale the control, or apply changes to height or width without scaling.

AMode indicates the layout policy applied in the method, and the actions performed to achieve the task.

Scaling factors are calculated (when needed) for both horizontal (X-axis) and vertical (Y-axis ) adjustments. The factors may represent changes to the PPI settings, or changes in the width for the control.

AutoAdjustLayout temporarily disables auto-sizing, and calls DoAutoAdjustLayout to apply the scaling factors or size changes.

Indicates whether the height and/or width for a control can be automatically adjusted.

In TControl, both AWidth and AHeight are set to True when the AutoSize property has not been enabled.

True if the width can be auto-adjusted.
True if the height can be auto-adjusted.
Corrects the font size for High-DPI-aware applications.

FixDesignFontsPPI is a method used to adjust the font size when the design-time PPI (Pixels per Inch) setting differs from the run-time PPI setting for the font in the control. It calls DoFixDesignFontPPI to restore the value in ADesignTimePPI to the Font reference passed as an argument to to the method. The font height is scaled using the factor represented by TFont.PixelsPerInch/ADesignTimePPI.

This method does not trigger a CM_PARENTFONTCHANGED message in the Parent control.

In TControl, this action is performed for the Font property. In descendent class, additional properties with a font reference may also be adjusted using the method.

FixDesignFontsPPI is called when scaling is enabled, and the Form which hosts the control calls its Loaded method when LCL streaming is completed.

Design-time PPI setting applied for the font size adjustment.
Resizes a font to the specified Pixels per Inch setting.

ScaleFontsPPI is a method used to resize a font in the control to the specified display density (Pixels per Inch) using the scaling factor in AProportion (when needed).

A font may need to be scaled when the run-time PPI setting for the screen differs from the design-time value applied to the font. If the font height is not assigned at run-time, its height is set to the value in TFont.PixelsPerInch / Screen.PixelsPerInch.

When AToPPI has a positive non-zero value, it is stored in the TFont.PixelsPerInch property for the font. Otherwise, the existing TFont.PixelsPerInch value is adjusted using the scaling factor in AProportion.

ScaleFontsPPI may be overridden in descendent controls to call the method for its child controls.

ScaleFontsPPI is called form the AutoAdjustLayout method.

PPI setting to apply to the font.
Scaling factor applied to the font height.
Constructor for the class instance.

Create is the overridden constructor for the class instance. Create calls the inherited constructor using TheOwner as the owner for the class instance. Resources are allocated in the method for members in the class instance, and the default values are set for the following properties:

- Align
- Anchors
- BaseBounds
- CaptureMouseButtons
- Color
- ControlStyle
- Cursor
- DesktopFont
- DragCursor
- Enabled
- FloatingDockSiteClass
- Font
- HelpType
- IsControl
- ParentBidiMode
- ParentColor
- ParentFont
- ParentShowHint
- Visible
- WindowProc

Create ensures that auto-sizing is disabled until the class instance is fully realized. Auto-sizing is re-enabled on exit from the method.
The owning component.
Removes the control from its Parent.

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

TLCLComponent.Destroy TComponent.Destroy
Performs notifications to before destruction handlers added to the control.
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.
Ends a drag operation by notifying the drag manager.
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 the control that is the top-most parent.
Finds the sub-component with the specified name in the components property.

FindSubComponent is a TComponent function used to get the sub-component with the name specified in AName. FindSubComponent is similar to TComponent.FindComponent, but accepts a prefixed component name in AName. For example: 'LabeledEdit1.EditLabel'.

FindSubComponent separates the value in AName into the owner and sub-component names. When a prefix is used, the FindComponent method is called to locate the TComponent instance with the owner name. Its FindComponent method is called to get the component with the sub-component name that is used in the return value. If a prefix is not used, the initial component is used as the return value.

The return value is Nil if a component is not found with the specified name.

TComponent.FindComponent TComponent.Components
The component with the specified name, or Nil when not found.
Parentage/path for the sub-component to retrieve in the method.
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.
Provides access to the value in the protected ParentColor property.

Checks the value in the member for the protected ParentColor property. Used in places where we need to check ParentColor property from TControl. Needed for widgetset classes.

True when ParentColor is set to True.
Provides access to the value in the protected ParentFont property.

Checks the value in the member for the protected ParentFont property. Used in places where we need to check ParentFont from TControl. Needed for widgetset classes.

True when ParentFont is set to True.
True if the form is being updated.

The return value is True a value has been assigned to Parent, and its FormIsUpdating method returns True.

True if the form is being updated.
True while painting the control.

As the name implies, the cfProcessingWMPaint flag in FControlFlags is set while a LM_PAINT message is processed, and IsProcessingPaintMsg checks this flag.

True when the control flags contain a value for paint methods.
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 is the current class instance (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 not covered by other controls will be visible.

Changes the cursor shape temporarily, preserving the original
The temporary cursor shape for the control.
Internal method called by a Form when its DefaultControl or CancelControl has changed.
This method is overridden in TCustomButton, where it updates the Cancel and Default properties for the control.
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.

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.

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 concrete 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.
Converts control-relative coordinates to absolute screen coordinates.
Converts the screen coordinates for the control to the screen coordinates for the specified parent control.

ClientToParent is a TPoint function used to convert the screen coordinates for the control to the screen coordinates for the specified parent control. If Aparent is unassigned, the Parent property for the control is used in the method.

ClientToParent calls the IsParentOf method in AParent to determine if control is in its control hierarchy. An EInvalidOperation exception is raised if the return value from IsParentOf is False.

The return value is determined by converting the client coordinates for the control to screen coordinates, and asking the parent control to convert them back to the client coordinates for the parent control.

ClientToParent is used, for instance, in the TScrollingWinControl.ScrollInView method.

TPoint instance with the client coordinates adjusted to the parent control.
TPoint instance with the client coordinates for the control.
Parent control with the bounds for the adjusted coordinates.
Converts the screen coordinates for the parent control to the screen coordinates for the control.
Get the visible part of a possibly scrolled client area.

If Scrolled is False, the ScrollOffset is ignored, so that the ClientRect is returned. Returns the Client rectangle relative to the left and top for the control. If Scrolled is true, the rectangle is moved by the current scrolling values (for an example see TScrollingWincontrol).

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 children').
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.
Adds an handler for the OnKeyDown event.
Removes an handler for the OnKeyDown event.
Adds a handler for OnBeforeDestruction events.
Removes a handler for OnBeforeDestruction events.
Adds a handler for OnMouseWheel events.
Removes a handler for OnMouseWheel events.
Contains the accessible name for the control.
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 the accessibility description in TControl.
The accessible value of the control.

The accessible value of the control. For example, for TLabel it would be the same as the Caption property. 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.
The Action associated with the control.

Action is a TBasicAction property with the action assigned to the control. The value for the property is read from the Action property in ActionLink (when assigned). If ActionLink has not been assigned, the property value is Nil.

Assigning an action to the property causes ActionLink to be updated. If the new property value is Nil, the TControlActionLink instance in ActionLink is freed and control style flags are updated to remove the value csActionClient.

Conversely, a TControlActionLink instance is created for a non-empty action assignment. Its OnChange event handler is set to the private DoActionChange method in the class instance. Control style flags are updated to include the value csActionClient.

Action is used in the Click method to signal its OnExecute event handler when assigned and enabled. Preference is given to the OnClick in the control (when assigned).

Values in the Caption, Enabled, HelpType, and Hint properties can be linked to the Action through the property values in the ActionLink.

Use AssignTo to copy property values in the control to a TCustomAction instance.

TBasicAction
Specifies the placement of the control inside its Parent.

Align is a TAlign property which specifies how the control is aligned to its parent control. The default value for the property is alNone.

alNone
  The control is not aligned. It uses it Top, Left, Height, and Width to place the control in the parent.
alTop
  Aligns the control to the top of the parent control, and adjusts it Width to fill the parent control.
alBottom
  Aligns the control to the bottom of the parent control, and adjusts its Width to fill the parent control.
alLeft
  Aligns the control to the left edge of the parent control, and adjusts its Height to fill the parent control.
alRight
  Aligns the control to the right edge of the parent control, and adjusts its Height to fill the parent control.
alClient
  Aligns the control fill the unused Height and Width for the parent control.
alCustom
  Aligns the control by calling the OnAlignInsertBefore or OnAlignPosition event handlers in the parent control.

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.

The anchored side of the control.
Allows automatic adjustment of the size for the control, according to its content.

The action performed 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 value for the property is False, and disables auto-sizing for the control instance.

Using AutoSize
Determines the inner and outer border spacing for this control.

The outer border determines the minimum distance to sibling controls. The inner border is the space between the BoundsRect and ClientRect for the control.

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

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

The BoundsRect rectangle describes the Top, Left and Bottom, Right coordinates for 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, occurring 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, that indicates 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 Top, Left pixel (in the client area) of the control.

Only TWinControl has a client area. For other controls, ClientOrigin is the same as ControlOrigin. Uses the corresponding property in the Parent control to get the property value, and includes the values in Left and Top to get the effective origin for the control.

An EInvalidOperation exception is raised if Parent has not been assigned when reading the value for the property.

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

Raises an EInvalidOperation exception with the message in sParentRequired if Parent has not been assigned when reading the value for the property.
Size of the client area for the control.

Contains the size for the visual client area in the control. For example, the inner size of a TGroupBox. For a TScrollBox it is the visual size, and not the logical size.

The property value is a TRect instance with the Top and Left members set to 0, and the Height and Width members set to the corresponding property values for the control.

TRect
The width of the client area of the control.
The background color of the control.

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

TColor
The minimum and maximum Width and Height for the control.
The top, left pixel of the 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.
Determines whether the control reacts on mouse or keyboard input.
Disabled controls usually appear 'greyed-out'
The font to be used for text display in this control.
TFont
Determines whether this object shall be streamed as a control.
Delphi compatible property, affecting only the streaming of Form properties.
True when the mouse has entered the control.
True when the mouse is in the client area for the control.
Event handler for a change of the Bounds of the control.
TNotifyEvent
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.

TNotifyEvent
Notification handler for a resize of the control.

This event is triggered after the Width, Height, ClientWidth or ClientHeight of the control has changed, and before the LCL sends the new size to the widgetset. The size of the underlying widget (e.g. unit LCLIntf function GetWindowSize and GetClientRect) may differ from the control's Width/Height/ClientRect during OnResize. During auto-size 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 behavior, use OnConstrainedResize instead.

Common mistake: Keep in mind that ClientWidth and ClientHeight can change even when Width and Height stay 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.

TNotifyEvent
Event Handler when a hint shall be shown.
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.

A context-sensitive menu that pops up when the right mouse button is clicked over this control.
TPopupMenu
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 the OnShowHint event handler.

Allows the control, and all of its children, to be displayed or hidden.

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 general message handler for this control.
Preprocesses several messages, then calls Dispatch to invoke the applicable message handler.
The message to handle.
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.

TLMessage
How the control is currently docked. (horizontally, vertically, in a notebook, or not at all).

The property value is assigned when the control is inserted into a docking tree during a drag and dock operation. Its value is used when CalculateDockSizes is called to adjust the height or width for the host dock site.

Determines whether the control is floating (not part of a form).
The class for a floating host dock site for this control.
The host site (TWinControl) into which this control is docked. Nil if not docked.
The Width when last docked, with siblings to the left or right.
The Height when last docked, with siblings above or below.
Height for the control when undocked.
Width for the control when undocked.
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.
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.

Allows to use the BiDiMode settings in the Parent control. Default is true.
Contains anchor aligment information used to position the control with its left edge anchored to another control.

AnchorSideLeft is a TAnchorSide property with information about the side, type, alignment, and control used to anchor align the class instance. AnchorSideLeft provides access to the array element in AnchorSide stored at the position in akLeft.

Contains anchor aligment information used to position the control with its top edge anchored to another control.

AnchorSideTop is a TAnchorSide property with information about the side, type, alignment, and control used to anchor align the class instance. AnchorSideTop provides access to the array element in AnchorSide stored at the position in akTop.

Contains anchor aligment information used to position the control with its right edge anchored to another control.

AnchorSideRight is a TAnchorSide property with information about the side, type, alignment, and control used to anchor align the class instance. AnchorSideRight provides access to the array element in AnchorSide stored at the position in akRight.

Contains anchor aligment information used to position the control with its bottom edge anchored to another control.

AnchorSideTop is a TAnchorSide property with information about the side, type, alignment, and control used to anchor align the class instance. AnchorSideTop provides access to the array element in AnchorSide stored at the position in akTop.

The shape of the mouse pointer, when the mouse is over this control.
The client coordinate of the left edge of the control.
The vertical size of the control.
The text to show in the Hint window for this control.
The client coordinate of the top edge of the control.
The horizontal extent of the control.
Determines whether context-sensitive Help is selected by numeric ID or keyword.
The keyword for context-sensitive Help on this control.
The ID for context-sensitive Help on this control.
Integer type for
Type of a callback method, to be called for all children of a control.
The child control.
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.
Defines the logic used to wrap child controls.
No wrapping.
Arranges controls in a row filled from left to right, and then top to bottom. Uses the value in BiDiMode; when it contains bdRightToLeft the horizontal direction is reversed (Right to Left).
Arranges controls in columns, from top to bottom and then left to right.
How child controls are sized relative to their parent.

TControlChildSizing is a TPersistent descendant which provides properties and methods used to layout, align, and resize child controls relative to their parent. Properties are provide which define the horizontal and vertical spacing between controls, the preferred direction controls are aligned, and whether controls are scaled to fit in the parent control.

See and for details about the enumeration values used in the properties.

Notifies the Control and invokes the OnChange handler.
Constructor for the class instance.

Create is the constructor for the class instance. Create calls the inherited constructor, and sets the default values for properties including:

Control
  Set to the value in the OwnerControl argument
Layout
  Set to cclNone
EnlargeHorizontal, EnlargeVertical, ShrinkHorizontal, ShrinkVertical
  Set to crsAnchorAligning

Control which owns the class instance.
Copies property values from the specified persistent object into the current class instance.
Persistent object with the property values copied in the method.
Copies property values from the current class instance to the specified persistent object.
Persistent object where the property values are stored.
Determines whether the specified sizing contains the same values as the current class instance.

IsEqual is a Boolean function used to determine whether the TControlChildSizing instance in Sizing contains the same values as the current class instance. IsEqual compares the following properties to determine the return value:

- EnlargeHorizontal
- EnlargeVertical
- ShrinkHorizontal
- EnlargeHorizontal
- ShrinkVertica
- EnlargeVertical
- ShrinkHorizontal
- ShrinkVertical
- ControlsPerLine
- Layout
- LeftRightSpacing
- TopBottomSpacing
- HorizontalSpacing
- VerticalSpacing

The return value is True when the properties contain equivalent values in both class instances.

True when the specified sizing contains the same values as the current class instance.
TControlChildSizing class instance compared in the method.
Set all spacing 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 when the 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 subsequent size messages sent by the widget.
Set when the adjusted ClientRect is valid.
Only used for TCustomPairSplitter / TPairSplitter.
Only used for TCustomPairSplitter / TPairSplitter.
Set of TWinControlFlag enumeration values.
Flags for finding a control at a given (client) position.

TControlAtPosFlag is an enumeration type with values that indicate the mechanism used to locate a control at a given client position.

capfAllowDisabled
  Include disabled controls
capfAllowWinControls
  Do not find WinControls if False
capfOnlyClientAreas
  Hit client areas only
capfRecursive
  Search in child controls
capfHasScrollOffset
  Scroll offset is already included in the coordinates
capfOnlyWinControls
  Include only TWinControls (ignore TControls)

Values from the enumeration are stored in the TControlAtPosFlags type.

TControlAtPosFlag enumeration values are used in the implementation of the ControlAtPos method in TWinControl, and in the FindControlAtPosition function.

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.
Include only TWinControls (and ignore TControls) when set.
Used in custom alignment (alCustom).
This record was added for compatibility with Delphi releases after Version 7. It is used in CustomInsertBefore and CustomAlignPosition methods and handlers.
The list of controls currently being aligned.
Index of current control.
The kind of alignment currently processed (always alCustom).
For internal use.
Type of an OnAlignInsertBefore handler.
The handler determines the order used to align both controls.
True if Control2 shall be placed before Control1 is placed.
The Parent control.
Type of an OnAlignPosition handler.
Handler which positions the Control using the specified coordinates.
TWinControl generating the event notification.
The control to position.
New Left coordinate for the control.
New Top coordinate for the control.
New Width for the control.
New Height for the control.
The remaining ClientRect.
Information about the current align process.
Implements an enumerator for TWinControl instances.

TWinControlEnumerator is a class used to implement an enumerator for TWinControl class instances. TWinControlEnumerator provides support the enumerator interface through its GetCurrent and MoveNext methods.

TWinControlEnumerator is the type returned by the GetEnumeratorControls and GetEnumeratorControlsReverse functions in TWinControl.

Member with the current position for the enumerator.
Member which indicates the order for the enumerator.
Member with the Parent for the enumerated values.
Gets the current enumerator value.
The enumerator instance.
Constructor for the class instance.
Control which is the Parent for the enumerator.
The enumerator uses ascending order when True (default).
Gets the enumerator for the class.
Moves to the next value using the ordering in effect for the enumerator.
Next value for the enumerator.
Gets the current value for the enumerator.
The base class for controls which can contain other (child) controls.

TWinControl is a TControl descendant which implements a base class for controls that can contain child controls. The name reflects the fact that (on Windows platforms) the controls are based on OS-provided widgets, which have window Handles.

The bounds as sent to the widget. Used to suppress feedback messages from the widget.
Aligns the control and its child controls.

AlignControl is a procedure used to align the control (and its child controls) relative to the control specified in AControl. AControl can contain the value Nil to indicate a containing control is not used to align the control instance.

AlignControl calls DisableAlign on entry, and EnableAlign prior to exiting from the method.

Please note: No actions are performed in the method when the control is being freed (the value csDestroying is in ComponentState).

AlignControl gets the client rectangle used to display the control, and calls AdjustClientRect to allocate border spacing when needed. AlignControls is called to align child controls relative to the control in AControl using the calculated client rectangle. Some widget sets update their client rectangle when the first child is positioned; a second call to AlignControls is made if the client rectangle is altered in the initial call to the method.

AlignControl is used in the implementation of the DoAllAutoSize method in TControl.

Control which provides the relative position for the control and its children.
Implements the storage specifier for the DoubleBuffered property.

Contains True when a parent control has not enabled its DoubleBuffered property.

Gets the value for the IsSpecialSubControl property.
Value for the property.
Sets the value for the DesignerDeleting property.
New value for the property.
New value for the Handle property.
New value for the BorderWidth property.
New value for the ParentWindow property.
New value for the TabOrder property.
New value for the TabStop property.
Places a control at the specified position in the tab order for Controls.

UpdateTabOrder is a procedure used to place the current control at the position in NewTabOrder in its Parent control. Causes the TabOrder for child controls in Parent to be re-sequenced as needed.

No actions are performed in the method when Parent is unassigned (contains Nil).

New tab order for the current control.
Inserts or appends the specified control to the list of child controls.

Insert is an overloaded procedure used to insert or append the control specified in AControl to the list of child controls in the class instance. An overloaded variant has an Index argument which specifies the position in the list.

No actions are performed in the method when AControl has not been assigned (contains Nil).

Insert raises an exception if AControl already has an assigned Parent, or when AControl is the same as the current class instance.

The ListInsert routine is called to store AControl in the Controls property at the position contained in Index. If AControl is a TWinControl instance, it is added to the internal list which maintains the tab order for child controls. At design-time, the TabStop property in AControl is automatically set to True when its CanTab property is enabled.

Insert sets the Parent property in AControl to the current control instance.

Inserts checks to see whether auto-sizing has been disabled in the AControl argument. When disabled in the child control, it is also disabled in the current class instance.

Insert is used in the implementation for the InsertControl method.

Raises an EInvalidOperation exception when the inserted control already has a Parent.

Raises an EInvalidOperation exception when the inserted control is the same as the current class instance. Uses the exception message in rsAControlCanNotHaveItselfAsParent.

Control to insert or append as a child control.
Position where the new control is stored in the Controls property.
Removes the specified control from the list of child Controls for the class instance.

Remove is a procedure used to remove the control in AControl from the list of child Controls for the class instance. No actions are performed in the method when AControl has not been assigned (contains Nil).

Remove ensures that the value in AControl is removed from the Controls property, and the internal list used to determine alignment order of the child controls. When AControl is a TWinControl instance, it is removed from the internal tab order list for child controls.

Remove sets the Parent property in AControl to Nil.

Remove checks to see whether auto-sizing has been disabled in the AControl argument. When disabled in the child control, it is re-enabled for the current class instance.

Remove is used in the implementation of the RemoveControl method.

Control removed from the list of child Controls in the class instance.
Fills the list with the child 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.
Various window control state flags.
Override this method when the ClientRect for a control differs from the default value.
It is called often, so don't use expensive code here, or cache the resulting client rectangle.
Returns the adjusted ClientRect, using the cached value if available.
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 for a custom-aligned child control, using the OnAlignPosition handler.

The derived coordinates take into account the anchoring for AControl.

The OnAlignPosition handler can update 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 position/align all given controls.
True when all controls have been placed.
The alignment of all given controls.
The controls to be placed.
Called after a change in 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.
Sends the control's new bounds to the widget.
Called by RealizeBounds.
Checks for changes in BoundsRect, and sends the new bounds to the widget using DoSendBoundsToInterface.
Sends changed BoundsRects to the widget, for this and all child controls.
Resets the bounds rectangle for the control.

Creates a new, empty TRect instance for the internal member passed to the widgetset class. Used in widgetset methods which apply changes to the Font for the control.

An empty implementation in the current LCL version.

An empty implementation in the current LCL version.

Creation parameters for the subclass.
Class name for the control added as a subclass.
Updates the size and extent of the control and its ClientRect.

Changing the ClientRect here, to the most probable size, reduces unnecessary resize messages.

Normally, the ClientWidth / ClientHeight are adjusted automatically by the widget. But it is up to the widget when this will be done. GTK, for example, just puts resize requests in a queue. The LCL would resize the child components immediately after the GTK procedure to adjust the ClientRect. On complex forms with lots of nested controls, this would result in thousands of resize messages.

Shrinks or enlarges the control to accommodate its children.

Because this method is frequently overridden, the LCL calls the method instead; it 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

Called by DoAllAutoSize after all bounds are computed.
TCustomForm.AllAutoSized
Override this method to return a different preferred height and/or width for auto-sizing.

Calls the inherited method to calculate the default / preferred width and height for a TWinControl instance. It is used by the LCL auto-sizing algorithms as the default size. Only positive values are valid. Negative or 0 (Zero) values are treated as undefined, and the LCL uses other values to perform auto-sizing.

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 relies on the current theme and widgetset.

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

WithThemeSpace adds space for stacking when set to True. For example: TRadioButton has a minimum size. But for stacking multiple TRadioButtons there should be space around each control. This space is theme- dependent, so it is passed as a parameter to the widget set.

Indicates if additional space is reserved for theme services.
Calculates the width and height for the frame area around the control.

Calculated as follows:

- AWidth is the difference between Width and ClientWidth.
- AHeight is the difference between Height and ClientHeight.

Width used for the frame around the control.
Height used for the frame around the control.
Calls the specified procedure for each child control owned by the control in Root.
The callback procedure.
Owner of the affected controls.
Returns True if the specified class is allowed in child controls.
True when allowed.
Class type examined in the method.
Paints all child controls which do not have a Handle.

Controls which do not descend from TWinControl have no handle of their own; they are repainted when the parent control is redrawn.

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 a clipped portion (child control) on the specified device context.
Creates the Brush, if not already created.
Scales (resizes) all child controls.
Scales (resizes) the control and all of its child controls.
Handler for a changed BiDiMode message; notifies the widget and all child controls.
Handler for changed Border property messages; adjusts and invalidates the control.
Message examined in the method.
Handler for changes to the DoubleBuffered property.

CMDoubleBufferedChanged is the handler used to process CM_PARENTDOUBLEBUFFEREDCHANGED messages when the value in DoubleBuffered has been been changed.

CMDoubleBufferedChanged calls NotifyControls to apply the message in the widget set class; the value in the Message argument is ignored.

CMDoubleBufferedChanged calls Invalidate to cause the control to be redrawn.

Message examined in the method.
Handler for changed Enabled message; notifies the widgetset.
Handles the CM_PARENTDOUBLEBUFFEREDCHANGED control message for the control (when enabled).

Sets the value in ParentDoubleBuffered to True. When Parent is assigned, the value in DoubleBufferred is set to the corresponding value from the Parent control.

No actions are performed in the method if ParentDoubleBuffered is already set to False.

Message handled in the method.
Handler for changed Showing message; notifies the widgetset.
Handler for changed ShowHint message; notifies all child controls.
Handles Focus changes, and forces UpdateControlState.
Handler for changed Visible message.
Handles the CM_ENTER control message for the control.

CM_ENTER and CM_EXIT messages occur when the active control is changed on a form.

Calls DoEnter to signal the OnEnter event handler (when assigned).

Message handled in the method.
Handles the CM_EXIT control message for the control.

CM_ENTER and CM_EXIT messages occur when the active control is changed on a form.

Calls DoExit to signal the OnExit event handler (when assigned).

Handler for an ContextMenu event; eventually delegates handling to the affected child control.
Erases the background, when required.
Handles (dispatches) notification messages.
Handler for receiving Focus event.
Handles the LM_KILLFOCUS message for the control.

WMKillFocus is a method used to handle the LM_KILLFOCUS control message received when a control loses focus. WMKillFocus ensures that the EditingDone method is called for the control when the parent form has been assigned and is Active.

No actions are performed in the method at design-time, or when the control is being freed.

GetParentForm
Message examined in the method.
Handler for changed visibility notification.
Handles the LM_ENTER message for the control.
Message handled in the method.
Handles the LM_EXIT message for the control.
Message handled in the method.
Event handler for a key press not handled by the widget; Tries
Event handler for system key presses not handled by the widget; tries
Event handler for key released, not handled by the widget. Tries .
Event handler for system key releases not handled by the widget; tries
Handler for messages sent by the widget, after it has handled the key press itself.
Handler for messages sent by the widget, after it has handled the key press itself.
Manages paint requests, and 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 the internal BoundsRealized member 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 the internal BoundsRealized member. Avoids 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 key press 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 the inherited method.

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 for messages from the DragManager including: dmEnter, dmLeave, and dmMove. Gets the DockRect to show.

Positions the DockRect, and invokes OnDockOver (via DoDockOver).

Everything can be overridden using the OnDockOver handler, when assigned.

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 the DockManager of an undocked client control.

The OnUnDock handler can deny the undocking request for the control. This can cause problems; instead, the control better should not be draggable.

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 for the dock site, and can be adjusted in the OnGetSiteInfo event 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.
Gets the handle for the Parent control.

GetParentHandle is a HWND function used to get the handle for the Parent in the current control. The return value contains the handle for the TWinControl instance in Parent (when assigned). When unassigned, the handle in ParentWindow is used as the return value.

Control or window handle that is the parent for the current control.
Gets the window handle for the parent control at the top of the control hierarchy.

GetTopParentHandle is a HWND function used to get the window handle for the first control in the parent control hierarchy. The value in Parent is recusrively searched until Parent is not assigned.

The return value is the ParentWindow property in the top-most control. If ParentWindow is 0 (the unassigned value), the value in its Handle property is used.

Window handle for the top-most parent control in the hierarchy.
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.
Returns the dock caption in AControl.

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

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.

Key event handlers are invoked in sequence, until a handler is located which responds to the key.

First, all application wide handlers are invoked (TApplication.NotifyKeyDownBeforeHandler).

Second, the form handler is invoked when KeyPreview is requested.

Third, the DragManager is used to determine the dragging status for the control. It interprets the ESC key as a cancel dragging request, and the CTRL key as a request to ignore drag targets.

Finally, the user handler is invoked.

If none of the handlers accept / respond to the key, the widget set class is used to process the key.

TApplication.NotifyKeyDownBeforeHandler
Set to True when the key was handled.
Message examined in the method.
Handles key down messages which are not handled by the widget.
True if the key was handled.
Handles key up messages which are not handled by the widget.
True if the key was handled.
Tries all OnKeyPress handlers; the Parent OnKeyPress handler is tried first.
True if the key was handled.
Tries all OnUTF8KeyPress handlers; the Parent OnUTF8KeyPress handler is tried first.
True if the key was handled.
UTF-8-encoded character examined in the method.
Handles a KeyUp event before the widget processes the key.

For details, see the method.

True if the key was handled.
Message examined in the method.
Applies the key message using ChildKey in the parent control.
True if the key was handled.
Forwards the key message to the parent form to be handled as an accelerator (shortcut) key.

No actions are performed in the method when accelerator keys are not enabled for the LCL interface, or when ParentForm is unassigned for the control.

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.
An empty implementation in the current LCL version.

An empty implementation in the current LCL version.

Invokes the OnKeyPress handler.
Invokes the OnKeyUp handler.
Invokes the OnKeyUp handler.
An empty implementation in the current LCL version.

An empty implementation in the current LCL version.

Invokes the OnUTF8KeyPress handler.
Returns the preceding or next control in the tab order.

When CurrentControl is Nil, the first control (forward) or last control (backward) in the TabOrder is returned; direction depends on the value in 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.
Gets the top, left screen coordinates for the client area in the control.
TControl.GetClientOrigin
TPoint instance with the screen coordinates for the origin of the control.
Gets the value for the ClientRect property.

GetClientRect is an overridden method in TWinControl used to get the value for the ClientRect property. ClientRect contains the visual client area for the control.

GetClientRect extends the ancestor method to synchronize values in the control and its widgetset class using the Handle for the control. It uses values in ComponentState and the control flags for the TWinControl instance to determine the actions needed in the method. If an action cannot be determined, or the handle is not available, values in ClientWidth and ClientHeight are used as the Width and Height in the TRect instance.

TControl.GetClientRect
Value for the ClientRect property.
The screen coordinates for the control.
TControl.GetControlOrigin
Gets the value for the ParentBackground property.
Value for the property.
Sends the mouse message to a child control.
True if a child control was found at the mouse coordinates.
Creates the Handle for the widget, if not already created.
Initializes the window creation parameter record with the settings for the control.

CreateParams is a procedure used to initialize and/or update creation parameters in the Params argument. CreateParams is called from the CreateWnd method when the window handle is allocated for the control.

CreateParams ensures that values in the TCreateParams record instance contain the values needed for the class instance. The following members in the record are update:

Caption
  Set to the value in the Caption property.
Style
  Includes flag values: WS_CHILD, WS_CLIPSIBLINGS, WS_CLIPCHILDREN, and WS_TABSTOP when needed.
ExStyle
  Includes style values needed for the value in ControlStyle and BorderStyle.
WndParent
  Set to the handle in ParentWindow, or Parent.Handle when assigned.
X, Y, Width, Height
  Set to the property values in the class instance.

TCreateParams
Create parameters updated in the method.
Creates the interface object (widget) and assigns the value in Handle.

Raises a catchable debugger exception for various conditions, including:

- The control, or its Parent, has the value csDestroying in the ComponentState property.
- The method has been called recursively, as indicated by values in the window control flags.
- The method has been called at run-time before LCL component streaming has been completed.
- The Handle was not successfully created in the widgetset class.

Ensures that the realized bounds for the control is reset prior to creating the Handle for the control and any child Controls. An EInvalidOperation exception is raised if the handle for the Parent control is not valid when the method is called.

Calls the InvalidatePreferredSize method for the control, and any child controls, and calls AdjustSize. If an error occurred while creating the Handle, auto-sizing is not enabled for the control.

CreateWnd is called from the CreateHandle method.

Destroys the handle for the control and all child controls.
Destroys the interface object (widget).
Flip children horizontally (mirrors the Left position).

Child controls arranged in left-to-right order appear in right-to-left order after flipping. All anchors are adjusted accordingly.

Prepares to remove the window (called before the Handle is destroyed).
Assigns sequential TabOrder values to all child controls.
Copies cached control properties to the just created widget.

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

Called when the control has been loaded from a resource, transfers the loaded property values to the widget.
Realizes all cached changes after a bulk update of the form. Calls inherited FormEndUpdated, then informs each child control.
This method allows handling messages in Windows.
Called after all child handles for the ParentForm are created; notifies all children of the end of the handle creation phase.
Called after all child handles have been created; resets wcfCreatingChildHandles.
Gets the value for the MouseCapture property.

GetMouseCapture is a Boolean function used to get the value for the MouseCapture property. It is overridden in TWinControl to ensure that the Handle for the control has been allocated. The return value is True when HandleAllocated returns True, and GetCaptureControl returns the current class instance.

Value for the MouseCapture property.
Sets the text / caption for the control.

RealSetText is an overridden method in TWinControl. It ensures that the new value is applied to the widgetset class when its Handle has been allocated, and the control size is adjusted when needed/enabled. The inherited method is called to apply AValue to the Text and/or Caption properties for the control.

New value for the text / caption for the control.
Notifies the parent when the control loses focus.
Sets the value for the Color property.

SetColor is an overridden method in TWinControl used to set the value for the Color property. It calls the inherited method on entry, and ensures that the new property value is applied to the internal TBrush instance used in the control. This includes translating the value clDefault to the actual brush color used for the platform.

If the Handle has been allocated for the control, the widgetset class is updated. Otherwise, control flags are updated to include the value wcfColorChanged.

The NotifyControls method is called to post the CM_PARENTCOLORCHANGED control message to the child controls.

Updates the position of the child control in the Z plane (i.e. front-to-back).
Sets the value for the ParentBackground property.
New value for the property.
Asks the parent to show itself.
The control to show, here: ignored!
Updates the visible state for the control; updates the widget set class when 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, and notifies the DockManager.

Handles the following messages:

LM_SETFOCUS
  Gets the parent form and show this control as focused
LM_KILLFOCUS
  Removes focus from this control
LM_NCHITTEST
  Checks the transparency for the control, etc.
Mouse messages
  Sent to the DockManager

Sends text to the widget (from WM_SETTEXT?).
The text to send.
For internal use; allows direct access to the Handle for the control, bypassing any getter/setter methods.
Allows a border (line) to be displayed around the control.
Provides information about the DockSite for the control.

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 dragging operation for the control.

OnGetSiteInfo occurs before the OnDockOver event handler.

This handler can provide a special DockCaption, different than the Caption default.
Indicates if the control uses the background for its Parent control.

ParentBackground is a Boolean property which indicates if the background for the Parent control is drawn as the background for the current control instance.

ParentBackground is True when csParentBackground is included in the ControlStyle property. Setting the value in ParentBackground causes ControlStyle to be updated to include or exclude the csParentBackground enumeration value; it is included when True.

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.
TBrush
The intended ClientHeight, as sent to the widget set class.
The intended ClientWidth, as sent to the widget set class.
Parameters for child control arrangement and spacing.
The number of child controls in the Controls property.
The indexed list of immediate child controls.
The index also indicates the Z-order of the child controls, zero for the topmost.
Index of the requested control.
The default WndProc on Windows widgetset and platforms.
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 a DockManager), or unmanaged (positioning docked controls in the event handlers). The DockManager determines the placement for 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 is set to True. Setting UseDockManager to True creates the DockManager using the DefaultDockManagerClass for this DockSite, if not previously assigned.

An unmanaged DockSite, without a 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 are typically 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 bitmap buffer 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 additional changes are required in application or custom control code.

A reference to the widget, associated with this control.
Used in Carbon and Cocoa widgetsets

IsFlipped is a read-only Boolean property. It is used in the Carbon and Cocoa widgetsets for these Mac platforms.

Check IsResizing and drop or delay changes to the control, until the new size has been determined.
Determines the sequence of control navigation when the user presses the Tab key.
Allows the user to navigate to this control, by pressing the Tab key.
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.
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 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 key codes. Control keys should be handled by an OnKeyDown handler instead. The handler can also be used to convert the character into a different one.

We recommend using OnUTF8KeyPress to prevent data loss. Characters are converted from UTF-8 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 be used to disallow undocking.

Handler for a character entered by the user.

This handler receives characters codes only, not control or other special key codes. Control keys should be handled by an OnKeyDown handler instead. The event handler can also convert the character code into a different value.

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

Value from the DoubleBuffered property in a Parent control.
The Handle for the parent widget.
Cached widget visibility, not necessarily in sync with the widget.
Determines whether a DockManager is used for this DockSite.

When UseDockManager is set to True, and DockSite is also set to True, a DockManager is created automatically. When set to False, an existing DockManager is ignored.

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

Indicates whether the wcfDesignerDeleting flag is included in the flags for the control.

DesignerDeleting is a Boolean property which indicates if the wcfDesignerDeleting is includes in the control flags for the TWinControl instance. When set to True, wcfDesignerDeleting is included in the control flag values. When set to False, it is removed. Used in TPairSplitter only.

Indicates if the control has the wcfSpecialSubControl control flag.

IsSpecialSubControl is a read-only Boolean property. Its vale is True when wcfSpecialSubControl has been included in the WinControlFlags for the control. Used in TCustomPairSplitter only.

The number of visible docked controls.
Translates state flags into AutoSizePhases.
Returns true if AutoSize should be skipped / delayed because of its handle.
Starts an update to the Bounds property; disables SetBounds by incrementing BoundsLockCount.
Ends an update to the Bounds property; decrements BoundsLockCount and eventually calls SetBounds.
Disables sending bounds to the widget, by incrementing the internal 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 for the given control.
True when we are a parent of Control.
The control examined as a child control.
Asks the widget if ClientRect has changed since the last AlignControl execution; calls AdjustSize on change.
The ClientRect is cached; call this procedure to invalidate the cache, so that the next ClientRect value is fetched from the widget set class.
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.
Returns the Client rectangle relative to the controls left, top.

If Scrolled is true, the rectangle is moved by the current scrolling values (for an example see TScrollingWincontrol).

TControl.GetChildrenRect
Disables auto-sizing for the control and its parent.
Re-enables auto-sizing for the control and its parent.
Scrolls the control using the handle for the widget set class.
Raises an Exception if the handle has not been allocated for the widget set class instance. Raised with the message 'TWinControl.ScrollBy_WS: Handle not allocated'.
Scrolls the control (and all child controls) by the specified amounts.
Increment for Left.
Increment for Top.
Automatically adjusts the size and layout for the control (and all of its children).

AutoAdjustLayout is an overridden procedure used to automatically adjust the size and layout for the control. All children in the Controls property also call their AutoAdjustLayout method, and the inherited method is called to adjust and resize the current control instance.

AutoAdjustLayout calls DisableAutoSizing on entry, and EnableAutoSizing prior to exit from the method.

Layout mode applied in the method.
Constructor for the class instance.

Create is the overridden constructor for the class instance. Create calls the inherited method using TheOwner as the owner for the class instance. Create allocates resources needed in the class instance, and sets the default values for the following properties:

ParentDoubleBuffered
  Set to True
ChildSizing
  Sets DoChildSizingChange as the OnChange event handler
Brush
  Set to Nil; few controls require a brush, and it is created on DoRemainingKeyDown
TabOrder
  Set to -1
TabStop
  Set to False

Create calls the InvalidateClientRectCache method to invalidate a cached client rectangle, and to force the value to be read from the LCL interface.

Owner of the class instance.
Constructor for a control that is the child of the given widget.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance.

Destroy call RemoveFocus to ensure that the control cannot receive focus from a Parent control. If a handle has been allocated for the windowed control, the DestroyHandle method is called.

Destroy iterates over Controls to remove the value in the Parent property for each child control, and to remove an assigned HostDockSite. It does not actually free the child Controls; they are freed by the owner of the control instance (usually a TForm instance).

Destroy ensures that any controls in the DockClients property remove the current class instance from their host dock site.

Destroy frees resources allocated in the constructor, or in other class methods, including the DockManager and DockCients. Destroy calls the inherited destructor prior to exiting from the method.

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, updates its Parent, HostDockSite, and the DockClients for the old and new DockSite.

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

Finally, an OnDockDrop event is signalled.

Is this control allowed to receive the focus when parent form is visible?

Checks if the control can get focus when parent form is visible, i.e. if all its parents except the form are visible and enabled.

A possible usage:

if FormFoo.EditFoo.CanFocus then FormFoo.ActiveControl := FormFoo.EditFoo;
CanFocus returns True even if the parent form isn't actually visible, and a subsequent SetFocus call could throw an exception. Use CanSetFocus in this case.
Is this control allowed to receive the focus?

Checks if the control can receive focus, i.e. if all its parents are visible and enabled.

A possible usage:

if MyControl.CanSetFocus then MyControl.SetFocus;

CanSetFocus should be preferred over CanFocus if used in CanSetFocus/SetFocus combination because it checks also if the parent form can receive focus and thus prevents the "cannot focus an invisible window" LCL exception.

Finds the index value for the given control, in
The ordinal position in Controls, -1 if not found.
The child control to locate in the method.
Checks whether the control has focus.
True when the control has focus.
Sets the focus to the next (or preceding) control.
True when the focus has been transferred.
The direction of Tab movement; 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 non-zero, the message already has been handled; otherwise, set the Result to a non-zero value (depending on the message ID) when the message has been handled.

TObject.DefaultHandler
The message to process.
Schedules a repaint request.
This implementation calls the Invalidate method for the widget.
Tells the widgetset to add a Handle object to a parent Handle object.
Inserts the specified control into the Controls property.
The control to insert.
Insert at index (optional).
Removes the specified control from the Controls property.
The control to remove.
Gets an enumerator for the Controls property.
The TWinControlEnumerator instance.
Gets a reverse-order enumerator for the Controls property.
The TWinControlEnumerator instance.
Ensures that the control or window handle has focus.

SetFocus is a procedure used to give focus to the current control. SetFocus calls GetParentForm for the control instance, and uses its FocusControl method to change the focused control.

If the parent Form is unassigned (contains Nil), the LCL interface is used to change focus to the handle for the control. No actions are performed in the method when Form is unassigned and the control does not have an allocated handle.

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 a repeat count into multiple keystrokes. Cannot be used 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.
Searches for a Parent form that can be used as a file drop target.
The TCustomForm instance that allows file drop actions, or Nil when file drag/drop is not supported.
Paints the control using the handle for the widget set class.

PaintTo is a procedure used to draw the control using the handle for the widget set class. An overloaded variant is provided which uses the handle in a TCanvas instance as the target for the drawing operation.

Device context (or Handle) used for the operation.
Horizontal coordinate where the control is drawn.
Vertical coordinate where the control is drawn.
TCanvas instance with the handle used in the operation.
Specifies the non-rectangular shape of the widget.

SetShape is an overloaded procedure used to set the shape for the control to the non-rectangular value in AShape. The overloaded methods allow AShape to be either a TBitmap or a TRegion value.

When TBitmap is used, the widget set class calls its SetShape method to apply the TBitmap handle to the handle for the widget. No actions are performed in the method when a handle has not been allocated for the widget set class.

When TRegion is used, SetWindowRgn in the LCL interface is called to apply the region in AShape to the handle for the control.

Shape for the control; TBitmap or TRegion in overloaded 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 do not contain other controls. Since lightweight controls do not wrap GUI widgets, they use fewer resources than controls based on TWinControl. If you want to accept keyboard input, or need to support child controls, use a TCustomControl instead.

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.

TCanvas
Event handler for paint messages.
Override this method with your own painting code.
The default implementation invokes the OnPaint handler.
Performs actions when the handle for the parent control is freed.

DoOnParentHandleDestruction is overridden in TGraphicControl to re-implement the method in the ancestor class. It ensures that Handle for the Canvas is freed when the parent handler is destroyed.

Supply your own OnPaint handler for painting the control.
Handles the CM_CURSORCHANGED message for the control.

CMCursorChanged is an overridden method in TGraphicControl. It ensures that the control is Visible before the temporary cursor shape is changed.

Visible must be set to True, and the Parent control (with the window handle) must be assigned before the control can be displayed. No actions are performed in the method if Visible is False, or Parent is Nil.

In addition, the mouse must be over the control to apply the cursor shape using SetTempCursor and the value in the Cursor property.

Constructor for the class instance.
Owner of the class instance.
Destructor for the class instance.
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 Canvas dimensions from the Parent control.

TCanvas
The base class for windowed controls which paint themselves.

In contrast to TGraphicControl, a TCustomControl can accept keyboard input (and receive 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.
Sets the value for the Color property

SetColor is an overridden method in TCustomControl used to set the value in the Color property. It calls the inherited method on entry, and applies the new color value to the Brush in the control Canvas.

TControl.Color TWinControl.SetColor
New value for the Color property.
Override this method in your derived class with your own paint handler.
Constructor for the class instance.
Owner for the class instance.
Destructor for the class instance.

Destroy is the overridden destructor for the class instance.

It calls RemoveFocus to prevent the Parent control from giving focus to the free control. It destroys the Handle for the control, and ensures that the control is removed as a Parent or DockSite for its child controls. It does not free the child controls; they are freed by their owner.

Controls in the DockClient property are updated to remove the class instance from the HostDockSite property in the docking clients.

Destroy frees resource allocated in the constructor, and calls the inherited method proper to exit.

The drawing surface for the control, see TCanvas for details.
TCanvas
Supply your own OnPaint handler for painting the control.
Implements the abstract ancestor class used to get the property list for a control.
Parses the string into the given list.
Represents a node in a TDockTree

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

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

The number of visible children.
Constructor for the class instance.
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.
The first visible child zone.
The next visible zone.
The zone, or Nil if none found.
The next visible zone.
The preceding visible zone.
Inserts NewZone as preceding or following sibling.
The zone to add.
How to add the zone.
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.
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 for the dock zone.
The dock tree of which this dock zone is a part.
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.
The next sibling zone.
The preceding sibling zone.
Class of
The type for a ForEachZone callback procedure, currently unused.
The iterated zone.
Represents flag values used in TDockTree.
Set type used to store values from the TDockTreeFlag enumeration.
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.

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

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

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 a control and dock it into the dock site. For example, to dock Form1 left to a Form2:

InsertControl(Form1,alLeft,Form2);

To dock 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.
Destroys the zone and its child zones.
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.
Paints the dock header of the zone containing AControl.
Updates the internal TDockTreeFlags to reflect the update status for the control

UpdateAll is a procedure used to update the internal TDockTreeFlags member to reflect the current update status for the control. UpdateAll checks an internal counter, incremented in BeginUpdate, to see if dtfUpdateAllNeeded needs to be included in or excluded from the set of flag values. It is included when the update count is greater than 0 (zero). Otherwise, it is excluded from the set.

UpdateAll is called from the EndUpdate method.

Constructor for the class instance.

Create is the overridden constructor for the class instance. TheDockSite contains the windowed control handled in the docking tree. Create calls the inherited constructor using TheDockSite as the owner for the class instance.

Creates allocates resources needed for the RootZone property, and sets the value for its border width to 4.

The window control to be managed.
Destructor for the class instance.

Frees resources allocated to the RootZone property, and calls the inherited destructor.

Starts an update process for the class instance.

BeginUpdate is an overridden method in TDockTree. It increments the internal update counter for the class. It is used to consolidate calls to the UpdateAll method until the internal counter reaches zero (0).

Finishes an update process for the class instance.

EndUpdate is an overridden method in TDockTree. BeginUpdate and EndUpdate are used to consolidate calls to the UpdateAll method. EndUpdate decrements the internal update counter, and when it reaches zero (0) calls UpdateAll to remove dtfUpdateAllNeeded from the docking tree flags.

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.

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 horizontal 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.
The class of all dock zones in this tree.
The parent control whose docked clients are managed
The root zone for the DockTree.
Class type used to create new splitter class instances.

Normally contains a reference to the TSplitter class, as assigned in the initialization section for the extctrls.pp unit.

TSplitter
Provides access to properties of the Mouse.

Contains information about the 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 for the mouse cursor.
True while dragging an object.
The number of lines to scroll with every notch or unit on the mouse wheel
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
Array with sets of anchors used for a given alignment option.

AnchorAlign is an array constant that contains elements with TAnchors set values. Values in AnchorAlign are indexed by TAlign enumeration values. This allows the TAlign value to retrieve the set of Anchors used for the specified align option. For example:

AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
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.
Gets the control at the specified screen position.

FindControlAtPosition is a TControl function used to get the control at the specified screen position. When AllowDisabled is True, a disabled control can also be located in the routine. 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 found at the specified Position; Nil when not found.
The screen position examined in the routine.
Finds disabled controls when True.
Find the window and its owning control at the given screen coordinates

FindLCLWindow is a TWinControl function used to find the window (and its owner control) at the specified screen coordinates.

FindLCLWindow gets the Handle for the window and checks to ensure it is enabled. When it is not enabled, or AllowDisabled is False, parent handles are examined until a suitable window is located. FindOwnerControl is called for the handle to get the return value. The return value is Nil if a Window was not found at the specified position.

The control that owns the window at the specified screen position; Nil when a window is not found
TPoint with the screen coordinates examined in the routine.
Allows a disabled window to be returned.
Return the TWinControl for 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!

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.
Moves the origin for a windowed control.

MoveWindowOrg is a procedure used to move the origin for a windowed control to the specified position. dc contains the device context for the Window handle used in the routine. X and Y contain the new coordinates in pixels used as the origin (Left and Top respectively) for canvas drawing operations.

Device context updated in the routine.
Left coordinate for the new window origin.
Top coordinate for the new window origin.
(Re-)Creates the widget set class instance for a TWinControl.

This function was originally a 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, does not know when properties values are changed. But the widget set does. To avoid the old VCL behavior, and to provide a central function for use in the widget set, it has been moved here.

The default class used to create a DockManager in
Cancels an active drag operation.

CancelDrag is a procedure used to cancel an active drag operation. CancelDrag calls the DragStop method in the currently active DragManager.

No actions are performed in the routine when DragManager has been assigned (contains Nil), or when DragManager returns False from its IsDragging method.
Set the mouse capture to AWinControl or its child at the given coordinates.
Returns the current capturing TControl instance.

Please note: For the interface, only a Handle for TWinControl can capture the mouse. The LCL extends this to allow TControl to capture the mouse.

Used in SynEdit.
NewStyleControls
is a Boolean variable. Currently used only by SynEdit in synedit.pp.
The global Mouse object.
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.
Calls the specified procedure for each of the cursor identifiers.
String procedure called in the routine.
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.
Checks whether the handle for a windowed control (or a parent control) is transparent.

CheckTransparentWindow is procedure used to check whether the handle for a windowed control (or a parent control) is transparent. CheckTransparentWindow uses the current mouse position to locate controls or forms under the mouse rectangle. The LM_NCHITTEST message is performed for AWinControl to determine if the handle is drawn transparently. Additional Forms in the Z-Order are visited until an opaque windowed control is located. Parent controls are searched too (when needed).

CheckTransparentWindow updates the values in Handle and AWinControl to reflect the results from the search. When an overlayed control is not located, the value in Handle is set to 0, and AWinControl is set to Nil.

Checks for multiple mouse click events for the specified control.
Gets a set of state values for current modifier keys.

GetKeyShiftState is a TShiftState function used to get a set with the current state values for modifier keys. GetKeyShiftState calls GetKeyState to capture the values in the set for the following virtual keyboard keys:

VK_CONTROL
  Includes ssCtrl when the Control key is pressed
VK_SHIFT
  Includes ssShift when the Control key is pressed
VK_MENU
  Includes ssAlt when the Alt key is pressed
VK_LWIN or VK_RWIN
  Includes ssMeta when one of the WIN keys (or Alt+GR on Mac) is pressed

The return value is an empty set ([]) when none of the virtual keys have a non-zero value.

Adjusts the space around the border for the 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.

Determines if the color for the control is the system default (GTK).

Used by GTK-based widget set classes to determine if the color in a control needs to be compares to the SYS_COLOR_BASE value used in the widget set.

Gets the inverse alignment value when BiDiMode is enabled.

Applies to TAlignment value taLeftJustify and taRightJustify. taCenter is always taCenter regardless of BidiMode.

TAlignment value converted in the method.
True to flip the alignment value when BiDiMode is enabled.
Swaps left and right anchor side settings for the specified control when BiDiMode is enabled.
Flips the left and right coordinates relative to the ParentRect when Flip is True.
Flips the value Alignment to reflect the value needed for BiDi mode.
TAligment value updated in the method.
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).
TAlign value converted in the routine.
Set of TAnchorKind values converted in the routine.
Anchor side enumeration value converted in the routine.
Auto-size phase converted in the routine.
All elements in this set will be shown as a comma-separated list.
Control style flag converted in the routine.
Set of control style flags converted in the routine.
Form style value converted in the routine.
Declares an assignment operator used to convert a Variant type to a TCaption type.

Declares an assignment operator used to convert a TVariant value to a TCaption value during assignment. Casts the value in AVariant to a String type and assigns it as the return value for the operator. For example:

var AVariant: Variant; AControl: TControl; // ... AControl.Caption := AVariant;
TCaption value for the assignment operator.
Variant value converted to a TCaption value prior to assignment.
Compares the specified pointers containing a Lazarus accessibility object and a accessibility object data.
Compares the specified pointers containing Lazarus accessibility object data and a accessibility object.
Register the components provided by this unit or package, so that they can be instantiated.

Register is a procedure used to register components in this unit in the Lazarus IDE. Register adds the TImageList component on the Common Controls tab. In addition, the TCustomControl and TGraphicControl components are registered without icons.

Register can also be used to register the controls required by an application.

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

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 is essentially the same as TWinControl.DoAutoSize. But since DoAutoSize is commonly overridden in descendent components, it is not useful to perform all tests, which can result in too much overhead. To reduce the overhead, the LCL calls AdjustSize instead.

When setting AutoSize to True, the LCL auto-sizes the width and height for the control. This is one of the most complex parts of the LCL, because the result depends on nearly a hundred properties. Let's start with a simple scenario:

The LCL will only auto-size the Width or Height if it is free to resize. In other words, the width is not auto-sized 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 Constraints can also be overridden 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 auto-size 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 widget sets 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 and 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. Others do not. The LCL is more consistent, and therefore Delphi incompatible. Left and Top can be negative or bigger than the client area. Some widget sets define a minimum, and maximum somewhere around 10,000 pixels or more.

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

During resizing, or when moving, the Left and Top coordinates are not always in sync with the coordinates for the Handle object.

When Parent is unassigned (contains Nil), Left and Top depend on the widgetset and the window manager. Until Lazarus 0.9.25, this is typically the screen coordinate of the left, top of the client area for 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 starts the movement instantly. If you want to change both Left and Top, use the following instead:

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

Width and Height

The Size in pixels must not be negative; most widgetsets do not allow Width and/or Height to be Zero (0). Some controls (on some platforms )define a larger minimum constraint. Instead of sizing a control to Width=0 and/or Height=0, set Visible to False. During resizing and 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 auto-sizing.

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

Used to avoid calling OnResize with the same coordinates. This reduces user defined auto-sizing.

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.

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 overridden 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.

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 coordinates for an point in client coordinates.

How multiple controls can be aligned and resized together, at run-time.

The tree-style layout of a form allows one 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 shrunken, 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 one 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 one 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 one to center a control relative to another control.

Example2

For centering A relative to B:

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

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.