From 2d7ae0a9c1800bfa5771cb41b555638604270c8a Mon Sep 17 00:00:00 2001 From: dsiders Date: Fri, 28 Apr 2023 02:41:51 +0100 Subject: [PATCH] Docs: LCL/forms. Corrections content for magnetic window manager and related topics. --- docs/xml/lcl/forms.xml | 100 +++++++++++++++++++++++++++-------------- 1 file changed, 66 insertions(+), 34 deletions(-) diff --git a/docs/xml/lcl/forms.xml b/docs/xml/lcl/forms.xml index d94494558e..2ece2541a6 100644 --- a/docs/xml/lcl/forms.xml +++ b/docs/xml/lcl/forms.xml @@ -202,7 +202,7 @@ but usually the window appear occupying all of the work area of a monitor. The window appears in full screen mode, when allowed by the platform. It will, for example, attempt to appear on the top of task bars and other static platform user interface elements. wsFullScreen is converted to wsMaximized -for use on the the Windows platform; the API does not provide a full screen +for use on the Windows platform; the API does not provide a full screen option. @@ -643,7 +643,7 @@ 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 +ScrollHandler ensures 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 @@ -2318,7 +2318,7 @@ and lapAutoAdjustForDPI enumeration values.

Create is the overridden constructor for the class instance. Create calls the inherited method using the value in TheOwner as -the the owner of the class instance. Create sets the default values for the +the owner of the class instance. Create sets the default values for the following properties:

-Use the Enabled property to enable or disable the magnetic window manager in -the global Screen instance. +The Enabled property determines whether the magnetic window manager is enabled +or disabled in the global Screen instance.

+ +Use of TWindowMagnetManager depends on the LM_WINDOWPOSCHANGING message +dispatched when the position for a form (window) is changed. In the current +LCL release, the LM_WINDOWPOSCHANGING message is dispatched for the Windows +platform only. None of the other widgetsets checked for or apply the message. + -Added in LCL version 2.4. +Added in LCL version 2.4. @@ -3488,20 +3494,28 @@ Snaps the specified form to the nearest snap target.

No actions are performed in the method when the Enabled property is set to -False, when the window flags indicate that the window is being shown or +False, when the window flags indicate that the window is being shown or hidden, or at design-time.

SnapForm calls the GetCompositorExtendedBorder routine to determine if the size for the window is inaccurate for borders or shadows added by the -compositor for the desktop window manager. This weirdness applies to the -Windows platforms only. For other platforms, the size adjustment is not needed -and is not performed. +compositor for the desktop window manager. Both the SnapToMonitor and +SnapToForms methods are called to determine the return value for the method.

The return value is True if the window position was snapped to either an edge on the monitor or another form instance in the application.

+

+SnapForm is called from the WMWindowPosChanging method when a +LM_WINDOWPOSCHANGING message is received and handled for a form instance. +

+ +In the current LCL release, the LM_WINDOWPOSCHANGING message is dispatched for +the Windows platform only. None of the other widgetsets checked for or apply +the message. +
@@ -4708,6 +4722,11 @@ for the form, and the distance at which the snapping behavior is engaged. You can also use the SnapBuffer and ScreenSnap properties to maintain Delphi VCL code compatibility.

+ +In the current LCL release, the LM_WINDOWPOSCHANGING message is dispatched for +the Windows platform only. None of the other widgetsets checked for or apply +the message. + Added in LCL version 2.4. @@ -5881,7 +5900,7 @@ visible in the task bar when one of its forms is visible. -If the the form is about to show, calculate its metrics. +If the form is about to show, calculate its metrics.

AllAutoSized is an overridden method used to apply the position @@ -6401,7 +6420,6 @@ aspects of the form instance. At run-time, it also calls Owner for the class instance. - Creates a form instance without a resource (.lfm) file. @@ -6419,11 +6437,18 @@ properties for the form instance, including:

  • Sets the default bounds for the form instance.
  • Sets Visible to False.
  • Sets WindowState to wsNormal.
  • -
  • Allocates resources for the Icon property but does not assign a -bitmap.
  • +
  • +Allocates resources for the Icon property but does not assign a +bitmap. +
  • Sets the default value for Color.
  • -
  • Calls Screen.AddForm to register the form instance on the current -screen.
  • +
  • +Calls Screen.AddForm to register the form instance on the current +screen. +
  • +
  • +Allocates resources for the SnapOptions property. +
  • @@ -6435,8 +6460,6 @@ screen. Ignored in the current implementation.
    - - Destructor for the class instance. @@ -6451,8 +6474,8 @@ screen. Destroy disables auto-sizing to prevent resize messages while the form is being freed. Destroy frees resources allocated for the form instance, including its Icon and any allocated icon handles. The form instance is -removed from Screen, and its ActionLists are freed. Destroy frees all form -handlers added to the class instance. +removed from Screen, and its ActionLists and SnapOptions are freed. Destroy +frees all form handlers added to the class instance.

    Destroy calls the inherited destructor prior to exiting from the method. @@ -8257,6 +8280,12 @@ instance to an edge for another form in the application. Use the SnapOptions.SnapFormTarget property to control whether the form allows other forms to be snapped to its edges.

    + +Screen snapping depends on the LM_WINDOWPOSCHANGING message dispatched +when the position for a form (window) is changed. In the current LCL release, +the LM_WINDOWPOSCHANGING message is dispatched for the Windows platform only. +None of the other widgetsets checked for or apply the message. +
    Added in LCL version 2.4. @@ -8270,6 +8299,12 @@ Distance from (or proximity to) an edge on a snap target where the snapping behavior is automatically engaged. + +Screen snapping depends on the LM_WINDOWPOSCHANGING message dispatched +when the position for a form (window) is changed. In the current LCL release, +the LM_WINDOWPOSCHANGING message is dispatched for the Windows platform only. +None of the other widgetsets checked for or apply the message. + Added in LCL version 2.4. @@ -10661,7 +10696,6 @@ application. - @@ -11417,15 +11451,16 @@ application. It is initialized in the Create constructor, and is enabled in the application by default.

    -Set its Enabled property to False to disable screen and form snapping -behavior in the application. -

    -

    MagnetManager is used when a TForm instance receives and handles a TLMWindowPosChanging (WMWindowPosChanging) message. Its SnapForm method is called to adjust the window position when the form instance is close enough to an edge that the snapping behavior is engaged.

    + +In the current LCL release, the LM_WINDOWPOSCHANGING message is dispatched for +the Windows platform only. None of the other widgetsets checked for or apply +the message. + Added in LCL version 2.4. @@ -11437,7 +11472,6 @@ Added in LCL version 2.4.
    - Constructor for the class instance. @@ -11446,14 +11480,13 @@ Added in LCL version 2.4. 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 allocates resources needed for properties, including: Fonts, Monitors, +CustomForms, CustomFormsZOrdered, MagnetManager, 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 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 @@ -11469,7 +11502,6 @@ used to get system fonts for the application. Owner of the class instance. - Destructor for the class instance. @@ -15826,7 +15858,7 @@ Called when the Hint timer has expired to stop showing the Hint. -Called when the the mouse is over a control with a Hint. +Called when the mouse is over a control with a Hint.

    Does nothing in the current LCL version.