From a54e6bdce6a613fa2d8538969d4ba72c8d99b00f Mon Sep 17 00:00:00 2001
From: dsiders
TControlRolesForForm is the type returned from the TCustomForm.GetRolesForControl method.
@@ -1261,7 +1263,9 @@
+ In drag-drop operations the cursor signals acceptance or rejection of an drop, depending on Accepted.
+
+ Create is the constructor for the class instance. It stores the value from the AControl argument to the Control property.
+
+ Calls the GetDragImages method to get the TDragImageList instance with the images displayed for the Control during drag and drop / dock operations. +
++ Please note that the image list is always unassigned (Nil) in TDragObject; it is provided by an overridden method in descendent classes like TDragControlObject. +
+TDragObjectEx is a TDragObject descendant. It provides an overridden constructor which sets the AutoFree property to True.
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:
++ Usage: +
OffsetRect(DockRect, FDockOffset);
Checks the DockRect for changes against EraseDockRect, to prevent flicker.
-Remembers the drawn frame coordinates in EraseDockRect.
++ Checks the DockRect for changes against EraseDockRect, to prevent flicker. Remembers the drawn frame coordinates in EraseDockRect. +
When the target is a DockTree, DropAlign indicates the placement of the control relative to DropOnControl. Other docking methods require a specialized (derived) DragDockObject.
@@ -3272,18 +3312,30 @@
+ True when the dragged control becomes or stays floating.
+
+ The property value is assigned when the ManualDock method is called for the Control. It is set to the inverse of the KeepDockSiteSize argument passed to the ManualDock or ManualFloat methods in Control. The value is not, however, subsequently used in the current LCL implementation.
+
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.
@@ -3302,16 +3354,23 @@
+ Create is the overridden constructor for the class instance.
+ It calls the inherited constructor on entry to assign the value in AControl to the Control property. It sets the default value for the AutoFree property to True.
+
+ When the Ctrl key is released, a drop is enabled again.
+ When (and while) the Ctrl key is pressed, dropping is disabled. The Esc key aborts the current dragging operation immediately.
+ When (and while) the Ctrl key is pressed, dropping is disabled. The Esc key aborts the current dragging operation immediately.
+ The Delphi VCL sets DragImmediate=True and DragThreshold=5.
+ The Delphi VCL sets DragImmediate to True and DragThreshold to 5.
+
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. @@ -3889,7 +3965,9 @@
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. @@ -4202,7 +4293,7 @@
AutoAdjustLayout is a procedure used to automatically adjust the size of the control using the specified proportions. @@ -4695,7 +4794,9 @@
AroundLeft is a read-only Integer property which indicates the spacing used around and on the left-hand side of the control. @@ -4711,19 +4812,25 @@
- Calls DoAutoSize while the control includes cfAutoSizeNeeded in its ControlFlags property. - Called from the AdjustSize and EnableAutoSizing methods. + Calls DoAutoSize while the control includes cfAutoSizeNeeded in its ControlFlags property. Called from the AdjustSize and EnableAutoSizing methods.
Returns True if ActionLink has not been assigned, or its IsCaptionLinked property is set to False.
@@ -6933,21 +7077,38 @@
+ ConstrainedResize is a method used to signal the OnConstrainedResize event handler (when assigned) for the control.
+
+ It is called from the DoConstrainedResize method, and occurs after values from Constraints have been normalized to the constraints from the LCL interface. The normalized values are stored in the MinWidth, MinHeight, MaxWidth, and MaxHeight arguments and passed to the OnConstrainedResize event handler.
+
+ Signals the OnResize event handler (when assigned) using the control instance as the Sender for the event notification. Calls DoCallNotifyHandler to signal any handler routines using the chtOnResize handler type.
+
+ DoOnChangeBounds ensures that cfOnChangeBoundsNeeded is removed from the flag values for the control. DoOnChangeBounds signals the OnChangeBounds event handler (when assigned) using the control instance as the Sender for the event notification. Calls DoCallNotifyHandler to signal any handler routines using the chtOnChangeBounds handler type.
+
+ Calls the AdjustSize method to handle resize operations delayed during loading or handle creation.
+
@@ -7068,53 +7246,71 @@
- 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.
+ DoSetBounds is a low-level function used 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.
+ Override this to update the content layout within the control, for example scroll bars. As always: do not paint here, but call Invalidate and paint using the OnPaint handler or an overridden Paint method.
- ScaleConstraints is called from the ChangeScale method; never call it directly. Multiplier and Divider contain the values passed as arguments to the ChangeScale method.
+ ScaleConstraints is called from the ChangeScale method; never call it directly. Multiplier and Divider contain the values passed as arguments to the ChangeScale method.
- ChangeScale is amethod used to apply scaling, expressed by the Multiplier and Divider arguments, to size values in the control. These values include:
+ ChangeScale is a method used to apply scaling, expressed by the Multiplier and Divider arguments, to size values in the control. These values include:
+ The return value is True when a control in the Parent hierarchy has been assigned and has wcfAligningControls in its Window control flags. The return value is False if both conditions are not satisfied.
+
+ The overridden method may fail when the TScrollingWinControl has only one scroll bar.
+
+ Returns the origin (top, left pixel) for the control, in screen coordinates. +
+ AutoSizing is a read-only Boolean property which indicates if an auto-size operation is currently active for the control. The property value is set to True when the BeginAutoSizing method is called, and set to False in the EndAutoSizing method. These methods raise a catchable exception when AutoSizing does not contain the expected / required value. +
+- No actions are performed in the method at design-time, or when the result code in Message has non-zero value. + No actions are performed in the method at design-time, or when the result code in Message has a non-zero value.
Calls DoContextPopup to signal the OnContextPopup event handler (when assigned). No additional actions are performed in the method if the context menu was displayed and executed in the OnContextPopup event handler.
@@ -7557,200 +7801,203 @@
- Floating state is assumed when the control has a HostDockSite of FloatingDockSiteClass, and is the only docked client.
+ Floating state is assumed when the control has a HostDockSite using the FloatingDockSiteClass type, and is the only docked client.
FormEndUpdated is overridden in descendent classes, like TWinControl, which provides a container for its child controls.
@@ -8670,7 +8924,9 @@
+ Notification handlers allow components to be notified of certain events. When the registered event occurs, all installed (added) handlers are invoked.
+
+ DoCallKeyEventHandler iterates over the handler routines using the type specified in HandlerType. The routines are cast to the TKeyEvent type used to implement the handler and receives the arguments specified in Key and Shift. The current class instance is used as the Sender for the event notification.
+
+ DoCallKeyEventHandler is called from the KeyDown method in descendent classes like TWinControl.
+
+ DoCallMouseWheelEventHandler iterates over the handler routines using the type specified in HandlerType. The routines are cast to the TMouseWheelEvent type used to implement the handler and receives the arguments specified in Shift, WheelDelta, MousePos, and Handled. Iteration is halted when an event handler returns True in the Handled argument, or when all handlers for the type have been signalled.
+
+ The current class instance is used as the Sender for each of the event notifications.
+
+ DoCallMouseWheelEventHandler is called from methods like DoMouseWheel and DoMouseWheelHorz.
+
+ DoContextPopup is a method used to signal the OnContextPopup event handler (when assigned). The control instance is used as the Sender argument. Values in MousePos and Handled are also passed as parameters to the event handler. Handled should be set to True in the handler routine if the context pop-up was displayed and a menu item was executed.
+
+ The default value is crDrag. If the control cannot be dropped on a target, the cursor changes temporarily to crNoDrop. +
++ Set to dkDrag for a drag-drop operation, or to dkDock for a drag-dock operation. +
+Default is dmManual, meaning that dragging must be started in code.
++ 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).
@@ -9583,7 +9913,7 @@OnMouseUp is signalled (when assigned) from the MouseUp method. It is signalled when standard mouse events are enabled using the ControlStyle property. The event is signalled after the mouse position has been updated and the event is applied to an active DragManager. @@ -9677,7 +10009,9 @@
OnMouseEnter is a TNotifyEvent property with the event handler signalled when the mouse pointer has entered the bounds for the control. OnMouseEnter is signalled from the MouseEnter method (when assigned), and occurs after the Parent control has been notified of the event. The Sender argument contains the control for the notification, and must be cast to a TControl type to access the properties or values specific to the class type. @@ -9695,7 +10029,9 @@
OnMouseLeave is a TNotifyEvent property with the event handler signalled when the mouse pointer has left the bounds for the control. OnMouseLeave is signalled from the MouseLeave method (when assigned), and occurs after the Parent control has been notified of the event. The Sender argument contains the control for the notification, and must be cast to a TControl type to access the properties or values specific to the class type. @@ -9754,13 +10090,13 @@
The handler can provide a special DragDock object, otherwise a default object is created.
++ The handler can provide a special DragDock object, otherwise a default object is created. +
+ GetCanvasScaleFactor is a Double function used to get the scaling factor for the Canvas in the control. +
++ GetCanvasScaleFactor calls the corresponding method in the widgetset class to get the return value. For TControl and TWSControl, the return value is always 1.0. It may be overridden in descendent classes to use a value appropriate to the implementation. +
++ GetCanvasScaleFactor is used in descendent classes when selecting a scalable image resolution for images and glyphs associated with a 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. + GetRGBColorResolvingParent is a convenience routine used to get an RGB color value for the background on the control. It calls GetColorResolvingParent to translate the clDefault color value to the Brush color in a Parent control. It calls ColorToRGB to convert a color constant to its numeric equivalent and to remove any alpha channel information in the color value.
+ The return value contains the coordinate for the anchor side indicated in the Side argument. For example: +
++ Called by the LCL interface, when something changed that effects the interface values for GetPreferredSize. +
++ EnableAutoSizing is used along with DisableAutoSizing to suspend and restore auto-sizing when the Parent, alignment, layout, visibility, or state for the control is updated. An exception is raised if EnableAutoSizing is called when DisableAutoSizing has not been called. +
++ EnableAutoSizing decrements the internal counter used to track auto-sizing locks. When the counter reaches 0 (zero), the EnableAutoSizing method in the Parent control is called (when assigned). Otherwise, the DoAllAutoSize method is called to trigger the OnResize event handlers for the control. +
++ It is not generally used in application code, but is needed by component developers. +
+
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.
@@ -10727,13 +11126,20 @@
+ Formats and outputs bounds, alignment, and anchor information for the debugger.
+
AutoAdjustLayout can be used to alter PPI settings, scale the control, or apply changes to height or width without scaling.
@@ -10928,7 +11334,9 @@
ExecuteDefaultAction has an empty implementation in TControl. It can be overridden in descendent classes to perform any actions needed for the class type.
@@ -10938,7 +11346,9 @@
ExecuteCancelAction has an empty implementation in TControl. It can be overridden in descendent classes to perform any actions needed for the class type.
@@ -10948,7 +11358,9 @@
HasParent is called during streaming to decide if a component has to be streamed by its owner or Parent. @@ -11037,10 +11453,12 @@
- GetTopParent is a TControl function used to get the control which is the top-most or intial Parent in the control hierarchy. + GetTopParent is a TControl function used to get the control which is the top-most or initial Parent in the control hierarchy.
GetTopParent visits each of the control instances in the Parent property. The return value is set to control where Parent is unassigned (Nil). The return value is the current control instance (Self) if Parent has not been assigned.
@@ -11052,7 +11470,9 @@
IsVisible calls IsControlVisible to determine if the control has its Visible property set to True. At design-time, ControlStyle is also checked to ensure that csNoDesignVisible is not used in the style flags. Each of the Parent controls in the hierarchy call their IsVisible method to determine the return value for the method. @@ -11100,11 +11522,15 @@
The return value is True when the Visible property is set to True. The value is False at design-time if the ControlStyle property includes the value csNoDesignVisible. IsControlVisible does not check the visibility for parent controls in the control hierarchy. @@ -11126,7 +11552,9 @@
Returns True when both the control instance and its parent control hierarchy are enabled. Used internally by TGraphicControls for painting and various states during run-time. @@ -11134,11 +11562,15 @@
Returns the value for the protected ParentColor property. Used in places where we need to check ParentColor property from within the TControl. Needed for widgetset classes. @@ -11151,7 +11583,9 @@
Checks the value for the protected ParentFont property. Used in places where we need to check ParentFont from within TControl. Needed for widgetset classes. @@ -11196,7 +11630,9 @@
Repaint is a method called redraw the control when it is visible. No actions are performed in the method when: @@ -11371,7 +11809,9 @@
This method only exists for Delphi compatibility.
@@ -11393,12 +11833,19 @@+ In TControl, the value indicates the size for the Caption property. + Descendent classes may use a different a different property as the basis for the return value. +
+
Perform is a method used to pass a message to the processing loop for the control.
@@ -11438,17 +11887,25 @@
The APoint argument contains the screen coordinates which are converted to client-relative coordinates in the method. The X member has the horizontal coordinate, and the Y member has the vertical coordinate. @@ -11479,28 +11936,40 @@
Show calls the ShowControl method in the Parent control (when assigned) to ensure that the control instance is visible on the Parent control. Show sets the value in the Visible property to True. The value in the Visible property is not changed at design-time or when csNoDesignVisible has not been included in the ControlStyle property. @@ -11640,7 +12113,9 @@
HandleObjectShouldBeVisible is a Boolean function which indicates if the control requires a valid handle in its widgetset class instance and should be visible. The return value is set to True when the following conditions are satisfied: @@ -11691,7 +12166,9 @@
Calls the Update method in ActionLink to signal the OnUpdate event handler for the linked TBasicAction instance. No actions are performed in the method when ActionLink has not been assigned. @@ -11744,7 +12221,9 @@
The BoundsRect rectangle describes the Top, Left and Bottom, Right coordinates for the control, relative to its parent.
@@ -12351,7 +12856,7 @@ ALabel.Caption := '&Notes && Comments';
- 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.
+ 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.
Enabled is a Boolean property which indicates whether the control can respond to focus, input, or mouse events. The default value for the property is True. When Enabled is set to False, the control is displayed with a "grayed-out" appearance. It is unable to receive input focus, handle keyboard navigation or input, respond to mouse click events, or execute its Action. @@ -12462,7 +12969,9 @@ ALabel.Caption := '&Notes && Comments';
Font is a TFont property with the typeface and display attributes used for textual values on the control. Use properties in the TFont instance to change attributes like Name (for the typeface), Charset, Color, Height, Orientation (rotation degrees), Pitch, Quality, Size, and Style. Assigning a new TFont instance to the property causes the control to be redrawn. @@ -12489,7 +12998,9 @@ ALabel.Caption := '&Notes && Comments';
MouseInClient is a read-only Boolean property which indicates if the mouse pointer has entered the client area for the control. The value for the property is updated when CM_MOUSEENTER or CM_MOUSELEAVE messages are handled for the control. The property value is set to True in CMMouseEnter, and set to False in CMMouseLeave. @@ -12520,7 +13033,9 @@ ALabel.Caption := '&Notes && Comments';
OnChangeBounds is signalled from the DoOnChangeBounds method (when assigned). It occurs after the internal control flags have been updated to exclude cfOnChangeBoundsNeeded, and before DoCallNotifyHandler is called to notify handlers for the chtOnChangeBounds type. @@ -12582,7 +13097,9 @@ ALabel.Caption := '&Notes && Comments';
OnShowHint is a TControlShowHintEvent property with the event handler signalled when a hint window is displayed for the control. Arguments to the event handler include the control instance for the event notification, and a pointer to the structure with the Hint details for the control.
@@ -12610,15 +13127,23 @@ ALabel.Caption := '&Notes && Comments';
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:
+ 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:
+
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.
@@ -12664,7 +13189,9 @@ ALabel.Caption := '&Notes && Comments';
Visible is set to True by Show, or to False by Hide. Calling these methods is equivalent to setting the Visible property.
@@ -12750,13 +13277,17 @@ ALabel.Caption := '&Notes && Comments';
- 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
+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
@@ -13077,7 +13611,9 @@ ALabel.Caption := '&Notes && Comments';
HelpType is a THelpType property which indicates the mechanism used to locate and display a help topic for the control. @@ -13169,7 +13705,9 @@ ALabel.Caption := '&Notes && Comments';
TBorderWidth is an Integer type with the range of values that can be used as the width for a border on a control. TBorderWidth is the type used to implement the BorderWidth property in TWinControl and descendent classes. @@ -13181,7 +13719,9 @@ ALabel.Caption := '&Notes && Comments';
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.
++ AdjustBorderSpace is an overloaded routines used to determine the space reserved for borders on the corresponding edges of a control. AdjustBorderSpace is called from methods in a widgetset class when the its bounds and constraints are realized and child controls are aligned to the new dimensions. +
++ The overloaded variants allow the border spaces to be specified as individual Integer values or passed in a TRect instance. +
- Used by GTK-based widgetset classes to determine if the color in a control needs to be compares to the SYS_COLOR_BASE value used in the widgetset. + Used by GTK-based widgetset classes to determine if the color in a control needs to be compared to the SYS_COLOR_BASE value used in the widgetset.