From c2c075c78f8b20d9002ba9ba9af34a6dbc85770d Mon Sep 17 00:00:00 2001
From: dsiders
-
The following components are added to the Lazarus IDE component palette:
@@ -3126,10 +3126,10 @@
- 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.
+ Re-implements the method from the ancestor class. Calls the inherited method on entry using the value in Message to set the BiDiMode 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.
+ 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 dispatched 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.
- By default it is a sizeable window, but it could, for example, be a dialog form
- or a tool window, or could be non-sizeable.
+ By default it is a sizeable window, but it could, for example, be a dialog form or a tool window, or could be non-sizeable.
- 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 widgetset. There are no
- borders under GTK.
+ 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 widgetset. There are no borders under GTK.
+ SessionProperties is a String property with the names of properties, in the form instance or its child components. It allows published property values to be saved to and restored from an external storage mechanism like: TIniPropStorage, TXMLPropStorage, or TJSONPropStorage.
+
+ Values in the property are delimited using the ';' (SemiColon) character. Component properties require both the component and property names using dotted notation like 'Image1.Visible'. The values can be assigned at design-time using a dialog in the Lazarus IDE, or by setting the property value at run-time.
+
+ For example:
+
+ At design-time, the selection dialog is limited to published properties since RTTI is used to display and access the property values. Use the event handlers in the storage mechanism, or its StoredValues property, to save or restore properties with lesser visibility. Use the Save and Restore methods in the storage mechanism to read and write the property values.
+
+ TForm sets the visibility for SessionProperties, introduced in TControl, to published.
+
+ Class type used to create new TForm instances. Used in the
- 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.
+ 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.
- AutoScroll is a Boolean property which indicates if the form can automatically show or hide its scroll bars. The default valule for the property is False in TCustomDockForm.
+ AutoScroll is a Boolean property which indicates if the form can automatically show or hide its scroll bars. The default value for the property is False in TCustomDockForm.
- 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.
+ 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.
Sets the result in Message to HTTRANSPARENT. This forces the message to be forwarded to other windowed controls in the Z-Order until a value other than HTTRANSPARENT is returned.
@@ -6601,7 +6647,9 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
Sets the bounds for the hint window to the values in the HintRect property, and makes the window Visible. The internal auto-hide timer is enabled when AutoHide contains True.
@@ -6854,16 +6902,22 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
SetBounds is an overridden method in THintWindow. It calls the inherited method on entry to apply the argument values to the bounds for the class instance. It calls the UpdateRegion method to set the window region, or apply a background theme when enabled.
@@ -6983,8 +7039,9 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
+ If AutoHide is TRUE, the hint disappears after an interval specified by HideInterval.
+
+ MonitorNum is a read-only Integer property with the ordinal position where the class instance is stored in a list of Monitors. The value for the property is assigned in the UpdateMonitors method in TScreen when the monitor class instance is created and stored.
+
+ Left is a read-only Integer property with the coordinate for the left edge of the monitor. It contains the value from the Left member in BoundsRect.
+
+ Height is a read-only Integer property with the height for the monitor in pixels. The property value is calculated as the difference between the Bottom and Top members in BoundsRect.
+
+ Top is a read-only Integer property with the top coordinate for the monitor. It contains the value from the Top member in BoundsRect.
+
+ Width is a read-only Integer property with the width for the monitor. It is calculated as the difference between the Right and Left members in BoundsRect.
+
+ BoundsRect is a read-only TRect property which contains the bounds for the display device. The property value is assigned from TMonitorInfo information retrieved using the platform-specific GetMonitorInfo routine. The rectangle can be empty (where all members have the value 0) if monitor information was not successfully retrieved from the widgetset.
+
+ WorkareaRect is a read-only TRect property with the bounds for the usable display area on the monitor. This does not include any space covered by the system task bar.
+
+ The property value is assigned from TMonitorInfo information retrieved using the platform-specific GetMonitorInfo routine. The rectangle can be empty (where all members have the value 0) if monitor information was not successfully retrieved from the widgetset.
+
+ Primary is a read-only Boolean property which indicates if the monitor is the primary display in a list of monitors. The property value is determined using flag values in the TMonitorInfo retrieved using GetMonitorInfo for the platform or operating system. It is set to True when the monitor information contains MONITORINFOF_PRIMARY in its flags.
+
+ Primary is used when the value for the PrimaryMonitor property is retrieved in the TScreen class. It indicates which TMonitor instance is used as the value for the PrimaryMonitor property.
+
+ PixelsPerInch is a read-only Integer property with the display density for the monitor. The property value is determined by calling the GetDpiForMonitor routine for the widgetset to retrieve the effective dots-per-inch for both horizontal and vertical dimensions. The horizontal density is used in the property value.
+
+ If the GetDpiForMonitor routine does not complete successfully, the PixelsPerInch property in TScreen is used as the property value.
+
+ PixelsPerInch can be used at run-time to ensure that the display density for a Font or Canvas matches the setting in a specific monitor. It is used in the Show and AutoScale methods in TCustomForm to apply an auto-adjust layout policy. It is also used in the form designer for the Lazarus IDE to perform similar actions during component streaming.
+
TMonitorList is a TList descendant used to store TMonitor class instances representing the physical monitors attached to the system. It provides an indexed Items property that can be used to access monitor information by an ordinal position in the list. It also provides an overridden Notify method to free a TMonitor instance when the lnDeleted list notification is received.
@@ -7256,7 +7490,9 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
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.
@@ -7464,14 +7704,18 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
+ SetFocusedForm ensures that the form in AForm becomes the FocusedForm in the class instance when needed. No actions are performed in the method, and the return value is set to True, when AForm and FocusedForm have the same values.
+
+ SetFocusedForm sends a CM_DEACTIVATE message to the form instance in FocusedForm (when assigned).
+
+ The return value indicates if the focus state has changed during form deactivation, and may return False if deactivation failed. FocusedForm is set to Nil if deactivation failed.
+
+ Otherwise, AForm is saved to the FocusedForm property and a CM_ACTIVATE message is performed. The return value is False if the activation failed.
+
+ SetFocuseForm is called from the SetFocusedControl method in TCustomForm when a new control becomes focused on a form other than FocusedForm.
+
+// var AForm: TForm;
+AForm.SessionProperties := 'Top;Left;WindowState;Image1.Visible;Image1.Transparent';
+
+
- 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, 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.
@@ -7939,7 +8372,9 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
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.
@@ -7962,7 +8397,9 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
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.
@@ -8294,10 +8731,14 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
MonitorFromRect is a TMonitor function used to get the monitor where the coordinates in the specified rectangle are located.
@@ -8706,7 +9153,9 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
Cursors is an indexed HCURSOR property which provides access to the handle for a mouse cursor shape by its numeric value. The cursor constants (like crHourGlass) defined in the
CustomFormCount is a read-only Integer property which contains the number of TCustomForm instances stored in the CustomForms property. Read access for the property value is redirected to the Count property in CustomForms.
@@ -8770,7 +9221,9 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
CustomFormsZOrdered is a read-only indexed TCustomForm property which provides access to a custom form by its ordinal position in the Z-Order for the screen. The form at position 0 (zero) is displayed at the top of the Z-Order, and overlaps any form with a higher Z-Order value.
@@ -8830,7 +9283,7 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
- DesktopLeft is a read-only Integer property with the left coordinate for the desktop. The property value contains the virtual screen size returned from GetSystemMetrics for the SM_XVIRTUALSCREEN parameter.
+ DesktopLeft is a read-only Integer property with the left coordinate for the desktop. The property value contains the virtual screen coordinate returned from GetSystemMetrics for the SM_XVIRTUALSCREEN parameter.
DesktopLeft is used in the MoveToDefaultPosition method in TCustomForm. The values in DesktopLeft, DesktopTop, DesktopWidth and DesktopHeight are also assigned to members in the DesktopRect property.
@@ -8846,7 +9299,7 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
- DesktopTop is a read-only Integer property with the top coordinate for the desktop. The property value contains the virtual screen size returned from GetSystemMetrics for the SM_YVIRTUALSCREEN parameter.
+ DesktopTop is a read-only Integer property with the top coordinate for the desktop. The property value contains the virtual screen coordinate returned from GetSystemMetrics for the SM_YVIRTUALSCREEN parameter.
DesktopTop is used in the MoveToDefaultPosition method in TCustomForm. The values in DesktopLeft, DesktopTop, DesktopWidth and DesktopHeight are also assigned to members in the DesktopRect property.
@@ -9041,7 +9494,9 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
PrimaryMonitor is a read-only TMonitor property with the primary monitor for the system. The property value is determined by checking for the TMonitor instance in Monitors with its Primary property set to True. The property value is Nil if a monitor is not found with its Primary property set to True.
@@ -9163,7 +9622,7 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
Use Height to get height for the primary monitor.
- Use DesktopWidth to get the usable width for the desktop minus the area reserved for a task bar.
+ Use DesktopWidth to get the usable width for the entire desktop.
+ WorkAreaRect is a read-only TRect property with the bounds for the usable display area on the primary monitor. It excludes the area covered by the system task bar. The return value is the result from the platform-specific SystemParametersInfo routine in the LCL interface using the SPI_GETWORKAREA parameter constant.
+
+ Use DesktopRect to get the bounds for the entire desktop spanning all monitors.
+
+ Use the Monitors property to access screen information for a specific monitor.
+
+ The property value is calculated as the difference between the Bottom and Top members in WorkAreaRect.
+
+ The property value contains the Left member from WorkAreaRect.
+
- Use DesktopWidth to get the width for the primary monitor including the task bar area. + Use DesktopWidth to get the width for the entire desktop spanning all monitors.
TShowHintEvent is an object procedure type which defines an event handler signalled to perform hint display. It is the type used for the TApplication.OnShowHint event handler property. @@ -9558,7 +10047,9 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
TApplicationFlags is the type used for the Flags property in TApplication. @@ -9583,11 +10074,13 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
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.
@@ -9874,7 +10373,7 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
- 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.
@@ -9886,7 +10385,9 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
The default value is bdLeftToRight.
@@ -13541,14 +14044,16 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
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. @@ -14668,10 +15181,14 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
- Calls GetParentDesignControl to get the return value for the function. Raises an EInvalidOperation exception if a TCustomDesignControl instance is not found for the specififed control. + Calls GetParentDesignControl to get the return value for the function. Raises an EInvalidOperation exception if a TCustomDesignControl instance is not found for the specified control.
Used in methods which perform scaling operations for TCustomForm or TControl instances. @@ -14769,11 +15286,19 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
An accelerator consists of an ampersand followed by the accelerator key. Duplicate ampersands are ignored; they denote a literal (displayed) ampersand character (&).
++ IsAccel calls UTF8Pos to locate all occurrences of a single Ampersand character in Str. The character immediately following the Ampersand is the short cut character for the accelerator, and it is compared to the numeric value in VK. If one of the short cut characters matches the value in VK, the return value is set to True and the routine is exited. If none of the short cut characters match VK, or an accelerator is not present in Str, the return value is False. +
++ IsAccel is called from controls which implement overridden CMDialogChar or DialogChar methods. It is also called when widgetset classes handle menu item selection and execution in an application. +
+ Calls the NotifyUserInputHandler method in the Application singleton when it has been assigned using Msg as an argument. +
++ NotifyApplicationUserInput is used as a callback routine in widgetset classes. It allows the widget to notify the application when a mouse or a keyboard event is pending in the LCL interface. +
+- A short Hint is separated from the long Hint by a '|' character. When no such character is found, the whole Hint is returned. + A short Hint is separated from the long Hint by a '|' character. If the character is not found, the whole Hint string is returned.
+ A long Hint is the part of the text which appears after a '|' character in Str. For example: +
+'Short Hint|This is the Long Hint for a control.'
+ + If the '|' character is not found, the value in Str is returned. +
++ Screen is a unit global TScreen variable which provides information about the display devices attached to the system. It allows access to the physical attributes for the monitors available in the application, as well logical attributes for the Desktop. It can also be used to access information about the Forms, DataModules, Fonts, and Cursor shapes used on the displays. +
++ See TScreen for more information about the properties, methods and events in the class instance. +
+
+ Screen is allocated in the initialization section for the
Used in the implementation of the TApplication.HandleException method. @@ -14863,7 +15433,9 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
FreeWidgetSet is a procedure used to free resources allocated to the Screen, Application, Clipboards, and WidgetSet singletons.
@@ -15019,7 +15595,7 @@ HintWindow.ActivateHint(Rect, 'This is the hint');
- Register is a procedure used to register components declared in the
Standard Tab