diff --git a/docs/xml/lcl/forms.xml b/docs/xml/lcl/forms.xml index bba32db63c..7c4c58b04f 100644 --- a/docs/xml/lcl/forms.xml +++ b/docs/xml/lcl/forms.xml @@ -31,11 +31,11 @@
- The unit also includes the TApplication and TScreen classes used in the Application and Screen singletons. + The unit also includes the TApplication and TScreen classes used in the Application and Screen singletons.
- ++ Used to define members in control classes. +
++ Used to define members in control classes. +
+- Scrollable controls supply their own integrated scrollbars, one for horizontal and one for vertical scrolling. This class allows access to (one of) these integrated scrollbars. + Scrollable controls supply their own integrated scroll bars, one for horizontal and one for vertical scrolling. This class allows access to (one of) these integrated scroll bars.
A scrollable control has both a physical (visible) client size, and a logical (virtual) client size. @@ -278,13 +276,13 @@ The Range property reflects the total virtual client size, in pixels.
- The Page property corresponds to physical (visible) client size, in pixels, excluding the scrollbars. It also determines the size of the slider, relative to the total Range. + The Page property corresponds to physical (visible) client size, in pixels, excluding the scroll bars. It also determines the size of the slider, relative to the total Range.
The Position property reflects the virtual origin of the visible client area, equivalent to the top coordinate of the slider. The Position can be changed by the user or by code.
- Scrollbars usually appear only when Range is higher than Page, i.e. when not the entire content can be shown at the same time. See the ScrollBar property of the scrolling control for details. + Scroll bars usually appear only when Range is higher than Page, i.e. when the entire content cannot be shown at the same time. See the scroll bar properties in TScrollingWinControl for more details.
+ Provides the handle passed as an argument to routines in the LCL interface, including: +
++ Used in methods which call LCL interface routines to avoid exceptions resulting from an unassigned control or an invalid handle value. +
++ Calls the UpdateScrollBars method in the associated TScrollingWinControl instance when its handle has been allocated. No actions are performed in the method during LCL component streaming and when the component is freed. +
++ Ensures that AValue is not less than zero (0). Applies the range limited value to the member for the Range property, and calls ControlUpdateScrollBars to refresh the scroll bars for the associated TScrollingWinControl instance. +
++ InternalSetRange is called when the SetRange method updates the value for the Range property. +
++ ScrollHandler is a method used to ensure that the control message in Message is applied to the Position property for the scroll bar. ScrollHandler uses the ScrollCode member from the TLMScroll instance to determine the actions needed in the method. It handles the following ScrollCode values: +
++ No actions are performed in the method if Message has any other value in its ScrollCode member. No actions are performed in the method at design-time. +
++ ScrollHandler ensures the the new value for the Position property is in the range 0..Range. Calls InvalidateScrollInfo to force scroll bar information to be re-initialized. Calls SetPosition to apply the new value for the Position property and scrolls the associated TScrollingWinControl accordingly. Sets the Result member in Message to 1 to indicate the control message was handled in the method. +
++ ScrollHandler is called when the WMHScroll or WMVScroll methods in the associated TScrollingWinControl instance are used to handle scroll messages. +
+UpdateScrollBar calls SetPosition to apply the current value in Position to a visible scroll bar in the class instance. When Control is a TScrollingWinControl instance, the Smooth property is used to determine if Increment needs to be adjusted to a value that is 10% of the Page size for the control. @@ -482,35 +578,35 @@ TLMScroll
Increment is a TScrollBarInc property which indicates the amount the client area in the associated control is scrolled when the Up or Down navigation arrows on the scroll bar are clicked. The default value is 8.
- The value in Increment may be automatically recalculated in the UpdateScrollBar method if the Smooth property is enabled, and the associated control is a TScrollingWinControl descendant. This is done to ensure that Increment contains 10% of the value for the Page property. + The value in Increment may be automatically recalculated in the UpdateScrollBar method when the Smooth property is enabled and the associated control is a TScrollingWinControl descendant. This is done to ensure that Increment contains 10% of the value for the Page property.
Increment is used in the ScrollHandler method when updating the Position property for scroll bar messages received in the control. @@ -699,7 +795,7 @@
@@ -737,7 +832,6 @@
- The scrollbar widget is visible only if (Visible=True) and (Range>Page). + The scroll bar widget is visible only if (Visible=True) and (Range>Page).
Set Visible to False to disallow the user to scroll the content, while the content still can be scrolled by code. @@ -821,45 +914,57 @@
This class introduces a logical (virtual) client area, part of which is visible in the physical (visible) client area. ScrollBars allow the user to scroll through the logical client area.
++ TScrollingWinControl is the ancestor for components like TScrollBox and TCustomDesignControl, and indirectly for TCustomFrame and TCustomForm. +
- AutoScrollEnabled is a Boolean function which indicates if automatic scrolling is enabled for the control. The return value is True when the control is NOT automatically resized, or used as a docksite by an active docking manager. + AutoScrollEnabled is a Boolean function which indicates if automatic scrolling is enabled for the control. The return value is True when the control is NOT automatically resized, or used as a dock site by an active docking manager.
Use the AutoSize property to enabled or disable automatic control resizing. Set the UseDockManager property to False to disable use of the DockSite for the control.
@@ -891,7 +996,7 @@
+ When the property is changed to True, the UpdateScrollBars method is called to calculate the page, range, and visibility for HorzScrollBar and VertScrollBar. When changed to False, the HideScrollbars method is called to reset the page, range, and visibility for the scroll bars. If the BoundsRect is updated in either method, the original valueis restored prior to exit. +
++ Loaded is an overridden method in TScrollingWinControl, and calls the inherited method on entry. It calls UpdateScrollBars to compute the page, auto ranges, and visibility for the scroll bars when AutoScroll is enabled. +
+- Resizing is an empty implementation in TScrollingWinControl. It must be implemented in descendent form or control classes. + Resizing is an empty implementation in TScrollingWinControl. It must be implemented in descendent classes.
+ ScrollInView is a method used to align and scroll the control in AControl into the visible area for the scrolling window control. No actions are performed in the method under the following conditions: +
++ The origin for AControl relative to its Parent is determined by calling the ClientToParent method. OffsetRect is called to apply the offset to the display rectangle for AControl. The adjusted coordinates are used to reposition the visible scroll bars so that AControl is visible in the client area for the scrolling window control. +
++ HorzScrollBar is a TControlScrollBar property with the horizontal scroll bar for the scrolling window control. The scroll bar is displayed for the control when its Visible property is True, or when Width is larger than the ClientWidth for the control and AutoScroll is enabled. +
++ VertScrollBar is a TControlScrollBar property with the vertical scroll bar for the scrolling window control. The scroll bar is displayed for the control when its Visible property is True, or when Height is larger than the ClientHeight for the control and AutoScroll is enabled. +
+@@ -1916,15 +2095,15 @@
- TCustomForm acts an abstraction layer which masks implementation-specific routines required for the various widget sets supported in the Lazarus Component Library (LCL). Methods and properties are provided which interact with the underlying Operating System or platform, and provide a common API for form-related operations. + TCustomForm acts an abstraction layer which masks implementation-specific routines required for the various widgetsets supported in the Lazarus Component Library (LCL). Methods and properties are provided which interact with the underlying Operating System or platform, and provide a common API for form-related operations.
- SetWindowFocus is a procedure used to ensure that the active control in the form instance has the inpout focus when the forms receives focus. At run-time, the control in ActiveControl (when assigned) is used as the active control. At design-time, the active control is the design surface for the current form instance. + SetWindowFocus is a procedure used to ensure that the active control in the form instance has the input focus when the forms receives focus. At run-time, the control in ActiveControl (when assigned) is used as the active control. At design-time, the active control is the design surface for the current form instance.
No actions are performed in the method when a handle has not been allocated for the active control, or the control cannot be focused.
@@ -2453,170 +2633,342 @@
+ Ensures that handles for the Menu are valid for the form display style. The Menu is not displayed at run-time for a modal dialog form (BorderStyle is set to bsDialog); in this case, the DestroyHandle method in Menu is called to free the Handle for the Menu. (This is Delphi compatible).
+
+ The WindowHandle for the Menu is set to the Handle property from the form instance.
+
+ No actions are performed in the method if the Handle has not been allocated, or when Menu has not been assigned for the form.
+
+ Uses values in ShowInTaskBar and the TaskBarBehavior setting in Application to determine the effective visibility for the form in the task bar. Calls the SetShowInTaskbar method in the widgetset class to update the effective form visibility.
+
+ No actions are performed in the method for the following conditions:
+
+ Calls SetActive to update the value in the Active property to reflect the value for the Active member in Message.
+
+ When the form is being de-activated, the Deactivate method in Application is called. Otherwise, the Activate method in Application is called. The UpdateShowInTaskBar method is called ShowInTaskBar to determine the effective visibility for the form in the task bar.
+
+ Calls the Close method to process and apply the ModalResult and CloseAction for the form. Sets the Result member in Message to 0 (zero) to indicate that WndProc should ignore the message; it has been handled in this method (and Close).
+
+
+ No actions are performed in the method at design-time, or when values have not been assigned to the HelpInfo member in Message.
+
+ When HelpInfo has a HELPINFO_WINDOW context type, FindControl is called to locate and display the help for the control with the item handle in Message. When HELPINFO_MENUITEM is the context type, GetHelpContext in Menu is called to locate the control ID in Message. If not found, the item handle in Message is used. As a default, the value in the Context property is used to display the context help.
+
+
+
+ No actions are performed in the method when the form has already been made visible (FormState contains the value fsShowing). +
++ Updates FormState to include the value fsShowing. Calls DoShowWindow to focus a control on the form (when needed). Removes fsShowing from FormState prior to exiting from the method. +
++ Re-implements the method from the ancestor class; does not call the inherited method. +
++ Re-implements the method from the ancestor class. +
++ Ensures that auto-sizing is disabled for a size message for a top-level form (where Parent is not assigned) or from the LCL interface. This is done by including the value fsDisableAutoSize in the FormState property. +
++ Calls the inherited method to apply the width, height, and window state values in Message. +
++ Re-implements the method from the ancestor class. +
++ Ensures that auto-sizing is disabled for a position message to a top-level form (where Parent is not assigned), or from the LCL interface when new height or width values are provided. This is done by including the value fsDisableAutoSize in the FormState property. +
++ Calls the inherited method prior to exit to apply the position and bounds for the form. +
++ Re-implements the method from the ancestor class. Calls the inherited method on entry using the value in Message to set the BiDi and adjust the size for the control. +
++ Ensures that all components owned by the form are notified of the change to the BiDiMode property. This is needed for menus on the form. A TLMessage instance is constructed with the CM_PARENTBIDIMODECHANGED message and displatched to all of the Components on the form not derived from TWinControl. TWinControl handles the notification for its descendants. Alignment is temporarily disabled during the process, and re-enabled prior to exiting from the method. +
++ Sets the BidiMode property to the value in Parent when ParentBiDiMode is True and Parent has been assigned. When Parent has not been assigned, the BiDiMode property in Application is copied to the form instance. +
++ Ensures that controls with a Glyph are notified when a change has occurred to a button glyph. Calls NotifyControls to broadcast Message to all Controls on the form. +
++ Ensures that menus and menus items are notified of a change to a Glyph. Dispatches the value in Message to all Components on the form. +
++ Frees and re-creates handle(s) for icons used on the form, and notifies the widgetset class by calling its SetIcon method. +
++ Calls the Free method to destroy the form instance. +
++ Ensures that the Menu for the MainForm in the Application is merged into the Menu for the form instance when FormStyle is fsMDIChild. This action is not performed at design-time, or when the MainForm or the Menu for the Application has not been assigned. +
++ Calls Activate to signal the OnActivate event handler (when assigned) if needed. +
++ This message occurs when the form loses focus within the application. +
++ Calls the Deactivate method to signal the OnDeactivate event handler (when assigned). Ensures that the Menu merged to the application MainForm during activation is removed from the Menu for the Application. This action is not performed at design-time, or when Menu has not been assigned. It applies to a form using the fsMDIChild form style in an application using the fsMDIForm style in its MainForm. +
++ Uses the value in Showing to determine whether the DoShow or the DoHide method is called. When Showing is True, the DoShow method is called to signal the OnShow event handler (when assigned) if needed. When Showing is False, the DoHide method is called to signal the OnHide event handler (when assigned). +
++ If either event handler raises an Exception, it is ignored when HandleShowHideException is set to True. It is re-raised when HandleShowHideException is False. +
++ Calls the inherited method prior to exit to notify the widgetset class of the window state change, and to update window control flags for the form. +
++ Calls AutoAdjustLayout to apply the DPI setting in Message. This action is performed when: +
++ Calls a private method to locate the first visible and enabled control in the tab order for the form. Sets the value in ActiveControl to the control instance located in the method. +
++ No actions are performed in the method at design-time, when ActiveControl has already been assigned, or when the form instance has a Parent. +
++ DoShowWindow is called from the WMShowWindow method where the LM_SHOWWINDOW window message is handled for the form. +
+Activate is a procedure used to signal the OnActivate event handler (if assigned) when the form is activated. Activate is called when the CM_Activate message is handled for the form. @@ -2639,35 +2991,60 @@ TControl.OnChangeBounds
+ AdjustClientRect is an overridden method in TCustomForm which re-implements the method from the ancestor class. It is used to decrease the width and height for the client rectangle specified in Rect by the number of pixels in the BorderWidth property. It is used in the AlignControls method, and when auto-sizing is performed for Controls. +
++ Used with the EndFormUpdate method to manage auto-sizing during form updates. For the initial call to BeginFormUpdate, DisableAutoSizing is called to suspend auto-sizing. +
++ Use EndFormUpdate to decrement the update counter. When the update count reaches 0, auto-sizing is re-enabled. +
- CreateParams is an overridden procedure in TCustomForm, and calls the inherited method on entry. CreateParams ensures that values in the Params argument are valid. This includes setting the realized parent form and window handle for a form which is not the main form in the application. Style flags are also updated to indicate how the form is displayed in the task bar. + CreateParams is an overridden procedure in TCustomForm, and calls the inherited method on entry. CreateParams ensures that values in the Params argument are valid. This includes setting the realized parent form and window handle for a form which is not the main form in the application. Style flags are also updated to indicate how the form is displayed in the task bar.
+ CreateWnd is an overridden method in TCustomForm used to create (or re-create) the Handle for the widgetset class. It sets the initial values for FormState, and calls the inherited method to handle auto-sizing and scroll bars. +
++ CreateWnd ensures that a handle is allocated for the Menu and the Handle for the form is used as its WindowHandle. The CM_ICONCHANGED control message is performed to (re-)create handles for menu glyphs, and to post the changes to the widgetset class. +
++ Called when the form loses focus in the application. Signals the OnDeactivate event handler (when assigned). Called from the CMDeactivate and WndProc methods. +
++ DoClose is a method used to notify close handlers for the form instance of the action requested in the CloseAction parameter. +
++ It is called from the Close method for a form that is not displayed as a modal dialog; i. e. FormState does not contain fsModal. It occurs after CloseQuery (and OnCloseQuery) have been called to determine if the form can in fact be closed, and the CloseAction has been set for the form style. +
++ DoClose signals the OnClose event handler (when assigned) to allow the form instance to modify the CloseAction argument. It iterates over the close handlers in the form instance, and signals each of the TCloseEvent instances in the method list using CloseAction as an argument. +
++ DoCreate is a method used to signal the create handlers for the form instance. DoCreate signals the OnCreate event handler (when assigned) to perform any actions needed for the new form instance. DoCreate also signals other create handlers to perform the methods using the current form instance as an argument. +
++ If an Exception occurs in one of the event handlers, it is handled in the method when HandleCreateException returns True. When it returns False, the exception is re-raised in the method. +
++ DoCreate calls LockRealizeBounds on entry to disable sending bounds changes to the widgetset class. UnlockRealizeBounds is called prior to exit to re-enable sending bounds changes to the widgetset class. +
++ DoCreate is a called from the AfterConstruction method after the initial bounds for the form have been set, and before scaling and automatic layout adjustment are performed (if needed) for the new form instance. +
++ DoDestroy is a method used to signal the OnDestroy event handlers assigned for the form instance. If an Exception occurs in the event handler, it is handled in the method when HandleDestroyException is set to True. When set to False, the exception is re-raised in the method. +
++ DoDestroy is called from the BeforeDestruction method, and allows the application to perform actions needed before the form instance is physically freed. It is called after the form has been removed from the focus list for the Screen, hidden by calling the Hide method, and merged menu items have been removed from the MainForm for the Application. +
++ Called from the CMShowingChanged method when Showing is set to False. +
++ No actions are performed in the method when a maximized or full-screen window (WindowState contains wsMaximized or wsFullScreen) is displayed for the first time. +
++ DoShow is called from the DelayedEvent method in response to queued OnResize or OnChangeBounds events, and from the CMShowingChanged method when Showing is set to True. +
++ HandleCreateException is a Boolean function which indicates if an exception raised in the OnCreate event handler is handled in the form instance. The return value is True when the Application.CaptureExceptions property is set to True; the HandleException method in Application is called to notify its exception handlers of the exception. When the return value is False, the exception is re-raised in the caller. +
++ HandleCreateException is called from the DoCreate method. +
++ Loaded is an overridden method in TCustomForm. +
++ It disables alignment in the form, and adjusts the PixelsPerInch setting for the Font when it differs from the design-time setting. It is performed when Scaled is enabled for the form and the Application. This action is also performed for any child Controls. Calls the inherited Loaded method, and re-enables alignment for the form instance. +
++ Ensures that the ActiveControl (when assigned) can receive focus. ActiveControl is set to Nil if the control cannot be focused for the form instance. Sets the Visible property to True when FormState contains the value fsVisible. +
++ PaintWindow is an overridden method in TCustomForm. It re-implements the method from the ancestor class, and does not call the inherited method. +
++ PaintWindow assigns the device context in dc to the Canvas handle. The Paint method is called to signal the OnPaint event handler (when assigned). If a design surface is active for the form instance, its PaintGrid method is called. The Canvas handle is reset to 0 prior to exiting from the method. +
+- Uses the value in State to determine the action required in the method. The LCL interface is used to determine if the window state is valid for the widget set. When allowed, the following methods are called for the corresponding TWindowState value: + Uses the value in State to determine the action required in the method. The LCL interface is used to determine if the window state is valid for the widgetset. When allowed, the following methods are called for the corresponding TWindowState value:
+ SetParent is an overridden method in TCustomForm used to set the value for the Parent property. +
++ SetParent disables auto-sizing before updating the property value. The Handle for the form is destroyed and re-created when Parent is both assigned and Visible. +
++ SetParent ensures that the PixelsPerInch settings for the form instance and its Parent are the same. AutoAdjustLayout is called when the values differ and Scaled has been enabled for both the Parent form and the Application. +
++ SetParent re-enables auto-sizing prior to exiting from the method. +
+ MoveToDefaultPosition is a method used to move the form instance to the location specified in its Position property. Position indicates the size and relative position for the form instance. See and for information about the property values and their meanings. +
++ MoveToDefaultPosition gets the display rectangle for the form instance. Its dimensions and coordinates are translated to the Monitor and/or relative layout indicated in Position. SetBounds is called to apply the + translated origin, height and width to the form instance. +
++ No actions are performed in the method when either Parent or the ParentWindow handle has been assigned for the form instance. No actions are performed in the method when WindowState contains wsFullScreen or wsMaximized. +
++ MoveToDefaultPosition is called from the AllAutoSized, SetRestoredBounds, and UpdateShowing methods. It is also called when a new value is assigned to the Position property. +
++ UpdateShowing is an overridden method used to configure and position the form instance when the visibility for the form has been changed. +
++ When Visible is set to True at run-time, the MoveToDefaultPosition method is called to move the form to the monitor / location in the Position property. This action is not needed (or allowed) at design-time. When FormState indicates it is the first time the form is being displayed, the DoFirstShow method is called to notify event handlers for the form. +
++ UpdateShowing calls the inherited method to update the Handle for the form and the visibility for any child Controls. +
++ If ActiveControl is not assigned, and there is no Parent form, the FindDefaultForActiveControl method is called to locate the first visible and enabled child control on the form. Its Handle is used to focus the control using the LCL SetFocus routine. +
++ Finally, the visibility of the form in the task bar is updated and passed to the widgetset class. +
++ SetVisible is an overridden method used to set the value for the Visible property. It ensures that FormState is updated to reflect the new value for the property. When set to True, fsVisible is included in the FormState property. Otherwise, fsVisible is excluded from FormState. No actions are performed in the method if FormState already already reflects the new value for the property. +
++ SetVisible calls the inherited method to store the new property value, and to perform resizing and control messages as needed. The UpdateVisible method in Application is called to ensure that the application is visible in the task bar when one of its forms is visible. +
++ AllAutoSized is an overridden method used to apply the position and layout for a visible form that about to be displayed. AllAutoSized implements the virtual method defined in the ancestor class. +
++ AllAutoSized is called from the DoAllAutoSize method when AutoSize has been enabled, and occurs after the bounds for the form have been calculated. It calls the MoveToDefaultPosition method to move the form to the monitor and relative location in Position. +
++ No actions are performed in the method if the form is already Showing or it is not Visible. +
+ Calls CallNotifyEvents in the internal method list for any methods using the fhtFirstShow handler type. The form instance is passed as an argument to the handler(s). +
++ Called from the UpdateShowing method when the form is Visible and its Showing property is changed to True. Occurs after MoveToDefaultPosition has been to called to position the form on its monitor, and after the value fsFirstShow has been included in the FormState property. +
++ Has an empty implementation in the current LCL version. +
++ Calls the inherited method prior to exit. +
+ Calls the inherited method on entry. +
++ When the Screen singleton has been assigned, its NotifyScreenFormHandler method is called to signal all snFormVisibleChanged handlers in the class instance. +
++ WndProc is an overridden method which implements the processing loop for window and control messags received for the form instance. It extends the method from the ancestor class to provide form-specific support for messages including: +
++ WndProc calls the inherited method to handle control-specific messages not handled in the method. +
++ Returns the value in the Visible property. +
++ SetAutoSize is an overridden method in TCustomForm used to set the value for the AutoSize property. +
++ When set to True, it updates FormState to exclude the value fsDisableAutoSize, and modifies Position to use poDefault when it contains poDefaultPosOnly. +
++ SetAutoScroll is an overridden method in TCustomForm used to set the value for the AutoScroll property. It calls the inherited method to apply the new property value, but includes an additional test for the BorderStyle used on the form. AutoScroll cannot be set to True when BorderStyle has a value other than bsSizeable or bsSizeToolWin. +
++ SetScaled is an overridden method in TCustomForm used to set the value for the Scaled property. It calls the inherited method on entry. At run-time, the AutoScale method is called when the new property value is set to True and differs from the existing property value. +
++ Ensures that the TList instance is allocated for the internal member. Calls the IndexOf method in the list to locate the value in the List argument. If it is not found, the Add method for the list is called to append the value. +
++ DoAddActionList is called from the Notification method when a TCustomActionList instance is added to the form (during LCL streaming). +
+ Calls the Remove method in the TList member to delete the TCustomActionList specified in List. +
++ DoRemoveActionList is called from the Notification method when a TCustomActionList instance is removed from the form. +
+ BeginAutoDrag is an overridden method in TCustomForm which re-implements the auto-drag and dock behavior for form instances. It allows form dragging only if it is docked (HostDockSite is assigned) to a site where a DockManager is not used (UseDockManager is False). It does not call the inherited method. +
+ DoDock is an overridden method used to dock / undock the form instance in the dock site specified in NewDockSite. When NewDockSite is unassigned (contains Nil), the form instance is undocked from the host dock site. +
++ ARect contains the bounds for the new dock site after resizing and alignment (when needed). +
++ When a form is docked, its BorderStyle is set to bsNone. DoDock ensures that the value in the BorderStyle property is saved or restored for the form when the value in HostDockSite is changed. If NewDockSite has been assigned, the value in BorderStyle is saved to an internal member. If NewDockSite is Nil, the value in BorderStyle is restored from the internal member. +
++ DoDock calls the inherited method prior to exit. +
++ DoDock is called from the Dock method in an ancestor class. +
++ GetDefaultDockCaption is an overridden String function used to get the default caption displayed when the form is docked. GetDefaultDockCaption returns the value in the Caption property. +
++ Called from the GetDockCaption method in an ancestor class. The value is passed as an argument to the OnGetDockCaption event handler. +
++ Calls DoExecuteAction to execute the TBasicAction passed as an argument in Message. Sets the Result member in Message to 1 to indicate that the action was performed in the method. +
++ Called when a CM_ACTIONEXECUTE control message dispatched in the WndProc method in TApplication is processed for the form instance. +
++ Create is the overridden constructor for the class instance. Create sets the default values for internal members used in the form instance, and calls the CreateNew method to configure the visible aspects of the form instance. At run-time, it also calls ProcessResource to load the form content from its resource file. +
++ CreateNew is an alternate constructor for the class instance. CreateNew is used to create a new TCustomForm instance which is not loaded from a resource file (.lfm). It performs actions to initialize properties for the form instance, including: +
++ Implements the virtual method defined in the ancestor class. +
++ Called after the form instance has been created and loaded from its resource file (when needed). +
++ Ensures that the initial bounds for the form are set to the values in the Left, Top, Bottom, and Right properties. Calls DoCreate to signal the OnCreate event handler (when assigned). Ends the form update started in the CreateNew constructor. Ensures that scaling and automatic layout are applied to form instance (if needed) when Scaled is enabled for both the form instance and the Application. +
++ Calls the inherited method on entry to signal any OnBeforeDestruction event handlers assigned to the form instance. +
++ Removes the form instance from the list of focused forms in the Screen singleton. At run-time, the Hide method is called when the form is not a MDI child form in the application. If the form is a MDI child form, merged menu items are removed from the menu in the MainForm for the Application. +
++ GetFormImage is a TBitmap function used to get a bitmap image with the contents for the form instance. The return value must be managed by the caller to ensure that the image is freed. +
+
+ GetFormImage sets the size for the TBitmap instance to the values in the ClientWidth and ClientHeight properties. The GetWindowRect routine in
+ The return value can be Nil if an Exception was raised and handled in the method. +
++ Checks form components to determine whether the specified message is a shortcut or accelerator key used on the form. This includes signalling the OnShortcut event handler (when assigned), calling IsShortCut for the form Menu, or calling IsShortcut for the ActionLists for the form instance. +
++ Returns True when the specified Message is an active as a shortcut. +
++ MakeFullyVisible is a method used to make the form instance fully visible on the specified monitor. This prevents the form from being partially visible on multiple monitors. +
++ AMonitor is the TMonitor instance where the form is displayed. If AMonitor is not specified (contains Nil), the value in the Monitor property is used. +
++ UseWorkarea indicates whether the work area for the target monitor is used. When set to True, the form uses the bounds established for the work area instead of the physical monitor. The default value for the parameter is False. +
++ MakeFullyVisible ensures the form fits within the required bounds for the monitor or work area. If the form is too wide or too tall, the form bounds are adjusted so that the form fits within the required bounds. +
++ AutoSizeDelayedHandle is an overridden Boolean function used to determine if an AutoSize action must be deferred due to a missing form Handle. +
++ When either Parent or ParentWindow has been assigned, the form is treated like a TWinControl; the return value is set to the value from the inherited method. +
++ If one of the values is unassigned, the return value is always set to False. The form has its own handle, and the resize action does not need to be delayed. +
++ Called from the AutoSizeDelayed method in an ancestor class. +
++ Ensures that the parameter values are used in the form instance. No actions are performed in the method when ALeft, ATop, AWidth, and AHeight are already assigned to the corresponding properties in the form instance. +
++ Temporarily sets WindowState to wsNormal, and calls SetBounds to apply the parameter values to the form instance. Calls MoveToDefaultPosition when ADefaultPosition is True. Restores WindowState to its original value, and updates the values for the RestoredLeft, RestoredRight, RestoredWidth, and RestoredHeight properties. +
++ Called from the AfterConstruction method prior to signalling the OnCreate event handler and applying the automatic layout policy for the form instance. +
++ Show is a method used to display the form in an LCL application. It re-implements the method defined in an ancestor class, and does not call the inherited method. +
++ Show ensures that scaling is performed using the automatic layout policy for the form instance. The PixelsPerInch setting for the Monitor is applied (when needed) by calling the AutoAdjustLayout method. This action is performed when both the Application and the form instance have their Scaled properties set to True. +
++ Show sets the value in the Visible property to True, and calls the ShowWindow routine in the LCL interface at run-time using the Handle and WindowState for the form. The BringToFront method is called to apply the Z-Order for the form instance and its siblings. +
++ Makes the form Visible and moves it to the top of the Z-Order. WindowState is changed to wsNormal if the form is currently in a minimized state (wsMinimized). Sets the value in Visible to True, and calls BringToFront to move the form to the top of the Z-Order among its siblings. +
++ GetChildren is an overridden method in TCustomForm which executes the callback method specified in Proc for child Controls owned by Root, or Components which do not have a Parent. It calls the inherited method in TWinControl to execute the callback for Child controls owned by Root. GetChildren iterates over the values in Component, and calls Proc when the HasParent method for a given component returns False. +
++ AutoScale is a method used to apply an automatic layout adjustment policy to scale the form and its controls when enabled and needed. +
++ AutoScale sets the value in the Scaled property to True if it is not already enabled. This causes AutoScale to be called again, so no additional actions are performed in the current method call. +
++ AutoScale uses the value in the PixelsPerInch property for the Monitor where the form is displayed to determine if the form and its controls need to be scaled. When Scaled is enabled for the Application, and the run-time PixelsPerInch setting differs from the design-time value, the AutoAdjustLayout method is called. The lapAutoAdjustForDPI policy is applied in the method using scaling factors for the Width and Height values on the form and its Controls. +
++ AutoScale is called when a new value is assigned to the Scaled property. +
++ Calls the inherited method using the values in NewDockSite and ARect as arguments. +
++ UpdateDockCaption is an overridden method used to get the combined Caption for all DockClients on the form. It does not call the inherited method. +
++ Exclude contains a control which is omitted from the Caption values (when assigned). UpdateDockCaption iterates over the controls in DockClients to build the combined Caption for visible controls (other than the control in Exclude). Blank control captions are ignored. UTF8FixBroken is called to ensure that a given caption does not contain invalid UTF-8 characters. The caption for a TMemo control is truncated after 20 characters. +
++ The Caption values for the controls are concatenated into a comma-delimited list of values which are assigned to the Caption property. An empty string is never assigned to the Caption property. +
++ UpdateDockCaption is called when a new value is assigned to the Text property for a DockClient control with an assigned HostDockSite. +
++ Active is a read-only Boolean property which indicates if the form is enabled, visible, and has focus. +
++ The SetActive method is used to update the value for the property, locate an ActiveControl for the form, and give focus to the form control. SetActive is called from the WMActivate method when the LM_ACTIVATE window control message is handled for the form. +
++ The value in Active is used in the FocusControl method. It causes SetFocus to be called when its value is False. It is also used in the SetActiveControl method to determine if the window already has focus when the active control is changed. +
+ ActiveControl is a TWinControl property which contains the control which has focus on the form. The property value can be Nil if the form is hidden, disabled, or has never been activated. +
++ Setting a new value for the property causes validity checks to be performed to ensure that the specified control can receive focus when the form is Visible. An EInvalidOperation exception is raised when the new property value contains: +
++ The SetWindowFocus method is called if the form is Active, and the ActiveChanged method is called. +
++ The value in ActiveControl is updated in the FocusControl and DefocusControl methods. +
++ The active control which is the default control executed when the Enter key is pressed. When setting a new value for the property, a previous default control is notified of the change to the property value using the ActiveDefaultControlChanged method. +
+- AllowDropFiles is a Boolean property which indicates whether this form receives an OnDropFiles event when files are dropped on form during a drag-and-drop operation. + AllowDropFiles is a Boolean property which indicates whether this form receives an OnDropFiles event when files are dropped on the form during a drag-and-drop operation.
- Changing the value in AlphaBlend causes the widgetset class to be notified of the property change at run-time when a handle has been allocated for the form instance. A change to the property value is not rendered at design-time. + Changing the value in AlphaBlend causes the widgetset class to be notified of the change at run-time when a handle has been allocated for the form instance. A change to the property value is not rendered at design-time.
AlphaBlend and AlphaBlendValue are used in the implementation of the InitializeWnd method, and passed as arguments to methods in the widgetset class when either of the values are changed.
- AutoScroll is a Boolean property which indicates if the form can automatically show or hide its scroll bars. Set AutoScroll to True to enable scroll bars when the form size is too small to display its content in its entirety. AutoScroll can only be True when the BorderStyle for the form is bsSizeable or bsSizeToolWin, and may be changed to False at run-time when setting the value in the BorderStyle property to another value. + AutoScroll is a Boolean property which indicates if the form can automatically show or hide its scroll bars. Set AutoScroll to True to enable scroll bars when the form size is too small to display its content in its entirety. AutoScroll can only be True when the BorderStyle for the form is bsSizeable or bsSizeToolWin, and may be changed to False at run-time when BorderStyle is changed to another value.
- Use borderstyle to get or set the appearance of the form's border. + Use BorderStyle to get or set the appearance of the form's border.
By default it is a sizeable window, but it could, for example, be a dialog form @@ -3685,7 +4755,7 @@
This property is slightly different (has a different base type) from the TCustomControl.BorderStyle property. When the form is put into - another control the window borders depend on the widget set. There are no + another control the window borders depend on the widgetset. There are no borders under GTK.
+ Setting the value in Caption also causes the caption in HostDockSite to be updated. +
+- This is typically a button such as 'Accept' which is highlighted in some way on-screen to indicate that this is the default action, and is selected either by hitting 'Return' or 'Enter' or by selecting that control with the mouse. + This is typically a button such as 'Ok' or 'Accept' which is highlighted in some way on-screen to indicate that this is the default action. It is selected either by hitting 'Return' or 'Enter', or by clicking the control with the mouse.
Possible values:
++ Possible values: +
- FormState is a read-only TFormState property which contains state flags enacted for the form instance. Values from the TFormStateType enumeration are included in, or excluded from, the set type when corresponding actions occur (or are resolved) for the form instance. + FormState is a read-only TFormState property which contains state flags enabled for the form instance. Values from the TFormStateType enumeration are included in, or excluded from, the set type when corresponding actions occur (or are resolved) for the form instance.
See TFormStateType for more information on the values and meanings in the enumeration. @@ -3785,11 +4870,13 @@
Possible values:
++ Possible values: +
- HelpFile is a String property which contains the name of the help file for the form instance. HelpFile can use a fully-qualified path to the help file if it is not locate in the same directory as the application which implements the form. + HelpFile is a String property which contains the name of the help file for the form instance. HelpFile can use a fully-qualified path to the help file if it is not located in the same directory as the application which implements the form.
The value in HelpFile is used in TApplication when it retrieves the help file name from the active form in the application. @@ -3826,7 +4913,7 @@
- KeyPreview is a Boolean property which controls whether the form can intercept key strokes from child controls. When KeyPreview is set to True, the form is allowed to receive KeyDown, KeyUp, and KeyPress events before they are received/applied to the ActiveControl in the form. + KeyPreview is a Boolean property which controls whether the form can intercept key strokes from child controls.
- The default value for the property is False. + When KeyPreview is set to True, the form is allowed to receive KeyDown, KeyUp, and KeyPress events before they are received / applied to the ActiveControl in the form. The default value for the property is False.
- KeyPreview is used in the implementation of key handling methods in TWinControl. KeyPreview is often enabled for modal dialogs to allow the parent form to handle specific user interactions. + KeyPreview is used in the implementation of key handling methods in TWinControl. KeyPreview is often enabled for modal dialogs to allow the parent form to handle specific interactions with the user.
- The form role is determined by the value in the FormStyle property. fsMDIForm is used for the main form, and fsMDIChild for the child forms. MDIChildren is relevant when the current form instance uses one of those MDI from style values. + The form role is determined by the value in the FormStyle property. fsMDIForm is used for the main form, and fsMDIChild for the child forms. MDIChildren is relevant when the current form instance uses one of these MDI form style values.
- The Integer Index value is used to access the MDI child forms for the current form instance by the ordinal for the requested form. The return value contains the TCustomForm instance at the specified position, as determined using the GetMDIChildren method in the widgetset class. The return value can be Nil when the current form does not use a FormStyle with the value fsMDIForm or fsMDIChild, or when a handle has not yet been allocated for the form instance. The return value is always Nil at design-time. + Index is an Integer value is used to access a MDI child form by its ordinal position in MDIChildren. The return value contains the TCustomForm instance at the specified position, as determined using the GetMDIChildren method in the widgetset class. The return value can be Nil when the current form does not use a FormStyle with the value fsMDIForm or fsMDIChild, or when a handle has not yet been allocated for the form instance. The return value is always Nil at design-time.
Use MDIChildCount to get the number MDI child forms for the form instance.
@@ -3894,7 +4981,7 @@
- Assigning a new value to Menu causes other forms on the Screen to be checked for a duplicate menu assignment. A singlular TMainMenu instance cannot be assigned to more than one form. An EInvalidOperation is raised if another form alreasy uses the menu instance. The UpdateMenu method is called when the new property value has been set. + Assigning a new value to Menu causes other forms on the Screen to be checked for a duplicate menu assignment. A singular TMainMenu instance cannot be assigned to more than one form. An EInvalidOperation is raised if another form already uses the menu instance. The UpdateMenu method is called when the new property value has been set.
- See TModalResult for more information about the enumertation values and their meanings. + See TModalResult for more information about the enumeration values and their meanings.
- At run-time, the widget set class is notified of the change in the PopupParent property. The notification is not performed at design-time. + At run-time, the widgetset class is notified of the change in the PopupParent property. The notification is not performed at design-time.
- OnClose is triggered from the DoClose method immediately before calling any internal form handlers registered for the fhtClose form handler action type. OnClose can be used to detemine the action performed in subsequent form handlers by setting the value in the CloseAction argument. + OnClose is triggered from the DoClose method immediately before calling any internal form handlers registered for the fhtClose form handler action type. OnClose can be used to determine the action performed in subsequent form handlers by setting the value in the CloseAction argument.
An application must implement and assign an object procedure using the signature for TCloseEvent to respond to the event notification. @@ -4046,7 +5134,7 @@
- Set AllowDropFiles to True to enable drog and drop operations, and execution of this event handler. + Set AllowDropFiles to True to enable drag and drop operations, and execution of this event handler.
- The CallHelp argument indicates if handler(s) in the Application instance should be called when the event handler in the form is completed. Set CallHelp to False when the help request has been satified in the event handler. + The CallHelp argument indicates if handler(s) in the Application instance should be called when the event handler in the form is completed. Set CallHelp to False when the help request has been satisfied in the event handler.
An application must implement and assign an object function using the signature for the handler to respond to the event notification. @@ -4164,7 +5252,7 @@
+ OnResize is a TNotifyEvent property with the event handler signalled when the dimensions for the form have been changed. It is signalled (when assigned) from the DoOnResize method, and occurs in the inherited DoOnResize method in the ancestor class. +
++ Create and assign a procedure to the event handler to perform any actions needed after the form has been resized. +
++ Use the OnConstrainedResize event handler to set the height and/or width for the form using minimum and maximum height and width values. +
+@@ -4203,12 +5309,20 @@
+ OnShow is a TNotifyEvent property with the event handler signalled (when assigned) when the form becomes visible. It is signalled from the DoShow method when the CM_SHOWINGCHANGED control messages is handled for the form, and when queued OnResize and OnChangeBounds events are executed for the form. +
++ Create and assign a procedure to OnShow to perform any actions needed when the Visible property for the form is set to True. +
+- See TWindowState for details about the values and meanings in the enumeration. + See TWindowState for details about the values and meanings in the enumeration.
+ The default value for the property is False in TCustomForm. +
+- Position is a TPosition property which indicates the size and position policy used to display the form instance. The default value for the property is poDesigned, and indicates that the coordinates used in the form designer are used at run-time. See TPosition for the other values, and their meanings, available for the property. + Position is a TPosition property which indicates the size and position policy used to display the form instance. The default value for the property is poDesigned, and indicates that the coordinates used in the form designer are used at run-time. See TPosition for the other values, and their meanings, available for the property.
Changing the value in Position causes the value in AutoSize to be updated when needed, and calls UpdateControlState. No additional actions are performed at design-time.
- MoveToDefaultPosition is called when a handle exists for the form instance and it has not been displayed yet. + MoveToDefaultPosition is called when a handle exists for the form instance and the form has not been displayed.
- RestoredLeft is a read-only Integer property which contains the left coordinate for the form when its size is altered in WMSize or WMMove message handlers. The property value is applied when the aynchronous queued event handler for the form is executed, and calls the DoOnChangeBounds method. + RestoredLeft is a read-only Integer property which contains the left coordinate for the form when its size is altered in WMSize or WMMove message handlers. The property value is applied when the asynchronous queued event handler for the form is executed, and calls the DoOnChangeBounds method.
- RestoredTop is a read-only Integer property which contains the top coordinate for the form when its size is altered in WMSize or WMMove message handlers. The property value is applied when the aynchronous queued event handler for the form is executed, and calls the DoOnChangeBounds method. + RestoredTop is a read-only Integer property which contains the top coordinate for the form when its size is altered in WMSize or WMMove message handlers. The property value is applied when the asynchronous queued event handler for the form is executed, and calls the DoOnChangeBounds method.
- RestoredWidth is a read-only Integer property which contains the Width for the form when its size is altered in WMSize or WMMove message handlers. The property value is applied when the aynchronous queued event handler for the form is executed, and calls the DoOnChangeBounds method. + RestoredWidth is a read-only Integer property which contains the Width for the form when its size is altered in WMSize or WMMove message handlers. The property value is applied when the asynchronous queued event handler for the form is executed and calls the DoOnChangeBounds method.
- RestoredHeight is a read-only Integer property which contains the height for the form when size is altered in WMSize or WMMove message handlers. The property value is applied when the aynchronous queued event handler for the form is executed, and calls the DoOnChangeBounds method. + RestoredHeight is a read-only Integer property which contains the height for the form when size is altered in WMSize or WMMove message handlers. The property value is applied when the asynchronous queued event handler for the form is executed and calls the DoOnChangeBounds method.
+ Re-declared in TCustomForm to use a different storage specifier than the ancestor class. In TCustomForm, visibility is not tied to an Action or an ActionLink; it uses the value in the Visible property. +
+- WindowState is a TWindowState property which indicates whether the form is currently displayed minimized, maximized, fullscreen or normal (restored) state. The default value is wsNormal (i. e. neither minimized nor maximized). + WindowState is a TWindowState property which indicates whether the form is currently displayed minimized, maximized, full-screen or normal (restored) state. The default value is wsNormal (i. e. neither minimized nor maximized).
Changing the value for the property at run-time causes the ShowWindow routine to be called with the Integer display command representing the new property value. The action is not performed at design-time, or when Showing is set to False. @@ -4380,52 +5513,75 @@
+ TForm is a TCustomForm descendant which implements a form displayed in an LCL application. It sets the visibility and default values for properties introduced in ancestor classes. It also adds methods needed for use as an MDI form in an application. LCL version information is available in the LCLVersion property, and is streamed to to the component resource file when a Parent is not assigned for the form. +
++ Forms created at design-time using the Lazarus IDE are TForm descendants. A form can be used as the main form in an application, or it can be displayed as a MDI forms, dialog box, or tool window. Controls can added to the form, such as: TEdit, TLabel, TButton, TCheckBox, TComboBox, TListView, TTreeView, et. al. +
++ Cascade is a method used to arrange MDI Chid forms so that they overlap in a cascading fashion. +
++ No actions are performed in the method when FormStyle has a value other than fsMDIForm. At run-time, the Cascade method in th widgetset class is called when its Handle has been allocated. +
++ Use Tile to arrange MDI child forms in a grid format. +
++ Used to distinguish form streaming content for different versions of the LCL. +
++ DoAddDockClient is an overridden method used to add the control in Client to the docked form. It calls the inherited method on entry to set the Parent in Client to the current class instance. It sets the Align property in Client to alAlign to align the control to the bounds for the docked form. Values in the BorderSpacing property in Client are reset to 0; the current class instance provides the BorderSpacing values for the docked control. At run-time, the VIsible property is set to True to display the docked form after the Client has been added. +
+Usage:
++ THintWindow is a TCustomForm descendant used to display text hints. It is not intended for use with child controls. +
++ Usage: +
HintWindow := THintWindow.Create(nil);
Rect := HintWindow.CalcHintRect(0, 'This is the hint',nil);
@@ -4603,23 +5778,26 @@
When UseBGThemes is enabled, ThemeServices are used to get the theme element details needed for the client rectangle in the hint window. @@ -4735,6 +5917,7 @@
- The default value for the property is taLeftJustify, as assigned in the Create constructor. The value in Alignment is used to derive the draw text flags required for the BidiMode in the hint display, and passed to to DrawText routine in theme services or widget set classes. + The default value for the property is taLeftJustify, as assigned in the Create constructor. The value in Alignment is used to derive the draw text flags required for the BidiMode in the hint display, and passed to to DrawText routine in theme services or widgetset classes.
- Getinfo is a Boolean function used to get monitor information from the OS or platform hosting the LCL application. Getinfo initializes the Info output parameter to the size required for the TMonitorInfo type, and calls the GetMonitorInfo routine for the widget set. + Getinfo is a Boolean function used to get monitor information from the OS or platform hosting the LCL application. Getinfo initializes the Info output parameter to the size required for the TMonitorInfo type, and calls the GetMonitorInfo routine for the widgetset.
The return value is True when monitor information is successfully retrieved for the OS or platform. Info contains the size, display rectangle, work area, and flags for the monitor.
@@ -5110,7 +6307,7 @@
- The virtual screen (desktop) can include multiple physical Monitors. Screen objects are Cursors, Fonts and Forms. For Delphi compatibility, non-visual DataModules are included.
+ TScreen is a TLCLComponent descendant which provides information about multiple monitors in an LCL application. TScreen allows the GUI for an application to be managed on multiple monitors. It includes the size and resolution for a screen, and allows mapping the virtual Desktop and Workareas to the physical Monitors known to the application.
+
+ TScreen also provides access to objects displayed on a given screen, including: Forms, Cursors, and Fonts. For Delphi compatibility, non-visual DataModules are also included in the TScreen information. Properties are provided in the class with the currently active Form, Control and Cursor for a screen.
+
+ TScreen is the type used for the Screen singleton in an LCL application.
The currently active Form, Control and Cursor also are tracked.
+ Calls GetSystemMetrics to get the value for the property.
+
+ Ensures that a TFont instance exists for the member, that it has been initialized to the stock hint font for the WidgetSet class, or uses the default font and the color in clInfoText.
+
+ Ensures that a TFont instance exists for the member, that it has been initialized to the stock ison font for the WidgetSet class, or uses the default font and the color in clDefault or clWIndowText (depends on the UseCLDefault define for the platform).
+
+ Create is the overridden constructor for the class instance, and calls the inherited method on entry.
+
+ Create allocates resources needed for properties, including: Fonts, Monitors, CustomForms, CustomFormsZOrdered, and
+ DataModules. Resources for internal members are also allocated.
+
+ Create gets the default value used for the PixelsPerInch property from the ScreenInfo variable in the LCL interface.
+
+ Create assigns methods in the class instance as the routines used by the Lazarus IDE to provide support for data modules. Create assigns the routine used to get system fonts for the application.
+
+ Destroy is the overridden destructor for the class instance. Destroy ensures that screen handlers registered using AddHandler are freed. Destroy also frees resource allocated for the class instance in the Create constructor. It calls the inherited method prior to exit.
+
+ CustomFormIndex is an Integer function used to get the position in CustomForms for the specified TCustomForm instance. It iterates over the values in CustomForms in reverse order. The return value contains the ordinal position in CustomForms where the TCustomForm instance in AForm was found, or -1 when AForm does not exist in CustomForms.
+
+ Use the FormIndex method to locate a form instance derived from TForm in the Forms property.
+
+ FormIndex is an Integer function used to get the position in Forms where the specified TForm instance in located. It iterates over the values in Forms in reverse order. The return value contains the ordinal position in Forms where the TForm instance in AForm was found, or -1 when AForm does not exist in Forms.
+
+ Use the CustomFormIndex method to locate a form instance derived from TCustomForm in the CustomForms property.
+
- The return value contains the activation order for the specified form, with the currently active form at index position zero (0).
+ The return value contains the z-order for the specified form, with the currently active form at index position zero (0).
+ Calls DestroyMonitors to clear existing TMonitor instances in the Monitors property. Calls EnumDisplayMonitors in the LCL interface to create and store TMonitor instances in the Monitors property.
+
+ UpdateMonitors is called when the private UpdatedMonitor function needs to access information for a monitor using its Handle. It is also called when the value for the Monitor or MonitorCount property is read.
+
+ Updates the value for the PixelsPerInch property from the ScreenInfo in the LCL interface.
+ Used to show modal forms or dialogs. The enabled state is determined from the widget, not from LCL properties. If DisabledList is Nil, a new list is created. Then all disabled forms
- are added to that list. When the modal form returns, call EnableForms to restore all forms.
+ Used to show modal forms or dialogs.
+
+ The enabled state for the forms is determined from the widgetset class, and not from LCL properties. If DisabledList is Nil, a new list is created. All forms disabled in the method are added to the list. When the modal form returns, EnableForms is called to restore forms disabled in the method.
+
+ Use this method to restore all previously disabled forms.
+
+ IconFont is passed to the InitStockFont method in the widgetset to load the font required.
+
@@ -6348,36 +7771,36 @@
- TOnUserInputEvent is an object procedure type which defines an event handler signalled to respond to user input messages in an application. It is used as a callback which forwards input messages from widget set classes to the current application.
+ TOnUserInputEvent is an object procedure type which defines an event handler signalled to respond to user input messages in an application. It is used as a callback which forwards input messages from widgetset classes to the current application.
TOnUserInputEvent is the type used for the OnUserInput event handler in TApplication and TApplicationProperties.
@@ -6512,7 +7935,7 @@
+ TApplicationHandlerType is an enumerated type with values that identify handler categories used in TApplication.
+
+ TApplicationHandlerType is used as an index value for the internal array of TMethodList instances used in TApplication. It is passed as an argument to the AddHandler and RemoveHandler methods in TApplication to identify the method list where the handler is stored. It is also used in the implementation of TApplication methods used to retrieve, execute, or maintain handlers such as: Destroy and RemoveAllHandlersOfObject.
+
- Two queues are used:
-
- New calls are added to the Next queue.
+ Two queues are used in TAsyncCallQueues. New calls are added to the Next queue. Cur contains the callbacks currently being processed in the queue.
When the application starts processing the calls, the Next queue becomes the Cur queue, and a new Next queue is created. This simplifies thread-safe addition in subsequent calls.
@@ -6883,23 +8303,25 @@
- TApplicationShowGlyphs is an enuemrated type with values that indicate the policy for displaying glyphs on menus and buttons. TApplicationShowGlyphs is the type used to implement the ShowButtonGlyphs and ShowMenuGlyphs properties in both TApplication and TApplicationProperties.
+ TApplicationShowGlyphs is an enumerated type with values that indicate the policy for displaying glyphs on menus and buttons. TApplicationShowGlyphs is the type used to implement the ShowButtonGlyphs and ShowMenuGlyphs properties in both TApplication and TApplicationProperties.
- TApplication is a TCustomApplication descendant which provides facilities used to manage and configure a GUI application. Properties, methods, and event handlers are provided which allow a program to create, execute, monitor, maintain and destroy an application and its forms. Every GUI application contains an Application variable that represents the TApplication or descendent class instance.
+ TApplication is a TCustomApplication descendant which provides facilities used to manage and configure a GUI application. Properties, methods, and event handlers are provided which allow a program to create, execute, monitor, maintain and destroy an application and its forms. Every GUI application contains an Application variable that represents the TApplication or descendent class instance.
- TApplication provides a message processing loop that includes hooks for event handlers and exception handling, and supports dispatching messages for TCustomAction instances used in application forms. TApplication provides support for Hints and content-sensitive help for forms and controls used in the application. Convenience methods, like MessageBox, are provided to simplify access to dialogs and error messages in the application.
+ TApplication provides a message processing loop that includes hooks for event handlers and exception handling, and supports dispatching messages for TCustomAction instances used in application forms. TApplication provides support for hints and content-sensitive help for forms and controls used in the application. Convenience methods, like MessageBox, are provided to simplify access to dialogs and error messages in the application.
- GetExename is a String function used to get the name of the executable file which started the application. The return value contains the first commandline parameter (ordinal position 0) returned from the ParamStrUTF8 routine in
+ Returns the AppHandle property from the WidgetSet singleton.
+
+ Extracts the program name from the command line arguments when Title is unassigned.
+
- FreeIconHandles is a procedure used to free icon handles used in the application. FreeIconHandles ensures that the internal members for the small and large icon handles are destroyed (when assigned). The DestroyIcon routine is called to destroy each of the icon handles using the correct routine for the widget set implementation.
+ FreeIconHandles is a procedure used to free icon handles used in the application. FreeIconHandles ensures that the internal members for the small and large icon handles are destroyed (when assigned). The DestroyIcon routine is called to destroy each of the icon handles using the correct routine for the widgetset implementation.
FreeIconHandles is called from the destructor for the class instance, and when an icon for the application has been changed.
- If a hint is not availabe for the specified mouse position, the CancelHint method is called. + If a hint is not available for the specified mouse position, the CancelHint method is called.
ActivateHint is used in the implementation of the DoOnMouseMove and ShowHintWindow methods.
CreateForm creates a Component instance of the given class, and sets the pointer to the component variable. If it is a form, it will be added to the form list in the application. @@ -7769,9 +9189,6 @@
Unless the application is shutting down, all requests are queued. Queued requests are processed when the application is not currently processing a message.
@@ -7828,9 +9246,10 @@
- Initialize is an overridden procedure in TApplication used to perform initialization tasks for the application. Initialize calls the inherited method to provide supprt for instance counting in the custom application. Initialize ensures that the WidgetSet class type is assigned for the application, and that the Screen singleton is initialized and updated.
+ Initialize is an overridden procedure in TApplication used to perform initialization tasks for the application. Initialize calls the inherited method to provide support for instance counting in the custom application. Initialize ensures that the WidgetSet class type is assigned for the application, and that the Screen singleton is initialized and updated.
Initialize raises an Exception if WidgetSet has not been assigned, or contains a class type other than TWidgetSet, for the application.
- Initialize updates the Flags property to include the value AppInitialized when both the LCL interface (Widget set) and the Screen singleton have been configured.
+ Initialize updates the Flags property to include the value AppInitialized when both the LCL interface (Widgetset) and the Screen singleton have been configured.
Initialize loads the graphic image used in the Icon property. If a resource with the name MAINICON is included in the Lazarus Resource, it is loaded and used as the application icon. Otherwise, FindResource is called to locate and load the named icon from the resource handle.
- Handle is a THandle property which provides access to the widget set handle used for the application instance. Reading the value for the property is redirected to the AppHandle allocated in the widget set class. Setting the value for the property causes the AppHandle in the widget set class to be updated with the new value. + Handle is a THandle property which provides access to the widgetset handle used for the application instance. Reading the value for the property is redirected to the AppHandle allocated in the widgetset class. Setting the value for the property causes the AppHandle in the widgetset class to be updated with the new value.
Handle is used to send and receive window messages and state change notifications for the application instance using the LCL interface. @@ -9055,12 +10456,12 @@
- A hint is a pop-up message that appears briefly while the mouse hovers over a control. It usually displays useful information about how to the UI element, or the type of data that should be entered, etc. + A hint is a pop-up message that appears briefly while the mouse hovers over a control. It usually displays useful information about how to use the UI element, or the type of data that should be entered, etc.
Other properties can be used to customize the delay before a Hint is shown, after the mouse is moved away from the control or form, and how long it will remain visible. @@ -9072,7 +10473,7 @@
These keys can be enabled for navigation:
-+ By default, the following keys can be used for keyboard navigation in an LCL application: +
+- This property is set when the first form is created using the CreateForm method when FormStyle contains a valueother than fsSplash. + This property is set when the first form is created using the CreateForm method when FormStyle contains a value other than fsSplash.
- MainFormOnTaskBar is a Boolean property which determines whether the icon for the main form in the appliciation is displayed on the task bar. When MainFormOnTaskBar is set to True, a button representing the main form is displayed on the task bar area in the window manager. When set to False, the button is not displayed in the task bar area. + MainFormOnTaskBar is a Boolean property which determines whether the icon for the main form in the application is displayed on the task bar. When MainFormOnTaskBar is set to True, a button representing the main form is displayed on the task bar area in the window manager. When set to False, the button is not displayed in the task bar area.
Changing the value in the property causes the Widgetset class to be notified of the new property value. @@ -9212,7 +10618,7 @@
Destroy calls the inherited destructor prior to exiting from the method.
@@ -10036,7 +11436,7 @@
+ TFormPropertyStorage is a TControlPropertyStorage descendant which extends the ancestor class to read and write form values. It provides additional methods called when a form is created, closed, or freed. TFormPropertyStorage is the base class for descendants like TCustomIniPropStorage, TCustomJSONPropStorage, and TCustomXMLPropStorage. +
+- The Keys value is of the type PtrUInt and is a or'ed combination of the following constants: + The return value is a PtrUInt type and contains an OR'ed combination of the following constants:
+ WindowStateToStr is a String function used to get the string representation for the TWindowState enumeration value in the State argument. Calls GetEnumName in
+ StrToWindowState is a TWindowState function used to get the value from the TWindowState enumeration for the specified string. StrToWindowState calls the GetEnumValueDef routine in
+ Alias for the Pointer type. Used as the return value for the SaveFocusState function. +
++ Returns the value from the LastFocusedControl variable in the implementation for the unit. The type used for the return value is TFocusState. +
++ GetParentForm is a TCustomForm function used to the form instance for the control specified in the Control argument. +
++ Control is the TControl instance examined in the method. The Parent property is used to navigate to preceding parent controls until a TCustomForm instance is found. +
++ TopForm indicates if the top-most form instance in the hierarchy is needed. When set to False (the default), the first TCustomForm instance found in the control hierarchy is used. Otherwise, all Parent controls in the hierarchy are examined until a Parent control has not been assigned. +
++ The return value can contain the value in Control if it is a TCustomForm descendant and no other form instances are used in the control hierarchy. This is Delphi compatible. +
++ GetFirstParentForm is a TCustomForm function used to find the first form instance in the Parents for the specified Control. GetFirstParentForm calls the GetParentForm routine to get the form instance used as the return value. The return value is Nil when Control has not been assigned, or a form is not found in GetParentForm. +
++ GetFirstParentForm is called from the IntfGetDropFilesTarget method in TWinControl, and from routines which handle accelerator keys for widgetset classes. +
+- Normally contains a reference to the DefaultMessageBox function. It may have another function reference assigned to the variable in specific widget set implementations (such as CustomDraw controls). + Normally contains a reference to the DefaultMessageBox function. It may have another function reference assigned to the variable in specific widgetset implementations (such as CustomDraw controls).
- CreateWidgetset is a procedure used to create the WidgetSet singleton. CreateWidgetset executes the nitialization handlers for the LCL interface. + CreateWidgetset is a procedure used to create the WidgetSet singleton. CreateWidgetset executes the initialization handlers for the LCL interface.
- AWidgetsetClass is the TWidgetsetClass class type used to create the WidgetSet singleton. CreateWidgetset is called from the
- Register is a procedure used to register components declared in the
+ Standard Tab +
++ Additional Tab +
+