diff --git a/components/lazcontrols/docs/checkboxthemed.xml b/components/lazcontrols/docs/checkboxthemed.xml index 4415fb254e..6748c8b0d9 100644 --- a/components/lazcontrols/docs/checkboxthemed.xml +++ b/components/lazcontrols/docs/checkboxthemed.xml @@ -1,784 +1,919 @@ - - - Implements a custom-drawn check box control drawn using theme services. - -

- checkboxthemed.pas contains classes used to implements a custom-drawn check box control drawn using theme services. -

-

- This file is part of the LazControls package. -

-
+ + + +Implements a custom-drawn check box control drawn using theme services. + + +

+checkboxthemed.pas contains classes used to implements a +custom-drawn check box control drawn using theme services. +

+

+This file is part of the LazControls package. +

+
- - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - Provides a link between a themed check box control and its action. - -

- TCheckBoxThemedActionLink is a TWinControlActionLink descendant which maintains a link between a TCustomCheckBoxThemed class instance and its Action. It provides overridden methods that use TCustomCheckBoxThemed as the internal client for the link, and maintains the checked state for the client control when the Action is linked and executed. -

-
- - TCustomAction - TWinControlActionLink - TControlActionLink - -
+ + +Provides a link between a themed check box control and its action. + + +

+TCheckBoxThemedActionLink is a TWinControlActionLink +descendant which maintains a link between a TCustomCheckBoxThemed +class instance and its Action. It provides overridden methods that +use TCustomCheckBoxThemed as the internal client for the link, and maintains +the checked state for the client control when the Action is linked and +executed. +

+
+ +TCustomAction +TWinControlActionLink +TControlActionLink + +
- - + + - - Sets the control used as the client in the action link. - -

- Calls the inherited method, and stores the control as a TCustomCheckBoxThemed instance in the member variable used in the class instance. -

-
- -
- - The themed check box object that is the client for the action link. - + +Sets the control used as the client in the action link. + +

+Calls the inherited method, and stores the control as a TCustomCheckBoxThemed +instance in the member variable used in the class instance. +

+
+ +
+ + +The themed check box object that is the client for the action link. + + - - - Sets the value in the Checked property for the client control when linked to the action. - - - - - - - - New value for the Checked property. - + + +Sets the value in the Checked property for the client control when linked to +the action. + + + + + + + +New value for the Checked property. + - - - - Determines if an Action is linked to the client control and if the Checked values are in sync. - - - - - - - - - True when an Action exists for the client control and they share the same Checked value. - - + + + +Determines if an Action is linked to the client control and if the Checked +values are in sync. + + + + + + + + +True when an Action exists for the client control and they share the +same Checked value. + + - - Class type used to create new instances of TCheckBoxThemedActionLink. - -

- TCheckBoxThemedActionLinkClass is a TCheckBoxThemedActionLink class type. -

-
- - - -
+ + +Class type used to create new instances of TCheckBoxThemedActionLink. + + +

+TCheckBoxThemedActionLinkClass is a +TCheckBoxThemedActionLink class type. +

+
+ + + +
- - Implements the base class for a custom-drawn check box control. - -

- TCustomCheckBoxThemed is a TCustomControl descendant which implements the base class for a custom-drawn check box control. -

-

- Do not create instances of TCustomCheckBoxThemed; use the TCheckBoxThemed descendant. -

-
- - - TCustomControl - -
+ +Implements the base class for a custom-drawn check box control. + +

+TCustomCheckBoxThemed is a TCustomControl descendant +which implements the base class for a custom-drawn check box control. +

+

+Do not create instances of TCustomCheckBoxThemed; use the +TCheckBoxThemed descendant. +

+
+ + +TCustomControl + +
- - - - - - - + + + + + + + - - Gets the value for the Check property. - - - - - - Value for the property. - + +Gets the value for the Check property. + + + + + +Value for the property. + - - Sets the value for the Alignment property. - - - - - - New value for the property. - + +Sets the value for the Alignment property. + + + + + +New value for the property. + - - Sets an internal flag used to track mouse hover, and redraws the control. - - - New value for the internal flag. - + + +Sets an internal flag used to track mouse hover, and redraws the control. + + + +New value for the internal flag. + - - Sets the value for the Checked property. - - - - - - New value for the property. - + +Sets the value for the Checked property. + + + + + +New value for the property. + - - Sets the value for the State property. - - - - - - New value for the property. - + +Sets the value for the State property. + + + + + +New value for the property. + - - + + - - - - Gets the dimensions for the check box in the control scaled to the given display density. - - - - - - TSize instance with the dimensions for the check box. - - - Design-time PPI setting used to scale to the PPI setting for the screen. - + + + +Gets the dimensions for the check box in the control scaled to the given +display density. + + + + + +TSize instance with the dimensions for the check box. + + + +Design-time PPI setting used to scale to the PPI setting for the screen. + + - - Member used to track key or mouse state in the control. - - - + +Member used to track key or mouse state in the control. + + + - - Not used in the current implementation. - - - + +Not used in the current implementation. + + + - - Not used in the current implementation. - - - + +Not used in the current implementation. + + + - - Not used in the current implementation. - - - + +Not used in the current implementation. + + + - - Calculates the preferred height and width for the control. - - - - - Preferred width calculated in the method. - - - Preferred height calculated in the method. - - - True if additional space is reserved for theming element / details. - + +Calculates the preferred height and width for the control. + + + + +Preferred width calculated in the method. + + +Preferred height calculated in the method. + + + +True if additional space is reserved for theming element / details. + + - - Handles the CM_BIDIMODECHANGED control message. - - - - - Control message examined in the method. - + +Handles the CM_BIDIMODECHANGED control message. + + + + +Control message examined in the method. + - - Handles the CM_ENABLEDCHANGED control message. - - - - - Control message examined in the method. - + +Handles the CM_ENABLEDCHANGED control message. + + + + +Control message examined in the method. + - - - Gets the size needed for the check box when drawn using ThemeServices. - - -

- InitCheckBoxSize is a class method used to initialize the member used to store the check box size when drawn using theme element details. Calls the GetDetailSize method in ThemeServices to store the value for the TPoint member. -

-
- -
+ + +Gets the size needed for the check box when drawn using ThemeServices. + + +

+InitCheckBoxSize is a class method used to initialize the member +used to store the check box size when drawn using theme element details. +Calls the GetDetailSize method in ThemeServices to store the value for the +TPoint member. +

+
+ +
- - Handles a message with an accelerator key for the control. - - - - - True when the key is handled in the method. - - - Message with the key event examined in the method. - + +Handles a message with an accelerator key for the control. + + + + +True when the key is handled in the method. + + +Message with the key event examined in the method. + - - Performs actions needed when the control is clicked. - -

- DoClick ensures that the State or Checked property is updated when the control is clicked. When AllowGrayed is enabled, the value in State is updated to the next value for the tri-state check box control. Otherwise, the current value in Checked is toggled. -

-

- DoClick is called from DialogChar when an accelerator key is handled for the control. It is called from KeyUp when the VK_RETURN or VK_SPACE key code is handled for the control. It is also called from MouseUp when a Left mouse button event occurs on the hovered control. -

-
- - - - - - - - -
+ +Performs actions needed when the control is clicked. + +

+DoClick ensures that the State or Checked property is updated when the +control is clicked. When AllowGrayed is enabled, the value in State is +updated to the next value for the tri-state check box control. Otherwise, the +current value in Checked is toggled. +

+

+DoClick is called from DialogChar when an accelerator key is handled for the +control. It is called from KeyUp when the VK_RETURN or VK_SPACE key code is +handled for the control. It is also called from MouseUp when a Left mouse +button event occurs on the hovered control. +

+
+ + + + + + + + +
- - - Performs actions needed when the control is entered (receives input focus). - - -

- DoEnter is an overridden method in TCustomCheckBoxThemed. It calls the inherited method on entry to signal the OnEnter event handler (when assigned). It calls Invalidate to cause the control to be redrawn. -

-
- - TWinControl.DoEnter - TWinControl.OnEnter - TWinControl.Invalidate - -
+ + +Performs actions needed when the control is entered (receives input focus). + + +

+DoEnter is an overridden method in +TCustomCheckBoxThemed. It calls the inherited method on entry to +signal the OnEnter event handler (when assigned). It calls +Invalidate to cause the control to be redrawn. +

+
+ +TWinControl.DoEnter +TWinControl.OnEnter +TWinControl.Invalidate + +
- - Performs actions needed when the control is exited (loses input focus). - -

- DoExit is an overridden method in TCustomCheckBoxThemed. It calls the inherited method on entry to signal the OnExit event handler (when assigned). It calls Invalidate to force the control to be redrawn. -

-
- - TWinControl.DoExit - TWinControl.OnExit - TWinControl.Invalidate - + + +Performs actions needed when the control is exited (loses input focus). + + +

+DoExit is an overridden method in +TCustomCheckBoxThemed. It calls the inherited method on entry to +signal the OnExit event handler (when assigned). It calls +Invalidate to force the control to be redrawn. +

+
+ +TWinControl.DoExit +TWinControl.OnExit +TWinControl.Invalidate + -
+
- - Gets the class reference used to create the action link for the control. - -

- GetActionLinkClass is an overridden method in TCustomCheckBoxThemed used to get the class reference needed to create a new action link for the control. The return value is the TCheckBoxThemedActionLink type. -

-

- It re-implements the method introduced in the ancestor class. It does not call the inherited method. -

-
- -
- - Always returns the TCheckBoxThemedActionLink type. - + + +Gets the class reference used to create the action link for the control. + + +

+GetActionLinkClass is an overridden method in +TCustomCheckBoxThemed used to get the class reference needed to +create a new action link for the control. The return value is the +TCheckBoxThemedActionLink type. +

+

+It re-implements the method introduced in the ancestor class. It does not +call the inherited method. +

+
+ +
+ +Always returns the TCheckBoxThemedActionLink type. + - - Handles key down events for the control. - - - - - Key code examined in method. - - - Shift, Alt, or Ctrl modifier for the key. - + +Handles key down events for the control. + + + + +Key code examined in method. + + +Shift, Alt, or Ctrl modifier for the key. + - - Handles key up events for the control. - - - - - Key code examined in method. - - - Shift, Alt, or Ctrl modifier for the key. - + +Handles key up events for the control. + + + + +Key code examined in method. + + +Shift, Alt, or Ctrl modifier for the key. + - - Handles mouse down events for the control. - - - - - Mouse button for the event. - - - Shift, Alt, or Ctrl modifier for the mouse event. - - - Horizontal coordinate for the mouse pointer. - - - Vertical coordinate for the mouse pointer. - + +Handles mouse down events for the control. + + + + +Mouse button for the event. + + +Shift, Alt, or Ctrl modifier for the mouse event. + + +Horizontal coordinate for the mouse pointer. + + +Vertical coordinate for the mouse pointer. + - - Updates the hover state when the mouse pointer enters the control. - - - + + +Updates the hover state when the mouse pointer enters the control. + + + + - - Updates the hover state when the mouse pointer leaves the control. - - - + + +Updates the hover state when the mouse pointer leaves the control. + + + + - - Handles a mouse up event for the control. - -

- MouseUp is an overridden method in TCustomCheckBoxThemed. It calls the inherited method on entry to signal the OnMouseUp event handler (when assigned). It ensures that a Left mouse button click anywhere within the client rectangle for the control causes the DoClick method to be called to update values in the State and/or Checked property. -

-
- -
- - Mouse button for the event. - - - Shift, Ctrl, Alt modifier for the mouse event. - - - Horizontal coordinate for the mouse pointer. - - - Vertical coordinate for the mouse pointer. - + +Handles a mouse up event for the control. + +

+MouseUp is an overridden method in +TCustomCheckBoxThemed. It calls the inherited method on entry to +signal the OnMouseUp event handler (when assigned). It ensures +that a Left mouse button click anywhere within the client rectangle for the +control causes the DoClick method to be called to update values in the State +and/or Checked property. +

+
+ +
+ +Mouse button for the event. + + +Shift, Ctrl, Alt modifier for the mouse event. + + +Horizontal coordinate for the mouse pointer. + + +Vertical coordinate for the mouse pointer. + - - Draws the themed check box control. - -

- Paint is an overridden method in TCustomCheckBoxThemed. It calls the inherited method to signal the OnPaint event handler (when assigned). It calls PaintSelf which implements the custom drawing method used for the themed check box control. -

-
- - - TCustomControl.Paint - -
+ +Draws the themed check box control. + +

+Paint is an overridden method in TCustomCheckBoxThemed. +It calls the inherited method to signal the OnPaint event handler +(when assigned). It calls PaintSelf which implements the custom +drawing method used for the themed check box control. +

+
+ + +TCustomControl.Paint + +
- - - Redraws the control when the caption text has been changed. - - -

- Calls the inherited method on entry. Calls Invalidate to force the control to be redrawn. -

-
- - TWinControl.Invalidate - -
+ + +Redraws the control when the caption text has been changed. + + +

+Calls the inherited method on entry. Calls Invalidate to force the +control to be redrawn. +

+
+ +TWinControl.Invalidate + +
- - Handles the WM_SIZE message for the control and redraws the control. - -

- Calls the inherited method on entry to apply the message to the control. Calls Invalidate to force the control to be redrawn. -

-
- - TWinControl.WMSize - -
- - Window message examined in the method. - + + +Handles the WM_SIZE message for the control and redraws the control. + + +

+Calls the inherited method on entry to apply the message to the control. +Calls Invalidate to force the control to be redrawn. +

+
+ +TWinControl.WMSize + +
+ +Window message examined in the method. + - - Indicates if the mouse pointer is hovered over the control. - - - + +Indicates if the mouse pointer is hovered over the control. + + + - - - Protected property used to track the Checked state in the ActionLink/Action for the control. - - - - + + +Protected property used to track the Checked state in the ActionLink/Action +for the control. + + + + - - - Internal constant with the space reserved for the focus border in the control. - - - - + + +Internal constant with the space reserved for the focus border in the control. + + + + - - Internal constant with the space reserved for padding in the control. - - - + + +Internal constant with the space reserved for padding in the control. + + + + - - - Renders a check box control using the specified parameters. - -

- PaintSelf is a class method used to render a custom-drawn check box control using the parameters passed to the method. -

-

- PaintSelf calculates the size and position for both the caption and the check box in the control using the theme element details in theme services. This includes use of the ARightToLeft parameter in DrawText flags. ThemeServices.DrawText is called to render the caption for the control. ThemeServices.DrawElement is called to draw the check box using the hovered, pressed, and checked state values for the control. -

-

- Canvas is the TCanvas instance where the control is drawn. -

-

- PaintSelf is called from the Paint method, and occurs after the inherited OnPaint event handler been signalled (when assigned). -

-
- - TThemeServices.DrawText - TThemeServices.DrawElement - -
- - Canvas for a check box control. - - - Caption text for a check box control. - - - Rectangle with the coordinates for a check box control. - - - Checked state for a check box control. - - - Alignment for caption in the check box control. - - - True if the mouse is hovered over the check box control. - - - True if the check box control is in the pressed state (mouse down). - - - True if the check box control has input focus. - - - Left-to-Right alignment for the content in the check box control. - - - True if the control is drawn in the enabled state. - + + +Renders a check box control using the specified parameters. + +

+PaintSelf is a class method used to render a custom-drawn check +box control using the parameters passed to the method. +

+

+PaintSelf calculates the size and position for both the caption and the check +box in the control using the theme element details in theme services. This +includes use of the ARightToLeft parameter in DrawText flags. +ThemeServices.DrawText is called to render the caption for the +control. ThemeServices.DrawElement is called to draw the check box +using the hovered, pressed, and checked state values for the control. +

+

+Canvas is the TCanvas instance where the control is +drawn. +

+

+PaintSelf is called from the Paint method, and occurs after the +inherited OnPaint event handler been signalled (when assigned). +

+
+ +TThemeServices.DrawText +TThemeServices.DrawElement + +
+ +Canvas for a check box control. + + +Caption text for a check box control. + + +Rectangle with the coordinates for a check box control. + + +Checked state for a check box control. + + +Alignment for caption in the check box control. + + +True if the mouse is hovered over the check box control. + + + +True if the check box control is in the pressed state (mouse down). + + + +True if the check box control has input focus. + + + +Left-to-Right alignment for the content in the check box control. + + + +True if the control is drawn in the enabled state. + - - Constructor for the class instance. - -

- Create is the overridden constructor for the class instance, and calls the inherited constructor on entry. Create sets the accessibility role and control style flags needed for the control. Create also sets the default values for properties, including: -

-
-
Alignment
-
Set to taRightJustify.
-
AllowGrayed
-
Set to False.
-
AutoSize
-
Set to True.
-
TabStop
-
Set to True.
-
-
- -
+ +Constructor for the class instance. + +

+Create is the overridden constructor for the class instance, and +calls the inherited constructor on entry. Create sets the accessibility role +and control style flags needed for the control. Create also sets the default +values for properties, including: +

+
+
Alignment
+
Set to taRightJustify.
+
AllowGrayed
+
Set to False.
+
AutoSize
+
Set to True.
+
TabStop
+
Set to True.
+
+
+ +
- - Horizontal alignment for the caption text in the control. - -

- Alignment is a TLeftRight property which contains the horizontal alignment used for the control. -

-

- The value in Alignment is used in the Paint and PaintSelf methods. It determines the alignment for Caption displayed for the control is drawn. taLeftJustify aligns the caption to the left of the check box, while taRightJustify aligns the caption to the right side of the check box. -

-

- The default value for the property is taRightJustify. -

-

- Setting a new value for the property calls the Invalidate method which forces the control to be redrawn. -

-
- - TWinControl.Invalidate - -
+ +Horizontal alignment for the caption text in the control. + +

+Alignment is a TLeftRight property which contains the +horizontal alignment used for the control. +

+

+The value in Alignment is used in the Paint and PaintSelf methods. It +determines the alignment for Caption displayed for the control is drawn. +taLeftJustify aligns the caption to the left of the check box, +while taRightJustify aligns the caption to the right side of the +check box. +

+

+The default value for the property is taRightJustify. +

+

+Setting a new value for the property calls the Invalidate method +which forces the control to be redrawn. +

+
+ +TWinControl.Invalidate + +
- - Indicates if the control can use the "grayed" state. - -

- AllowGrayed is a Boolean property which indicates if the control can be displayed using its "grayed" state. This indicates that the control is disabled or has an undetermined state value. The default value for the property is False. -

-

- AllowGrayed is used to determine the new value for the State property when the control is clicked, or when handling key events in the control. When AllowGrayed is True, a click event changes State from cbUnchecked, to cbGrayed, to cbChecked and then back to cbUnchecked. When AllowGrayed is False, the State value is toggled between cbUnchecked and cbChecked using the Checked property. -

-
- - - - - - -
+ +Indicates if the control can use the "grayed" state. + +

+AllowGrayed is a Boolean property which indicates if +the control can be displayed using its "grayed" state. This indicates that +the control is disabled or has an undetermined state value. The default value +for the property is False. +

+

+AllowGrayed is used to determine the new value for the State +property when the control is clicked, or when handling key events in the +control. When AllowGrayed is True, a click event changes State from +cbUnchecked, to cbGrayed, to cbChecked and +then back to cbUnchecked. When AllowGrayed is False, the +State value is toggled between cbUnchecked and cbChecked using the +Checked property. +

+
+ + + + + + +
- - Provides access to the checked state for the control as a Boolean value. - -

- Checked is a Boolean property used to read or write the checked or unchecked state for the control as a Boolean value. -

-

- Checked is True when the value in the State property is cbChecked. Any other value in State causes Checked to contain False (including cbGrayed). Setting a new value for the property causes State to change to either cbChecked (for True) or cbUnchecked (for False). -

-

- Use State to set the checked state for the control using the 3-state values in the TCheckBoxState enumeration. -

-

- The default value for the property is False. -

-
- - - - -
+ + +Provides access to the checked state for the control as a Boolean value. + + +

+Checked is a Boolean property used to read or write the +checked or unchecked state for the control as a Boolean value. +

+

+Checked is True when the value in the State property is +cbChecked. Any other value in State causes Checked to contain +False (including cbGrayed). Setting a new value for the +property causes State to change to either cbChecked (for True) or +cbUnchecked (for False). +

+

+Use State to set the checked state for the control using the 3-state values +in the TCheckBoxState enumeration. +

+

+The default value for the property is False. +

+
+ + + + +
- - - Indicates the checked, unchecked, or grayed state for the check box control. - - -

- State is a TCheckBoxState property which indicates the checked, unchecked, or grayed state for the check box control. The default value for the property is cbUnchecked. -

-

- At run-time, setting a new value for State causes additional actions to be performed: -

-
    -
  • Signals the OnEditingDone event handler (when assigned).
  • -
  • Signals the OnChange event handler (when assigned).
  • -
  • - Signals the OnClick event handler (when assigned) if an Action has not been assigned for the control, or the Check value in Action has not been changed. -
  • -
  • - Executes the Action (via the ActionLink) when the new property value is different than the Checked state for the Action. -
  • -
  • Calls Invalidate to force the control to be redrawn.
  • -
-

- No actions are performed at design-time, during LCL streaming, when the control is freed, or when the new value for State is the same as the existing property value. -

-

- State is related to the Checked property. Checked is True when State contains cbChecked, or False for any other value in State. Setting the value in Checked causes the value in State to be toggled between cbChecked and cbUnchecked. -

-

- The value in State is updated when the accelerator character or a click event is handled for the control. Its value is used in the Paint and PaintSelf methods to determine how the themed check box is drawn for the control. -

-
- - - - - - - TWinControl.Invalidate - TControl.OnEditingDone - TControl.OnClick - TControl.Action - TControl.ActionLink - -
+ + +Indicates the checked, unchecked, or grayed state for the check box control. + + +

+State is a TCheckBoxState property which indicates the +checked, unchecked, or grayed state for the check box control. The default +value for the property is cbUnchecked. +

+

+At run-time, setting a new value for State causes additional actions to be +performed: +

+
    +
  • Signals the OnEditingDone event handler (when assigned).
  • +
  • Signals the OnChange event handler (when assigned).
  • +
  • +Signals the OnClick event handler (when assigned) if an Action has not been +assigned for the control, or the Check value in Action has not been changed. +
  • +
  • +Executes the Action (via the ActionLink) when the new property value is +different than the Checked state for the Action. +
  • +
  • Calls Invalidate to force the control to be redrawn.
  • +
+

+No actions are performed at design-time, during LCL streaming, when the +control is freed, or when the new value for State is the same as the existing +property value. +

+

+State is related to the Checked property. Checked is True +when State contains cbChecked, or False for any other value in State. +Setting the value in Checked causes the value in State to be toggled between +cbChecked and cbUnchecked. +

+

+The value in State is updated when the accelerator character or a click event +is handled for the control. Its value is used in the Paint and +PaintSelf methods to determine how the themed check box is drawn +for the control. +

+
+ + + + + + +TWinControl.Invalidate +TControl.OnEditingDone +TControl.OnClick +TControl.Action +TControl.ActionLink + +
- - Event handler signalled when the value for the control is changed. - -

- OnChange is a TNotifyEvent property with the event handler signalled when the value for the control is changed. -

-

- OnChange is signalled when the value in State or Checked is modified. It occurs after the OnEditingDone event handler and before the OnClick event handler (or execution of the Action) for the control. -

-

- Applications must implement and assign an object procedure to the property to respond to the event notification. -

-
- - - - TControl.OnEditingDone - TControl.OnClick - TControl.Action - TControl.ActionLink - TNotifyEvent - -
+ + +Event handler signalled when the value for the control is changed. + + +

+OnChange is a TNotifyEvent property with the event +handler signalled when the value for the control is changed. +

+

+OnChange is signalled when the value in State or +Checked is modified. It occurs after the OnEditingDone +event handler and before the OnClick event handler (or execution +of the Action) for the control. +

+

+Applications must implement and assign an object procedure to the property to +respond to the event notification. +

+
+ + + +TControl.OnEditingDone +TControl.OnClick +TControl.Action +TControl.ActionLink +TNotifyEvent + +
- - Implements a custom-drawn check box control. - -

- TCheckBoxThemed is a TCustomCheckBoxThemed descendant which implements a custom-drawn check box control. It implements a custom paint method to render the control using theme services. TCheckBoxThemed is the type used to implement check box controls used in both the Object Inspector and Property editors in the Lazarus IDE. -

-

- TCheckBoxThemed sets the visibility and default values for properties defined in an ancestor class. -

-
- - - -
+ +Implements a custom-drawn check box control. + +

+TCheckBoxThemed is a TCustomCheckBoxThemed descendant +which implements a custom-drawn check box control. It implements a custom +paint method to render the control using theme services. TCheckBoxThemed is +the type used to implement check box controls used in both the Object +Inspector and Property editors in the Lazarus IDE. +

+

+TCheckBoxThemed sets the visibility and default values for properties defined +in an ancestor class. +

+
+ + + +
- - - - + + + + - - - -

- The default value for the property is True in TCheckBoxThemed. -

-
-
+ + + +

+The default value for the property is True in +TCheckBoxThemed. +

+
+
- - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - -

- The default value for the property is True in TCheckBoxThemed. -

-
-
+ + +

+The default value for the property is True in +TCheckBoxThemed. +

+
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + -
-
+
+
diff --git a/components/lazcontrols/docs/dividerbevel.xml b/components/lazcontrols/docs/dividerbevel.xml index bbecc1ba78..29e396cb08 100644 --- a/components/lazcontrols/docs/dividerbevel.xml +++ b/components/lazcontrols/docs/dividerbevel.xml @@ -1,554 +1,672 @@ - + - - - Implements a bevel with additional drawing features used as a separator on forms, frames, and panels. - - -

- DividerBevel.pas contains the TDividerBevel control, a bevel with additional drawing features. This file is part of the LazControls package. -

-
+ + +Implements a bevel with additional drawing features used as a separator on +forms, frames, and panels. + + +

+DividerBevel.pas contains the TDividerBevel control, +a bevel with additional drawing features. This file is part of the +LazControls package. +

+
- - - - - - - - - - - - + + + + + + + + + + + + - - Line with text in the middle, used as a divider or header. - -

- TDividerBevel is a TGraphicControl descendant which implements a component represented as a beveled line with a caption. It is used as a separator or header on forms, frames, and panels. It is similar to TBevel, but provides additional drawing styles as well layout options for the control caption. -

-

- TDividerBevel can be oriented either horizontally or vertically. The bevel can be drawn using a raised or lowered drawing style. The bevel can be rendered using a line drawing shape or a pattern defined in the Style property. The height of the bevel can be specified, or it can resize to the Text on the control. The caption can be drawn at a specific position (LeftIndent) and surrounded by an unused space using the CaptionSpacing property. Transparency is also supported in the control. -

-

- The BevelWidth property indicates the thickness for the bevel. It is set to -1 by default, and indicates that the size is Max(3, TextHeight div 5). A positive value means that pixel measurements are used in the property. -

-

- The LeftIndent is set by default to 60. Any negative value in LeftIndent causes the text in Caption to be centered along the bevel orientation. -

-
- -
+ +Line with text in the middle, used as a divider or header. + +

+TDividerBevel is a TGraphicControl descendant which implements a component +represented as a beveled line with a caption. It is used as a separator or +header on forms, frames, and panels. It is similar to TBevel, but provides +additional drawing styles as well layout options for the control caption. +

+

+TDividerBevel can be oriented either horizontally or vertically. The bevel +can be drawn using a raised or lowered drawing style. The bevel can be +rendered using a line drawing shape or a pattern defined in the Style +property. The height of the bevel can be specified, or it can resize to the +Text on the control. The caption can be drawn at a specific position +(LeftIndent) and surrounded by an unused space using the CaptionSpacing +property. Transparency is also supported in the control. +

+

+The BevelWidth property indicates the thickness for the bevel. It is set to +-1 by default, and indicates that the size is Max(3, TextHeight div 5). A +positive value means that pixel measurements are used in the property. +

+

+The LeftIndent is set by default to 60. Any negative value in LeftIndent +causes the text in Caption to be centered along the bevel orientation. +

+
+ +
- - - - - - - - + + + + + + + + - - Sets the value in the BevelStyle property. - - - - TControl.AutoSize - - - - New value for the BevelStyle property. - + +Sets the value in the BevelStyle property. + + + +TControl.AutoSize + + + +New value for the BevelStyle property. + - - Sets the value in the BevelWidth property. - - - - - - - New value for the BevelWidth property. - + +Sets the value in the BevelWidth property. + + + + + + +New value for the BevelWidth property. + - - Sets the value for the CaptionSpacing property. - - - - - - - New value for the CaptionSpacing property. - + +Sets the value for the CaptionSpacing property. + + + + + + +New value for the CaptionSpacing property. + - - Sets the value for the LeftIndent property. - - - - - - - New value for the LeftIndent property. - + +Sets the value for the LeftIndent property. + + + + + + +New value for the LeftIndent property. + - - Sets the value for the Orientation property. - - - - - - - New value for the Orientation property. - + +Sets the value for the Orientation property. + + + + + + +New value for the Orientation property. + - - Sets the value for the Style property. - - - - - - - New value for the Style property. - + +Sets the value for the Style property. + + + + + + +New value for the Style property. + - - Sets the value for the Transparent property. - - - - - - - New value for the Transparent property. - + +Sets the value for the Transparent property. + + + + + + +New value for the Transparent property. + - - - Member with the height for the bevel. - - - + + +Member with the height for the bevel. + + + - - Member with the top for the bevel. - - - + +Member with the top for the bevel. + + + - - - Member with the flag set when the Font, Text, Bevel or the preferred size has been changed. - - - - - - - - - - - + + +Member with the flag set when the Font, Text, Bevel or the preferred size has +been changed. + + + + + + + + + + + - - Member with the text extent for the Caption property. - - - - - - - + +Member with the text extent for the Caption property. + + + + + + + - - The default size for a new instance of the class. - -

- GetControlClassDefaultSize is an overridden TSize function used to get the default size for new instances of the TDividerBevel class. The width (CX) in the TSize instance is set to 240. The height (CY) in the TSize instance is set to 17. -

-

- Used by the GetDefaultWidth and GetDefaultHeight methods. -

-
- - TControl.GetControlClassDefaultSize - -
- - TSize instance with the width and height for the new class instance. - + +The default size for a new instance of the class. + +

+GetControlClassDefaultSize is an overridden TSize function used to get the +default size for new instances of the TDividerBevel class. The width (CX) in +the TSize instance is set to 240. The height (CY) in the TSize instance is +set to 17. +

+

+Used by the GetDefaultWidth and GetDefaultHeight methods. +

+
+ +TControl.GetControlClassDefaultSize + +
+ + +TSize instance with the width and height for the new class instance. + + - - Calculates the height for the Caption text and the bevel on the control. - -

- CalcSize is a method used to calculate the height for the Caption text and the bevel drawn on the control. An internal flag, set when the Text or Font for the control is changed, is used to determine when the calculation is needed. No actions are performed in the method if the flag has not been set. -

-

- CalcSize calls the TextExtent method in the control Canvas to get the text extent for Caption. -

-

- BevelWidth is used to set the height for the bevel in pixels when it has a positive or zero value. When BevelWidth has a negative value, the height for the bevel is set to the larger of 20% of the text height or 3 pixels. The bevel is centered in the text height. -

-

- CalcSize is called from the CalculatePreferredSize and Paint methods. -

-
- -
+ + +Calculates the height for the Caption text and the bevel on the control. + + +

+CalcSize is a method used to calculate the height for the Caption text and +the bevel drawn on the control. An internal flag, set when the Text or Font +for the control is changed, is used to determine when the calculation is +needed. No actions are performed in the method if the flag has not been set. +

+

+CalcSize calls the TextExtent method in the control Canvas to get the text +extent for Caption. +

+

+BevelWidth is used to set the height for the bevel in pixels when it has a +positive or zero value. When BevelWidth has a negative value, the height for +the bevel is set to the larger of 20% of the text height or 3 pixels. The +bevel is centered in the text height. +

+

+CalcSize is called from the CalculatePreferredSize and Paint methods. +

+
+ +
- - Draws the control on its Canvas. - -

- Paint is an overridden method used to draw the control on its Canvas. It re-implements the method from the ancestor class, and does not call the inherited method. -

-

- Paint calls CalcSize to ensure that the height for the Caption text and the bevel are updated before the control is drawn. -

-

- If Transparent is set to False, the background for the control is filled using the value in Color. -

-

- Values in BevelStyle, Style, Orientation, and Caption are used to determine the drawing area for the bevel on the control. The PaintBevel method is called to render the bevel to the control Canvas. -

-

- When Caption has been assigned, it is positioned using the values in LeftIndent and CaptionSpacing. The TextOut method in Canvas is called to draw the Caption text using the Orientation for the control. -

-

- Use the Font property to configure the font face, style, and size used for the Caption text. -

-
- -
+ +Draws the control on its Canvas. + +

+Paint is an overridden method used to draw the control on its +Canvas. It re-implements the method from the ancestor class, and +does not call the inherited method. +

+

+Paint calls CalcSize to ensure that the height for the Caption text and the +bevel are updated before the control is drawn. +

+

+If Transparent is set to False, the background for the control is +filled using the value in Color. +

+

+Values in BevelStyle, Style, Orientation, and Caption are used to determine +the drawing area for the bevel on the control. The PaintBevel method is +called to render the bevel to the control Canvas. +

+

+When Caption has been assigned, it is positioned using the values in +LeftIndent and CaptionSpacing. The TextOut method in Canvas is called to draw +the Caption text using the Orientation for the control. +

+

+Use the Font property to configure the font face, style, and size used for +the Caption text. +

+
+ +
- - Performs actions when the Font for the control has been changed. - -

- FontChanged is an overridden method used to update the control when the value in Font has been changed. It calls the inherited method on entry to apply the new font to the control Canvas, and post a CM_FONTCHANGED control message to the widgetset class. The internal flag used to force text and bevel sizes to be recalculated is set. Invalidate is called to force the control to be redrawn. -

-

- FontChanged is assigned as the OnChange event handler in the Font property. -

-
- - TGraphicControl.FontChanged - -
- - Object instance for the event notification. - + + +Performs actions when the Font for the control has been changed. + + +

+FontChanged is an overridden method used to update the control +when the value in Font has been changed. It calls the inherited +method on entry to apply the new font to the control Canvas, and +post a CM_FONTCHANGED control message to the widgetset class. The +internal flag used to force text and bevel sizes to be recalculated is set. +Invalidate is called to force the control to be redrawn. +

+

+FontChanged is assigned as the OnChange event handler in the Font property. +

+
+ +TGraphicControl.FontChanged + +
+ +Object instance for the event notification. + - - Sets the value for the AutoSize property. - -

- SetAutoSize is an overridden method in TDividerBevel. It calls the inherited method on entry to update the member for AutoSize and to call the AdjustSize method when needed. It extends InvalidatePreferredSize method (in the ancestor) to clear any cached preferred size value for the control or any of its parents when Value is set to True. -

-
- - TControl.AutoSize - TControl.InvalidatePreferredSize - -
- - New value for the AutoSize property. - + +Sets the value for the AutoSize property. + +

+SetAutoSize is an overridden method in TDividerBevel. It calls the +inherited method on entry to update the member for AutoSize and to call the +AdjustSize method when needed. It extends InvalidatePreferredSize method (in +the ancestor) to clear any cached preferred size value for the control or any +of its parents when Value is set to True. +

+
+ +TControl.AutoSize +TControl.InvalidatePreferredSize + +
+ +New value for the AutoSize property. + - - - Performs actions when the CM_TEXTCHANGED message is handled for the control. - - -

- TextChanged is an overridden method used to perform action needed when the value in the text property has been changed for the control. It re-implements the method from the ancestor class to set in the internal flag to recalculate text and bevel sizes in the control, and calls the Invalidate method to force the control to be redrawn. -

-

- TextChanged is called from the CMTextChanged method. -

-
- - TControl.CMTextChanged - -
+ + +Performs actions when the CM_TEXTCHANGED message is handled for the control. + + +

+TextChanged is an overridden method used to perform action needed +when the value in the text property has been changed for the control. It +re-implements the method from the ancestor class to set in the internal flag +to recalculate text and bevel sizes in the control, and calls the +Invalidate method to force the control to be redrawn. +

+

+TextChanged is called from the CMTextChanged method. +

+
+ +TControl.CMTextChanged + +
- - Calculates the preferred size for the control. - -

- CalculatePreferredSize is an overridden method used to calculate the preferred width and height for the control. It re-implements the method from the ancestor class, and does not call the inherited method. -

-

- CalculatePreferredSize sets the internal flag to recalculate the text and bevel height, and calls CalcSize to update the values. -

-

- The value in Orientation is used to determine the value calculated in the method. When set to trHorizontal, PreferredHeight is set to the maximum of the text height or the bevel height (Caption is empty). When set to trVertical, the PreferredWidth is set to the maximum of the text height or the bevel height (Caption is empty). -

-
- -
- - The preferred width for the control. - - - The preferred height for the control. - - - - True if additional space is reserved for theme elements. Not used in the method. - - + +Calculates the preferred size for the control. + +

+CalculatePreferredSize is an overridden method used to calculate the +preferred width and height for the control. It re-implements the method from +the ancestor class, and does not call the inherited method. +

+

+CalculatePreferredSize sets the internal flag to recalculate the text and +bevel height, and calls CalcSize to update the values. +

+

+The value in Orientation is used to determine the value calculated in the +method. When set to trHorizontal, PreferredHeight is set to the maximum of +the text height or the bevel height (Caption is empty). When set to +trVertical, the PreferredWidth is set to the maximum of the text height or +the bevel height (Caption is empty). +

+
+ +
+ +The preferred width for the control. + + +The preferred height for the control. + + + +True if additional space is reserved for theme elements. Not used in +the method. + + - - - Constructor for the class instance. - -

- Create is the overridden constructor for the class instance, and calls the inherited method on entry. It sets the default values for properties, including: -

-
    -
  • BevelStyle (bsLowered)
  • -
  • BevelWidth (-1 for relative bevel size)
  • -
  • CaptionSpacing (10 pixels)
  • -
  • LeftIndex (60 pixels)
  • -
  • Orientation (trHorizontal)
  • -
  • Transparent (True)
  • -
  • AutoSize (True)
  • -
-

- An internal flag used to force the text and bevel height to be calculated is set. The GetControlClassDefaultSize method is called get and set the initial bounds for the class instance. -

-
- -
- - Owner of the class instance. - + + +Constructor for the class instance. + +

+Create is the overridden constructor for the class instance, and calls the +inherited method on entry. It sets the default values for properties, +including: +

+
    +
  • BevelStyle (bsLowered)
  • +
  • BevelWidth (-1 for relative bevel size)
  • +
  • CaptionSpacing (10 pixels)
  • +
  • LeftIndex (60 pixels)
  • +
  • Orientation (trHorizontal)
  • +
  • Transparent (True)
  • +
  • AutoSize (True)
  • +
+

+An internal flag used to force the text and bevel height to be calculated is +set. The GetControlClassDefaultSize method is called get and set the initial +bounds for the class instance. +

+
+ +
+ +Owner of the class instance. + - - Determine if the width and/or height can be adjusted by a layout policy. - -

- Re-implements the method from the ancestor class, and does not call the inherited method. In TDividerBevel, a dimension can be auto-adjusted when AutoSize is not enabled, and the dimension is not the Orientation for the control. Called when an auto-adjust layout policy is applied to the control. -

-
- - TControl.ShouldAutoAdjust - -
- - True if the width can be auto-adjusted by a layout policy. - - - True if the height can be auto-adjusted by a layout policy. - + + +Determine if the width and/or height can be adjusted by a layout policy. + + +

+Re-implements the method from the ancestor class, and does not call the +inherited method. In TDividerBevel, a dimension can be +auto-adjusted when AutoSize is not enabled, and the dimension is +not the Orientation for the control. Called when an auto-adjust +layout policy is applied to the control. +

+
+ +TControl.ShouldAutoAdjust + +
+ + +True if the width can be auto-adjusted by a layout policy. + + + + +True if the height can be auto-adjusted by a layout policy. + + - - - - - + + + + + - - - Indicates whether the bevel is drawn using a raised or lowered drawing style. - - -

- BevelStyle is a TBevelStyle property which indicates if the bevel is drawn using a raised or lowered style. The default value for the property is bsLowered. Changing the value for the property causes the control to be redrawn. -

-

- Use BevelWidth to set the bevel height in pixels, or relative to the text height for the control. Use Style to set the shape or pattern used to draw the bevel. -

-

- BevelStyle is used in the Paint method. -

-
- - - - TBevelStyle - -
+ + +Indicates whether the bevel is drawn using a raised or lowered drawing style. + + +

+BevelStyle is a TBevelStyle property which indicates if +the bevel is drawn using a raised or lowered style. The default value for the +property is bsLowered. Changing the value for the property causes +the control to be redrawn. +

+

+Use BevelWidth to set the bevel height in pixels, or relative to the text +height for the control. Use Style to set the shape or pattern used to draw +the bevel. +

+

+BevelStyle is used in the Paint method. +

+
+ + + +TBevelStyle + +
- - Height for the bevel on its Orientation. - -

- The default value for the property is -1. Negative values in the property indicate that the bevel is drawn using 20% of the Text height for the control, with a minimum height of 3 pixels. -

-

- Changing the value in BevelWidth causes the control to be updated. When AutoSize is True, the preferred size is reset and the AdjustSize method is called. When AutoSize is False, an internal flag is set to indicate that the size needs to be recalculated in the CalcSize method. The Invalidate method is called to force the control to be redrawn. -

-
- - - TControl.InvalidatePreferredSize - TControl.AdjustSize - TControl.Invalidate - -
+ +Height for the bevel on its Orientation. + +

+The default value for the property is -1. Negative values in the +property indicate that the bevel is drawn using 20% of the Text height for +the control, with a minimum height of 3 pixels. +

+

+Changing the value in BevelWidth causes the control to be updated. When +AutoSize is True, the preferred size is reset and the AdjustSize +method is called. When AutoSize is False, an internal flag is set to +indicate that the size needs to be recalculated in the CalcSize method. The +Invalidate method is called to force the control to be redrawn. +

+
+ + +TControl.InvalidatePreferredSize +TControl.AdjustSize +TControl.Invalidate + +
- - + + - - - Number of pixels reserved as spacing in front of and following the Caption for the control. - - -

- The default value for the property is 10. Use LeftIndent to set the position (in pixels) where the Caption text is drawn. A negative value in LeftIndent causes the caption to be centered along the bevel, and the value in CaptionSpacing is ignored. -

-
- - - -
+ + +Number of pixels reserved as spacing in front of and following the Caption +for the control. + + +

+The default value for the property is 10. Use LeftIndent to +set the position (in pixels) where the Caption text is drawn. A negative +value in LeftIndent causes the caption to be centered along the bevel, and +the value in CaptionSpacing is ignored. +

+
+ + + +
- - + + - - - - - + + + + + - - - Position relative to Left where the CaptionSpacing and Caption are drawn. - - -

- LeftIndent is an Integer property which indicates the position relative to the Left property where the CaptionSpacing and Caption text are displayed on the control. The default value for the property is 60 pixels. -

-

- Use CaptionSpacing to set the number of pixels reserved as undecorated blank space on each side of the Caption text. -

-

- For example: If CaptionSpacing is set to 10, and LeftIndent is set to 60, the CaptionSpacing starts at 60 pixels and the text at 70 pixels relative to Left. -

-

- LeftIndent, when set to a negative value, causes the CaptionSpacing and Caption text to be centered along the Orientation for the divider bevel. When set to 0, neither left indent nor caption spacing are applied before the Caption text. -

-

- Changing the value for the property causes the control to be redrawn. -

-

- LeftIndent is used in the Paint method. -

-
- - - - - TControl.Caption - TControl.Left - -
+ + +Position relative to Left where the CaptionSpacing and Caption are drawn. + + +

+LeftIndent is an Integer property which indicates the +position relative to the Left property where the +CaptionSpacing and Caption text are displayed on the +control. The default value for the property is 60 pixels. +

+

+Use CaptionSpacing to set the number of pixels reserved as +undecorated blank space on each side of the Caption text. +

+

+For example: If CaptionSpacing is set to 10, and LeftIndent is set to 60, +the CaptionSpacing starts at 60 pixels and the text at 70 pixels relative to +Left. +

+

+LeftIndent, when set to a negative value, causes the CaptionSpacing and +Caption text to be centered along the Orientation for the divider bevel. When +set to 0, neither left indent nor caption spacing are applied before the +Caption text. +

+

+Changing the value for the property causes the control to be redrawn. +

+

+LeftIndent is used in the Paint method. +

+
+ + + + +TControl.Caption +TControl.Left + +
- - Direction that the bevel and caption are drawn. - -

- Orientation is a TTrackBarOrientation property which indicates the direction that the bevel and caption are drawn on the control. The default value for the property is trHorizontal, and causes the bevel and caption to be draw from left to right horizontally. When set to trVertical, the Font on the control Canvas is rotated 90 degrees and the bevel and caption are drawn from top to bottom vertically. -

-

- Changing the value for the property causes the size to be adjusted when AutoSize is set to True. The control is redrawn when the new property value is applied. -

-

- Orientation is used in the Paint method. -

-
- - - TGraphicControl.Canvas - TControl.AutoSize - TTrackBarOrientation - -
+ +Direction that the bevel and caption are drawn. + +

+Orientation is a TTrackBarOrientation property which +indicates the direction that the bevel and caption are drawn on the control. +The default value for the property is trHorizontal, and causes the +bevel and caption to be draw from left to right horizontally. When set to +trVertical, the Font on the control Canvas is rotated +90 degrees and the bevel and caption are drawn from top to bottom vertically. +

+

+Changing the value for the property causes the size to be adjusted when +AutoSize is set to True. The control is redrawn when the +new property value is applied. +

+

+Orientation is used in the Paint method. +

+
+ + +TGraphicControl.Canvas +TControl.AutoSize +TTrackBarOrientation + +
- - - - - - + + + + + + - - Drawing style for the bevel on the control. - -

- Style is a TGrabStyle property with the shape or pattern used to draw the bevel on the control. -

-

- The default value for the property is gsSimple, and causes a simple rectangle to be drawn with the appearance in the BevelStyle property. Contrasting colors on the borders are used to achieve the raised or lowered appearance. Other values include: -

-
-
gsDouble
-
Draws double lines using the appearance in BevelStyle.
-
gsHorLines
-
Draws a single line using the appearance in BevelStyle.
-
gsVerLines
-
Draws a vertical line using the appearance in BevelStyle.
-
gsGripper
-
- Draws a row of raised dots on the bevel. BevelStyle is not used. Drawn using the trGripper theme element details in ThemeServices. -
-
gsButton
-
- Draws the bevel using a pseudo-button style. BevelStyle is not used. Drawn using the tbPushButtonNormal theme element details in ThemeServices. -
-
-
- - - - -
+ +Drawing style for the bevel on the control. + +

+Style is a TGrabStyle property with the shape or +pattern used to draw the bevel on the control. +

+

+The default value for the property is gsSimple, and causes a +simple rectangle to be drawn with the appearance in the BevelStyle +property. Contrasting colors on the borders are used to achieve the raised or +lowered appearance. Other values include: +

+
+
gsDouble
+
Draws double lines using the appearance in BevelStyle.
+
gsHorLines
+
Draws a single line using the appearance in BevelStyle.
+
gsVerLines
+
Draws a vertical line using the appearance in BevelStyle.
+
gsGripper
+
+Draws a row of raised dots on the bevel. BevelStyle is not used. Drawn using +the trGripper theme element details in ThemeServices. +
+
gsButton
+
+Draws the bevel using a pseudo-button style. BevelStyle is not used. Drawn +using the tbPushButtonNormal theme element details in ThemeServices. +
+
+
+ + + + +
- - - Indicates if the parent control is visible beneath the drawing area for the divider bevel. - - -

- Transparent is a Boolean property which indicates if the control is drawn with transparency. When set to True, the parent control is visible beneath the undecorated areas on the control. When set to False, the client area for the control is filled using the value in Color. The default value for the property is True. -

-
- - TControl.Color - -
+ + +Indicates if the parent control is visible beneath the drawing area for the +divider bevel. + + +

+Transparent is a Boolean property which indicates if the control +is drawn with transparency. When set to True, the parent control is +visible beneath the undecorated areas on the control. When set to +False, the client area for the control is filled using the value in +Color. The default value for the property is True. +

+
+ +TControl.Color + +
- - - - - - - - - - - - - - - + + + + + + + + + + + + + + + -
+
-
+
diff --git a/components/lazcontrols/docs/extendednotebook.xml b/components/lazcontrols/docs/extendednotebook.xml index 4756d45e2c..91471a7047 100644 --- a/components/lazcontrols/docs/extendednotebook.xml +++ b/components/lazcontrols/docs/extendednotebook.xml @@ -1,489 +1,565 @@ - + - - - Contains an extended notebook with support for dragging and dropping tabs on the control. - - -

- ExtendedNotebook.pas contains classes and types used to implement an extended notebook control. It provides support for dragging and dropping tabs on the control. -

-

- This file is part of the LazControls package, -

-
+ + +Contains an extended notebook with support for dragging and dropping tabs on +the control. + + +

+ExtendedNotebook.pas contains classes and types used to +implement an extended notebook control. It provides support for dragging and +dropping tabs on the control. +

+

+This file is part of the LazControls package, +

+
- - - - - - - - - - + + + + + + + + + + - - - Specifies an event handler signalled for a drag/drop event on a notebook tab. - - -

- TNotebookTabDragDropEvent is the type used for the OnTabDragDropEx property in TExtendedNotebook. It is used to perform actions needed when a tab on a TExtendedNotebook control is moved to a new location using drag and drop. -

-

- An application must implement and assign an object method which uses this signature to respond to the event notification. It is signalled from the DragDrop method in TExtendedNotebook, and occurs after its OnTabDragOverEx event. -

-
- - - - - -
- - Object for the notification. - - - Control where the drag operation originated. - - - Original ordinal position for the dragged tab. - - - New ordinal position for the dragged tab. - - - True if the Ctrl key is pressed during the drag and drop operation. - - - True if the tab can be moved to the new location. - + + +Specifies an event handler signalled for a drag/drop event on a notebook tab. + + +

+TNotebookTabDragDropEvent is the type used for the OnTabDragDropEx property +in TExtendedNotebook. It is used to perform actions needed when a tab on a +TExtendedNotebook control is moved to a new location using drag and drop. +

+

+An application must implement and assign an object method which uses this +signature to respond to the event notification. It is signalled from the +DragDrop method in TExtendedNotebook, and occurs after its OnTabDragOverEx +event. +

+
+ + + + + +
+ +Object for the notification. + + +Control where the drag operation originated. + + +Original ordinal position for the dragged tab. + + +New ordinal position for the dragged tab. + + + +True if the Ctrl key is pressed during the drag and drop operation. + + + +True if the tab can be moved to the new location. + - - - Specifies an event handler signalled when a dragged tab is over a notebook control. - - - - - - - - - - Object for the notification. - - - Control where the drag operation originated. - - - Original ordinal position for the dragged tab. - - - New ordinal position for the dragged tab. - - - True if the Ctrl key is pressed during the drag and drop operation. - - - True if the notebook control can accept the dragged tab. - + + +Specifies an event handler signalled when a dragged tab is over a notebook +control. + + + + + + + + + +Object for the notification. + + +Control where the drag operation originated. + + +Original ordinal position for the dragged tab. + + +New ordinal position for the dragged tab. + + + +True if the Ctrl key is pressed during the drag and drop operation. + + + +True if the notebook control can accept the dragged tab. + - - - Implements a notebook or page control which supports drag and drop events for its tabs. - - -

- TExtendedNotebook is a TPageControl descendant, and extends the ancestor class with properties, methods, and events which enable drag and drop operations for the tabs on the paged notebook control. It works in conjunction with the DragManager (TDragManager) instance for the LCL interface. -

-

- Overridden methods are provided initiates and completes a drag and drop operation, as well as handle mouse up, down and move messages for the control. Event handlers signalled during drag and drop are also provided. Additional properties are introduced to indicate how drop / drop operations are handled by the control and to identify the tab affected by the operation. -

-

- TExtendedNotebook is used in the implementation of TSourceWindow in the Lazarus IDE, where it provides access to the source editor for a tab, as well as its form and anchor design surfaces. -

-
- - TPageControl - TDragManager - DragManager - -
+ + +Implements a notebook or page control which supports drag and drop events for +its tabs. + + +

+TExtendedNotebook is a TPageControl descendant, and extends the ancestor +class with properties, methods, and events which enable drag and drop +operations for the tabs on the paged notebook control. It works in +conjunction with the DragManager (TDragManager) instance for the LCL +interface. +

+

+Overridden methods are provided initiates and completes a drag and drop +operation, as well as handle mouse up, down and move messages for the +control. Event handlers signalled during drag and drop are also provided. +Additional properties are introduced to indicate how drop / drop operations +are handled by the control and to identify the tab affected by the operation. +

+

+TExtendedNotebook is used in the implementation of TSourceWindow in the +Lazarus IDE, where it provides access to the source editor for a tab, as well +as its form and anchor design surfaces. +

+
+ +TPageControl +TDragManager +DragManager + +
- - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - - + + - - - - + + + + - - - - - - + + + + + + - - Handles mouse down messages for the control. - -

- MouseDown is an overridden method in TExtendedNotebook. It initializes members used to track drag and drop operations in the class instance, and sets the DragCursor for the control. It calls the inherited MouseDown method to handle an OnEditingDone event for the ActiveControl on the parent form. It updates DragManager for the mouse button in the notification, and signals the OnMouseDown event handler (when assigned). When DragMode is set to dmAutomatic, a left mouse button event causes the value in MouseCapture to be set to True. -

-

- MouseDown is called from methods which process LM_LBUTTONDOWN, LM_RBUTTONDOWN, LM_MBUTTONDOWN, and LM_XBUTTONDOWN window messages for the control. -

-
- - TControl.OnEditingDone - TControl.MouseDown - TControl.WMLButtonDown - TControl.WMRButtonDown - TControl.WMMButtonDown - TControl.WMXButtonDown - -
- - Mouse button for the event. - - - Shift, Ctrl, or Alt modifier for the mouse button event. - - - Horizontal coordinate for the mouse pointer. - - - Vertical coordinate for the mouse pointer. - + +Handles mouse down messages for the control. + +

+MouseDown is an overridden method in TExtendedNotebook. It initializes +members used to track drag and drop operations in the class instance, and +sets the DragCursor for the control. It calls the inherited MouseDown method +to handle an OnEditingDone event for the ActiveControl on the parent form. It +updates DragManager for the mouse button in the notification, and signals the +OnMouseDown event handler (when assigned). When DragMode is set to +dmAutomatic, a left mouse button event causes the value in MouseCapture to be +set to True. +

+

+MouseDown is called from methods which process LM_LBUTTONDOWN, +LM_RBUTTONDOWN, LM_MBUTTONDOWN, and LM_XBUTTONDOWN window messages for the +control. +

+
+ +TControl.OnEditingDone +TControl.MouseDown +TControl.WMLButtonDown +TControl.WMRButtonDown +TControl.WMMButtonDown +TControl.WMXButtonDown + +
+ +Mouse button for the event. + + +Shift, Ctrl, or Alt modifier for the mouse button event. + + +Horizontal coordinate for the mouse pointer. + + +Vertical coordinate for the mouse pointer. + - - Handles mouse up events for the control. - - - - - Mouse button for the event. - - - Shift, Ctrl, or Alt modifier for the mouse button event. - - - Horizontal coordinate for the mouse pointer. - - - Vertical coordinate for the mouse pointer. - + +Handles mouse up events for the control. + + + + +Mouse button for the event. + + +Shift, Ctrl, or Alt modifier for the mouse button event. + + +Horizontal coordinate for the mouse pointer. + + +Vertical coordinate for the mouse pointer. + - - Handles mouse move messages for the control. - - - - - Shift, Ctrl, or Alt modifier for the mouse button event. - - - Horizontal coordinate for the mouse pointer. - - - Vertical coordinate for the mouse pointer. - + +Handles mouse move messages for the control. + + + + +Shift, Ctrl, or Alt modifier for the mouse button event. + + +Horizontal coordinate for the mouse pointer. + + +Vertical coordinate for the mouse pointer. + - - Handles control notification messages for the control. - - - - - Message examined in the method. - + +Handles control notification messages for the control. + + + + +Message examined in the method. + - - Removes the page at the specified ordinal position. - - - - - Ordinal position for the page removed in the method. - + +Removes the page at the specified ordinal position. + + + + +Ordinal position for the page removed in the method. + - - Inserts the specified page at the ordinal position in Index. - - - - - Page instance inserted in the method. - - - Ordinal position where the page instance is inserted. - + +Inserts the specified page at the ordinal position in Index. + + + + +Page instance inserted in the method. + + +Ordinal position where the page instance is inserted. + - - Performs actions when the mouse capture has changed for the control. - - - + + +Performs actions when the mouse capture has changed for the control. + + + + - - Performs actions needed when a drag operation is started for the control. - - - - - Object which is dragged in the operation. - + + +Performs actions needed when a drag operation is started for the control. + + + + + +Object which is dragged in the operation. + - - Performs actions needed when a drag operation is ended for the control. - - - - - Target for the drag operation. - - - Horizontal coordinate where the drag operation was ended. - - - Vertical coordinate where the drag operation was ended. - + + +Performs actions needed when a drag operation is ended for the control. + + + + + +Target for the drag operation. + + +Horizontal coordinate where the drag operation was ended. + + +Vertical coordinate where the drag operation was ended. + - - - Performs actions needed when a drag operation is over a tab on the control. - - - - - - - - - - - - - - - - - - - + + +Performs actions needed when a drag operation is over a tab on the control. + + + + + + + + + + + + + + + + + + + - - Performs actions needed to cancel a drag operation for the control. - - - + + +Performs actions needed to cancel a drag operation for the control. + + + + - - Paints the window for the control to the specified device context. - - - TWinControl.PaintWindow - TPageControl.TabPosition - - - - Device context where the window is drawn. - + + +Paints the window for the control to the specified device context. + + + +TWinControl.PaintWindow +TPageControl.TabPosition + + + +Device context where the window is drawn. + - - Constructor for the class instance. - -

- Create is the overridden constructor for the class instance. It ensures that internal members used in drag and drop operations are initialized for the class instance. -

-
- - - TPageControl.DragCursor - -
- - Owner of the class instance. - + +Constructor for the class instance. + +

+Create is the overridden constructor for the class instance. It +ensures that internal members used in drag and drop operations are +initialized for the class instance. +

+
+ + +TPageControl.DragCursor + +
+ +Owner of the class instance. + - - - Performs actions needed when a dragged object is dropped onto the control. - - -

- DragDrop is an overridden method in TExtendedNotebook used to perform actions needed when the object in Source is dropped on the control. -

-

- If Source is not derived from TExtendedNotebook, or not the tab being dragged in the control, the inherited method is called to signal the OnDragDrop event handler (when assigned). No additional actions are performed in the method when this situation occurs. -

-

- The OnTabDragDrop event handler is signalled (when assigned) for the TExtendedNotebook instance in Source. The OnTabDragDropEx event handler is signalled (when assigned) to allow Ctrl + Drag mouse messages to be handled for the control. -

-

- If the tab order was changed by the drag operation, the tabs (pages) are re-ordered to reflect the new position. -

-
- -
- - Object dragged / dropped on to the control. - - - Horizontal coordinate where the drop occurred. - - - Vertical coordinate where the drop occurred. - + + +Performs actions needed when a dragged object is dropped onto the control. + + +

+DragDrop is an overridden method in TExtendedNotebook +used to perform actions needed when the object in Source is +dropped on the control. +

+

+If Source is not derived from TExtendedNotebook, or not the tab being dragged +in the control, the inherited method is called to signal the OnDragDrop event +handler (when assigned). No additional actions are performed in the method +when this situation occurs. +

+

+The OnTabDragDrop event handler is signalled (when assigned) for the +TExtendedNotebook instance in Source. The OnTabDragDropEx event handler is +signalled (when assigned) to allow Ctrl + Drag mouse messages to be handled +for the control. +

+

+If the tab order was changed by the drag operation, the tabs (pages) are +re-ordered to reflect the new position. +

+
+ +
+ +Object dragged / dropped on to the control. + + +Horizontal coordinate where the drop occurred. + + +Vertical coordinate where the drop occurred. + - - Starts a drag operation for a tab on the control. - -

- Called from the MouseMove method when a mouse down event has occurred on a tab in the control. -

-
- -
- - Ordinal position for the tab affected in the drag operation. - - - - True if the drag operation starts immediately and the drag threshold is ignored. - - - - - Distance that the mouse must move before the drag operation starts, or -1 to use the default value from the drag manager. - - + +Starts a drag operation for a tab on the control. + +

+Called from the MouseMove method when a mouse down event has occurred on a +tab in the control. +

+
+ +
+ +Ordinal position for the tab affected in the drag operation. + + + +True if the drag operation starts immediately and the drag threshold +is ignored. + + + + +Distance that the mouse must move before the drag operation starts, or -1 to +use the default value from the drag manager. + + - - Ordinal position for the tab affected by a drag operation. - -

- DraggingTabIndex is a read-only Integer property which contains the ordinal position for the tab or page active in a drag and drop operation. Its value is assigned in methods like BeginDragTab, DoEndDrag, and DragCanceled. The value is set to -1 when drag and drop is not active for the control. -

-

- Its value is used in the DragOver and DragDrop methods, and is passed as an argument to event handlers signalled in the class instance. -

-
- - - - - - - -
+ +Ordinal position for the tab affected by a drag operation. + +

+DraggingTabIndex is a read-only Integer property which contains the ordinal +position for the tab or page active in a drag and drop operation. Its value +is assigned in methods like BeginDragTab, DoEndDrag, and DragCanceled. The +value is set to -1 when drag and drop is not active for the control. +

+

+Its value is used in the DragOver and DragDrop methods, and is passed as an +argument to event handlers signalled in the class instance. +

+
+ + + + + + + +
- - - Event handler signalled when the mouse hovers over a tab on the control during a drag operation. - - - - + + +Event handler signalled when the mouse hovers over a tab on the control +during a drag operation. + + + + - - - Event handler signalled when the Ctrl key is held while dragging a tab on the control. - - - - + + +Event handler signalled when the Ctrl key is held while dragging a tab on the +control. + + + + - - - Event handler signalled when an object is dropped onto a tab on the control. - - - - + + +Event handler signalled when an object is dropped onto a tab on the control. + + + + - - - Event handler signalled when an object is dropped onto a tab on the control while the Ctrl key is held. - - - - + + +Event handler signalled when an object is dropped onto a tab on the control +while the Ctrl key is held. + + + + - - - Event handler signalled when a drag operation is ended for a tab on the control. - - - - + + +Event handler signalled when a drag operation is ended for a tab on the +control. + + + + - - - Event handler signalled when a drag operation is started for a tab on the control. - - - - + + +Event handler signalled when a drag operation is started for a tab on the +control. + + + + - - - Indicates how a Drag operation is started for a tab on the control. - - -

- The default value for the property is dmManual, and indicates that the operation is started in code executed by OnTabStartDrag event handler for the control. When set to dmAutomatic, the drag operation is initialized in the MouseDown method when the left mouse button is clicked on a tab for the notebook control. -

-
- -
+ + +Indicates how a Drag operation is started for a tab on the control. + + +

+The default value for the property is dmManual, and indicates that +the operation is started in code executed by OnTabStartDrag event handler for +the control. When set to dmAutomatic, the drag operation is +initialized in the MouseDown method when the left mouse button is clicked on +a tab for the notebook control. +

+
+ +
- - - Default accept mode for a drag operation for a tab. - - -

- TabDragAcceptMode is a TDragMode property which indicates how a dragged tab is accepted on the destination control. It is used in the DragDrop method to determine whether the tab is positioned automatically, or handled in code assigned to an event handler. -

-

- The default value for the property is dmManual, and indicates that the tab is relocated manually in the OnTabDragDropEx event handler for the control. When set to dmAutomatic, the tab is automatically relocated using the Move method in the Pages collection for the control. -

-
- -
+ + +Default accept mode for a drag operation for a tab. + + +

+TabDragAcceptMode is a TDragMode property which +indicates how a dragged tab is accepted on the destination control. It is +used in the DragDrop method to determine whether the tab is positioned +automatically, or handled in code assigned to an event handler. +

+

+The default value for the property is dmManual, and indicates that +the tab is relocated manually in the OnTabDragDropEx event handler for the +control. When set to dmAutomatic, the tab is automatically +relocated using the Move method in the Pages collection for the control. +

+
+ +
-
+
-
+
diff --git a/components/lazcontrols/docs/extendedtabcontrols.xml b/components/lazcontrols/docs/extendedtabcontrols.xml index 0495218e70..a5d7431722 100644 --- a/components/lazcontrols/docs/extendedtabcontrols.xml +++ b/components/lazcontrols/docs/extendedtabcontrols.xml @@ -1,1073 +1,1089 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- TExtendedTabToolbar is a TToolBar descendant. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - Constructor for the class instance. - -

- Create is the overridden constructor for the class instance. -

-
- -
- - - - - - - - - - - - - - - - -

- TExtendedTabToolButton is a TToolButton descendant. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Constructor for the class instance. - -

- Create is the constructor for the class instance. -

-
- -
- - - - - - - - - - - - - - - Number of tool buttons in the Buttons property. - -

- ButtonCount is a read-only Integer property which contains the number of tool buttons available in the Buttons property. -

-
- -
- - - - -

- Buttons is an indexed TToolButton property which provides access to the tool buttons created for the tool bar. The Index value must be in the range 0 to ButtonCount - 1. -

-

- Use ButtonCount to get the number of tool buttons created in the ButtonList for the tool bar. -

-
- -
- - Ordinal position for the requested tool button. - - - - - -

- ButtonList is a read-only TList property which contains the TToolButton instances created for the tool bar. Use Buttons to access an individual TToolButton instance by its ordinal position in ButtonList. Use ButtonCount to get the number to tool buttons stored in ButtonList. -

-
- -
- - - - -

- RowCount is a read-only Integer property. -

-
- -
- - - - - -

- EdgeBorders is a TEdgeBorders property which contains a set of TEdgeBorder enumeration values. The values indicates which borders will be drawn for the tool bar. The default value for the property is a set which includes the following values: -

-
    -
  • ebLeft
  • -
  • ebTop
  • -
  • ebRight
  • -
  • ebBottom
  • -
-
- -
- - - Drawing style used for the inner edge of the tool bar. - -

- EdgeInner is a TEdgeStyle property which indicates the drawing style used for the inner edge of the tool bar. The default value for the property is esRaised. -

-
- -
- - - - - The default value for the property is esLowered. - - - - - - - - The default value for the property is True. - - - - - - - - The default value for the property is True. - - - - - - - - - - - - - - - - - - - - - - - - - - The default value for the property is 1. - - - - - - - - The default value for the property is False. - - - - - - - - - - - - - - The default value for the property is False. - - - - - - - - - - - - - - The default value for the property is True. - - - - - - - - - - - - - - - - - - - - - - - - - -

- TExtendedInternalCustomPage is a TCustomPage descendant. -

-
- -
- - - - - - - - - - - - - - - - Internal TabControl used to display tabs. - -

- TExtendedInternalTabControl is a TNoteBookStringsTabControl descendant. -

-
- -
- - - - - - - - - - - - List of tabs (and pages) used in TCustomExtendedTabControl. - -

- TExtendedTabControlNoteBookStrings is a TTabControlNoteBookStrings descendant. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - Returns a TExtendedInternalTabControl type. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Class type used for Pages in TCustomExtendedTabControl. - -

- Implements the class reference used for the PageClass and Pages properties in TCustomExtendedTabControl. -

-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- Experimental. Platform dependent. -

-
- -
- - - - -

- Experimental. Platform dependent. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+TExtendedTabToolbar is a TToolBar descendant. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +Constructor for the class instance. + +

+Create is the overridden constructor for the class instance. +

+
+ +
+ + + + + + + + + + + + + + + + +

+TExtendedTabToolButton is a TToolButton descendant. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Constructor for the class instance. + +

+Create is the constructor for the class instance. +

+
+ +
+ + + + + + + + + + + + + + +Number of tool buttons in the Buttons property. + +

+ButtonCount is a read-only Integer property which +contains the number of tool buttons available in the Buttons property. +

+
+ +
+ + + + +

+Buttons is an indexed TToolButton property which +provides access to the tool buttons created for the tool bar. The Index value +must be in the range 0 to ButtonCount - 1. +

+

+Use ButtonCount to get the number of tool buttons created in the ButtonList +for the tool bar. +

+
+ +
+ +Ordinal position for the requested tool button. + + + + + +

+ButtonList is a read-only TList property which contains +the TToolButton instances created for the tool bar. Use +Buttons to access an individual TToolButton instance by its +ordinal position in ButtonList. Use ButtonCount to get the number +to tool buttons stored in ButtonList. +

+
+ +
+ + + + +

+RowCount is a read-only Integer property. +

+
+ +
+ + + + + +

+EdgeBorders is a TEdgeBorders property which contains a +set of TEdgeBorder enumeration values. The values indicates which +borders will be drawn for the tool bar. The default value for the property is +a set which includes the following values: +

+
    +
  • ebLeft
  • +
  • ebTop
  • +
  • ebRight
  • +
  • ebBottom
  • +
+
+ +
+ + +Drawing style used for the inner edge of the tool bar. + +

+EdgeInner is a TEdgeStyle property which indicates the +drawing style used for the inner edge of the tool bar. The default value for +the property is esRaised. +

+
+ +
+ + + + +The default value for the property is esLowered. + + + + + + + +The default value for the property is True. + + + + + + + +The default value for the property is True. + + + + + + + + + + + + + + + + + + + + + + + + + +The default value for the property is 1. + + + + + + + +The default value for the property is False. + + + + + + + + + + + + + +The default value for the property is False. + + + + + + + + + + + + + +The default value for the property is True. + + + + + + + + + + + + + + + + + + + + + + + + + +

+TExtendedInternalCustomPage is a TCustomPage descendant. +

+
+ +
+ + + + + + + + + + + + + + + +Internal TabControl used to display tabs. + +

+TExtendedInternalTabControl is a +TNoteBookStringsTabControl descendant. +

+
+ +
+ + + + + + + + + + + +List of tabs (and pages) used in TCustomExtendedTabControl. + +

+TExtendedTabControlNoteBookStrings is a +TTabControlNoteBookStrings descendant. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +Returns a TExtendedInternalTabControl type. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Class type used for Pages in TCustomExtendedTabControl. + +

+Implements the class reference used for the PageClass and +Pages properties in TCustomExtendedTabControl. +

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Experimental. Platform dependent. +

+
+ +
+ + + + +

+Experimental. Platform dependent. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
diff --git a/components/lazcontrols/docs/listfilteredit.xml b/components/lazcontrols/docs/listfilteredit.xml index 7914f66dff..ee6787a482 100644 --- a/components/lazcontrols/docs/listfilteredit.xml +++ b/components/lazcontrols/docs/listfilteredit.xml @@ -1,545 +1,691 @@ - + - - Implements a control used to filter an associated list box. - -

- ListFilterEdit.pas contains classes and types used to implement the TListFilterEdit control, an edit control which filters values found in an associated list box. -

-

- This file is part of the LazControls package. -

-
+ +Implements a control used to filter an associated list box. + +

+ListFilterEdit.pas contains classes and types used to implement +the TListFilterEdit control, an edit control which filters values +found in an associated list box. +

+

+This file is part of the LazControls package. +

+
- - - - - - - - - - - - + + + + + + + + + + + + - - Not used in the current LCL version. - - - - - - - - - - - - - - - + +Not used in the current LCL version. + + + + + + + + + + + + + + + - - - Implements an edit control used to filter items from an associated TListBox control. - - -

- TListFilterEdit is a TCustomControlFilterEdit descendant which implements an edit control used to filter an associated TListBox control. It consists of an edit control used to located and optionally select item(s) in the list box control, and a button used to clear the filter value entered in the edit control. -

-

- TListFilterEdit introduces properties and methods needed to access the items and selections in the associated list box control. Use FilteredListbox to specify the TListBox instance with the values filtered in the control. You can also use other TCustomListBox descendants in FilteredListbox; i. e. TCheckListBox. Use the Items property to access the list items for the filtered edit control. Use SelectionList to access the list of selected items in the list box control. -

-

- Overridden methods are provided to navigate between the values in the list box, store or remove selection(s) in for the control, and to apply the filter condition. -

-
- - TCustomControlFilterEdit - TCustomListBox - TListBox - TCheckListBox - -
+ + +Implements an edit control used to filter items from an associated TListBox +control. + + +

+TListFilterEdit is a TCustomControlFilterEdit +descendant which implements an edit control used to filter an associated +TListBox control. It consists of an edit control used to located and +optionally select item(s) in the list box control, and a button used to clear +the filter value entered in the edit control. +

+

+TListFilterEdit introduces properties and methods needed to access the items +and selections in the associated list box control. Use FilteredListbox to +specify the TListBox instance with the values filtered in the control. You +can also use other TCustomListBox descendants in FilteredListbox; i. e. +TCheckListBox. Use the Items property to access the list items for the +filtered edit control. Use SelectionList to access the list of selected items +in the list box control. +

+

+Overridden methods are provided to navigate between the values in the list +box, store or remove selection(s) in for the control, and to apply the filter +condition. +

+
+ +TCustomControlFilterEdit +TCustomListBox +TListBox +TCheckListBox + +
- - - The list box control with the items for the control. - + + +The list box control with the items for the control. + - - Stores / restores the selections in the associated control. - + +Stores / restores the selections in the associated control. + - - Stores a flag that indicates a single selection is used for the control. - + + +Stores a flag that indicates a single selection is used for the control. + + - - The original item values from the associated list box control. - + +The original item values from the associated list box control. + - - Item values sorted for viewing in the associated list box. - + +Item values sorted for viewing in the associated list box. + - - Contains the checked items for an associated TCheckListBox control. - + + +Contains the checked items for an associated TCheckListBox control. + + - - - Implements the routine used to order list Items when SortData is enabled. - - -

- CompareFNs is an Integer function which implements the routine used to order the values in Items before they are stored in the sorted data for the control. CompareFNs calls the CompareFilenames routine in the lazfileutils.pas unit to perform a case-insensitive comparison for the specified caption values in Items and the internal sorted data. Contrary to the names for the arguments, the values are not file names. -

-

- The return value is 0 when SortData is not enabled, or when the captions contain the same value. A negative value indicates that AFilename1 comes before AFilename2 in the sort order. A Positive value indicates that AFilename1 comes after AFilename2 in the sort order. -

-

- CompareFNs is called from the SortAndFilter method and determines if a value (and its Object instance) in Items is relocated in the internal sorted data. -

-
- - - TCustomControlFilterEdit.SortData - -
- - Position for AFilename1 relative to AFilename2. - - - List item caption from Items compared in the method. - - - List item caption from the sorted data compared in the method. - + + +Implements the routine used to order list Items when SortData is enabled. + + +

+CompareFNs is an Integer function which implements the +routine used to order the values in Items before they are stored in the +sorted data for the control. CompareFNs calls the CompareFilenames routine in +the lazfileutils.pas unit to perform a case-insensitive +comparison for the specified caption values in Items and the internal sorted +data. Contrary to the names for the arguments, the values are not file names. +

+

+The return value is 0 when SortData is not enabled, or when the captions +contain the same value. A negative value indicates that AFilename1 comes +before AFilename2 in the sort order. A Positive value indicates that +AFilename1 comes after AFilename2 in the sort order. +

+

+CompareFNs is called from the SortAndFilter method and determines if a value +(and its Object instance) in Items is relocated in the internal sorted data. +

+
+ + +TCustomControlFilterEdit.SortData + +
+ +Position for AFilename1 relative to AFilename2. + + +List item caption from Items compared in the method. + + +List item caption from the sorted data compared in the method. + - - Sets the value for the FilteredListbox property. - - - New value for the FilteredListbox property. - + +Sets the value for the FilteredListbox property. + + +New value for the FilteredListbox property. + - - - - Handles a notification when a component is added to or removed from the control. - - -

- Notification is an overridden method in TListFilterEdit, and calls the inherited method on entry. It ensures that the FilteredListbox property is set to Nil when the component is removed from the class instance. It also sets the value for IdleConnected to False, and resets the internal update flag for the control. -

-
- - - TCustomControlFilterEdit.IdleConnected - TControl.Notification - -
- - Component for the notification. - - - Operation for the component notification. - + + + +Handles a notification when a component is added to or removed from the +control. + + +

+Notification is an overridden method in +TListFilterEdit, and calls the inherited method on entry. It +ensures that the FilteredListbox property is set to Nil +when the component is removed from the class instance. It also sets the value +for IdleConnected to False, and resets the internal update +flag for the control. +

+
+ + +TCustomControlFilterEdit.IdleConnected +TControl.Notification + +
+ +Component for the notification. + + +Operation for the component notification. + - - Changes the position in FilteredListbox and optionally selects the value. - - - - - New position in FilteredListbox. - - - True to add the list item to Selected items in the list box. - + + +Changes the position in FilteredListbox and optionally selects the value. + + + + + +New position in FilteredListbox. + + + +True to add the list item to Selected items in the list box. + + - - - Moves to the next item in FilteredListbox and optionally selects the value. - - - - - - True to add the list item to Selected items in the list box. - + + +Moves to the next item in FilteredListbox and optionally selects the value. + + + + + + +True to add the list item to Selected items in the list box. + + - - - Moves to the previous item in FilteredListbox and optionally selects the value. - - - - - - True to add the list item to Selected items in the list box. - + + +Moves to the previous item in FilteredListbox and optionally selects the +value. + + + + + + +True to add the list item to Selected items in the list box. + + - - - Moves the position in FilteredListbox by one page towards the start of the list. - - - - - - True to add the list item to Selected items in the list box. - + + +Moves the position in FilteredListbox by one page towards the start of the +list. + + + + + + +True to add the list item to Selected items in the list box. + + - - - Moves the position in FilteredListbox by one page towards the end of the list. - - - - - - True to add the list item to Selected items in the list box. - + + +Moves the position in FilteredListbox by one page towards the end of the list. + + + + + + +True to add the list item to Selected items in the list box. + + - - Moves the position in FilteredListbox to the first entry in the list. - - - - - True to add the list item to Selected items in the list box. - + + +Moves the position in FilteredListbox to the first entry in the list. + + + + + + +True to add the list item to Selected items in the list box. + + - - Moves the position in FilteredListbox to the last entry in the list. - - - - - True to add the list item to Selected items in the list box. - + + +Moves the position in FilteredListbox to the last entry in the list. + + + + + + +True to add the list item to Selected items in the list box. + + - - Returns True if a Return key press was forwarded to the list box. - -

- ReturnKeyHandled is an overridden method in TListFilterEdit. It implements the abstract virtual method defined in the ancestor class. -

-

- ReturnKeyHandled passes a VK_RETURN virtual key code to the list box in FilteredListbox when it has been received by the edit control. The OnKeyPress event handler in FilteredListbox is signalled (when assigned) to respond to the key press event. -

-

- No actions are performed in the method if FilteredListbox or its OnKeyPress event handler have not been assigned. -

-
- - - TCustomControlFilterEdit.EditKeyDown - -
- - True if a Return key press was forwarded to the list box. - + + +Returns True if a Return key press was forwarded to the list box. + + +

+ReturnKeyHandled is an overridden method in +TListFilterEdit. It implements the abstract virtual method defined +in the ancestor class. +

+

+ReturnKeyHandled passes a VK_RETURN virtual key code to the list box in +FilteredListbox when it has been received by the edit control. The OnKeyPress +event handler in FilteredListbox is signalled (when assigned) to respond to +the key press event. +

+

+No actions are performed in the method if FilteredListbox or its OnKeyPress +event handler have not been assigned. +

+
+ + +TCustomControlFilterEdit.EditKeyDown + +
+ + +True if a Return key press was forwarded to the list box. + + - - - Copies string and object values from Items to SortData, and sorts and filters the item values. - - -

- SortAndFilter is an overridden method in TListFilterEdit. It implements the abstract virtual method defined in the ancestor class. SortAndFilter is used to copy values found in Items to a list where the caption values are stored in sorted order. The existing list of sorted data is cleared on entry. -

-

- SortAndFilter iterates over the caption values in Items and calls DoFilterItem to determine the handler routine used filter each value in the list. If a caption matches the Filter value, the CompareFNs method is called to determine its order in the sorted list of data. SortAndFilter stores caption values and Object instances from Items to the sorted list. -

-

- SortAndFilter is called from the ApplyFilter method, and indirectly when the OnIdle handler applies a pending update for the control. -

-

- Use the OnFilterItemEx or OnFilterItem event handler to determine if a caption value is allowed for the Filter in the control. Use FilterOptions to control case-sensitivity and partial matches when the Filter value is applied. Use OnAfterFilter to perform actions needed when sorting and filtering are completed in the OnIdle handler for the control. -

-
- - TCustomControlFilterEdit.Filter - TCustomControlFilterEdit.SortData - TCustomControlFilterEdit.DoFilterItem - TCustomControlFilterEdit.DoDefaultFilterItem - TCustomControlFilterEdit.OnFilterItemEx - TStringList - -
+ + +Copies string and object values from Items to SortData, and sorts and filters +the item values. + + +

+SortAndFilter is an overridden method in +TListFilterEdit. It implements the abstract virtual method defined +in the ancestor class. SortAndFilter is used to copy values found in Items to +a list where the caption values are stored in sorted order. The existing list +of sorted data is cleared on entry. +

+

+SortAndFilter iterates over the caption values in Items and calls +DoFilterItem to determine the handler routine used filter each value in the +list. If a caption matches the Filter value, the CompareFNs method is called +to determine its order in the sorted list of data. SortAndFilter stores +caption values and Object instances from Items to the sorted list. +

+

+SortAndFilter is called from the ApplyFilter method, and indirectly when the +OnIdle handler applies a pending update for the control. +

+

+Use the OnFilterItemEx or OnFilterItem event handler to determine if a +caption value is allowed for the Filter in the control. Use FilterOptions to +control case-sensitivity and partial matches when the Filter value is +applied. Use OnAfterFilter to perform actions needed when sorting and +filtering are completed in the OnIdle handler for the control. +

+
+ +TCustomControlFilterEdit.Filter +TCustomControlFilterEdit.SortData +TCustomControlFilterEdit.DoFilterItem +TCustomControlFilterEdit.DoDefaultFilterItem +TCustomControlFilterEdit.OnFilterItemEx +TStringList + +
- - - Copies filtered string and object values from sorted data to the Items in FilteredListbox. - - -

- ApplyFilterCore is an overridden method in TListFilterEdit used to update the list box in FilteredListbox to display the items that match the value in Filter. It implements the abstract virtual method defined in the ancestor class. -

-

- No actions are performed in the method if FilteredListbox has not been assigned. -

-

- ApplyFilterCore calls the Clear method in FilteredListbox to remove existing Items in the list box control. It iterates over the values in the sorted data to store both the caption and object instance to the Items property in FilteredListbox. -

-

- If FilteredListbox is a TCheckListBox instance, the OnCheckItem event handler is signalled (when assigned) using the object instance for the list item. If OnCheckItem is not assigned, the internal list of checked items is applied to FilteredListbox. -

-

- If SimpleSelection is enabled, the MoveTo method is called to position and select the list box item in FilteredListbox using the Text or sorted data values in the control. -

-
- - - - - TCustomControlFilterEdit.Text - TCustomControlFilterEdit.OnCheckItem - TCustomControlFilterEdit.Filter - TCustomControlFilterEdit.ApplyFilter - TCustomControlFilterEdit.ApplyFilterCore - -
+ + +Copies filtered string and object values from sorted data to the Items in +FilteredListbox. + + +

+ApplyFilterCore is an overridden method in +TListFilterEdit used to update the list box in FilteredListbox to +display the items that match the value in Filter. It implements the abstract +virtual method defined in the ancestor class. +

+

+No actions are performed in the method if FilteredListbox has not been +assigned. +

+

+ApplyFilterCore calls the Clear method in FilteredListbox to remove existing +Items in the list box control. It iterates over the values in the sorted data +to store both the caption and object instance to the Items property in +FilteredListbox. +

+

+If FilteredListbox is a TCheckListBox instance, the OnCheckItem event handler +is signalled (when assigned) using the object instance for the list item. If +OnCheckItem is not assigned, the internal list of checked items is applied to +FilteredListbox. +

+

+If SimpleSelection is enabled, the MoveTo method is called to position and +select the list box item in FilteredListbox using the Text or sorted data +values in the control. +

+
+ + + + +TCustomControlFilterEdit.Text +TCustomControlFilterEdit.OnCheckItem +TCustomControlFilterEdit.Filter +TCustomControlFilterEdit.ApplyFilter +TCustomControlFilterEdit.ApplyFilterCore + +
- - - Gets the name for the resource used as the default glyph in the control. - - - - TCustomEditButton.Glyph - TCustomEditButton.LoadDefaultGlyph - TCustomEditButton.GlyphChanged - - - - - Name of the resource with the default image used in Glyph. - - + + +Gets the name for the resource used as the default glyph in the control. + + + +TCustomEditButton.Glyph +TCustomEditButton.LoadDefaultGlyph +TCustomEditButton.GlyphChanged + + + + +Name of the resource with the default image used in Glyph. + + - - - Constructor for the class instance. - -

- Create is the overridden constructor for the class instance. It calls the inherited method on entry to initialize the control and to set its default property values. Create allocates resources needed for the Items and SelectionList properties, as well as an internal member used to store sorted values in Items. -

-
- - - - TCustomControlFilterEdit.Create - -
- - Owner of the class instance. - + + +Constructor for the class instance. + +

+Create is the overridden constructor for the class instance. It +calls the inherited method on entry to initialize the control and to set its +default property values. Create allocates resources needed for the Items and +SelectionList properties, as well as an internal member used to store sorted +values in Items. +

+
+ + + +TCustomControlFilterEdit.Create + +
+ +Owner of the class instance. + - - Destructor for the class instance. - -

- Destroy is the overridden destructor for the class instance. Destroy ensures that resources allocated to members in the class instance are freed, including: -

-
    -
  • Items
  • -
  • SelectionList
  • -
  • The internal member for sorted list item data.
  • -
  • The internal member for check box-style list items.
  • -
-

- Destroy calls the inherited method prior to exit. -

-
- - - - TCustomControlFilterEdit.Destroy - -
+ +Destructor for the class instance. + +

+Destroy is the overridden destructor for the class instance. +Destroy ensures that resources allocated to members in the class instance are +freed, including: +

+
    +
  • Items
  • +
  • SelectionList
  • +
  • The internal member for sorted list item data.
  • +
  • The internal member for check box-style list items.
  • +
+

+Destroy calls the inherited method prior to exit. +

+
+ + + +TCustomControlFilterEdit.Destroy + +
- - Removes the specified string value from the Items property. - -

- RemoveItem calls the IndexOf method in Items to get the ordinal position for the value in AItem. When found, the Delete method in Items is called to remove the list item. If FilteredListbox is a TCheckListBox instance, the value is also removed from the internal string map used for the check box item values. -

-

- No actions are performed in the method if AItem is not found in the Items property. -

-
- - - - TCheckListBox - TStringList.IndexOf - TStringList.Delete - -
- - Item located and removed in the method. - + +Removes the specified string value from the Items property. + +

+RemoveItem calls the IndexOf method in Items to get the ordinal +position for the value in AItem. When found, the Delete method in Items is +called to remove the list item. If FilteredListbox is a TCheckListBox +instance, the value is also removed from the internal string map used for the +check box item values. +

+

+No actions are performed in the method if AItem is not found in the Items +property. +

+
+ + + +TCheckListBox +TStringList.IndexOf +TStringList.Delete + +
+ +Item located and removed in the method. + - - - Notifies the control when the checked state for an item has been changed. - - -

- ItemWasClicked is significant when FilteredListbox contains a TCheckListBox instance. It is not used internally in the implementation for the control, but can be used to synchronize the control when a check box in the FilteredListbox is toggled. -

-

- An example of its usage can be found in the ide/editorfilemanager.pas unit in the Lazarus IDE. -

-
- - - TCheckListBox - -
- - - String with the list item changed in an associated checked list box control. - - - - - Checked state for the list box item. - - + + +Notifies the control when the checked state for an item has been changed. + + +

+ItemWasClicked is significant when FilteredListbox contains a +TCheckListBox instance. It is not used internally in the implementation for +the control, but can be used to synchronize the control when a check box in +the FilteredListbox is toggled. +

+

+An example of its usage can be found in the +ide/editorfilemanager.pas unit in the Lazarus IDE. +

+
+ + +TCheckListBox + +
+ + +String with the list item changed in an associated checked list box control. + + + + +Checked state for the list box item. + + - - - Stores the selected list item(s) in FilteredListbox to the SelectionList for the control. - - -

- StoreSelection is an overridden method in TListFilterEdit used to load the values in SelectionList from the Selected items in FilteredListbox. No actions are performed in the method if FilteredListbox has not been assigned. -

-

- StoreSelection calls the Clear method in SelectionList to remove any existing values. It iterates over the Selected property values in FilteredListbox, and calls the Add method in SelectionList to store the caption for the selected list items. -

-

- StoreSelection is called from the ApplyFilter method. It occurs after the list items in FilteredListbox have been sorted and filtered in the sorted data and Items properties for the control. -

-
- - - - TCustomControlFilterEdit.ApplyFilter - TCustomControlFilterEdit.Filter - TCustomListBox.Selected - -
+ + +Stores the selected list item(s) in FilteredListbox to the SelectionList for +the control. + + +

+StoreSelection is an overridden method in +TListFilterEdit used to load the values in SelectionList from the +Selected items in FilteredListbox. No actions are performed in the method if +FilteredListbox has not been assigned. +

+

+StoreSelection calls the Clear method in SelectionList to remove any existing +values. It iterates over the Selected property values in FilteredListbox, and +calls the Add method in SelectionList to store the caption for the selected +list items. +

+

+StoreSelection is called from the ApplyFilter method. It occurs after the +list items in FilteredListbox have been sorted and filtered in the sorted +data and Items properties for the control. +

+
+ + + +TCustomControlFilterEdit.ApplyFilter +TCustomControlFilterEdit.Filter +TCustomListBox.Selected + +
- - - Restores values in SelectionList as the selected Items in FilteredListbox. - - - - + + +Restores values in SelectionList as the selected Items in FilteredListbox. + + + + - - - Indicates whether a single selection has been made using the FilteredListbox for the control. - - -

- The property value is updated in StoreSelection, and is set to True when SelectionList contains a single entry. The property value is updated before the items in SelectionList are checked. -

-

- It is used in RestoreSelection to prevent un-needed updates to check boxes in SelectionList. -

-

- It is also used in the ApplyFilterCore method when checked values in Items and SelectionList are located and displayed in the FilteredListbox control. -

-
- -
+ + +Indicates whether a single selection has been made using the FilteredListbox +for the control. + + +

+The property value is updated in StoreSelection, and is set to True +when SelectionList contains a single entry. The property value is updated +before the items in SelectionList are checked. +

+

+It is used in RestoreSelection to prevent un-needed updates to check boxes in +SelectionList. +

+

+It is also used in the ApplyFilterCore method when checked values in Items +and SelectionList are located and displayed in the FilteredListbox control. +

+
+ +
- - - The list of selected list items for the FilteredListbox control. - - -

- SelectionList is a read-only TStringList property with the list of items that are marked as Selected in the associated list box control. Values in SelectionList are cleared and reloaded in the StoreSelection method, and occurs before the Filter value and sorting are applied to the control. -

-

- Values is SelectionList are re-applied to the FilteredListbox control in the RestoreSelection method, and occurs after the Filter value and sorting are applied to the control. -

-
- - - - - - TCustomControlFilterEdit.ApplyFilter - TCustomControlFilterEdit.Filter - TCustomListBox.Selected - -
+ + +The list of selected list items for the FilteredListbox control. + + +

+SelectionList is a read-only TStringList property with +the list of items that are marked as Selected in the associated list box +control. Values in SelectionList are cleared and reloaded in the +StoreSelection method, and occurs before the Filter value and sorting are +applied to the control. +

+

+Values is SelectionList are re-applied to the FilteredListbox control in the +RestoreSelection method, and occurs after the Filter value and sorting are +applied to the control. +

+
+ + + + + +TCustomControlFilterEdit.ApplyFilter +TCustomControlFilterEdit.Filter +TCustomListBox.Selected + +
- - - Contains the list items which are filtered and displayed for the associated list box control. - - -

- Items is a read-only TStringList property with the list items available to the filter edit control. It contains the original list item data loaded from the associated list box control, and is populated when the value is assigned to the FilteredListbox property. Its content is modified when the RemoveItem method is called to delete a list item with a given caption. Values in Items are copied into the sorted data when the value in Filter is applied to the control. -

-

- Use SelectionList to access the list item(s) which are marked as Selected in associated list box control. -

-
- - - - - TCustomControlFilterEdit.ApplyFilter - TCustomControlFilterEdit.Filter - TCustomListBox.Items - -
+ + +Contains the list items which are filtered and displayed for the associated +list box control. + + +

+Items is a read-only TStringList property with the list +items available to the filter edit control. It contains the original list +item data loaded from the associated list box control, and is populated when +the value is assigned to the FilteredListbox property. Its content is +modified when the RemoveItem method is called to delete a list item with a +given caption. Values in Items are copied into the sorted data when the value +in Filter is applied to the control. +

+

+Use SelectionList to access the list item(s) which are marked as Selected in +associated list box control. +

+
+ + + + +TCustomControlFilterEdit.ApplyFilter +TCustomControlFilterEdit.Filter +TCustomListBox.Items + +
- - - - The list box associated with the filtered edit control. - - -

- FilteredListbox is a TCustomListBox property with the list box which provides the data for the filter edit control. TCustomListBox descendants other than TListBox can be assigned to the property; i. e. TCheckListBox. -

-

- The Items and Selected properties in the list box instance are used to populate the Items, sorted data, and SelectionList properties in the control. FilteredListbox is also used to display the results after the Filter is applied to the Items in the edit control. -

-

- Assigning a new value to the property causes the Filter and Items properties to be updated for the control. Filter is set to the current value in the Text property. Items is reloaded from the Items property in FilteredListbox. When FilteredListbox is a TCheckListBox instance, the internal string map with the check box items on the control is created. -

-
- - - - TCustomControlFilterEdit.Filter - TCustomControlFilterEdit.Text - TCustomListBox - TListBox - TCheckListBox - -
+ + + +The list box associated with the filtered edit control. + + +

+FilteredListbox is a TCustomListBox property with the +list box which provides the data for the filter edit control. TCustomListBox +descendants other than TListBox can be assigned to the property; i. e. +TCheckListBox. +

+

+The Items and Selected properties in the list box instance are used to +populate the Items, sorted data, and SelectionList properties in the control. +FilteredListbox is also used to display the results after the Filter is +applied to the Items in the edit control. +

+

+Assigning a new value to the property causes the Filter and Items properties +to be updated for the control. Filter is set to the current value in the Text +property. Items is reloaded from the Items property in FilteredListbox. When +FilteredListbox is a TCheckListBox instance, the internal string map with the +check box items on the control is created. +

+
+ + + +TCustomControlFilterEdit.Filter +TCustomControlFilterEdit.Text +TCustomListBox +TListBox +TCheckListBox + +
-
+
-
+
diff --git a/components/lazcontrols/docs/listviewfilteredit.xml b/components/lazcontrols/docs/listviewfilteredit.xml index 5c989acbaa..639096138a 100644 --- a/components/lazcontrols/docs/listviewfilteredit.xml +++ b/components/lazcontrols/docs/listviewfilteredit.xml @@ -1,487 +1,603 @@ - - - Implements an edit control used to filter an associated TListView control. - -

- ListViewFilterEdit contains classes and types used to implement the TListViewFilterEdit control. It is used to filter the items displayed for an associated TListView control by the caption or sub-items in list item data. -

-

- This file is part of the LazControls package. -

-
+ + + +Implements an edit control used to filter an associated TListView control. + + +

+ListViewFilterEdit contains classes and types used to implement +the TListViewFilterEdit control. It is used to filter the items +displayed for an associated TListView control by the caption or +sub-items in list item data. +

+

+This file is part of the LazControls package. +

+
- - - - - - - - - - + + + + + + + + + + - - - Record type with data and lines of text for an item in a list view control. - - -

- TListViewDataItem is the typed maintained in TListViewDataList, and passed an argument to the method in TListViewFilterEdit which finds matches for its Filter criteria. -

-
- - - - -
+ + +Record type with data and lines of text for an item in a list view control. + + +

+TListViewDataItem is the typed maintained in TListViewDataList, and passed an +argument to the method in TListViewFilterEdit which finds matches for its +Filter criteria. +

+
+ + + + +
- - Pointer to the data for the list item. - - - TListItem.Data - - + +Pointer to the data for the list item. + + +TListItem.Data + + - - Array of String values with the text displayed for the list item. - - - TStringArray - - + + +Array of String values with the text displayed for the list item. + + + +TStringArray + + - - - Implements the Equal (=) comparison operator for TListViewDataItem instances. - - -

- The return value is True when both the Data and the StringArray for the compared TListViewDataItem instances are the same. -

-
- -
- - True when the compared items have the same Data and StringArray values. - - - TListViewDataItem instance for the comparison operator. - - - TListViewDataItem instance for the comparison operator. - + + +Implements the Equal (=) comparison operator for TListViewDataItem instances. + + +

+The return value is True when both the Data and the +StringArray for the compared TListViewDataItem +instances are the same. +

+
+ +
+ + +True when the compared items have the same Data and StringArray values. + + + +TListViewDataItem instance for the comparison operator. + + +TListViewDataItem instance for the comparison operator. + - - List container for TListViewDataItem instances. - -

- TListViewDataList is a specialization of TFPGList to use TListViewDataItem instances in the container. TListViewDataList is the type used to implement the Items property in TListViewFilterEdit. -

-
- - - - -
+ +List container for TListViewDataItem instances. + +

+TListViewDataList is a specialization of TFPGList to use +TListViewDataItem instances in the container. TListViewDataList is the type +used to implement the Items property in +TListViewFilterEdit. +

+
+ + + + +
- - - Implements a control used to filter list items in an associated TListView control. - - -

- TListViewFilterEdit is a TCustomControlFilterEdit descendant which implements a control used to filter list item data from an associated TCustomListView control. It includes the FilteredListview property which provides the original list items and selections, and displays the filtered results. Overridden methods are provided to apply the filter and sort the list items for the associated list view control. The button on the edit control is used to clear the filter applied to the list items. Other overridden methods are provided to navigate between and select the filtered list items. -

- - TListViewFilterEdit requires FilteredListview to have list items available in its Items property. This prevents use of virtual mode (when OwnerData is True) in the associated list view control. - -
- - TCustomControlFilterEdit - -
+ + +Implements a control used to filter list items in an associated TListView +control. + + +

+TListViewFilterEdit is a TCustomControlFilterEdit +descendant which implements a control used to filter list item data from an +associated TCustomListView control. It includes the FilteredListview property +which provides the original list items and selections, and displays the +filtered results. Overridden methods are provided to apply the filter and +sort the list items for the associated list view control. The button on the +edit control is used to clear the filter applied to the list items. Other +overridden methods are provided to navigate between and select the filtered +list items. +

+ +TListViewFilterEdit requires FilteredListview to have list items available in +its Items property. This prevents use of virtual mode (when OwnerData is +True) in the associated list view control. + +
+ +TCustomControlFilterEdit + +
- - TListView control showing the filtered data. - + +TListView control showing the filtered data. + - - Stores the value for the ByAllFields property. - + +Stores the value for the ByAllFields property. + - - Stores / restores the previous selections in the associated control. - + + +Stores / restores the previous selections in the associated control. + + - - Data supplied by the caller through the Items property. - + +Data supplied by the caller through the Items property. + - - Data sorted for viewing. - + +Data sorted for viewing. + - - True when the list view item matches a filter condition for the control. - - - True when the list view item matches a filter condition for the control. - - - - + + +True when the list view item matches a filter condition for the +control. + + + + +True when the list view item matches a filter condition for the +control. + + + + + - - Sets the value for the FilteredListview property. - - - New value for the FilteredListview property. - + +Sets the value for the FilteredListview property. + + +New value for the FilteredListview property. + - - - Handles a notification message received when a component is added to or removed from the control. - - -

- Overridden in TListViewFilterEdit to ensure that the FilteredListview property is set to Nil when the component is removed from the control. -

-
- - - TControl.Notification - -
- - Component for the notification message. - - - Operation for the component. - + + +Handles a notification message received when a component is added to or +removed from the control. + + +

+Overridden in TListViewFilterEdit to ensure that the +FilteredListview property is set to Nil when the component +is removed from the control. +

+
+ + +TControl.Notification + +
+ +Component for the notification message. + + +Operation for the component. + - - Gets the ordinal position for the last selected list view item. - -

- The return value is retrieved from the Index property in LastSelected (when assigned). The value is -1 if LastSelected has not been assigned. -

-
- - TCustomListView.LastSelected - -
- - - Ordinal position for the last selected list view item, or -1 when LastSelected has not been assigned. - - + +Gets the ordinal position for the last selected list view item. + +

+The return value is retrieved from the Index property in LastSelected (when +assigned). The value is -1 if LastSelected has not been assigned. +

+
+ +TCustomListView.LastSelected + +
+ + +Ordinal position for the last selected list view item, or -1 when +LastSelected has not been assigned. + + - - - Changes the selection for the associated list view control to the specified item position. - - - - - - Ordinal position for the list item to select, multi-select, or de-select. - - - True if the item is selected or included in a multi-selection. - + + +Changes the selection for the associated list view control to the specified +item position. + + + + + + +Ordinal position for the list item to select, multi-select, or de-select. + + + + +True if the item is selected or included in a multi-selection. + + - - Moves the list view control to the next list item. - -

- MoveNext is an overridden method in TListViewFilterEdit used to position the associated list view control on the next list item which matches the filter condition. The value in LastSelected is used as the starting point for the navigation request. -

-

- MoveNext calls the MoveTo method to reposition the list view and determine the existing selected state for the list item. -

-

- ASelect indicates whether the list item is included in the Selection (multi-selection) for the list view control. -

-

- No actions are performed in the method when FilteredListview has not been assigned, or does not contain any list items. -

-
- - TCustomControlFilterEdit.MoveNext - -
- - - True if the new list item should become selected, or added to the multi-selection for the list view control. - - + +Moves the list view control to the next list item. + +

+MoveNext is an overridden method in TListViewFilterEdit +used to position the associated list view control on the next list item which +matches the filter condition. The value in LastSelected is used as the +starting point for the navigation request. +

+

+MoveNext calls the MoveTo method to reposition the list view and determine +the existing selected state for the list item. +

+

+ASelect indicates whether the list item is included in the Selection +(multi-selection) for the list view control. +

+

+No actions are performed in the method when FilteredListview has not been +assigned, or does not contain any list items. +

+
+ +TCustomControlFilterEdit.MoveNext + +
+ + +True if the new list item should become selected, or added to the +multi-selection for the list view control. + + - - - Moves the associated list view control to the previous list item. - - - - - - True if the list item should be become selected (or multi-selected). - + + +Moves the associated list view control to the previous list item. + + + + + + +True if the list item should be become selected (or multi-selected). + + - - - Moves the associated list view control towards the start of its list items by the number of visible rows for the control. - - - - - - True if the list item should be become selected (or multi-selected). - + + +Moves the associated list view control towards the start of its list items by +the number of visible rows for the control. + + + + + + +True if the list item should be become selected (or multi-selected). + + - - - Moves the associated list view control towards the end of its list items by the number of visible rows for the control. - - - - - - True if the list item should be become selected (or multi-selected). - + + +Moves the associated list view control towards the end of its list items by +the number of visible rows for the control. + + + + + + +True if the list item should be become selected (or multi-selected). + + - - - Move the associated list view control to the first list item. - - - - - - True if the list item should be become selected (or multi-selected). - + + +Move the associated list view control to the first list item. + + + + + + +True if the list item should be become selected (or multi-selected). + + - - - Move the associated list view control to the last list item. - - - - - - True if the list item should be become selected (or multi-selected). - + + +Move the associated list view control to the last list item. + + + + + + +True if the list item should be become selected (or multi-selected). + + - - - Returns True if a Return or Enter key press was forwarded to the list view control. - - - - - - - True if a Return (Enter) key press was forwarded to the list view control. - - + + +Returns True if a Return or Enter key press was forwarded to the list +view control. + + + + + + +True if a Return (Enter) key press was forwarded to the list view +control. + + - - - Sorts the data in the associated control and applies the filter. - - -

- SortAndFilter is an overridden method in TListViewFilterEdit which implements the abstract virtual method from the ancestor class. It discards previous filtering results and re-evaluates the filter condition(s) for each of the list items in FilteredListview. -

-
- - - TCustomControlFilterEdit.SortAndFilter - TCustomControlFilterEdit.DoFilterItem - TCustomControlFilterEdit.OnFilterItem - TCustomControlFilterEdit.OnFilterItemEx - -
+ + +Sorts the data in the associated control and applies the filter. + + +

+SortAndFilter is an overridden method in +TListViewFilterEdit which implements the abstract virtual method +from the ancestor class. It discards previous filtering results and +re-evaluates the filter condition(s) for each of the list items in +FilteredListview. +

+
+ + +TCustomControlFilterEdit.SortAndFilter +TCustomControlFilterEdit.DoFilterItem +TCustomControlFilterEdit.OnFilterItem +TCustomControlFilterEdit.OnFilterItemEx + +
- - - Implements the method used to apply filter data to the associated control. - - -

- Called when the ApplyFilter method in the ancestor class is executed. -

-
- -
+ + +Implements the method used to apply filter data to the associated control. + + +

+Called when the ApplyFilter method in the ancestor class is executed. +

+
+ +
- - Gets the default resource name for the button glyph on the control. - - - - - Resource name for the button glyph. - + + +Gets the default resource name for the button glyph on the control. + + + + + +Resource name for the button glyph. + - - Constructor for the class instance. - -

- Create is the overridden constructor for the class instance, and calls the inherited method on entry. It allocates resources for the SelectionList and Items properties. It creates an internal TListViewDataList instance used to store the filtered data for the list view control. -

-
- -
- - Owner of the class instance. - + +Constructor for the class instance. + +

+Create is the overridden constructor for the class instance, and +calls the inherited method on entry. It allocates resources for the +SelectionList and Items properties. It creates an +internal TListViewDataList instance used to store the filtered +data for the list view control. +

+
+ +
+ +Owner of the class instance. + - - Destructor for the class instance. - -

- Destroy is the overridden destructor for the class instance. It frees resources allocated to SelectionList, Items, and the internal filtered data list. It calls the inherited method prior to exit. -

-
- -
+ +Destructor for the class instance. + +

+Destroy is the overridden destructor for the class instance. It +frees resources allocated to SelectionList, Items, and +the internal filtered data list. It calls the inherited method prior to exit. +

+
+ +
- - - Clears the selection list for the control, and stores any list items from FilteredListview with their Selected property set to True. - - -

- StoreSelection is an overridden method in TListViewFilterEdit. It implements the abstract virtual method from the ancestor class. StoreSelection calls the Clear method in SelectionList to remove existing values in the list. When FilteredListview has selected items (SelCount > 0), the Caption for each selected TListItem is added to SelectionList. -

-

- No actions are performed in the method if FilteredListview has not been assigned. -

-

- StoreSelection is used in the implementation for the ApplyFilter method in the ancestor class. -

-

- See RestoreSelection for the action performed to select the list items in SelectionList in the Items for the associated TListView control. -

-
- - - - TCustomControlFilterEdit.StoreSelection - TCustomControlFilterEdit.ApplyFilter - TCustomListView.Items - TListItems - TListItem.Selected - -
+ + +Clears the selection list for the control, and stores any list items from +FilteredListview with their Selected property set to True. + + +

+StoreSelection is an overridden method in +TListViewFilterEdit. It implements the abstract virtual method +from the ancestor class. StoreSelection calls the Clear method in +SelectionList to remove existing values in the list. When FilteredListview +has selected items (SelCount > 0), the Caption for each selected TListItem +is added to SelectionList. +

+

+No actions are performed in the method if FilteredListview has not been +assigned. +

+

+StoreSelection is used in the implementation for the ApplyFilter method in +the ancestor class. +

+

+See RestoreSelection for the action performed to select the list items in +SelectionList in the Items for the associated TListView control. +

+
+ + + +TCustomControlFilterEdit.StoreSelection +TCustomControlFilterEdit.ApplyFilter +TCustomListView.Items +TListItems +TListItem.Selected + +
- - - Restores the Selected property for list items in FilteredListview which are stored in StoreSelection. - - -

- RestoreSelection is an overridden method in TListViewFilterEdit. It implements the abstract virtual method from the ancestor class. -

-

- RestoreSelection locates and updates the Selected property for TListItem entries found in th associated TListView control. RestoreSelection visits each of the caption values in SelectionList and calls the IndexOf method for the Items in FilteredListview. When a caption value is located, the Selected property for the TListItem entry is set to True. -

-

- No actions are performed in the method when SelectionList does not contain any caption values (Count = 0) or when FilteredListview has not been assigned. -

-

- RestoreSelection is used in the implementation for the ApplyFilter method in the ancestor class. -

-

- See StoreSelection for the actions performed to store the selected items in FilteredListview to the SelectionList property. -

-
- - - - TCustomControlFilterEdit.RestoreSelection - TCustomControlFilterEdit.ApplyFilter - TCustomListView.Items - TListItems - TListItem.Selected - -
+ + +Restores the Selected property for list items in FilteredListview which are +stored in StoreSelection. + + +

+RestoreSelection is an overridden method in +TListViewFilterEdit. It implements the abstract virtual method +from the ancestor class. +

+

+RestoreSelection locates and updates the Selected property for TListItem +entries found in th associated TListView control. RestoreSelection visits +each of the caption values in SelectionList and calls the IndexOf method for +the Items in FilteredListview. When a caption value is located, the Selected +property for the TListItem entry is set to True. +

+

+No actions are performed in the method when SelectionList does not contain +any caption values (Count = 0) or when FilteredListview has not been assigned. +

+

+RestoreSelection is used in the implementation for the ApplyFilter method in +the ancestor class. +

+

+See StoreSelection for the actions performed to store the selected items in +FilteredListview to the SelectionList property. +

+
+ + + +TCustomControlFilterEdit.RestoreSelection +TCustomControlFilterEdit.ApplyFilter +TCustomListView.Items +TListItems +TListItem.Selected + +
- - Identifies the selected items in the associated TListView control. - -

- SelectionList is a read-only TStringList property which contains the list items which are marked as selected in FilteredListview. It contains the caption for the TListItem entries in FilteredListview which have their Selected property set to True. -

-

- Caption values are stored in the property when StoreSelection is called when the Filter value is applied to the associated list view control. SelectionList is cleared and reloaded each time StoreSelection is called. -

-

- RestoreSelection is used to re-apply the selected state for list items in FilteredListview when the Filter is cleared for the control. -

-
- - - TCustomControlFilterEdit.Filter - TCustomControlFilterEdit.ApplyFilter - TCustomListView.Items - TCustomListView.SelCount - TListItems - TListItem.Caption - TListItem.Selected - -
+ + +Identifies the selected items in the associated TListView control. + + +

+SelectionList is a read-only TStringList property which +contains the list items which are marked as selected in FilteredListview. It +contains the caption for the TListItem entries in FilteredListview which have +their Selected property set to True. +

+

+Caption values are stored in the property when StoreSelection is called when +the Filter value is applied to the associated list view control. +SelectionList is cleared and reloaded each time StoreSelection is called. +

+

+RestoreSelection is used to re-apply the selected state for list items in +FilteredListview when the Filter is cleared for the control. +

+
+ + +TCustomControlFilterEdit.Filter +TCustomControlFilterEdit.ApplyFilter +TCustomListView.Items +TCustomListView.SelCount +TListItems +TListItem.Caption +TListItem.Selected + +
- - Maintains the data which is filtered and shown in the ListView. - - - + +Maintains the data which is filtered and shown in the ListView. + + + - - The associated list view for the filtered edit control. - -

- FilteredListview is a TCustomListView property with the list view control which contains the list item data and selections filtered in the control. -

-

- Applications must assign a value to the property to enable filtering in edit control. No actions are performed in the control when FilteredListview has not been assigned (contains Nil), or FilteredListView does not contain any list items in its Items property. -

-

- Changing the value in the property causes the value in Text to be assigned to the Filter property for the control. This causes the original list item data in FilteredListView to be stored to the Items property in the control. -

-

- Use ByAllFields to control whether SubItems in list item data are included in the filtered values for the control. -

-
- - - - - TCustomControlFilterEdit.Filter - TCustomControlFilterEdit.ApplyFilter - TCustomControlFilterEdit.Text - TCustomListView - -
+ +The associated list view for the filtered edit control. + +

+FilteredListview is a TCustomListView property with the +list view control which contains the list item data and selections filtered +in the control. +

+

+Applications must assign a value to the property to enable filtering in edit +control. No actions are performed in the control when FilteredListview has +not been assigned (contains Nil), or FilteredListView does not contain any +list items in its Items property. +

+

+Changing the value in the property causes the value in Text to be assigned to +the Filter property for the control. This causes the original list item data +in FilteredListView to be stored to the Items property in the control. +

+

+Use ByAllFields to control whether SubItems in list item data are included in +the filtered values for the control. +

+
+ + + + +TCustomControlFilterEdit.Filter +TCustomControlFilterEdit.ApplyFilter +TCustomControlFilterEdit.Text +TCustomListView + +
- - Indicates if all fields are compared using the filter. - -

- When set to True, all fields in the list view data are used when searching for a value that matches the filter. Otherwise, only the Caption is used. The default value for the property is False. -

-

- ByAllFields is used when SortAndFilter is called to select and order the filtered data for the control. -

-
- -
-
-
+ +Indicates if all fields are compared using the filter. + +

+When set to True, all fields in the list view data are used when +searching for a value that matches the filter. Otherwise, only the Caption is +used. The default value for the property is False. +

+

+ByAllFields is used when SortAndFilter is called to +select and order the filtered data for the control. +

+
+ +
+
+
diff --git a/components/lazcontrols/docs/lvlgraphctrl.xml b/components/lazcontrols/docs/lvlgraphctrl.xml index 71e8c139d7..21db945102 100644 --- a/components/lazcontrols/docs/lvlgraphctrl.xml +++ b/components/lazcontrols/docs/lvlgraphctrl.xml @@ -1,3546 +1,3639 @@ - - - - Implements a Level (or Layered) Graph control. - -

- LvlGraphCtrl.pas contains classes, types, constants, and routines used to implement a Level (or Layered) Graph control. -

-

- This file is part of the LazControls package. -

-
+ + + +Implements a Level (or Layered) Graph control. + +

+LvlGraphCtrl.pas contains classes, types, constants, and +routines used to implement a Level (or Layered) Graph control. +

+

+This file is part of the LazControls package. +

+
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - + + + - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - -

- Data is a Pointer property which points to the location in memory where the data for the node is stored. -

-
- -
+ + + + +

+Data is a Pointer property which points to the location in memory where the +data for the node is stored. +

+
+ +
- - Constructor for the class instance. - -

- Create is the constructor for the class instance. -

-
- -
- - - - - - - - - + +Constructor for the class instance. + +

+Create is the constructor for the class instance. +

+
+ +
+ + + + + + + + + - - Destructor for the class instance. - - - + +Destructor for the class instance. + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - -

- Requires a value greater than or equal to 0 (zero) in the ImageIndex property. -

-
- -
+ + + +

+Requires a value greater than or equal to 0 (zero) in the +ImageIndex property. +

+
+ +
- - - -

- The default value for the property is defined in the DefaultLvlGraphNodeImageEffect constant. -

-
- -
+ + + +

+The default value for the property is defined in the +DefaultLvlGraphNodeImageEffect constant. +

+
+ +
- - - -

- Graph is a read-only TLvlGraph property. -

-
- -
+ + + +

+Graph is a read-only TLvlGraph property. +

+
+ +
- - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - -

- InEdges is a read-only indexed TLvlGraphEdge property which provides access to the input edges for the node. Use InEdgeCount to get the total number of input edges for the node. -

-
- - - -
- - - + + + +

+InEdges is a read-only indexed TLvlGraphEdge property which provides access +to the input edges for the node. Use InEdgeCount to get the total number of +input edges for the node. +

+
+ + + +
+ + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - -

- OutEdges is a read-only indexed TLvlGraph property which provides access to the output edges for the node. Use OutEdgeCount to get the total number of output edges for the node. -

-
- - - -
- - - + + + +

+OutEdges is a read-only indexed TLvlGraph property which provides access to +the output edges for the node. Use OutEdgeCount to get the total number of +output edges for the node. +

+
+ + + +
+ + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - -

- NextSelected is a read-only TLvlGraphNode property. -

-
- -
+ + + +

+NextSelected is a read-only TLvlGraphNode property. +

+
+ +
- - - -

- PrevSelected is a read-only TLvlGraphNode property. -

-
- -
+ + + +

+PrevSelected is a read-only TLvlGraphNode property. +

+
+ +
- - Drawing position for the node at the current Level. - - - + +Drawing position for the node at the current Level. + + + - - - -

- The default value for the property is 1. -

-
- -
+ + + +

+The default value for the property is 1. +

+
+ +
- - - - - + + + + + - - - -

- Calculated using the formula: -

+ + + +

+Calculated using the formula: +

DrawPositionEnd := DrawPosition + Max(InSize, OutSize); -
- -
- - - - - - Last drawing position for the caption, with scrolling. - -

- DrawnCaptionRect is a read-only TRect property. -

-
- -
- - - Total weight for InEdges. - -

- InWeight is a read-only Single property. -

-
- -
- - - Total weight for OutEdges. - -

- OutWeight is a read-only Single property. -

-
- -
- - - Class reference for the TLvlGrapNode type. - - - - - Pointer to a TLvlGrapNode instance. - - - - - - - - - - - - - - - - True when a circular reference exists between 2 nodes, with no levels between; i. e. both edges paint in the same location. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Pointer to the user data for the edge. - - - - - - Constructor for the class instance. - -

- Create is the constructor for the class instance. -

-
- -
- - - - - - - - - Destructor for the class instance. - -

- Destroy is the overridden destructor for the class instance. -

-
- -
- - - - -

- Source is a read-only TLvlGrapNode property. -

-
- -
- - - - -

- Target is a read-only TLvlGrapNode property. -

-
- -
- - - - -

- Requires a value greater than or equal to 0 (zero). -

-
- -
- - - - - - - - - - - - - - - -

- BackEdge is a read-only Boolean property. The value is True if the direction for the edge was reversed (source and target were exchanged). -

-
- -
- - - - - - - - - Last drawing rectangle, with scrolling. - - DrawnAt is a read-only TRect property. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Pointer to a TLvlGraphEdge type. - - - - - - - -

- TLvlGraphLevel is a TPersistent descendant. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Constructor for the class instance. - -

- Create is the constructor for the class instance. -

-
- -
- - - - - - - - - Destructor for the class instance. - -

- Destroy is the overridden destructor for the class instance. -

-
- -
- - - - - - - - - - -

- Nodes is a read-only indexed TLvlGrapNode property. Nodes is the default property for the class instance. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sum of the maximum weights for each node: Max(InWeight,OutWeight). - - - - - -

- Index is a read-only Integer property. -

-
- -
- - - - -

- Graph is a read-only TLvlGraph property. -

-
- -
- - - - - - - - - - - - - - - - -

- TLvlGraphSubGraph is a TPersistent descendant. -

-
- -
- - - - - - - - - - Constructor for the class instance. - -

- Create is the constructor for the class instance. -

-
- -
- - - - - - - - - Destructor for the class instance. - -

- Destroy is the overridden destructor for the class instance. -

-
- -
- - - - -

- Graph is a read-only TLvlGraph property. -

-
- -
- - - - -

- Index is a read-only Integer property. -

-
- -
- - - - -

- LowestLevel is a read-only Integer property. -

-
- -
- - - - -

- HighestLevel is a read-only Integer property. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - Create separate hidden nodes for each edge; this creates a lot of hidden nodes. - - - Combine hidden nodes at source (outgoing edge). - - - Combine hidden nodes at target (incoming edge). - - - Combine hidden nodes at source or target, whichever has more edges. - - - - - -

- TLvlGraph is a TPersistent descendant. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Constructor for the class instance. - -

- Create is the constructor for the class instance. -

-
- -
- - - Destructor for the class instance. - -

- Destroy is the overridden destructor for the class instance. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- Signalled when a Node, Edge, or Level has been added or deleted in the level graph. -

-
- -
- - - - - - - - - - - - - -

- Nodes is a read-only indexed TLvlGraphNode property. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- NodeClass is a read-only TLvlGraphNodeClass property. -

-
- -
- - - - -

- FirstSelected is a read-only TLvlGrapNode property. -

-
- -
- - - - -

- LastSelected is a read-only TLvlGraphNode property. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- EdgeClass is a read-only TLvlGraphEdgeClass property. -

-
- -
- - - - -

- SubGraphs is a read-only indexed TLvlGraphSubGraph property. Use SubGraphCount to get the number of subgraphs in the class instance. -

-
- - - -
- - - - - - - -

- SubGraphCount is a read-only Integer property with the number of subgraphs available in the class instance. -

-
- - - -
- - - - -

- Levels is a read-only indexed TLvlGraphLevel property. Use LevelCount to get the number of Levels used in the nodes for the class instance. -

-
- -
- - - - - - - - - - - - - -

- LevelClass is a read-only TLvlGraphLevelClass property. -

-
- -
- - - - - - - - - Creates levels using the edges for the Level Graph. - - - - - - - - - - - - - -

- Requires BackEdge to have been processed in MarkBackEdges. -

-
- -
- - - - - - - - - - - - - - - - - - Splits long edges by adding hidden nodes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Permutates nodes to minimize crossings. - - - - - - Sets the position for all nodes to ensure the required gaps between nodes. - - - An overloaded variant without the ALevel parameter was added in version 2.3.0. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Automatic graph layout after graph has changed. - - - - - CreateTopologicalLevels (AutoLayout) will attempts to find an order with less BackEdges. - - - - - Puts nodes topologically at higher levels. - - - - - If nodes are not fixed to a level by neighbors on both side, find the level which reduces total edge length the most. - - - - - Minimizes vertical up/down movement of edges. - - - - - Mouse hover highlights a node and its edges. - - - - - When the mouse is near an edge, highlight the node and its edges. lgoHighlightNodeUnderMouse takes precedence. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- TLvlGraphNodeStyle is a TPersistent descendant. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Constructor for the class instance. - -

- Create is the constructor for the class instance. -

-
- -
- - Level Graph control where values in the class instance are used. - - - - Destructor for the class instance. - -

- Destroy is the overridden destructor for the class instance. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - -

- Control is a read-only TCustomLvlGraphControl property. -

-
- -
- - - - - -

- The default value for the property is defined in the DefaultLvlGraphNodeCaptionPosition constant. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphNodeCaptionScale constant. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphNodeShape constant. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphNodeGapLeft constant. Used by AutoLayout. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphNodeGapTop constant. Used by AutoLayout. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphNodeGapRight constant. Used by AutoLayout. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphNodeGapBottom constant. Used by AutoLayout. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphNodeWith constant. -

-
- -
- - - - - - - - - - - - - - - - -

- TLvlGraphEdgeStyle is a TPersistent descendant. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Constructor for the class instance. - -

- Create is the constructor for the class instance. -

-
- -
- - - - - - Destructor for the class instance. - -

- Destroy is the overridden destructor for the class instance. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - -

- Control is a read-only TCustomLvlGraphControl property. -

-
- -
- - - - - -

- The default value for the property is defined in the DefaultLvlGraphEdgeSplitMode constant. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphEdgeNearMouseDistMax constant. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphEdgeShape constant. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphEdgeColor constant. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphEdgeBackColor constant. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphEdgeHighlightColor constant. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphEdgeBackHighlightColor constant. -

-
- -
- - - - -

- TLvlGraphLimits is a TPersistent descendant. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - Constructor for the class instance. - -

- Create is the constructor for the class instance. -

-
- -
- - Control where class instance is used. - - - - Destructor for the class instance. - -

- Destroy is the overridden destructor for the class instance. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - -

- Control is a read-only TCustomLvlGraphControl property. -

-
- -
- - - - Maximum number of user-specified nodes for a level. - -

- MaxLevelHeightAbs is an Integer property with the maximum number of visible (user-specified) nodes in a level. 0 (zero) indicates that the maximum is ignored. The default value for the property is defined in the DefaultMaxLevelHeightAbs constant. -

-
- -
- - - - -

- MaxLevelHeightRel is a Single property with a factor used to determine the maximum number of nodes for a level. 0 (zero) indicates that the factor is ignored. -

-

- The default value for the property is defined in the DefaultMaxLevelHeightRel constant. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ancestor for the TLvlGraphControl control. - -

- TCustomLvlGraphControl is a TCustomControl descendant which implements the ancestor for TLvlGraphControl. -

-

- It is used to render a level graph (also known as a edlayered graph). A level graph consists of nodes (or vertices) and edges with an equidistant spacing between related nodes. -

-

- TCustomLvlGraphControl and TLvlGraphControl provide the following features: -

-
    -
  • - Offers automatic topological sorting, with an option to put nodes left-most or right-most. -
  • -
  • - Offers automatic topological sorting, with an option to put nodes left-most or right-most. -
  • -
  • - Edges can be automatically combined. -
  • -
  • - Long edges over multiple levels are combined into a single line with forks to related nodes. -
  • -
  • - Provides a heuristic to minimize line crossings. -
  • -
  • - Automatically prevents overlapping of display elements. -
  • -
  • - Nodes can be displayed as rectangles, ellipses or icons stored in a TImageList. -
  • -
  • - You can select nodes using the mouse. -
  • -
  • - You can select multiple nodes at once. -
  • -
  • - You can highlight nodes or edges under the mouse. -
  • -
  • - The control displays back edges in special colors, which facilitates quick visual identification of cycles (e.g. unit circles). -
  • -
  • - Edges can be drawn straight or as a curve (bezier). -
  • -
  • - There is a header caption. -
  • -
  • - Node captions can be shown to the left, to the right, above, or below nodes. -
  • -
  • - All colors can be set via published properties. -
  • -
  • - Events are provided to custom-draw and/or skip each part of the default drawing. -
  • -
-

- There is a simple example in: - ($LazarusDir)/examples/levelgraph/lvlgraph_dependencies.lpi. -

-

- TLvlGraphControl is used to display unit dependencies in the Package Graph for the Lazarus IDE. -

-
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Converts a given point or rectangle to client coordinates in the visible area for the control. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Draws a line for the specified Edge using the current Canvas color. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Constructor for the class instance. - -

- Create is the overridden constructor for the class instance. -

-
- -
- - Owner of the class instance. - - - - Destructor for the class instance. - -

- Destroy is the overridden destructor for the class instance. -

-
- -
- - - - - - - - - - - - - -

- Graph is a read-only TLvlGraph property. -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- EdgeStyle is a read-only TLvlGraphEdgeStyle property. -

-
- -
- - - - -

- Limits is a read-only TLvlGraphLimits property. -

-
- -
- - - - -

- The default value for the property is defined in the DefaultLvlGraphCtrlOptions constant. -

-
- -
- - - - - - - - - - - - - - - - -

- ScrollTopMax is a read-only Integer property. -

-
- -
- - - - - - - - - - -

- ScrollLeftMax is a read-only Integer property. -

-
- -
- - - Event handler signalled to provide an alternative minimize crossing algorithm. - - - - - - Event handler signalled to provide an alternative minimize overlappings algorithm. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- PixelPerWeight is a read-only Single property. -

-
- -
- - - - - - - - - - -

- The default value for the property is True. -

-
- -
- - - Implements a control used to draw a level (or layered) graph. - -

- TLvlGraphControl is a TCustomLvlGraphControl descendant which implements a control used to render a level graph (also known as a edlayered graph). A level graph consists of nodes (or vertices) and edges with an equidistant spacing between related nodes. -

-

- TLvlGraphControl provides the following features: -

-
    -
  • - Offers automatic topological sorting, with an option to put nodes left-most or right-most. -
  • -
  • - Offers automatic topological sorting, with an option to put nodes left-most or right-most. -
  • -
  • - Edges can be automatically combined. -
  • -
  • - Long edges over multiple levels are combined into a single line with forks to related nodes. -
  • -
  • - Provides a heuristic to minimize line crossings. -
  • -
  • - Automatically prevents overlapping of display elements. -
  • -
  • - Nodes can be displayed as rectangles, ellipses or icons stored in a TImageList. -
  • -
  • - You can select nodes using the mouse. -
  • -
  • - You can select multiple nodes at once. -
  • -
  • - You can highlight nodes or edges under the mouse. -
  • -
  • - The control displays back edges in special colors, which facilitates quick visual identification of cycles (e.g. unit circles). -
  • -
  • - Edges can be drawn straight or as a curve (bezier). -
  • -
  • - There is a header caption. -
  • -
  • - Node captions can be shown to the left, to the right, above, or below nodes. -
  • -
  • - All colors can be set via published properties. -
  • -
  • - Events are provided to custom-draw and/or skip each part of the default drawing. -
  • -
-

- There is a simple example in: - ($LazarusDir)/examples/levelgraph/lvlgraph_dependencies.lpi. -

-

- TLvlGraphControl is used to display unit dependencies in the Package Graph for the Lazarus IDE. -

-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gets the distance from a point measured along axes at right angles. - -

- GetManhattanDistancePointLine is an Integer function used to get a distance from a point measured along axes at right angles. Also called "taxicab geometry". In taxicab geometry, the distance between two points is the sum of the absolute differences of their Cartesian coordinates. -

-

- In other words, Geometric distance measures the hypotenuse for a right triangle. Manhattan distance is the cumulative length of the adjacent and opposite sides for that right triangle. -

-

- X and Y contain the coordinates with the origin for the measurement. -

-

- LineX1 and LineY1 contain the end coordinates for the adjacent side of the right triangle (starting at X, Y). -

-

- LineX2 and LineY2 contain the end coordinates for the opposite side of the right triangle (start at LineX1, LineY1). -

-
- -
- - Distance along the sides of a right triangle using the specified coordinates. - - - Horizontal coordinate for the origin of the measurement. - - - Vertical coordinate for the origin of the measurement. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gets a string with a comma-delimited list of captions for the specified node array. - - - - - Comma-delimited list of captions for the specified node array. - - - Array with the TLvlGraphNode instances examined in the routine. - - - - - - - - - - - - - - - - - - - - -
- -
+ + + + + + + + +Last drawing position for the caption, with scrolling. + +

+DrawnCaptionRect is a read-only TRect property. +

+
+ +
+ + +Total weight for InEdges. + +

+InWeight is a read-only Single property. +

+
+ +
+ + +Total weight for OutEdges. + +

+OutWeight is a read-only Single property. +

+
+ +
+ + +Class reference for the TLvlGrapNode type. + + + + +Pointer to a TLvlGrapNode instance. + + + + + + + + + + + + + + + +True when a circular reference exists between 2 nodes, with no levels +between; i. e. both edges paint in the same location. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Pointer to the user data for the edge. + + + + + +Constructor for the class instance. + +

+Create is the constructor for the class instance. +

+
+ +
+ + + + + + + + +Destructor for the class instance. + +

+Destroy is the overridden destructor for the class instance. +

+
+ +
+ + + + +

+Source is a read-only TLvlGrapNode property. +

+
+ +
+ + + + +

+Target is a read-only TLvlGrapNode property. +

+
+ +
+ + + + +

+Requires a value greater than or equal to 0 (zero). +

+
+ +
+ + + + + + + + + + + + + + + +

+BackEdge is a read-only Boolean property. The value is True if the +direction for the edge was reversed (source and target were exchanged). +

+
+ +
+ + + + + + + + +Last drawing rectangle, with scrolling. + +DrawnAt is a read-only TRect property. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Pointer to a TLvlGraphEdge type. + + + + + + + +

+TLvlGraphLevel is a TPersistent descendant. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Constructor for the class instance. + +

+Create is the constructor for the class instance. +

+
+ +
+ + + + + + + + +Destructor for the class instance. + +

+Destroy is the overridden destructor for the class instance. +

+
+ +
+ + + + + + + + + + +

+Nodes is a read-only indexed TLvlGrapNode property. Nodes is the default +property for the class instance. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Sum of the maximum weights for each node: Max(InWeight,OutWeight). + + + + + + +

+Index is a read-only Integer property. +

+
+ +
+ + + + +

+Graph is a read-only TLvlGraph property. +

+
+ +
+ + + + + + + + + + + + + + + + +

+TLvlGraphSubGraph is a TPersistent descendant. +

+
+ +
+ + + + + + + + + +Constructor for the class instance. + +

+Create is the constructor for the class instance. +

+
+ +
+ + + + + + + + +Destructor for the class instance. + +

+Destroy is the overridden destructor for the class instance. +

+
+ +
+ + + + +

+Graph is a read-only TLvlGraph property. +

+
+ +
+ + + + +

+Index is a read-only Integer property. +

+
+ +
+ + + + +

+LowestLevel is a read-only Integer property. +

+
+ +
+ + + + +

+HighestLevel is a read-only Integer property. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +Create separate hidden nodes for each edge; this creates a lot of hidden +nodes. + + + +Combine hidden nodes at source (outgoing edge). + + +Combine hidden nodes at target (incoming edge). + + + +Combine hidden nodes at source or target, whichever has more edges. + + + + + + +

+TLvlGraph is a TPersistent descendant. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Constructor for the class instance. + +

+Create is the constructor for the class instance. +

+
+ +
+ + +Destructor for the class instance. + +

+Destroy is the overridden destructor for the class instance. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Signalled when a Node, Edge, or Level has been added or deleted in the level +graph. +

+
+ +
+ + + + + + + + + + + + + +

+Nodes is a read-only indexed TLvlGraphNode property. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+NodeClass is a read-only TLvlGraphNodeClass property. +

+
+ +
+ + + + +

+FirstSelected is a read-only TLvlGrapNode property. +

+
+ +
+ + + + +

+LastSelected is a read-only TLvlGraphNode property. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+EdgeClass is a read-only TLvlGraphEdgeClass property. +

+
+ +
+ + + + +

+SubGraphs is a read-only indexed TLvlGraphSubGraph property. Use +SubGraphCount to get the number of subgraphs in the class instance. +

+
+ + + +
+ + + + + + + +

+SubGraphCount is a read-only Integer property with the number of subgraphs +available in the class instance. +

+
+ + + +
+ + + + +

+Levels is a read-only indexed TLvlGraphLevel property. Use LevelCount to get +the number of Levels used in the nodes for the class instance. +

+
+ +
+ + + + + + + + + + + + + +

+LevelClass is a read-only TLvlGraphLevelClass property. +

+
+ +
+ + + + + + + + +Creates levels using the edges for the Level Graph. + + + + + + + + + + + + + +

+Requires BackEdge to have been processed in MarkBackEdges. +

+
+ +
+ + + + + + + + + + + + + + + + + +Splits long edges by adding hidden nodes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Permutates nodes to minimize crossings. + + + + + + +Sets the position for all nodes to ensure the required gaps between nodes. + + + +An overloaded variant without the ALevel parameter was added in version 2.3.0. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Automatic graph layout after graph has changed. + + + + +CreateTopologicalLevels (AutoLayout) will attempts to find an order with less +BackEdges. + + + + +Puts nodes topologically at higher levels. + + + + +If nodes are not fixed to a level by neighbors on both side, find the level +which reduces total edge length the most. + + + + +Minimizes vertical up/down movement of edges. + + + + +Mouse hover highlights a node and its edges. + + + + +When the mouse is near an edge, highlight the node and its edges. +lgoHighlightNodeUnderMouse takes precedence. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+TLvlGraphNodeStyle is a TPersistent descendant. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Constructor for the class instance. + +

+Create is the constructor for the class instance. +

+
+ +
+ + +Level Graph control where values in the class instance are used. + + + + +Destructor for the class instance. + +

+Destroy is the overridden destructor for the class instance. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Control is a read-only TCustomLvlGraphControl property. +

+
+ +
+ + + + + +

+The default value for the property is defined in the +DefaultLvlGraphNodeCaptionPosition constant. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphNodeCaptionScale constant. +

+
+ +
+ + + + +

+The default value for the property is defined in the DefaultLvlGraphNodeShape +constant. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphNodeGapLeft constant. Used by AutoLayout. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphNodeGapTop constant. Used by AutoLayout. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphNodeGapRight constant. Used by AutoLayout. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphNodeGapBottom constant. Used by AutoLayout. +

+
+ +
+ + + + +

+The default value for the property is defined in the DefaultLvlGraphNodeWith +constant. +

+
+ +
+ + + + + + + + + + + + + + + + +

+TLvlGraphEdgeStyle is a TPersistent descendant. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Constructor for the class instance. + +

+Create is the constructor for the class instance. +

+
+ +
+ + + + + +Destructor for the class instance. + +

+Destroy is the overridden destructor for the class instance. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Control is a read-only TCustomLvlGraphControl property. +

+
+ +
+ + + + + +

+The default value for the property is defined in the +DefaultLvlGraphEdgeSplitMode constant. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphEdgeNearMouseDistMax constant. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphEdgeShape constant. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphEdgeColor constant. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphEdgeBackColor constant. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphEdgeHighlightColor constant. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphEdgeBackHighlightColor constant. +

+
+ +
+ + + + +

+TLvlGraphLimits is a TPersistent descendant. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + +Constructor for the class instance. + +

+Create is the constructor for the class instance. +

+
+ +
+ +Control where class instance is used. + + + +Destructor for the class instance. + +

+Destroy is the overridden destructor for the class instance. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Control is a read-only TCustomLvlGraphControl property. +

+
+ +
+ + + +Maximum number of user-specified nodes for a level. + +

+MaxLevelHeightAbs is an Integer property with the maximum number of visible +(user-specified) nodes in a level. 0 (zero) indicates that the +maximum is ignored. The default value for the property is defined in the +DefaultMaxLevelHeightAbs constant. +

+
+ +
+ + + + +

+MaxLevelHeightRel is a Single property with a factor used to +determine the maximum number of nodes for a level. 0 (zero) +indicates that the factor is ignored. +

+

+The default value for the property is defined in the +DefaultMaxLevelHeightRel constant. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Ancestor for the TLvlGraphControl control. + +

+TCustomLvlGraphControl is a TCustomControl descendant +which implements the ancestor for TLvlGraphControl. +

+

+It is used to render a level graph (also known as a edlayered graph). A level +graph consists of nodes (or vertices) and edges with an equidistant spacing +between related nodes. +

+

+TCustomLvlGraphControl and TLvlGraphControl provide the following features: +

+
    +
  • +Offers automatic topological sorting, with an option to put nodes left-most +or right-most. +
  • +
  • +Offers automatic topological sorting, with an option to put nodes left-most +or right-most. +
  • +
  • +Edges can be automatically combined. +
  • +
  • +Long edges over multiple levels are combined into a single line with forks to +related nodes. +
  • +
  • +Provides a heuristic to minimize line crossings. +
  • +
  • +Automatically prevents overlapping of display elements. +
  • +
  • +Nodes can be displayed as rectangles, ellipses or icons stored in a +TImageList. +
  • +
  • +You can select nodes using the mouse. +
  • +
  • +You can select multiple nodes at once. +
  • +
  • +You can highlight nodes or edges under the mouse. +
  • +
  • +The control displays back edges in special colors, which facilitates quick +visual identification of cycles (e.g. unit circles). +
  • +
  • +Edges can be drawn straight or as a curve (bezier). +
  • +
  • +There is a header caption. +
  • +
  • +Node captions can be shown to the left, to the right, above, or below nodes. +
  • +
  • +All colors can be set via published properties. +
  • +
  • +Events are provided to custom-draw and/or skip each part of the default +drawing. +
  • +
+

+There is a simple example in: +($LazarusDir)/examples/levelgraph/lvlgraph_dependencies.lpi. +

+

+TLvlGraphControl is used to display unit dependencies in the Package Graph +for the Lazarus IDE. +

+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Converts a given point or rectangle to client coordinates in the visible area +for the control. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Draws a line for the specified Edge using the current Canvas color. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Constructor for the class instance. + +

+Create is the overridden constructor for the class instance. +

+
+ +
+ +Owner of the class instance. + + + +Destructor for the class instance. + +

+Destroy is the overridden destructor for the class instance. +

+
+ +
+ + + + + + + + + + + + + +

+Graph is a read-only TLvlGraph property. +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+EdgeStyle is a read-only TLvlGraphEdgeStyle property. +

+
+ +
+ + + + +

+Limits is a read-only TLvlGraphLimits property. +

+
+ +
+ + + + +

+The default value for the property is defined in the +DefaultLvlGraphCtrlOptions constant. +

+
+ +
+ + + + + + + + + + + + + + + + +

+ScrollTopMax is a read-only Integer property. +

+
+ +
+ + + + + + + + + + +

+ScrollLeftMax is a read-only Integer property. +

+
+ +
+ + + +Event handler signalled to provide an alternative minimize crossing algorithm. + + + + + + + +Event handler signalled to provide an alternative minimize overlappings +algorithm. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+PixelPerWeight is a read-only Single property. +

+
+ +
+ + + + + + + + + + +

+The default value for the property is True. +

+
+ +
+ + +Implements a control used to draw a level (or layered) graph. + +

+TLvlGraphControl is a TCustomLvlGraphControl descendant +which implements a control used to render a level graph (also known as a +edlayered graph). A level graph consists of nodes (or vertices) and edges +with an equidistant spacing between related nodes. +

+

+TLvlGraphControl provides the following features: +

+
    +
  • +Offers automatic topological sorting, with an option to put nodes left-most +or right-most. +
  • +
  • +Offers automatic topological sorting, with an option to put nodes left-most +or right-most. +
  • +
  • +Edges can be automatically combined. +
  • +
  • +Long edges over multiple levels are combined into a single line with forks to +related nodes. +
  • +
  • +Provides a heuristic to minimize line crossings. +
  • +
  • +Automatically prevents overlapping of display elements. +
  • +
  • +Nodes can be displayed as rectangles, ellipses or icons stored in a +TImageList. +
  • +
  • +You can select nodes using the mouse. +
  • +
  • +You can select multiple nodes at once. +
  • +
  • +You can highlight nodes or edges under the mouse. +
  • +
  • +The control displays back edges in special colors, which facilitates quick +visual identification of cycles (e.g. unit circles). +
  • +
  • +Edges can be drawn straight or as a curve (bezier). +
  • +
  • +There is a header caption. +
  • +
  • +Node captions can be shown to the left, to the right, above, or below nodes. +
  • +
  • +All colors can be set via published properties. +
  • +
  • +Events are provided to custom-draw and/or skip each part of the default +drawing. +
  • +
+

+There is a simple example in: +($LazarusDir)/examples/levelgraph/lvlgraph_dependencies.lpi. +

+

+TLvlGraphControl is used to display unit dependencies in the Package Graph +for the Lazarus IDE. +

+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Gets the distance from a point measured along axes at right angles. + + +

+GetManhattanDistancePointLine is an Integer function used to get a distance +from a point measured along axes at right angles. Also called "taxicab +geometry". In taxicab geometry, the distance between two points is the sum +of the absolute differences of their Cartesian coordinates. +

+

+In other words, Geometric distance measures the hypotenuse for a right +triangle. Manhattan distance is the cumulative length of the adjacent and +opposite sides for that right triangle. +

+

+X and Y contain the coordinates with the origin for the measurement. +

+

+LineX1 and LineY1 contain the end coordinates for the adjacent side of the +right triangle (starting at X, Y). +

+

+LineX2 and LineY2 contain the end coordinates for the opposite side of the +right triangle (start at LineX1, LineY1). +

+
+ +
+ + +Distance along the sides of a right triangle using the specified coordinates. + + + +Horizontal coordinate for the origin of the measurement. + + +Vertical coordinate for the origin of the measurement. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Gets a string with a comma-delimited list of captions for the specified node +array. + + + + + +Comma-delimited list of captions for the specified node array. + + +Array with the TLvlGraphNode instances examined in the routine. + + + + + + + + + + + + + + + + + + + + +
+ +
diff --git a/components/lazcontrols/docs/shortpathedit.xml b/components/lazcontrols/docs/shortpathedit.xml index 8b64783d8b..3aa72ee3d1 100644 --- a/components/lazcontrols/docs/shortpathedit.xml +++ b/components/lazcontrols/docs/shortpathedit.xml @@ -1,119 +1,163 @@ - + - - Implements the TShortPathEdit control. - -

- ShortPathEdit.pas implements the TShortPathEdit control, a directory edit control with a directory selection dialog. -

-

- This file is part of the LazControls package. -

-
+ +Implements the TShortPathEdit control. + +

+ShortPathEdit.pas implements the TShortPathEdit control, a +directory edit control with a directory selection dialog. +

+

+This file is part of the LazControls package. +

+
- - - - - - + + + + + + - - Control used to select a directory on the local file system. - -

- TShortPathEdit is a TDirectoryEdit descendant which allows selecting a directory on the local file system. -

-

- TShortPathEdit provides a Directory property to specify the starting directory for its path selection dialog. If Directory is not assigned, the RootDirectory property is used instead. It differs from the ancestor class in its implementation of the CreateDialog and RunDialog methods. -

-

- An OnAcceptDirectory event handler is provided and allows the application to determine how the selected directory name is handled. The event handler can be used to process and store the value for the directory selected in the dialog. -

-

- TShortPathEdit is used in the implementation of the path editor dialog in the Lazarus IDE. -

-
- - - -
+ +Control used to select a directory on the local file system. + +

+TShortPathEdit is a TDirectoryEdit descendant which +allows selecting a directory on the local file system. +

+

+TShortPathEdit provides a Directory property to specify the +starting directory for its path selection dialog. If Directory is not +assigned, the RootDirectory property is used instead. It differs from the +ancestor class in its implementation of the CreateDialog and +RunDialog methods. +

+

+An OnAcceptDirectory event handler is provided and allows the +application to determine how the selected directory name is handled. The +event handler can be used to process and store the value for the directory +selected in the dialog. +

+

+TShortPathEdit is used in the implementation of the path editor dialog in the +Lazarus IDE. +

+
+ + + +
- - - + + + - - - Creates and configures the dialog used to select a directory. - -

- CreateDialog is an overridden method in TShortPathEdit used to create and configure the directory selection dialog for the control. The return value contains the TCommonDialog descendant created and configured in the method. It is actually a TSelectDirectoryDialog instance. -

-

- CreateDialog uses the value in the Directory property as the initial directory for the dialog. Directory must contain a path which exists on the local file system. If Directory is unassigned, or does not exist, the value in RootDir is used as the initial directory for the dialog. -

-

- CreateDialog assigns the value in DialogTitle as the title for the dialog. -

-

- CreateDialog is called when the RunDialog method is called after clicking on the speed button for the control. -

-
- -
- - Directory selection dialog created and configured in the method. - + + +Creates and configures the dialog used to select a directory. + +

+CreateDialog is an overridden method in TShortPathEdit +used to create and configure the directory selection dialog for the control. +The return value contains the TCommonDialog descendant created and +configured in the method. It is actually a TSelectDirectoryDialog +instance. +

+

+CreateDialog uses the value in the Directory property as the +initial directory for the dialog. Directory must contain a path which exists +on the local file system. If Directory is unassigned, or does not exist, the +value in RootDir is used as the initial directory for the dialog. +

+

+CreateDialog assigns the value in DialogTitle as the title for the +dialog. +

+

+CreateDialog is called when the RunDialog method is called after +clicking on the speed button for the control. +

+
+ +
+ + +Directory selection dialog created and configured in the method. + + - - - Executes the directory selection dialog for the control. - -

- RunDialog is an overridden method in TShortPathEdit. It is an alternate implementation, and does not call the inherited method. -

-

- RunDialog calls CreateDialog to create and configure the directory selection dialog used in the control. The Execute method in the dialog is called, and the String returned as the dialog result is captured. The OnAcceptDirectory event handler is signalled (when assigned) using the dialog result as an argument. If the dialog return value is not an empty string (''), it is assigned to the Directory property. -

-
- -
+ + +Executes the directory selection dialog for the control. + +

+RunDialog is an overridden method in TShortPathEdit. It +is an alternate implementation, and does not call the inherited method. +

+

+RunDialog calls CreateDialog to create and configure the directory +selection dialog used in the control. The Execute method in the +dialog is called, and the String returned as the dialog result is captured. +The OnAcceptDirectory event handler is signalled (when assigned) +using the dialog result as an argument. If the dialog return value is not an +empty string (''), it is assigned to the Directory property. +

+
+ +
- - Initial directory used in the directory selection dialog. - -

- Directory is a String property used to specify the initial directory on the local file system used to select a directory in the control. It is used as the initial directory for the directory selection dialog executed in the RunDialog method. It is also used to store a valid path name returned from the directory selection dialog. -

-

- A value assigned to Directory is not automatically reflected in the text for the control. Use the OnAcceptDirectory event handler to update the value in Text if desired. -

-
- -
+ +Initial directory used in the directory selection dialog. + +

+Directory is a String property used to specify the +initial directory on the local file system used to select a directory in the +control. It is used as the initial directory for the directory selection +dialog executed in the RunDialog method. It is also used to store a valid +path name returned from the directory selection dialog. +

+

+A value assigned to Directory is not automatically reflected in the text for +the control. Use the OnAcceptDirectory event handler to update the value in +Text if desired. +

+
+ +
- - - Event handler signalled when a directory is selected in the directory selection dialog. - - -

- OnAcceptDirectory is TAcceptFileNameEvent property with the event handler signalled when a directory path has been selected in the RunDialog method. Arguments to the event handler include the directory name selected in the dialog, or an empty string when the Cancel button is pressed in the dialog. -

-

- OnAcceptDirectory can be used to performed actions needed when the selected directory has been changed. Value is a variable parameter, so it can be modified in the event handler prior to its storage in the Directory property. For instance, the selected directory could be converted to a path relative to the RootDir for the control. Or, the selected directory could shortened and assigned to the Text for the control. -

-

- Applications must implement and assign an object procedure to allow responding to the event notification. -

-
- -
+ + +Event handler signalled when a directory is selected in the directory +selection dialog. + + +

+OnAcceptDirectory is TAcceptFileNameEvent property +with the event handler signalled when a directory path has been selected in +the RunDialog method. Arguments to the event handler include the +directory name selected in the dialog, or an empty string when the Cancel +button is pressed in the dialog. +

+

+OnAcceptDirectory can be used to performed actions needed when the selected +directory has been changed. Value is a variable parameter, so it can be +modified in the event handler prior to its storage in the +Directory property. For instance, the selected directory could be +converted to a path relative to the RootDir for the control. Or, the selected +directory could shortened and assigned to the Text for the control. +

+

+Applications must implement and assign an object procedure to allow +responding to the event notification. +

+
+ +
-
+
-
+
diff --git a/components/lazcontrols/docs/spinex.xml b/components/lazcontrols/docs/spinex.xml index 45649dac0c..edc716a478 100644 --- a/components/lazcontrols/docs/spinex.xml +++ b/components/lazcontrols/docs/spinex.xml @@ -1,2062 +1,2640 @@ - - - - Provides extended TSpinEdit- and TFloatSpinEdit-like controls. - -

- Implements TSpinEditEx and TFloatSpinEditEx, which allow a NullValue and provide behaviors applied when the text for the control is not a valid number. -

-

- Initial implementation: 2016 by Bart Broersma. Revised in August 2020. -

-

- This file is part of the LazControls package. -

-
- - - - - - - - - - - - - - - - Specifies the behavior applied in a control when its text is not a valid number. - - -

- TNullValueBehaviour is an enumerated type with values that control the behavior in TSpinEditEx or TFloatSpinEditEx when their value is not a valid number, or not within the Min and Max value for the control. -

-
- -
- - Value becomes NullValue, and Text becomes empty. TextHint will show when focus is lost. - - - Value becomes GetLimitedValue(NullValue), and Text becomes Value. - - - - Value becomes MinValue, and Text becomes Value. Please note that this is the default behavior, as used in Delphi. - - - - - Value becomes MaxValue, and Text becomes Value. - - - - - Value becomes InitialValue (OnEnter), and Text becomes Value. - - - - - Specifies the base class for extended spin edit controls in the unit. - -

- TSpinEditExBase is a generic class type, and a descendant of TCustomAbstractGroupedEdit. TSpinEditExBase specifies the base class for the extended spin edit controls including TSpinEditEx and TFloatSpinEditEx. TSpinEditExBase must be specialized in a descendent class for a specific data type. The specialization type is used to implement properties including: Increment, MinValue, MaxValue, NullValue, and Value. -

-
- - - - - - - - -
- - - - Default value for the Increment property. - - - Default value for the MaxValue property. - - - Default value for the MinValue property. - - - Default value for the MinRepeatValue property. - - - - - - - - - - - - - - - - - - Gets the value for the Edit property. - - - - - - - Value for the property. - - - - Sets the value for the MinRepeatValue property. - - - - - - - New value for the property. - - - - Called when one of the buttons in the TUpDown control has been clicked. - -

- SpinUpDown ensures that the value in Text is a valid representation for the numeric type used in the control. It calls GetLimitedValue to ensure that Value is in the range specified in MinValue and MaxValue. MinValue is used if TextIsNumber returns False. -

-

- SpinUpDown sets the value in Modified to True when Value has been updated in the method. -

-

- Called when key or mouse events are handled in EditKeyDown, EditMouseWheelDown, and EditMouseWheelUp. It is also assigned as the handler routine for the OnChangingEx event in the UpDown property in the constructor for the class instance. -

-
- - - - - - - -
- - - True when the Up button in the TUpDown control has been clicked; False when the Down button has been clicked. - - - - - Gets the value for the NullValue property. - - - - - - - Returns the generic type with the value for the NullValue property. - - - - Gets the value for the UpDown property. - - - - - - - Value for the property. - - - - Gets the value for the Value property. - - - - - - - Value for the property. - - - - Gets the storage specifier for the Increment property. - - - - - - - True when a value other than DefIncrement has been assigned to the Increment property. - - - - Indicates if valid values have been assigned to the MinValue and MaxValue properties. - -

- The return value is True when MaxValue is larger than MinValue. IsLimited is used in the implementation of the IsOutOfLimits method. -

-
- - - - -
- - True when the typed value in MaxValue is larger than the typed value in MinValue. - - - - Determines if the specified value is not within the limits set in MinValue and MaxValue. - - - - - True when the value is outside the limits specified in the MinValue and MaxValue properties. - - - Value examined in the method. - - - - Gets the storage specifier for the MaxValue property. - - - - - - - True when a value other than DefMaxValue has been assigned to the MaxValue property. - - - - Gets the storage specifier for the MaxValue property. - - - - - - - True when a value other than DefMaxValue has been assigned to the MinValue property. - - - - Updates members in the control when editing is completed. - -

- UpdateControl is a method used to update members in the class instance to reflect the state for the control. It is called when a new value is assigned to properties in the class instance. It is called when editing has been completed using the Edit for the grouped editing control. It is also called when the handle is allocated for the control in InitializeWnd. -

-

- NullValueBehaviour is used to determine whether Value is adjusted to ensure that it is in the range specified by MinValue and MaxValue. A value other than nvbShowTextHint causes GetLimitedValue to be called to get the adjusted Value. -

-

- No additional actions are performed in the method when a handle has not been allocated for the control, or at design-time. -

-

- When NullValueBehaviour is set to nvbShowTextHint, an invalid numeric value entered in Text causes Text to be set to an empty string. This allows the TextHint for the control to be displayed. -

-

- When Value is a valid number, and in the required range, it is converted to its String representation and assigned to the Text for the control. -

-
- -
- - - Implements the OnChangingEx event handler assigned to UpDown. - -

- No actions are performed in the handler when ReadOnly is set to True. -

-

- When Direction is updUp, the SpinUpDown method is called using True as an argument. Otherwise, SpinUpDown is called using False as an argument. -

-
- -
- - Control for the event notification. - - - Not used in the method. - - - Not used in the method. - - - Indicates whether the up or down button was clicked in UpDown. - - - - Implements the OnClick event handler assigned to UpDown. - -

- Calls the BuddyClick method for the grouped edit control. -

-
- - - -
- - Control for the event notification. - - - The button type for the TUpDown control. - - - - - Gets the class type used for Buddy in the grouped edit control. - - - - - - - - Returns a class reference to TUpDown. - - - - Performs actions needed when the control is focused. - -

- DoEnter is an overridden method in TSpinEditExBase, and calls the inherited method on entry. The inherited methods handle the change in control focus, and signal the OnEnter event handler (when assigned). DoEnter ensures that the initial Value for the control is stored internally for use with the NullValueBehaviour used for the control instance. -

-
- - - - - - - -
- - - Gets the text displayed for the control. - -

- RealGetText is an overridden TCaption function in TSpinEditExBase used to get the text displayed for the control. RealGetText checks whether a handle has been allocated for the control in the widget set class. When a handle is assigned, the inherited method is called to the Text for the Edit in the grouped edit control. Otherwise, ValueToStr is called to get the string representation for the control Value. -

-
- - - - - TCustomAbstractGroupedEdit.RealGetText - -
- - Contains the text with the value for the control. - - - - - Reverts changes made to the value for the control. - -

- Reset is an overridden method in TSpinEditExBase used to revert changes made to the Value for the control. The IsMasked property is used to determine if an editing mask is in use in the Edit for the grouped edit control. When set to True, the inherited method is called to revert any changes made in Edit. When an editing mask is not in use, the initial value for the control (captured when it received focus) is restored in the Value property. -

-

- Reset is used in the implementation of the EditKeyDown event handler assigned to Edit. It is called when the Escape key (VK_Escape) is pressed in the Edit control. -

-
- - - - - - - -
- - - - Signals the OnChange event handler for the Edit in the grouped edit control. - - -

- EditChange is an overridden method in TSpinEditExBase. It ensures that Modified is set to True when Value has been changed using the UpDown buttons, Up or Down cursor keys, or by scrolling the mouse wheel. EditChange calls the inherited method prior to exit to signal the OnChange event handler (when assigned). -

-
- - - - - - -
- - - Implements the KeyDown handler for the grouped edit control. - -

- EditKeyDown is an overridden method in TSpinEditExBase which implements the KeyDown event handler for the Edit control. It calls the inherited method which signals the OnKeyDown event handler (when assigned). It also ensures that any keys explicitly handled in the grouped edit control are discarded by setting Key to 0 (zero). This includes the following virtual key codes and their associated actions: -

-
-
VK_Escape
-
Calls Reset.
-
VK_Up
-
- Calls SpinUpDown when ArrowKeys is set to True and the control is not ReadOnly. -
-
VK_Down
-
- Calls SpinUpDown when ArrowKeys is set to True and the control is not ReadOnly. -
-
-
- -
- - Virtual key code examined in the handler. - - - Shift, Ctrl, or Alt modifier for the key code. - - - - Applies a Mouse Wheel Up message to the value for the control. - -

- EditMouseWheelUp is the handler signalled when a Mouse Wheel Up message occurs in the Edit for the control. EditMouseWheelUp is overridden in TSpinEditExBase, and calls the inherited method. Handled is set to True if the mouse wheel message was handled in the ancestor class. When set to False, the SpinUpDown method is called to increment the value in the control. -

-
- - - -
- - Shift, Alt, or Ctrl modifier for the mouse wheel message. - - - Coordinates for the Mouse pointer. - - - True when the message is handled in the ancestor class. - - - - - Handles mouse wheel down messages for the Edit in the control. - -

- EditMouseWheelDown is the handler signalled when a Mouse Wheel Down message occurs in the Edit for the control. EditMouseWheelDown is overridden in TSpinEditExBase, and calls the inherited method. Handled is set to True if the mouse wheel message was handled in the ancestor class. When set to False, the SpinUpDown method is called to decrement the value in the control. -

-
- - - -
- - Shift, Alt, or Ctrl modifier for the mouse message. - - - Coordinates for the mouse cursor. - - - True when the message was handled in the method. - - - - Ensures the incremented value is a valid number for the data type. - -

- SafeInc is a function used to increase the specified value by the Increment for the control. SafeInc ensures that the incremented value is valid for a given data type. It is an abstract virtual method, and must be implemented in a descendent class to use the specific data type for the specialization. -

-

- AValue contains the type with the numeric value to be incremented. -

-

- The return value contains the numeric value for the type after the value in Increment has been added. The return value is constrained when the incremented value is too large for the data type. -

-

- SafeInc is used in the implementation of the SpinUpDown method. -

-
- - - - -
- - The incremented (and possibly constrained) value. - - - Value incremented in the method. - - - - Ensures the decremented value is a valid number for the data type. - -

- SafeDec is a function used to decrease the specified value by the Increment for the control. SafeDec ensures that the decremented value is valid for a given data type. It is an abstract virtual method, and must be implemented in a descendent class to use the specific data type for the specialization. -

-

- AValue contains the type with the numeric value to be decremented. -

-

- The return value contains the numeric value for the type after the value in Increment has been subtracted. The return value is range limited when the incremented value is too large for the data type. -

-

- SafeDec is used in the implementation of the SpinUpDown method. -

-
- - - - -
- - Control value after the decrement operation. - - - The decremented (and possibly range limited) value. - - - - Determines whether the specified arguments have the same value. - -

- SameValue is a Boolean function used to compare the values in AValue1 and AValue2 to determine if they have the same value. The return value is True when both AValue1 and AValue2 have the same value. It is defined as an abstract virtual method in TSpinEditExBase, and must be implemented in descendent classes to compare the data type for the specialization. -

-

- SameValue is used in the implementation of storage specifiers for the Increment, MinValue, and MaxValue properties. -

-

- SameValue is defined when using FPC compiler version 3.2.2 on the Windows 64-bit platform. This method was introduced to ensure that the type specialization for the class instance is used when value comparisons are performed. Specifically, it allows the 64-bit compiler on Windows to determine which of the overloads in Math.SameValue is called for the Currency type. -

-
- - Introduced in version 2.2.0. - - - - - - - - Math.SameValue - -
- - True if both arguments have the same value. - - - First value for the comparison. - - - Second value for the comparison. - - - - Sets the value for the Value property. - - - - - - - New value for the property. - - - - Sets the value for the NullValue property. - - - - - - - New value for the property. - - - - Sets the value for the MaxValue property. - - - - - - - New value for the property. - - - - Sets the value for the MinValue property. - - - - - - - New value for the property. - - - - Sets the value for the Increment property. - - - - - - - New value for the property. - - - - Indicates if the specified String contains a valid numeric value. - -

- TextIsNumber is an abstract virtual Boolean function which indicates the value specified in S represents a valid number. ANumber is an output parameter where the numeric value for the data type is stored. -

-

- TextIsNumber must be implemented in a descendent class using the data type for the specialization. -

-
- - - - -
- - True when S contains a value that can be converted to the data type for ANumber. - - - String converted to a numeric value in the method. - - - Numeric value for the specified String. - - - - Performs actions needed when the handle is allocated for the control. - -

- InitializeWnd is an overridden method used to perform actions needed when the handle is allocated for the control, and before child controls are created. InitializeWnd calls the inherited method on entry. -

-

- InitializeWnd calls UpdateControl to validate and update members in the class instance. -

-
- -
- - - Performs actions prior to freeing the handle for the control. - -

- Ensures that the Value property is up-to-date before releasing the Handle for the control. -

-
- - TWinControl.FinalizeWnd - -
- - - - Performs action needed when the component has been loaded from the LCL streaming mechanism. - - -

- Loaded is an overridden method in TSpinEditExBase, and calls the inherited method on entry. Loaded corrects an undesirable behavior in the ancestor class; it sends a CM_PARENTFONTCHANGED message which also alters the color in the grouped edit control. Loaded calls UpdateSpacing prior to restoring the initial color assigned to the edit control. -

-
- - - - -
- - - Indicates is Up and Down cursor keys can be used in the Edit for the control - -

- ArrowKeys is a Boolean property which indicates if cursor keys can be used to navigate content in the Edit for the control. -

-

- When set to True, the Up (VK_UP) and Down (VK_Down) arrow keys can be used to increase or decrease the Value for the control. The key events are handled in the EditKeyDown event handler assigned to Edit. When set to False, the Up and Down keys are ignored in Edit. -

-

- The default value for the property is True. -

-

- Use UpDown to access the TUpDown instance used in the grouped edit control. -

-
- - - - - - - -
- - - Text editor for the grouped edit control. - -

- Edit a read-only TGEEdit property which contains the editor for the grouped edit control. Edit is used to perform direct input of a new Value for the control. Edit allows use of the Up and Down cursor keys to increment or decrement the value when ArrowKeys is enabled. -

-

- UpDown is the TUpDown instance used to increment and decrement the value for the grouped edit control using mouse clicks. -

-
- - - - -
- - - Contains the TUpDown instance used in the grouped edit control. - -

- UpDown is a read-only property which contains the TUpDown instance used to increment or decrement the Value for the grouped edit control. Click on the buttons in UpDown to increase or decrease the Value for the control by the amount specified in the Increment property. -

-

- Edit is used to perform direct input of the value for the grouped edit control. -

-
- - - - - -
- - - Indicates whether the TUpDown instance for the grouped edit control is visible. - -

- UpDownVisible is a Boolean property which indicates if UpDown in the grouped edit control is visible. It is a convenience property; read and write access for the value are redirected to the Visible property in the TUpDown instance in UpDown. The default value for the property is True. -

-
- - - - - -
- - - Contains the repeat interval for the TUpDown instance in the grouped edit control. - -

- MinRepeatValue contains the repeat interval used for the UpDown control in the grouped edit. The default value for the property is defined in the DefMinRepeatValue constant. -

-

- Changing the value for the property causes the MinRepeatInterval property in UpDown to be updated with the new value. -

-
- - - -
- - - - Constructor for the class instance. - -

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

-
    -
  • ArrowKeys
  • -
  • Increment
  • -
  • MaxValue
  • -
  • NullValueBehaviour
  • -
  • MinRepeatValue
  • -
-

- Create configures the Edit and UpDown instances used in the grouped edit control. Edit is configured to use right alignment for its text (since it is a numeric value). UpDown is configured to include the flags needed in its ControlStyle property. The OnChangingEx and OnClick event handlers for UpDown are also set in the method. -

- - UpDown does not use its Associate property to maintain the relationship to Edit. This is by design, and allows Edit to be used with floating point numbers and have a NullValue (in a descendent class instance). It also enables proper alignment and anchoring for the grouped edit control. - -

- Internal members needed in the class instance are also initialized. -

-

- Create calls SetInitialBounds to set the size for the control to the default values returned from GetControlClassDefaultSize. -

-
- -
- - Owner of the class instance. - - - - Constrains the specified value to MinValue and MaxValue for the control. - -

- GetLimitedValue is used in the implementation of UpdateControl, SpinUpDown, and StrToValue methods. It is also called from the ValueToStr method in TCustomFloatSpinEditEx. -

-

- GetLimitedValue ensures that the value for the type specified in AValue is constrained to the range specified in the MinValue and MaxValue properties. -

-

- The return value contains the original value after it has been range adjusted. When AValue is smaller than MinValue, MinValue is assigned to the return value. When AValue is larger than MaxValue, MaxValue is assigned to the return value. -

- - The return value is not range adjusted when MinValue and MaxValue have the same value. This is Delphi VCL compatible. - -
- -
- - Value adjusted (when needed) to the MinValue and MaxValue constraints. - - - Value examined (and adjusted when needed) in the method. - - - - Converts the specified value to its representation as a String. - -

- ValueToStr is an abstract virtual String function used to convert the value specified in AValue to its representation as a String data type. ValueToStr must be implemented in a descendent class to use the data type and formatting needed for the specialization. -

-
- - - - -
- - String representation for the specified data type. - - - Type with the numeric value converted in the method. - - - - Converts the specified string to a numeric value for the generic data type. - -

- StrToValue is a function which returns a generic type with the numeric value for the specified String. TextIsNumber is used to determine if S contains a valid numeric value. If S is not a valid number, the NullValueBehaviour property is used to determine the return value for the method. -

-
-
nvbShowTextHint
-
NullValue is used as the return value.
-
nvbLimitedNullValue
-
GetLimitedValue is used to derive the Null return value.
-
nvbMinValue
-
MinValue is used as the return value.
-
nvbMaxValue
-
MaxValue is used as the return value.
-
nvbInitialValue
-
The initial value for the control is used as the return value.
-
nvbShowTextHint
-
GetLimitedValue is used to get the return value
-
-
- -
- - Numeric value for the specified string. - - - String representation converted in method. - - - - Implements the EditingDone handler for the Edit in the grouped edit control. - -

- EditEditingDone is an overridden method in TSpinEditExBase. It calls the inherited method on entry to signal the OnEditingDone event handler (when assigned). -

-

- EditEditingDone updates the Value for the control from the Text in the Edit. UpdateControl is called to ensure that members in the property are updated and validated after a change to the Value property. -

-
- - - -
- - - Value added to or subtracted from Value when the UpDown control is clicked. - -

- Increment is a property which defines the value added to or subtracted from the control Value when the UpDown control is clicked. It is also used when ArrowKeys are enable in the Edit for the grouped edit control. -

-

- Increment uses the generic type for the class instance. There is no default value for the control in TSpinEditExBase, but it may be re-specified in a descendent class specialized for a given data type. -

-
- - - - - - - - - -
- - - Minimum value allowed in the Value property. - -

- MinValue is a property used to specify the minimum numeric value allowed in the Value property. MinValue uses the type specified for the generic class. Changing the property value causes UpdateControl to be called to range check and update members in the control. -

-

- MinValue is used in the implementation of methods such as IsLimited, IsOutOfLimits, SpinUpDown, and GetLimitedValue. It also influences the value stored in the control when a NullValueBehaviour is applied. -

-

- Use MaxValue to specify the maximum value allowed in the control. -

-
- - - - - - - -
- - - Maximum value allowed in the Value property. - -

- MaxValue is a property which contains the largest numeric value allowed in the Value property. MaxValue uses the type specified for the generic class. Changing the property value causes UpdateControl to be called to range check and update members in the control. -

-

- MaxValue is used in the implementation of methods such as IsLimited, IsOutOfLimits, SpinUpDown, and GetLimitedValue. It also influences the value stored in the control when a NullValueBehaviour is applied. -

-

- Use MinValue to specify the smallest value allowed in the control. -

-
- - - - - - - -
- - - Value used when the text for the control is not a valid number. - -

- NullValue contains the numeric value used when the text for the control does not represent a valid number. NullValue is assigned to Value when the NullValueBehaviour property is set to nvbLimitedNullValue or nvbShowTextHint. -

-
- -
- - - Controls the logic applied when control text is not a valid number. - -

- NullValueBehaviour is a TNullValueBehaviour property which contains the logic applied when the text for the control does not represent a valid numeric value. The default value for the property is nvbMinValue, and indicates that the value in MinValue is stored in the Value property when an invalid number is detected. -

-

- See TNullValueBehaviour for more information about values in the enumeration and their meanings. -

-

- NullValueBehaviour is used in the implementation of the UpdateControl and StrToValue methods. -

-
- -
- - - Numeric value for the control. - -

- Value is a property which contains the numeric value for the grouped edit control. Value used the data type specified for the generic class. -

-

- Read access to the property value checks for an allocated handle in the control. If the handle has not been allocated, the StrToValue method is called to get the property value. When the handle exists, the value stored in the internal member is used. -

-

- Write access to the property value ensures that text assigned directly to Edit contains a valid number for the data type. This is done by calling TextIsNumber. If the new value is the same as the stored property value, no actions are performed. -

-

- When the value for the property is changed, the UpdateControl method is called to range check, validate, and update members in the class instance. -

-

- Use MinValue and MaxValue to control the minimum and maximum values allowed in the control. Use Increment to control the amount applied to the control value when a button in the UpDown control is clicked. Use NullValue and NullValueBehaviour to control the logic applied with an invalid numeric value is stored in the control. -

-
- - - - - - - - - - -
- - - Indicates the display mode used for the floating point value in TFloatSpinEditEx. - - - - - Value is displayed with fixed precision and decimal places. - - - - Value is displayed in scientific (exponential) notation used for numbers that are too large or too small to be easily represented using the decimal form. - - - - - Value is automatically formatted using scientific notation when it exceeds the limits assigned in ExponentialFormatLimitPos or ExponentialFormatLimitNeg. - - - - - When Value is 0.0, it is formatted using 20 digits of fixed precision with the number of decimals in DecimalPlaces. Similar to dmAuto but using fixed precision. - - - - - A specialization of TSpinEditExBase for the Double data type. - -

- TCustomFloatSpinEditEx defines an extended spin edit control with an editor for the numeric value, and buttons to increment or decrement the control value.It is a TSpinEditExBase descendant which specializes the generic ancestor for the Double data type. Double is a real type which allows values in the range 5.0E-324 .. 1.7E+308 and uses 15-16 digits of precision. Double is used to implement properties including: Increment, MinValue, MaxValue, NullValue, and Value. -

-

- Do not create instances of TCustomFloatSpinEditEx; use the TFloatSpinEditEx descendant which sets the visibility and default values for properties in the class. -

- - The NumbersOnly property has been removed as a published property in TCustomFloatSpinEditEx and its descendent classes. It is not appropriate for use in floating point notation. Removed in LazUtils version 2.3.0. - -
- - - - - -
- - - - Default number of decimal places used to display the Value for the control. - - - Default decimal separator used in the floating point value. - - - - - Number of decimal places used to display the Value for the control. - - - Formatting used to edit and display the Value for the control. - - - Number of digits displayed in an exponent using scientific notation. - - - Maximum exponent digits allowed before exponential notation is used for negative values. - - - Maximum exponent digits allowed before exponential notation is used for positive values. - - - Local format settings used in the control. - - - Number of digits of precision used to edit and display the Value for the control. - - - - Gets the value for the DecimalSeparator property. - - - - - - Value for the property. - - - - Sets the value for the DecimalSeparator property. - - - - - - New value for the property. - - - - Sets the value for the DisplayMode property. - - - - - - - New value for the property. - - - - Sets the value for the ExponentDigits property. - - - - - New value for the property. - - - - Sets the value for the ExponentialFormatLimitNeg property. - - - - - New value for the property. - - - - Sets the value for the ExponentialFormatLimitPos property. - - - - - New value for the property. - - - - Sets the value for the Precision property. - - - - - New value for the property. - - - - - Gets the local format settings for the control. - - - - - Local format settings used for the control. - - - - Implements handler for KeyPress events in the Edit for the control. - -

- EditKeyPress is an overridden method in TCustomFloatSpinEditEx used to ensure that the specified character is valid for the Edit in the control. Key contains the character examined in the method. The allowed values in Key include the following characters: -

-
-
Numeric Digits
-
Characters in the range '0'..'9'.
-
Decimal separator
-
- Accepts either ',' (Comma), or '.' (Period) characters as the decimal separator, and is automatically translated to the value used in local format settings in the DecimalSeparator property. Any decimal separator will, however, be discarded when DecimalPlaces is set to 0 (zero). -
-
Exponent Notation
-
- Allows 'E' or 'e' to represent the exponent character used to represent "... times ten raised to the power of ...". -
-
Control Characters
-
- Allows the following control characters to be passed to the Edit control: #8 (BackSpace), #9 (Tab), ^C (Ctrl+C or Copy), ^X (Ctrl+X or Cut), ^V (Ctrl+V or Paste), ^Z (Ctrl+Z or Undo). -
-
-

- EditKeyPress calls the inherited method to signal the OnKeyPress event handler (when assigned). -

-

- Any character which is not allowed in the floating point value is set to #0 to discard the character value. -

-
- - - - - - - -
- - Character examined in the method. - - - - Determines if the specified string is a valid number for the numeric data type. - -

- TextIsNumber is an overridden Boolean function used to determine if the specified string contains a valid representation for the numeric data type in the control. TextIsNumber re-implements the inherited method to use the Double data type, and does not call the method in the ancestor class. -

-

- TextIsNumber calls TryStrToFloat using the local format settings for the control to convert the value in S to a floating point value. An exception raised by TryStrToFloat is handled in the method. The converted numeric value is stored in the ANumber argument on success. ANumber should be considered "undefined" when the conversion fails due to an exception. -

-

- The return value is True when the value in S can be converted to the Double data type. It is False when an exception was raised and handled in the method. -

-

- TextIsNumber is used in the implementation of methods like UpdateControl, SpinUpDown, and StrToValue. It is also called when setting a new value in the Value property. -

-

- Set values in the MinValue, MaxValue, NullValue, and NullValueBehaviour properties to control the actions performed when TextIsNumber returns False. -

-
- - - - - -
- - True if the specified string is a valid numeric value. - - - String with the value examined in the method. - - - Stores the numeric value for the specified string; undefined when the result is False. - - - - Ensures the incremented value is a valid number for the Double data type. - -

- SafeInc is an overridden function in TCustomFloatSpinEditEx used to increase the specified value by the Increment for the control. SafeInc ensures that the incremented value is valid for the Double data type. SafeInc does not call the inherited method. -

-

- AValue contains the type with the numeric value to be incremented. -

-

- The return value contains the numeric value after the value in Increment has been added. The return value is constrained when the incremented value is too large for the Double data type. The upper limit for the value in the data type is defined in the MaxDouble constant. -

-

- SafeInc is used in the implementation of the SpinUpDown method. -

-

- SafeDec is used to decrement a specified Double value. -

-
- - - - -
- - The numeric value after Increment has been added. - - - Numeric value incremented in the method. - - - - Ensures the decremented value is a valid number for the Double data type. - -

- SafeDec is an overridden function in TCustomFloatSpinEditEx used to decrease the specified value by the Increment for the control. SafeDec ensures that the decremented value is valid for the Double data type. SafeDec does not call the inherited method. -

-

- AValue contains the type with the numeric value to be decremented. -

-

- The return value contains the numeric value after the value in Increment has been subtracted. The return value is constrained when the decremented value is too small for the Double data type. The lower limit for the value in the data type is defined as -1 * MaxDouble. -

-

- SafeDec is used in the implementation of the SpinUpDown method. -

-

- SafeInc is used to increment a specified Double value. -

-
- -
- - The numeric value after Increment has been subtracted. - - - Numeric value decremented in the method. - - - - Determines whether the specified arguments have the same value. - -

- SameValue is an overridden Boolean function used to compare the values in AValue1 and AValue2 to determine if they have the same value. The return value is True when both AValue1 and AValue2 have the same value. The arguments are implemented using the Double type in TCustomFloatSpinEditEx. The overloaded SameValue routine in the math.pp unit is called to get the return value for the method. -

-

- SameValue is defined when using FPC compiler version 3.2.2 on the Windows 64-bit platform. This method was introduced to ensure that the type specialization for the class instance is used when value comparisons are performed. Specifically, it allows the 64-bit compiler on Windows to determine which of the overloads in Math.SameValue is called for the Currency type. -

-
- - Introduced in version 2.2.0. - - - - Math.SameValue - -
- - True if both arguments have the same value. - - - First value for the comparison. - - - Second value for the comparison. - - - - Sets the value for the DecimalPlaces property. - - - - - - - New value for the property. - - - - Registers the widget set class used for the control. - -

- Calls the inherited method on entry, and registers the following properties to be skipped during LCL component streaming: -

-
-
NumbersOnly
-
Property should not be published for this control.
-
-
- - Added in LazUtils version 2.3.0 and higher. - - -
- - - Specifies the formatting used to edit and display the Value for the control. - -

- DisplayMode is a TDisplayMode property which specifies the formatting used to edit and display the Value for the control. The default value for the property is dmFixed, and indicates that fixed precision and decimals are used when formatting the control value. - - See TDisplayMode for more information about the values and meanings in the enumeration. -

-

- Changing the value in DisplayMode causes the Value for the control to be updated. It also forces UpdateControl to be called to validate and normalize members in the class instance. -

-

- DisplayMode is used in the implementation of the ValueToStr method which generates the string representation for the Value in the control, and is assigned to the Text property in the Edit for the grouped edit control. -

-
- - - - - - -
- - - - Maximum exponent digits allowed before exponential notation is required for a positive number. - - -

- ExponentialFormatLimitPos is an Integer property which contains the maximum exponent allowed before a positive Value in the control must be represented using exponential notation. The default value for the property is 6 (six) and indicates that Value must exceed 10^6 before exponential notation is required for a positive number. -

-

- Setting a new value for the property causes Value to be updated, and calls the UpdateControl method to validate and normalize members in the class instance. -

-

- ExponentialFormatLimitPos is used in the ValueToStr method when DisplayMode contains the value dmAuto and Value has a non-zero floating point value. -

-

- Use ExponentialFormatLimitNeg to specify the maximum exponent allowed before using exponential notation for a negative value in the control. -

-

- Use Precision to specify the total number of digits used for a number in scientific notation. Use ExponentDigits to specify the number of exponent digits used for a number in scientific notation. -

-
- - - - - - - - - -
- - - - Maximum exponent digits allowed before exponential notation is required for a negative number. - - -

- ExponentialFormatLimitNeg is an Integer property which contains the exponent value at which use of scientific notation is triggered for a negative Value in the control. The default value for the property is -6, and indicates that scientific notation is required when Value is smaller than 10^-6. -

-

- Changing the value for the property causes GetValue and UpdateControl to be called. -

-

- ExponentialFormatLimitNeg is used in the ValueToStr method when DisplayMode is dmAuto and the Value is not 0.0. -

-

- Use ExponentialFormatLimitPos to specify the exponent value which triggers use of scientific notation for a positive value. -

-

- Use Precision to specify the total number of digits used for a number in scientific notation. Use ExponentDigits to specify the number of exponent digits used for a number in scientific notation. -

-
- - - - - - - - -
- - - Number of digits of precision used after the decimal point in scientific notation. - -

- Precision is an Integer property which specifies the number of digits of precision used after the decimal point for a floating point value in scientific notation. It is the value used as the precision argument for the FloatToStrF routine in RTL. The default value for the property is 6. The maximum precision for the data type is 15. -

-

- Changing the value for the property causes the GetValue and UpdateControl methods to be called. -

-

- Precision is used in the ValueToStr method when DisplayMode is dmScientific or dmAuto. -

-
- -
- - - Number of digits prior to the decimal point used in scientific notation. - -

- ExponentDigits is an Integer property which contains the number of digits used before the decimal point when using scientific notation. The default value for the property is 2. -

-

- Changing the value for the property causes the GetValue and UpdateControl methods to be called. -

-

- ExponentDigits is used in the ValueToStr method when the DisplayMode is dmScientific or dmAuto. -

-

- Use Precision to specify the number of digits after the decimal point in a floating point value using scientific notation. -

-
- - - - - - -
- - - - Gets the string representation for the numeric Value in the control. - - - - - String representation for the numeric Value. - - - Numeric value examined and converted in the method. - - - - Constructor for the class instance. - -

- Create is the overridden constructor for the class instance, and calls the inherited constructor on entry. -

-

- Create makes an internal copy of the default format settings for the platform. This allows the value in DecimalSeparator to be specified and stored independent of the value in DefaultFormatSettings. The local copy is modified to used the value in the DefDecimalSeparator constant as the default value for DecimalSeparator. -

-

- Create sets the default values for properties, including: -

-
-
DecimalPlaces
-
Set to the value in the DefDecimals constant.
-
ExponentialFormatLimitPos
-
Set to 6 (six).
-
ExponentialFormatLimitNeg
-
Set to -6.
-
Precision
-
Set 6 digits for the mantissa.
-
ExponentDigits
-
Set to 2.
-
DisplayMode
-
- Set to the value dmFixed for fixed format using the Precision and ExponentDigits defined in the control. -
-
-
- -
- - - Value used to represent a decimal point in the Edit control. - -

- DecimalSeparator is a Char property which contains the character used as the decimal point in a floating point value. Read and write access for the property value are redirected to the local TFormatSetting stored in the class instance. This allows the control to set the decimal separator independent of the format settings for the platform or operating system. -

-

- The default value for the property is defined in the DefDecimalSeparator constant. Changing the value for the property updates the local format settings, and calls UpdateControl to validate and update members in the class instance. -

-

- DecimalSeparator is used in EditKeyPress to validate characters entered in the Edit for the control. It is also used in ValueToStr to format the value in the control for the selected DisplayMode. -

-
- - - - - - - -
- - - Number of decimal places used to edit and display the Value for the control. - -

- DecimalPlaces is an Integer property which indicates the number of decimal places used when formatting the Value for the control. It must contain a positive integer value or 0 (zero). The default value for the property is defined in the DefDecimals constant. Changing the value for the property causes the Value property to be updated, and calls UpdateControl to validate and update other members in the class instance. -

-

- DecimalPlaces is used in ValueToStr to format the value in the control for the selected DisplayMode. -

-
- - - - - - - -
- - - Implement a spin edit control for a value using the Double data type. - -

- TFloatSpinEditEx is a TCustomFloatSpinEditEx descendant which implements a spin edit control for a value using the Double data type. TFloatSpinEditEx sets the visibility for properties defined in ancestor classes. -

-

- TFloatSpinEditEx defines an extended spin edit control with an editor for the numeric value, and buttons to increment or decrement the control value. It specializes the generic ancestor for the Double data type. Double is a real type which allows values in the range 5.0E-324 .. 1.7E+308 and uses 15-16 digits of precision. Double is used to implement properties including: Increment, MinValue, MaxValue, NullValue, and Value. -

-
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Defines the base class for a spin edit control for Int64 values. - -

- TCustomSpinEditEx is a specialization of the generic TSpinEditExBase class for the Int64 data type. In addition to implementing the Int64 data type, it provides additional properties and methods used to validate, format, and display the numeric value. -

-

- Use the ThousandSeparator to set the UTF-8-encoded value used as the decimal point in the control value. -

-

- Set Increment to the value by which the control is increased or decreased when the UpDown button is clicked. -

-

- Use ValueToStr to get the string representation for the numeric value. -

-

- Do not create instances of TCustomSpinEditEx; use TSpinEditEx, which sets the visibility for properties, instead. -

-

- Use TFloatSpinEditEx to edit a floating point value using fixed or scientific notation. -

-
- - - - - - -
- - - - Stores the thousands separator. - - - - Sets the value for the ThousandSeparator property. - - - - - - New value for the property. - - - - - Implements the handler for KeyPress events in the Edit for the control. - -

- EditKeyPress is an overridden method in TCustomSpinEditEx, and calls the inherited method on entry. The OnKeyPress event handler is signalled (when assigned) by the inherited method. -

-

- EditKeyPress ensures that the value in Key is valid for the control. An invalid value is discarded by setting Key to the #0 character (Decimal 0). Valid characters include numeric digits ('0'..'9'), the value in ThousandSeparator, and the negative sign indicator ('-'). -

-

- Please note: The sign indicator will be disallowed when a positive non-zero value is specified in the MinValue property. -

-

- Tab, BackSpace, Cut, Paste, Copy, and Undo key presses are passed to the inherited method. -

-
- - - - - - -
- - Character examined in the method. - - - - Ensures the incremented value is valid for the data type. - -

- SafeInc is a function used to increase AValue by the amount specified in the Increment property. SafeInc is overridden in TCustomSpinEditEx to ensure that the incremented value is valid for the Int64 data type. -

-

- AValue contains the the numeric value to be incremented. -

-

- The return value contains the Int64 value after Increment has been added. The return value is constrained when the incremented value is too large for the Int64 data type; its value is set to High(Int64). -

-

- SafeInc is used in the implementation of the SpinUpDown method in the ancestor class. -

-
- - - - -
- - Numeric value after the increment has been added. - - - Numeric value incremented in the method. - - - - Ensures the decremented value is valid for the data type. - -

- SafeDec is a function used to decrease the specified value by the amount specified in the Increment property. SafeDec is overridden in TCustomSpinEditEx to ensure that the decremented value is valid for the Int64 data type. -

-

- AValue contains the numeric value to be decremented. -

-

- The return value contains the Int64 value after Increment has been subtracted. The return value is constrained when the decremented value is too small for the Int64 data type; its value is set to Low(Int64). -

-

- SafeDec is used in the implementation of the SpinUpDown method in the ancestor class. -

-
- - " - - -
- - Numeric value after the increment has been subtracted. - - - Numeric value decremented in the method. - - - - Determines whether the specified arguments have the same value. - -

- SameValue is an overridden Boolean function used to compare the values in AValue1 and AValue2 to determine if they have the same value. The return value is True when both AValue1 and AValue2 have the same value. The arguments are implemented using the Int64 type in TCustomSpinEditEx. -

-

- SameValue is defined when using FPC compiler version 3.2.2 on the Windows 64-bit platform. This method was introduced to ensure that the type specialization for the class instance is used when value comparisons are performed. -

-
- - Introduced in version 2.2.0. - - - - Math.SameValue - -
- - True if both arguments have the same value. - - - First value for the comparison. - - - Second value for the comparison. - - - - Indicates if the specified String contains a valid Int64 data type. - -

- TextIsNumber is an overridden Boolean function which indicates if the value specified in S represents a valid number for the Int64 data type. -

-

- ANumber is an output parameter where the numeric value from the conversion from the is stored. -

-

- The return value is a Boolean type which contains True when the text in S is successfully converted to an Int64 value and stored i the N argument. If the conversion raises an exception, it is handled in the method and the return value is set to False. The value in N should be considered as "undefined" in this scenario. -

-
- - - -
- - True when the text contains a valid Int64 value. - - - Text converted to a numeric value in the method. - - - Contains the successfully converted numeric value for the string. - - - - - Converts the specified numeric value to its String representation. - -

- ValueToStr is an overridden String function used to convert the value specified in AValue to its representation as a String data type. AValue is an Int64 type. -

-

- ValueToStr calls IntToStr to convert the integer value to the String used as the return value for the method. When ThousandSeparator has been assigned, the InsertThousandSeparator routine is called to apply the display formatting to the return value. -

-

- ValueToStr is used in the implementation of both the UpdateControl and RealGetText methods in the ancestor class. -

-
- - - - -
- - String representation for the specified numeric value. - - - Numeric value converted in the method. - - - - Amount by which the control value is increased or decreased when UpDown is clicked. - -

- Increment is an Int64 property in TCustomSpinEditEx, and represents the amount by which the control value is increased or decreased when the UpDown button is clicked. The default value for the property is 1. -

-

- Increment is used in the implementation of the SafeInc and SafeDec methods. -

-
- - - - -
- - - Contains the thousands separator used to format and display the control value. - -

- ThousandSeparator is a String property which contains the character used as the thousands separator in the control. It is implemented as a String type to allow use of UTF-8-encoded characters in the property value. When it is unassigned (contains an empty string), the separator is not used to format the string value for the control. -

-

- Changing the value in ThousandSeparator causes the UpdateControl method to be called to update the display for the control. -

-

- ThousandSeparator is used in methods like EditKeyPress, TextIsNumber, and ValueToStr. -

-
- - - - - -
- - - Implements a spin edit control for an Int64 data type. - -

- TSpinEditEx is a TCustomSpinEditEx descendant which implements a spin edit control using an Int64 value. TSpinEditEx sets the visibility for properties defined in ancestor classes. -

-

- Use the ThousandSeparator to set the UTF-8-encoded value used as the decimal point in the control value. -

-

- Set Increment to the value by which the control is increased or decreased when the UpDown button is clicked. -

-

- Use ValueToStr to get the string representation for the numeric value. -

-
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gets debugging information about a value from TNullValueBehaviour. - -

- DbgS is an overloaded String function used to get information displayed in the Debugger. This variant of the routine accepts a TNullValueBehaviour argument, an converts the specified value to its string representation, -

-
-
- - String representation for the specified null value behavior. - - - Enumeration value converted to a string in the method. - - - - Introduction to Extended Spin Edit Controls. - -

- The SpinEx.pp unit contains extended spin edit controls, like TSpinEditEx and TFloatSpinEditEx. They are very similar to TSpinEdit and TFloatSpinEdit, but provide additional features which allow a NullValue for the control and behaviors performed when the value for the control is not a valid numeric value. -

-

- This introduction will discuss the problems the design of the controls, and the problems they are intended to eliminate. -

-

- Why another SpinEdit or FloatSpinEdit control? -

-

- The standard controls, TSpinEdit and TFloatSpinEdit, do not support a NullValue mechanism. Also, their implementations are widgetset dependent. While this provides a control that has the look and feel native to the widgetset, the behavior also depends on the widgetset. This is especially important when the text for the control contains an invalid numeric value (otherwise not a number). In such a case, when querying the control for it's Value, the results are not consistent for the various platforms. The difference in behavior between widgetsets also prevents implementation of the NullValue mechanism, especially the possibility to leave the control empty or to display informative text inside the control about the condition. -

-

- TSpinEditEx handles Int64 values, while TSpinEdit is limited to LongInt values. This is because TSpinEdit inherits from TCustomFloatSpinEdit and the internal member for the Value is stored using the Double type, and Double does not have enough significant digits to handle the range for the Int64 type. -

-

- In addition, TFloatSpinEditEx can set the value for its DecimalSeparator property independent of the value in the DefaultFormatSettings for the platform or operating system. Note: Unlike T(Float)SpinEdit, the GetValue method is always derived from the actual text in the control. This is by design, and it should not be altered. -

-

- Why not simply associate a TUpDown with a TEdit instead? -

-

- Using TEdit with a TUpDown control has several disadvantages: -

-
    -
  • It does not allow floating point values.
  • -
  • Its range is limited to the range for the SmallInt type.
  • -
  • It does not properly anchor and/or align.
  • -
-

- While both TSpinEditEx and TFloatSpinEditEx use a TUpDown control in their implementations, they do not use the Associate property in TUpDown. The two controls (the edit and the up/down button) are embedded in a TCustomControl (much like TEditButton) to provide proper alignment and anchoring behavior. -

-
- -
- -
- -
+ + + +Provides extended TSpinEdit- and TFloatSpinEdit-like controls. + +

+Implements TSpinEditEx and TFloatSpinEditEx, which +allow a NullValue and provide behaviors applied when the text for +the control is not a valid number. +

+

+Initial implementation: 2016 by Bart Broersma. Revised in August 2020. +

+

+This file is part of the LazControls package. +

+
+ + + + + + + + + + + + + + + +Specifies the behavior applied in a control when its text is not a valid +number. + + +

+TNullValueBehaviour is an enumerated type with values that control +the behavior in TSpinEditEx or TFloatSpinEditEx when their value is not a +valid number, or not within the Min and Max value for the control. +

+
+ +
+ + +Value becomes NullValue, and Text becomes empty. TextHint will show when +focus is lost. + + + + +Value becomes GetLimitedValue(NullValue), and Text becomes Value. + + + + +Value becomes MinValue, and Text becomes Value. Please note that this is the +default behavior, as used in Delphi. + + + + +Value becomes MaxValue, and Text becomes Value. + + + + +Value becomes InitialValue (OnEnter), and Text becomes Value. + + + + + +Specifies the base class for extended spin edit controls in the unit. + + +

+TSpinEditExBase is a generic class type, and a descendant of +TCustomAbstractGroupedEdit. TSpinEditExBase specifies the base +class for the extended spin edit controls including TSpinEditEx +and TFloatSpinEditEx. TSpinEditExBase must be specialized in a +descendent class for a specific data type. The specialization type is used to +implement properties including: Increment, MinValue, MaxValue, NullValue, and +Value. +

+
+ + + + + + + + +
+ + + +Default value for the Increment property. + + +Default value for the MaxValue property. + + +Default value for the MinValue property. + + +Default value for the MinRepeatValue property. + + + + + + + + + + + + + + + + + +Gets the value for the Edit property. + + + + + + +Value for the property. + + + +Sets the value for the MinRepeatValue property. + + + + + + +New value for the property. + + + + +Called when one of the buttons in the TUpDown control has been clicked. + + +

+SpinUpDown ensures that the value in Text is a valid +representation for the numeric type used in the control. It calls +GetLimitedValue to ensure that Value is in the range +specified in MinValue and MaxValue. MinValue is used if +TextIsNumber returns False. +

+

+SpinUpDown sets the value in Modified to True when Value +has been updated in the method. +

+

+Called when key or mouse events are handled in EditKeyDown, +EditMouseWheelDown, and EditMouseWheelUp. It is also +assigned as the handler routine for the OnChangingEx event in the +UpDown property in the constructor for the class instance. +

+
+ + + + + + + +
+ + +True when the Up button in the TUpDown control has been clicked; +False when the Down button has been clicked. + + + + +Gets the value for the NullValue property. + + + + + + + +Returns the generic type with the value for the NullValue property. + + + + +Gets the value for the UpDown property. + + + + + + +Value for the property. + + + +Gets the value for the Value property. + + + + + + +Value for the property. + + + +Gets the storage specifier for the Increment property. + + + + + + + +True when a value other than DefIncrement has been assigned to the +Increment property. + + + + + +Indicates if valid values have been assigned to the MinValue and MaxValue +properties. + + +

+The return value is True when MaxValue is larger than MinValue. +IsLimited is used in the implementation of the IsOutOfLimits +method. +

+
+ + + + +
+ + +True when the typed value in MaxValue is larger than the typed value +in MinValue. + + + + + +Determines if the specified value is not within the limits set in MinValue +and MaxValue. + + + + + + +True when the value is outside the limits specified in the MinValue +and MaxValue properties. + + + +Value examined in the method. + + + +Gets the storage specifier for the MaxValue property. + + + + + + + +True when a value other than DefMaxValue has been assigned to the +MaxValue property. + + + + +Gets the storage specifier for the MaxValue property. + + + + + + + +True when a value other than DefMaxValue has been assigned to the +MinValue property. + + + + +Updates members in the control when editing is completed. + +

+UpdateControl is a method used to update members in the class +instance to reflect the state for the control. It is called when a new value +is assigned to properties in the class instance. It is called when editing +has been completed using the Edit for the grouped editing control. +It is also called when the handle is allocated for the control in +InitializeWnd. +

+

+NullValueBehaviour is used to determine whether Value +is adjusted to ensure that it is in the range specified by MinValue and +MaxValue. A value other than nvbShowTextHint causes +GetLimitedValue to be called to get the adjusted Value. +

+

+No additional actions are performed in the method when a handle has not been +allocated for the control, or at design-time. +

+

+When NullValueBehaviour is set to nvbShowTextHint, an invalid +numeric value entered in Text causes Text to be set to an empty +string. This allows the TextHint for the control to be displayed. +

+

+When Value is a valid number, and in the required range, it is converted to +its String representation and assigned to the Text for the control. +

+
+ +
+ + +Implements the OnChangingEx event handler assigned to UpDown. + +

+No actions are performed in the handler when ReadOnly is set to +True. +

+

+When Direction is updUp, the SpinUpDown +method is called using True as an argument. Otherwise, SpinUpDown is +called using False as an argument. +

+
+ +
+ +Control for the event notification. + + +Not used in the method. + + +Not used in the method. + + +Indicates whether the up or down button was clicked in UpDown. + + + +Implements the OnClick event handler assigned to UpDown. + +

+Calls the BuddyClick method for the grouped edit control. +

+
+ + + +
+ +Control for the event notification. + + +The button type for the TUpDown control. + + + + +Gets the class type used for Buddy in the grouped edit control. + + + + + + + +Returns a class reference to TUpDown. + + + +Performs actions needed when the control is focused. + +

+DoEnter is an overridden method in TSpinEditExBase, and +calls the inherited method on entry. The inherited methods handle the change +in control focus, and signal the OnEnter event handler (when assigned). +DoEnter ensures that the initial Value for the control is stored +internally for use with the NullValueBehaviour used for the +control instance. +

+
+ + + + + + + +
+ + +Gets the text displayed for the control. + +

+RealGetText is an overridden TCaption function in +TSpinEditExBase used to get the text displayed for the control. +RealGetText checks whether a handle has been allocated for the control in the +widget set class. When a handle is assigned, the inherited method is called +to the Text for the Edit in the grouped edit control. +Otherwise, ValueToStr is called to get the string representation +for the control Value. +

+
+ + + + +TCustomAbstractGroupedEdit.RealGetText + +
+ +Contains the text with the value for the control. + + + + +Reverts changes made to the value for the control. + +

+Reset is an overridden method in TSpinEditExBase used +to revert changes made to the Value for the control. The +IsMasked property is used to determine if an editing mask is in +use in the Edit for the grouped edit control. When set to +True, the inherited method is called to revert any changes made in +Edit. When an editing mask is not in use, the initial value for the control +(captured when it received focus) is restored in the Value property. +

+

+Reset is used in the implementation of the EditKeyDown event +handler assigned to Edit. It is called when the Escape key +(VK_Escape) is pressed in the Edit control. +

+
+ + + + + + + +
+ + + +Signals the OnChange event handler for the Edit in the grouped edit control. + + +

+EditChange is an overridden method in TSpinEditExBase. +It ensures that Modified is set to True when +Value has been changed using the UpDown buttons, Up or +Down cursor keys, or by scrolling the mouse wheel. EditChange calls the +inherited method prior to exit to signal the OnChange event +handler (when assigned). +

+
+ + + + + + +
+ + +Implements the KeyDown handler for the grouped edit control. + +

+EditKeyDown is an overridden method in TSpinEditExBase +which implements the KeyDown event handler for the Edit +control. It calls the inherited method which signals the OnKeyDown +event handler (when assigned). It also ensures that any keys explicitly +handled in the grouped edit control are discarded by setting Key +to 0 (zero). This includes the following virtual key codes and +their associated actions: +

+
+
VK_Escape
+
Calls Reset.
+
VK_Up
+
+Calls SpinUpDown when ArrowKeys is set to True and the control is not +ReadOnly. +
+
VK_Down
+
+Calls SpinUpDown when ArrowKeys is set to True and the control is not +ReadOnly. +
+
+
+ +
+ +Virtual key code examined in the handler. + + +Shift, Ctrl, or Alt modifier for the key code. + + + +Applies a Mouse Wheel Up message to the value for the control. + +

+EditMouseWheelUp is the handler signalled when a Mouse Wheel Up +message occurs in the Edit for the control. EditMouseWheelUp is +overridden in TSpinEditExBase, and calls the inherited method. +Handled is set to True if the mouse wheel message was +handled in the ancestor class. When set to False, the +SpinUpDown method is called to increment the value in the control. +

+
+ + + +
+ +Shift, Alt, or Ctrl modifier for the mouse wheel message. + + +Coordinates for the Mouse pointer. + + +True when the message is handled in the ancestor class. + + + + +Handles mouse wheel down messages for the Edit in the control. + +

+EditMouseWheelDown is the handler signalled when a Mouse Wheel +Down message occurs in the Edit for the control. +EditMouseWheelDown is overridden in TSpinEditExBase, and calls the +inherited method. Handled is set to True if the mouse wheel +message was handled in the ancestor class. When set to False, the +SpinUpDown method is called to decrement the value in the control. +

+
+ + + +
+ +Shift, Alt, or Ctrl modifier for the mouse message. + + +Coordinates for the mouse cursor. + + +True when the message was handled in the method. + + + + +Ensures the incremented value is a valid number for the data type. + + +

+SafeInc is a function used to increase the specified value by the +Increment for the control. SafeInc ensures that the incremented +value is valid for a given data type. It is an abstract virtual method, and +must be implemented in a descendent class to use the specific data type for +the specialization. +

+

+AValue contains the type with the numeric value to be incremented. +

+

+The return value contains the numeric value for the type after the value in +Increment has been added. The return value is constrained when the +incremented value is too large for the data type. +

+

+SafeInc is used in the implementation of the SpinUpDown method. +

+
+ + + + +
+ +The incremented (and possibly constrained) value. + + +Value incremented in the method. + + + + +Ensures the decremented value is a valid number for the data type. + + +

+SafeDec is a function used to decrease the specified value by the +Increment for the control. SafeDec ensures that the decremented +value is valid for a given data type. It is an abstract virtual method, and +must be implemented in a descendent class to use the specific data type for +the specialization. +

+

+AValue contains the type with the numeric value to be decremented. +

+

+The return value contains the numeric value for the type after the value in +Increment has been subtracted. The return value is range limited when the +incremented value is too large for the data type. +

+

+SafeDec is used in the implementation of the SpinUpDown method. +

+
+ + + + +
+ +Control value after the decrement operation. + + +The decremented (and possibly range limited) value. + + + +Determines whether the specified arguments have the same value. + +

+SameValue is a Boolean function used to compare the +values in AValue1 and AValue2 to determine if they have +the same value. The return value is True when both AValue1 and +AValue2 have the same value. It is defined as an abstract virtual method in +TSpinEditExBase, and must be implemented in descendent classes to +compare the data type for the specialization. +

+

+SameValue is used in the implementation of storage specifiers for the +Increment, MinValue, and MaxValue properties. +

+

+SameValue is defined when using FPC compiler version 3.2.2 on the Windows +64-bit platform. This method was introduced to ensure that the type +specialization for the class instance is used when value comparisons are +performed. Specifically, it allows the 64-bit compiler on Windows to +determine which of the overloads in Math.SameValue is called for +the Currency type. +

+
+ +Introduced in version 2.2.0. + + + + + + + +Math.SameValue + +
+ +True if both arguments have the same value. + + +First value for the comparison. + + +Second value for the comparison. + + + +Sets the value for the Value property. + + + + + + +New value for the property. + + + +Sets the value for the NullValue property. + + + + + + +New value for the property. + + + +Sets the value for the MaxValue property. + + + + + + +New value for the property. + + + +Sets the value for the MinValue property. + + + + + + +New value for the property. + + + +Sets the value for the Increment property. + + + + + + +New value for the property. + + + + +Indicates if the specified String contains a valid numeric value. + + +

+TextIsNumber is an abstract virtual Boolean function +which indicates the value specified in S represents a valid +number. ANumber is an output parameter where the numeric value for +the data type is stored. +

+

+TextIsNumber must be implemented in a descendent class using the data type +for the specialization. +

+
+ + + + +
+ + +True when S contains a value that can be converted to the data type +for ANumber. + + + +String converted to a numeric value in the method. + + +Numeric value for the specified String. + + + + +Performs actions needed when the handle is allocated for the control. + + +

+InitializeWnd is an overridden method used to perform actions +needed when the handle is allocated for the control, and before child +controls are created. InitializeWnd calls the inherited method on entry. +

+

+InitializeWnd calls UpdateControl to validate and update members +in the class instance. +

+
+ +
+ + +Performs actions prior to freeing the handle for the control. + +

+Ensures that the Value property is up-to-date before releasing the Handle for +the control. +

+
+ +TWinControl.FinalizeWnd + +
+ + + +Performs action needed when the component has been loaded from the LCL +streaming mechanism. + + +

+Loaded is an overridden method in TSpinEditExBase, and +calls the inherited method on entry. Loaded corrects an undesirable behavior +in the ancestor class; it sends a CM_PARENTFONTCHANGED message which +also alters the color in the grouped edit control. Loaded calls +UpdateSpacing prior to restoring the initial color assigned to the +edit control. +

+
+ + + + +
+ + + +Indicates is Up and Down cursor keys can be used in the Edit for the control + + +

+ArrowKeys is a Boolean property which indicates if +cursor keys can be used to navigate content in the Edit for the control. +

+

+When set to True, the Up (VK_UP) and Down +(VK_Down) arrow keys can be used to increase or decrease the +Value for the control. The key events are handled in the +EditKeyDown event handler assigned to Edit. When set to +False, the Up and Down keys are ignored in Edit. +

+

+The default value for the property is True. +

+

+Use UpDown to access the TUpDown instance used in the +grouped edit control. +

+
+ + + + + + + +
+ + +Text editor for the grouped edit control. + +

+Edit a read-only TGEEdit property which contains the +editor for the grouped edit control. Edit is used to perform direct input of +a new Value for the control. Edit allows use of the Up and +Down cursor keys to increment or decrement the value when +ArrowKeys is enabled. +

+

+UpDown is the TUpDown instance used to increment and +decrement the value for the grouped edit control using mouse clicks. +

+
+ + + + +
+ + +Contains the TUpDown instance used in the grouped edit control. + +

+UpDown is a read-only property which contains the +TUpDown instance used to increment or decrement the +Value for the grouped edit control. Click on the buttons in UpDown +to increase or decrease the Value for the control by the amount +specified in the Increment property. +

+

+Edit is used to perform direct input of the value for the grouped +edit control. +

+
+ + + + + +
+ + + +Indicates whether the TUpDown instance for the grouped edit control is +visible. + + +

+UpDownVisible is a Boolean property which indicates if +UpDown in the grouped edit control is visible. It is a convenience +property; read and write access for the value are redirected to the +Visible property in the TUpDown instance in UpDown. The +default value for the property is True. +

+
+ + + + + +
+ + + +Contains the repeat interval for the TUpDown instance in the grouped edit +control. + + +

+MinRepeatValue contains the repeat interval used for the +UpDown control in the grouped edit. The default value for the +property is defined in the DefMinRepeatValue constant. +

+

+Changing the value for the property causes the MinRepeatInterval +property in UpDown to be updated with the new value. +

+
+ + + +
+ + + +Constructor for the class instance. + +

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

+
    +
  • ArrowKeys
  • +
  • Increment
  • +
  • MaxValue
  • +
  • NullValueBehaviour
  • +
  • MinRepeatValue
  • +
+

+Create configures the Edit and UpDown instances used in +the grouped edit control. Edit is configured to use right alignment for its +text (since it is a numeric value). UpDown is configured to include the flags +needed in its ControlStyle property. The OnChangingEx and OnClick event +handlers for UpDown are also set in the method. +

+ +UpDown does not use its Associate property to maintain the relationship to +Edit. This is by design, and allows Edit to be used with floating point +numbers and have a NullValue (in a descendent class instance). It also +enables proper alignment and anchoring for the grouped edit control. + +

+Internal members needed in the class instance are also initialized. +

+

+Create calls SetInitialBounds to set the size for the control to +the default values returned from GetControlClassDefaultSize. +

+
+ +
+ +Owner of the class instance. + + + + +Constrains the specified value to MinValue and MaxValue for the control. + + +

+GetLimitedValue is used in the implementation of +UpdateControl, SpinUpDown, and StrToValue +methods. It is also called from the ValueToStr method in +TCustomFloatSpinEditEx. +

+

+GetLimitedValue ensures that the value for the type specified in +AValue is constrained to the range specified in the +MinValue and MaxValue properties. +

+

+The return value contains the original value after it has been range +adjusted. When AValue is smaller than MinValue, MinValue is assigned to the +return value. When AValue is larger than MaxValue, MaxValue is assigned to +the return value. +

+ +The return value is not range adjusted when MinValue and MaxValue have the +same value. This is Delphi VCL compatible. + +
+ +
+ + +Value adjusted (when needed) to the MinValue and MaxValue constraints. + + + +Value examined (and adjusted when needed) in the method. + + + +Converts the specified value to its representation as a String. + +

+ValueToStr is an abstract virtual String function used +to convert the value specified in AValue to its representation as +a String data type. ValueToStr must be implemented in a descendent class to +use the data type and formatting needed for the specialization. +

+
+ + + + +
+ +String representation for the specified data type. + + +Type with the numeric value converted in the method. + + + + +Converts the specified string to a numeric value for the generic data type. + + +

+StrToValue is a function which returns a generic type with the +numeric value for the specified String. TextIsNumber is used to +determine if S contains a valid numeric value. If S is not a valid +number, the NullValueBehaviour property is used to determine the +return value for the method. +

+
+
nvbShowTextHint
+
NullValue is used as the return value.
+
nvbLimitedNullValue
+
GetLimitedValue is used to derive the Null return value.
+
nvbMinValue
+
MinValue is used as the return value.
+
nvbMaxValue
+
MaxValue is used as the return value.
+
nvbInitialValue
+
The initial value for the control is used as the return value.
+
nvbShowTextHint
+
GetLimitedValue is used to get the return value
+
+
+ +
+ +Numeric value for the specified string. + + +String representation converted in method. + + + + +Implements the EditingDone handler for the Edit in the grouped edit control. + + +

+EditEditingDone is an overridden method in +TSpinEditExBase. It calls the inherited method on entry to signal +the OnEditingDone event handler (when assigned). +

+

+EditEditingDone updates the Value for the control from the +Text in the Edit. UpdateControl is called to +ensure that members in the property are updated and validated after a change +to the Value property. +

+
+ + + +
+ + + +Value added to or subtracted from Value when the UpDown control is clicked. + + +

+Increment is a property which defines the value added to or +subtracted from the control Value when the UpDown +control is clicked. It is also used when ArrowKeys are enable in +the Edit for the grouped edit control. +

+

+Increment uses the generic type for the class instance. There is no default +value for the control in TSpinEditExBase, but it may be re-specified in a +descendent class specialized for a given data type. +

+
+- + + + + + + + +
+ + +Minimum value allowed in the Value property. + +

+MinValue is a property used to specify the minimum numeric value +allowed in the Value property. MinValue uses the type specified +for the generic class. Changing the property value causes +UpdateControl to be called to range check and update members in +the control. +

+

+MinValue is used in the implementation of methods such as +IsLimited, IsOutOfLimits, SpinUpDown, and +GetLimitedValue. It also influences the value stored in the +control when a NullValueBehaviour is applied. +

+

+Use MaxValue to specify the maximum value allowed in the control. +

+
+ + + + + + + +
+ + +Maximum value allowed in the Value property. + +

+MaxValue is a property which contains the largest numeric value +allowed in the Value property. MaxValue uses the type specified +for the generic class. Changing the property value causes +UpdateControl to be called to range check and update members in +the control. +

+

+MaxValue is used in the implementation of methods such as +IsLimited, IsOutOfLimits, SpinUpDown, and +GetLimitedValue. It also influences the value stored in the +control when a NullValueBehaviour is applied. +

+

+Use MinValue to specify the smallest value allowed in the control. +

+
+ + + + + + + +
+ + +Value used when the text for the control is not a valid number. + +

+NullValue contains the numeric value used when the text for the +control does not represent a valid number. NullValue is assigned to Value +when the NullValueBehaviour property is set to nvbLimitedNullValue or +nvbShowTextHint. +

+
+ +
+ + + +Controls the logic applied when control text is not a valid number. + + +

+NullValueBehaviour is a TNullValueBehaviour property +which contains the logic applied when the text for the control does not +represent a valid numeric value. The default value for the property is +nvbMinValue, and indicates that the value in MinValue +is stored in the Value property when an invalid number is detected. +

+

+See TNullValueBehaviour for more +information about values in the enumeration and their meanings. +

+

+NullValueBehaviour is used in the implementation of the +UpdateControl and StrToValue methods. +

+
+ +
+ + +Numeric value for the control. + +

+Value is a property which contains the numeric value for the +grouped edit control. Value used the data type specified for the generic +class. +

+

+Read access to the property value checks for an allocated handle in the +control. If the handle has not been allocated, the StrToValue +method is called to get the property value. When the handle exists, the value +stored in the internal member is used. +

+

+Write access to the property value ensures that text assigned directly to +Edit contains a valid number for the data type. This is done by +calling TextIsNumber. If the new value is the same as the stored +property value, no actions are performed. +

+

+When the value for the property is changed, the UpdateControl +method is called to range check, validate, and update members in the class +instance. +

+

+Use MinValue and MaxValue to control the minimum and +maximum values allowed in the control. Use Increment to control +the amount applied to the control value when a button in the +UpDown control is clicked. Use NullValue and +NullValueBehaviour to control the logic applied with an invalid +numeric value is stored in the control. +

+
+ + + + + + + + + + +
+ + + +Indicates the display mode used for the floating point value in +TFloatSpinEditEx. + + + + + +Value is displayed with fixed precision and decimal places. + + + +Value is displayed in scientific (exponential) notation used for numbers that +are too large or too small to be easily represented using the decimal form. + + + + +Value is automatically formatted using scientific notation when it exceeds +the limits assigned in ExponentialFormatLimitPos or ExponentialFormatLimitNeg. + + + + +When Value is 0.0, it is formatted using 20 digits of fixed precision with +the number of decimals in DecimalPlaces. Similar to dmAuto but using fixed +precision. + + + + +A specialization of TSpinEditExBase for the Double data type. + +

+TCustomFloatSpinEditEx defines an extended spin edit control with +an editor for the numeric value, and buttons to increment or decrement the +control value.It is a TSpinEditExBase descendant which +specializes the generic ancestor for the Double +data type. Double is a real type which allows values in the range 5.0E-324 .. +1.7E+308 and uses 15-16 digits of precision. Double is used to implement +properties including: Increment, MinValue, +MaxValue, NullValue, and Value. +

+

+Do not create instances of TCustomFloatSpinEditEx; use the +TFloatSpinEditEx descendant which sets the visibility and default +values for properties in the class. +

+ +The NumbersOnly property has been removed as a published property +in TCustomFloatSpinEditEx and its descendent classes. It is not appropriate +for use in floating point notation. Removed in LazUtils version 2.3.0. + +
+ + + + + +
+ + + + +Default number of decimal places used to display the Value for the control. + + + +Default decimal separator used in the floating point value. + + + + + +Number of decimal places used to display the Value for the control. + + + +Formatting used to edit and display the Value for the control. + + + +Number of digits displayed in an exponent using scientific notation. + + + + +Maximum exponent digits allowed before exponential notation is used for +negative values. + + + + +Maximum exponent digits allowed before exponential notation is used for +positive values. + + + +Local format settings used in the control. + + + +Number of digits of precision used to edit and display the Value for the +control. + + + + +Gets the value for the DecimalSeparator property. + + + + + +Value for the property. + + + +Sets the value for the DecimalSeparator property. + + + + + +New value for the property. + + + +Sets the value for the DisplayMode property. + + + + + + +New value for the property. + + + +Sets the value for the ExponentDigits property. + + + + +New value for the property. + + + +Sets the value for the ExponentialFormatLimitNeg property. + + + + +New value for the property. + + + +Sets the value for the ExponentialFormatLimitPos property. + + + + +New value for the property. + + + +Sets the value for the Precision property. + + + + +New value for the property. + + + + +Gets the local format settings for the control. + + + + +Local format settings used for the control. + + + + +Implements handler for KeyPress events in the Edit for the control. + + +

+EditKeyPress is an overridden method in +TCustomFloatSpinEditEx used to ensure that the specified character +is valid for the Edit in the control. Key contains the character +examined in the method. The allowed values in Key include the following +characters: +

+
+
Numeric Digits
+
Characters in the range '0'..'9'.
+
Decimal separator
+
+Accepts either ',' (Comma), or '.' (Period) characters as the decimal +separator, and is automatically translated to the value used in local format +settings in the DecimalSeparator property. Any decimal separator will, +however, be discarded when DecimalPlaces is set to 0 (zero). +
+
Exponent Notation
+
+Allows 'E' or 'e' to represent the exponent character used to represent "... +times ten raised to the power of ...". +
+
Control Characters
+
+Allows the following control characters to be passed to the Edit control: #8 +(BackSpace), #9 (Tab), ^C (Ctrl+C or Copy), ^X (Ctrl+X or Cut), ^V (Ctrl+V or +Paste), ^Z (Ctrl+Z or Undo). +
+
+

+EditKeyPress calls the inherited method to signal the OnKeyPress event +handler (when assigned). +

+

+Any character which is not allowed in the floating point value is set to #0 +to discard the character value. +

+
+ + + + + + + +
+ +Character examined in the method. + + + + +Determines if the specified string is a valid number for the numeric data +type. + + +

+TextIsNumber is an overridden Boolean function used to +determine if the specified string contains a valid representation for the +numeric data type in the control. TextIsNumber re-implements the inherited +method to use the Double data type, and does not call the method +in the ancestor class. +

+

+TextIsNumber calls TryStrToFloat using the local format settings +for the control to convert the value in S to a floating point +value. An exception raised by TryStrToFloat is handled in the method. The +converted numeric value is stored in the ANumber argument on +success. ANumber should be considered "undefined" when the conversion fails +due to an exception. +

+

+The return value is True when the value in S can be converted to the +Double data type. It is False when an exception was raised and handled +in the method. +

+

+TextIsNumber is used in the implementation of methods like +UpdateControl, SpinUpDown, and StrToValue. +It is also called when setting a new value in the Value property. +

+

+Set values in the MinValue, MaxValue, +NullValue, and NullValueBehaviour properties to control +the actions performed when TextIsNumber returns False. +

+
+ + + + + +
+ +True if the specified string is a valid numeric value. + + +String with the value examined in the method. + + + +Stores the numeric value for the specified string; undefined when the result +is False. + + + + + +Ensures the incremented value is a valid number for the Double data type. + + +

+SafeInc is an overridden function in +TCustomFloatSpinEditEx used to increase the specified value by the +Increment for the control. SafeInc ensures that the incremented +value is valid for the Double data type. SafeInc does not call the +inherited method. +

+

+AValue contains the type with the numeric value to be incremented. +

+

+The return value contains the numeric value after the value in Increment has +been added. The return value is constrained when the incremented value is too +large for the Double data type. The upper limit for the value in the data +type is defined in the MaxDouble constant. +

+

+SafeInc is used in the implementation of the SpinUpDown method. +

+

+SafeDec is used to decrement a specified Double value. +

+
+ + + + +
+ +The numeric value after Increment has been added. + + +Numeric value incremented in the method. + + + + +Ensures the decremented value is a valid number for the Double data type. + + +

+SafeDec is an overridden function in +TCustomFloatSpinEditEx used to decrease the specified value by the +Increment for the control. SafeDec ensures that the decremented +value is valid for the Double data type. SafeDec does not call the +inherited method. +

+

+AValue contains the type with the numeric value to be decremented. +

+

+The return value contains the numeric value after the value in Increment has +been subtracted. The return value is constrained when the decremented value +is too small for the Double data type. The lower limit for the value in the +data type is defined as -1 * MaxDouble. +

+

+SafeDec is used in the implementation of the SpinUpDown method. +

+

+SafeInc is used to increment a specified Double value. +

+
+ +
+ +The numeric value after Increment has been subtracted. + + +Numeric value decremented in the method. + + + +Determines whether the specified arguments have the same value. + +

+SameValue is an overridden Boolean function used to +compare the values in AValue1 and AValue2 to determine +if they have the same value. The return value is True when both +AValue1 and AValue2 have the same value. The arguments are implemented using +the Double type in TCustomFloatSpinEditEx. The overloaded SameValue routine +in the math.pp unit is called to get the return value for the +method. +

+

+SameValue is defined when using FPC compiler version 3.2.2 on the Windows +64-bit platform. This method was introduced to ensure that the type +specialization for the class instance is used when value comparisons are +performed. Specifically, it allows the 64-bit compiler on Windows to +determine which of the overloads in Math.SameValue is called for +the Currency type. +

+
+ +Introduced in version 2.2.0. + + + +Math.SameValue + +
+ +True if both arguments have the same value. + + +First value for the comparison. + + +Second value for the comparison. + + + +Sets the value for the DecimalPlaces property. + + + + + + +New value for the property. + + + +Registers the widget set class used for the control. + +

+Calls the inherited method on entry, and registers the following properties +to be skipped during LCL component streaming: +

+
+
NumbersOnly
+
Property should not be published for this control.
+
+
+ +Added in LazUtils version 2.3.0 and higher. + + +
+ + + +Specifies the formatting used to edit and display the Value for the control. + + +

+DisplayMode is a TDisplayMode property which specifies +the formatting used to edit and display the Value for the control. +The default value for the property is dmFixed, and indicates that +fixed precision and decimals are used when formatting the control value. + +See TDisplayMode for more information about the values and +meanings in the enumeration. +

+

+Changing the value in DisplayMode causes the Value for the control to be +updated. It also forces UpdateControl to be called to validate +and normalize members in the class instance. +

+

+DisplayMode is used in the implementation of the ValueToStr method +which generates the string representation for the Value in the control, and +is assigned to the Text property in the Edit for the +grouped edit control. +

+
+ + + + + + +
+ + + +Maximum exponent digits allowed before exponential notation is required for a +positive number. + + +

+ExponentialFormatLimitPos is an Integer property which +contains the maximum exponent allowed before a positive Value in +the control must be represented using exponential notation. The default value +for the property is 6 (six) and indicates that Value must exceed 10^6 +before exponential notation is required for a positive number. +

+

+Setting a new value for the property causes Value to be updated, and calls +the UpdateControl method to validate and normalize members in the +class instance. +

+

+ExponentialFormatLimitPos is used in the ValueToStr method when +DisplayMode contains the value dmAuto and Value has a +non-zero floating point value. +

+

+Use ExponentialFormatLimitNeg to specify the maximum exponent +allowed before using exponential notation for a negative value in the control. +

+

+Use Precision to specify the total number of digits used for a +number in scientific notation. Use ExponentDigits to specify the +number of exponent digits used for a number in scientific notation. +

+
+ + + + + + + + + +
+ + + +Maximum exponent digits allowed before exponential notation is required for a +negative number. + + +

+ExponentialFormatLimitNeg is an Integer property which +contains the exponent value at which use of scientific notation is triggered +for a negative Value in the control. The default value for the +property is -6, and indicates that scientific notation is required +when Value is smaller than 10^-6. +

+

+Changing the value for the property causes GetValue and UpdateControl to be +called. +

+

+ExponentialFormatLimitNeg is used in the ValueToStr method when +DisplayMode is dmAuto and the Value is not +0.0. +

+

+Use ExponentialFormatLimitPos to specify the exponent value which +triggers use of scientific notation for a positive value. +

+

+Use Precision to specify the total number of digits used for a +number in scientific notation. Use ExponentDigits to specify the +number of exponent digits used for a number in scientific notation. +

+
+ + + + + + + + +
+ + + +Number of digits of precision used after the decimal point in scientific +notation. + + +

+Precision is an Integer property which specifies the number of digits of +precision used after the decimal point for a floating point value in +scientific notation. It is the value used as the precision argument for the +FloatToStrF routine in RTL. The default value for the property is 6. +The maximum precision for the data type is 15. +

+

+Changing the value for the property causes the GetValue and UpdateControl +methods to be called. +

+

+Precision is used in the ValueToStr method when DisplayMode is +dmScientific or dmAuto. +

+
+ +
+ + + +Number of digits prior to the decimal point used in scientific notation. + + +

+ExponentDigits is an Integer property which contains +the number of digits used before the decimal point when using scientific +notation. The default value for the property is 2. +

+

+Changing the value for the property causes the GetValue and +UpdateControl methods to be called. +

+

+ExponentDigits is used in the ValueToStr method when the +DisplayMode is dmScientific or dmAuto. +

+

+Use Precision to specify the number of digits after the decimal +point in a floating point value using scientific notation. +

+
+ + + + + + +
+ + + + +Gets the string representation for the numeric Value in the control. + + + + + +String representation for the numeric Value. + + +Numeric value examined and converted in the method. + + + +Constructor for the class instance. + +

+Create is the overridden constructor for the class instance, and +calls the inherited constructor on entry. +

+

+Create makes an internal copy of the default format settings for the +platform. This allows the value in DecimalSeparator to be +specified and stored independent of the value in +DefaultFormatSettings. The local copy is modified to used the +value in the DefDecimalSeparator constant as the default value for +DecimalSeparator. +

+

+Create sets the default values for properties, including: +

+
+
DecimalPlaces
+
Set to the value in the DefDecimals constant.
+
ExponentialFormatLimitPos
+
Set to 6 (six).
+
ExponentialFormatLimitNeg
+
Set to -6.
+
Precision
+
Set 6 digits for the mantissa.
+
ExponentDigits
+
Set to 2.
+
DisplayMode
+
+Set to the value dmFixed for fixed format using the Precision and +ExponentDigits defined in the control. +
+
+
+ +
+ + +Value used to represent a decimal point in the Edit control. + +

+DecimalSeparator is a Char property which contains the +character used as the decimal point in a floating point value. Read and write +access for the property value are redirected to the local +TFormatSetting stored in the class instance. This allows the +control to set the decimal separator independent of the format settings for +the platform or operating system. +

+

+The default value for the property is defined in the +DefDecimalSeparator constant. Changing the value for the property +updates the local format settings, and calls UpdateControl to +validate and update members in the class instance. +

+

+DecimalSeparator is used in EditKeyPress to validate characters +entered in the Edit for the control. It is also used in +ValueToStr to format the value in the control for the selected +DisplayMode. +

+
+ + + + + + + +
+ + + +Number of decimal places used to edit and display the Value for the control. + + +

+DecimalPlaces is an Integer property which indicates +the number of decimal places used when formatting the Value for +the control. It must contain a positive integer value or 0 +(zero). The default value for the property is defined in the +DefDecimals constant. Changing the value for the property causes +the Value property to be updated, and calls UpdateControl to +validate and update other members in the class instance. +

+

+DecimalPlaces is used in ValueToStr to format the value in the +control for the selected DisplayMode. +

+
+ + + + + + + +
+ + + +Implement a spin edit control for a value using the Double data type. + + +

+TFloatSpinEditEx is a TCustomFloatSpinEditEx descendant +which implements a spin edit control for a value using the Double +data type. TFloatSpinEditEx sets the visibility for properties defined in +ancestor classes. +

+

+TFloatSpinEditEx defines an extended spin edit control with an +editor for the numeric value, and buttons to increment or decrement the +control value. It specializes the generic ancestor for the Double +data type. Double is a real type which allows values in the range 5.0E-324 .. +1.7E+308 and uses 15-16 digits of precision. Double is used to implement +properties including: Increment, MinValue, +MaxValue, NullValue, and Value. +

+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Defines the base class for a spin edit control for Int64 values. + + +

+TCustomSpinEditEx is a specialization of the generic +TSpinEditExBase class for the Int64 data type. In +addition to implementing the Int64 data type, it provides additional +properties and methods used to validate, format, and display the numeric +value. +

+

+Use the ThousandSeparator to set the UTF-8-encoded value used as +the decimal point in the control value. +

+

+Set Increment to the value by which the control is increased or +decreased when the UpDown button is clicked. +

+

+Use ValueToStr to get the string representation for the numeric +value. +

+

+Do not create instances of TCustomSpinEditEx; use TSpinEditEx, +which sets the visibility for properties, instead. +

+

+Use TFloatSpinEditEx to edit a floating point value using fixed or +scientific notation. +

+
+ + + + + + +
+ + + +Stores the thousands separator. + + + +Sets the value for the ThousandSeparator property. + + + + + +New value for the property. + + + + + +Implements the handler for KeyPress events in the Edit for the control. + + +

+EditKeyPress is an overridden method in +TCustomSpinEditEx, and calls the inherited method on entry. The +OnKeyPress event handler is signalled (when assigned) by the +inherited method. +

+

+EditKeyPress ensures that the value in Key is valid for the +control. An invalid value is discarded by setting Key to the #0 +character (Decimal 0). Valid characters include numeric digits +('0'..'9'), the value in ThousandSeparator, and the +negative sign indicator ('-'). +

+

+Please note: The sign indicator will be disallowed when a positive non-zero +value is specified in the MinValue property. +

+

+Tab, BackSpace, Cut, Paste, Copy, and Undo key presses are passed to the +inherited method. +

+
+ + + + + + +
+ +Character examined in the method. + + + +Ensures the incremented value is valid for the data type. + +

+SafeInc is a function used to increase AValue by the +amount specified in the Increment property. SafeInc is overridden +in TCustomSpinEditEx to ensure that the incremented value is valid for the +Int64 data type. +

+

+AValue contains the the numeric value to be incremented. +

+

+The return value contains the Int64 value after Increment has been added. The +return value is constrained when the incremented value is too large for the +Int64 data type; its value is set to High(Int64). +

+

+SafeInc is used in the implementation of the SpinUpDown method in +the ancestor class. +

+
+ + + + +
+ +Numeric value after the increment has been added. + + +Numeric value incremented in the method. + + + +Ensures the decremented value is valid for the data type. + +

+SafeDec is a function used to decrease the specified value by the +amount specified in the Increment property. SafeDec is overridden +in TCustomSpinEditEx to ensure that the decremented value is valid +for the Int64 data type. +

+

+AValue contains the numeric value to be decremented. +

+

+The return value contains the Int64 value after Increment has been +subtracted. The return value is constrained when the decremented value is too +small for the Int64 data type; its value is set to Low(Int64). +

+

+SafeDec is used in the implementation of the SpinUpDown method in +the ancestor class. +

+
+ +" + + +
+ +Numeric value after the increment has been subtracted. + + +Numeric value decremented in the method. + + + +Determines whether the specified arguments have the same value. + +

+SameValue is an overridden Boolean function used to +compare the values in AValue1 and AValue2 to determine +if they have the same value. The return value is True when both +AValue1 and AValue2 have the same value. The arguments are implemented using +the Int64 type in TCustomSpinEditEx. +

+

+SameValue is defined when using FPC compiler version 3.2.2 on the Windows +64-bit platform. This method was introduced to ensure that the type +specialization for the class instance is used when value comparisons are +performed. +

+
+ +Introduced in version 2.2.0. + + + +Math.SameValue + +
+ +True if both arguments have the same value. + + +First value for the comparison. + + +Second value for the comparison. + + + + +Indicates if the specified String contains a valid Int64 data type. + + +

+TextIsNumber is an overridden Boolean function which +indicates if the value specified in S represents a valid number +for the Int64 data type. +

+

+ANumber is an output parameter where the numeric value from the +conversion from the is stored. +

+

+The return value is a Boolean type which contains True when +the text in S is successfully converted to an Int64 value and +stored i the N argument. If the conversion raises an exception, it +is handled in the method and the return value is set to False. The +value in N should be considered as "undefined" in this scenario. +

+
+ + + +
+ +True when the text contains a valid Int64 value. + + +Text converted to a numeric value in the method. + + + +Contains the successfully converted numeric value for the string. + + + + + + +Converts the specified numeric value to its String representation. + + +

+ValueToStr is an overridden String function used to +convert the value specified in AValue to its representation as a +String data type. AValue is an Int64 type. +

+

+ValueToStr calls IntToStr to convert the integer value +to the String used as the return value for the method. When +ThousandSeparator has been assigned, the +InsertThousandSeparator routine is called to apply the display +formatting to the return value. +

+

+ValueToStr is used in the implementation of both the UpdateControl +and RealGetText methods in the ancestor class. +

+
+ + + + +
+ +String representation for the specified numeric value. + + +Numeric value converted in the method. + + + + +Amount by which the control value is increased or decreased when UpDown is +clicked. + + +

+Increment is an Int64 property in +TCustomSpinEditEx, and represents the amount by which the control +value is increased or decreased when the UpDown button is clicked. The +default value for the property is 1. +

+

+Increment is used in the implementation of the SafeInc and +SafeDec methods. +

+
+ + + + +
+ + + +Contains the thousands separator used to format and display the control value. + + +

+ThousandSeparator is a String property which contains +the character used as the thousands separator in the control. It is +implemented as a String type to allow use of UTF-8-encoded +characters in the property value. When it is unassigned (contains an empty +string), the separator is not used to format the string value for the control. +

+

+Changing the value in ThousandSeparator causes the UpdateControl +method to be called to update the display for the control. +

+

+ThousandSeparator is used in methods like EditKeyPress, +TextIsNumber, and ValueToStr. +

+
+ + + + + +
+ + +Implements a spin edit control for an Int64 data type. + +

+TSpinEditEx is a TCustomSpinEditEx descendant which +implements a spin edit control using an Int64 value. TSpinEditEx +sets the visibility for properties defined in ancestor classes. +

+

+Use the ThousandSeparator to set the UTF-8-encoded value used as +the decimal point in the control value. +

+

+Set Increment to the value by which the control is increased or +decreased when the UpDown button is clicked. +

+

+Use ValueToStr to get the string representation for the numeric +value. +

+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Gets debugging information about a value from TNullValueBehaviour. + + +

+DbgS is an overloaded String function used to get +information displayed in the Debugger. This variant of the routine accepts a +TNullValueBehaviour argument, an converts the specified value to +its string representation, +

+
+
+ +String representation for the specified null value behavior. + + +Enumeration value converted to a string in the method. + + + +Introduction to Extended Spin Edit Controls. + +

+The SpinEx.pp unit contains extended spin edit controls, like +TSpinEditEx and TFloatSpinEditEx. They are very similar +to TSpinEdit and TFloatSpinEdit, but provide additional +features which allow a NullValue for the control and behaviors performed when +the value for the control is not a valid numeric value. +

+

+This introduction will discuss the problems the design of the controls, and +the problems they are intended to eliminate. +

+

+Why another SpinEdit or FloatSpinEdit control? +

+

+The standard controls, TSpinEdit and TFloatSpinEdit, do not support a +NullValue mechanism. Also, their implementations are widgetset dependent. +While this provides a control that has the look and feel native to the +widgetset, the behavior also depends on the widgetset. This is especially +important when the text for the control contains an invalid numeric value +(otherwise not a number). In such a case, when querying the control for it's +Value, the results are not consistent for the various platforms. The +difference in behavior between widgetsets also prevents implementation of the +NullValue mechanism, especially the possibility to leave the control empty or +to display informative text inside the control about the condition. +

+

+TSpinEditEx handles Int64 values, while TSpinEdit is limited to LongInt +values. This is because TSpinEdit inherits from TCustomFloatSpinEdit and the +internal member for the Value is stored using the Double type, and Double +does not have enough significant digits to handle the range for the Int64 +type. +

+

+In addition, TFloatSpinEditEx can set the value for its DecimalSeparator +property independent of the value in the DefaultFormatSettings for the +platform or operating system. Note: Unlike T(Float)SpinEdit, the GetValue +method is always derived from the actual text in the control. This is by +design, and it should not be altered. +

+

+Why not simply associate a TUpDown with a TEdit instead? +

+

+Using TEdit with a TUpDown control has several disadvantages: +

+
    +
  • It does not allow floating point values.
  • +
  • Its range is limited to the range for the SmallInt type.
  • +
  • It does not properly anchor and/or align.
  • +
+

+While both TSpinEditEx and TFloatSpinEditEx use a TUpDown control in their +implementations, they do not use the Associate property in TUpDown. The two +controls (the edit and the up/down button) are embedded in a TCustomControl +(much like TEditButton) to provide proper alignment and anchoring behavior. +

+
+ +
+ +
+ +
diff --git a/components/lazcontrols/docs/treefilteredit.xml b/components/lazcontrols/docs/treefilteredit.xml index b1dcd1a647..807e033161 100644 --- a/components/lazcontrols/docs/treefilteredit.xml +++ b/components/lazcontrols/docs/treefilteredit.xml @@ -1,622 +1,682 @@ - + - - Implements a control used to filter an associated TTreeView control. - -

- treefilteredit.pas contains classes and other types used to implement a control used to filter an associated TTreeView control. This file is part of the LazControls package. -

-
+ + +Implements a control used to filter an associated TTreeView control. + + +

+treefilteredit.pas contains classes and other types used to +implement a control used to filter an associated TTreeView control. This file +is part of the LazControls package. +

+
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - Specifies an event handler signalled to determine if a tree node matches the Filter in a TTreeFilterEdit control. - - -

- TFilterNodeEvent is a Boolean object function which defines an event handler used to determine whether a tree node can be used in a TTreeFilterEdit control. TFilterNodeEvent is the type used to implement the OnFilterNode property in TTreeFilterEdit. -

-
- - - -
- - - True if the specified tree node can be used. - - - - - Tree node examined in the handler routine. - - - - - True if the node was handled in the routine. False if the node was ignored in the handler. - - + + +Specifies an event handler signalled to determine if a tree node matches the +Filter in a TTreeFilterEdit control. + + +

+TFilterNodeEvent is a Boolean object function which +defines an event handler used to determine whether a tree node can be used in +a TTreeFilterEdit control. TFilterNodeEvent is the type used to implement the +OnFilterNode property in TTreeFilterEdit. +

+
+ + + +
+ + +True if the specified tree node can be used. + + + + +Tree node examined in the handler routine. + + + + +True if the node was handled in the routine. False if the node +was ignored in the handler. + + - - - Represents a branch for an existing tree node when a filter is used in "sub-branches" mode. - - - - + + +Represents a branch for an existing tree node when a filter is used in +"sub-branches" mode. + + + + - - - Constructor for the class instance. - - -

- Allocates resources for the Items property, and other internal members. Stores AOwner in the Owner property, and ARootNode to the internal member used in the class instance. -

-
- -
- - - Filter edit control which owns the class instance. - - - - - Tree node which is the root for the brance, or Nil when all nodes are considered as top-level tree nodes. - - + + +Constructor for the class instance. + + +

+Allocates resources for the Items property, and other internal members. +Stores AOwner in the Owner property, and ARootNode to the internal member +used in the class instance. +

+
+ +
+ + +Filter edit control which owns the class instance. + + + + +Tree node which is the root for the brance, or Nil when all nodes are +considered as top-level tree nodes. + + - - - Adds an entry in Items for a root node in a branch. - - -

- Text, a data reference, and an associated file name can be added for the node. -

-
-
- - - - - - - - - + + +Adds an entry in Items for a root node in a branch. + + +

+Text, a data reference, and an associated file name can be added for the node. +

+
+
+ + + + + + + + + - - - Removes the specified tree node from the data for the class instance. - - -

- Removes the specified tree node from Items, the internal list for sorted data, and the items in the FilteredTreeview for the owner control. -

-
- -
- - - Tree node deleted in the method. - - + + +Removes the specified tree node from the data for the class instance. + + +

+Removes the specified tree node from Items, the internal list for sorted +data, and the items in the FilteredTreeview for the owner control. +

+
+ +
+ + +Tree node deleted in the method. + + - - - Frees the specified tree node including its node object data. - - - - - - - Tree node freed in the method. - - + + +Frees the specified tree node including its node object data. + + + + + + +Tree node freed in the method. + + - - - Gets the object data for the node at the specified position in the sorted data. - - - - - - - TObject instance at the specified position, or Nil when AIndex does not exist in the sorted data. - - - - - Ordinal position in the sorted data where the object instance is stored. - - + + +Gets the object data for the node at the specified position in the sorted +data. + + + + + + +TObject instance at the specified position, or Nil when AIndex does not exist +in the sorted data. + + + + +Ordinal position in the sorted data where the object instance is stored. + + - - - Frees the specified tree node and all of its child nodes. - - - - + + +Frees the specified tree node and all of its child nodes. + + + + - - - Causes nodes in the class instance to be sorted, filtered, and applied to the owner control. - - - - + + +Causes nodes in the class instance to be sorted, filtered, and applied to the +owner control. + + + + - - - Moves the tree node at the specified position in Items to the position in NewIndex. - - - - - - - - - - + + +Moves the tree node at the specified position in Items to the position in +NewIndex. + + + + + + + + + + - - - - - + + + + + - - - Specializes TFPGObjectList for the TTreeFilterBranch type. - - -

- Used in the implementation of the TTreeFilterEdit control. -

-
- - - - -
+ + +Specializes TFPGObjectList for the TTreeFilterBranch type. + + +

+Used in the implementation of the TTreeFilterEdit control. +

+
+ + + + +
- - Implements a filter edit control for an associated TTreeView control. - -

- This control has 2 different modes of operation. One mode maintains and filters sub-items of root-nodes in a tree. The other mode filters the whole tree using the TreeNode.Visible property for each of the nodes. -

-

- Mode 1: Sub-branches under root nodes Items for each branch are maintained in a TTreeFilterBranch class instance. -

-

- Mode 2: A whole tree When no branches are defined (no calls made to GetBranch), the TreeFilterEdit control filters the whole tree automatically. It uses each TreeNode's Visible property to show/hide it. -

-
-
+ + +Implements a filter edit control for an associated TTreeView control. + + +

+This control has 2 different modes of operation. One mode maintains and +filters sub-items of root-nodes in a tree. The other mode filters the whole +tree using the TreeNode.Visible property for each of the nodes. +

+

+Mode 1: Sub-branches under root nodes Items for each branch are +maintained in a TTreeFilterBranch class instance. +

+

+Mode 2: A whole tree When no branches are defined (no calls made to +GetBranch), the TreeFilterEdit control filters the whole tree automatically. +It uses each TreeNode's Visible property to show/hide it. +

+
+
- - - Performs actions needed when the specified component is added to or removed from the control. - - - - - - - Component for the notification event. - - - - - Operation for the specified component. - - + + +Performs actions needed when the specified component is added to or removed +from the control. + + + + + + +Component for the notification event. + + + + +Operation for the specified component. + + - - - Moves to and optionally selects the next node in the associated tree view control. - - - - - - - True if the new tree node is marked as selected in the tree view control. - - + + +Moves to and optionally selects the next node in the associated tree view +control. + + + + + + +True if the new tree node is marked as selected in the tree view +control. + + - - - Moves to and optionally selects the previous node in the associated tree view control. - - - - - - - True if the new tree node is marked as selected in the tree view control. - - + + +Moves to and optionally selects the previous node in the associated tree view +control. + + + + + + +True if the new tree node is marked as selected in the tree view +control. + + - - - Moves the associated tree view control by one page in the upward direction, and optionally selects the first node. - - - - - - - True if the new tree node is marked as selected in the tree view control. - - + + +Moves the associated tree view control by one page in the upward direction, +and optionally selects the first node. + + + + + + +True if the new tree node is marked as selected in the tree view +control. + + - - - Moves the associated tree view control by one page in the downward direction, and optionally selects the first node. - - - - - - - True if the new tree node is marked as selected in the tree view control. - - + + +Moves the associated tree view control by one page in the downward direction, +and optionally selects the first node. + + + + + + +True if the new tree node is marked as selected in the tree view +control. + + - - - Moves the tree view control to the first (or root) node in the tree. - - - - - - - True if the new tree node is marked as selected in the tree view control. - - + + +Moves the tree view control to the first (or root) node in the tree. + + + + + + +True if the new tree node is marked as selected in the tree view +control. + + - - - Moves the tree view control to the last node in the tree. - - - - - - - True if the new tree node is marked as selected in the tree view control. - - + + +Moves the tree view control to the last node in the tree. + + + + + + +True if the new tree node is marked as selected in the tree view +control. + + - - - Indicates if a Return key in the Edit control was forwarded to the associated tree view. - - - - - TCustomControlFilterEdit.EditKeyDown - - - - - True if the Return key press was forwarded to the tree view control. - - + + +Indicates if a Return key in the Edit control was forwarded to the associated +tree view. + + + + +TCustomControlFilterEdit.EditKeyDown + + + + +True if the Return key press was forwarded to the tree view control. + + - - - Sorts and filters either branches or the whole tree depending on operation mode for the control. - - - - - - - - - + + +Sorts and filters either branches or the whole tree depending on operation +mode for the control. + + + + + + + + + - - - Applies the Filter to branches in tree or the whole tree depending on the mode of operation for the control. - - - - - TCustomControlFilterEdit.Filter - TCustomControlFilterEdit.ApplyFilter - - + + +Applies the Filter to branches in tree or the whole tree depending on the +mode of operation for the control. + + + + +TCustomControlFilterEdit.Filter +TCustomControlFilterEdit.ApplyFilter + + - - - Gets the resource name for the glyph used on the Button in the filter edit control. - - - - - - - Name of the resource with the glyph image for the button. - - + + +Gets the resource name for the glyph used on the Button in the filter edit +control. + + + + + + +Name of the resource with the glyph image for the button. + + - - - Constructor for the class instance. - - -

- Allocates resource for the SelectionList property. Sets the default values for the ExpandAllInitially and ImageIndexDirectory properties. -

-
- -
- - - Owner of the class instance. - - + + +Constructor for the class instance. + + +

+Allocates resource for the SelectionList property. Sets the default values +for the ExpandAllInitially and ImageIndexDirectory properties. +

+
+ +
+ + +Owner of the class instance. + + - - - Destructor for the class instance. - - -

- Frees resource allocated in the class instance for: -

-
    -
  • FilteredTreeview
  • -
  • SelectionList
  • -
  • Other internal members
  • -
-
- -
+ + +Destructor for the class instance. + + +

+Frees resource allocated in the class instance for: +

+
    +
  • FilteredTreeview
  • +
  • SelectionList
  • +
  • Other internal members
  • +
+
+ +
- - - Stores the first visible node for the selected tree node in FilteredTreeview to the SelectionList property. - - -

- No actions are performed in the method for the following conditions: -

-
    -
  • FilteredTreeview has not been assigned.
  • -
  • FilteredTreeview does not have a Selected tree node.
  • -
-
- - - - -
+ + +Stores the first visible node for the selected tree node in FilteredTreeview +to the SelectionList property. + + +

+No actions are performed in the method for the following conditions: +

+
    +
  • FilteredTreeview has not been assigned.
  • +
  • FilteredTreeview does not have a Selected tree node.
  • +
+
+ + + + +
- - - Makes the tree node in SelectionList the Selected node in the FilteredTreeview control. - - -

- No actions are performed in the method if FilteredTreeview has not been assigned. -

-

- Raises an assertion exception if SelectionList has more than one node in the list. -

-
- - - -
+ + +Makes the tree node in SelectionList the Selected node in the +FilteredTreeview control. + + +

+No actions are performed in the method if FilteredTreeview has not been +assigned. +

+

+Raises an assertion exception if SelectionList has more than one node in the +list. +

+
+ + + +
- - Get an existing branch for a given tree-node, or Nil if there is none. - -

- This can be used only with the "sub-branches" mode. -

-
- -
- - - - - - + + +Get an existing branch for a given tree-node, or Nil if there is none. + + +

+This can be used only with the "sub-branches" mode. +

+
+ +
+ + + + + + - - Get a new or existing branch with data cleared for a given tree-node. - -

- This can be used only with the "sub-branches" mode. In fact calling this method switches the filter into "sub-branches" mode. This is the way to add those branches. -

-
- -
- - - - - - + + +Get a new or existing branch with data cleared for a given tree-node. + + +

+This can be used only with the "sub-branches" mode. In fact calling this +method switches the filter into "sub-branches" mode. This is the way to add +those branches. +

+
+ +
+ + + + + + - - - Deletes the specified branch root node from the internal list for the control. - - - - - - - - - - Returns True the specified branch node was successfully removed from the internal list. - - - - - Tree node that represents the root for a given branch. - - + + +Deletes the specified branch root node from the internal list for the control. + + + + + + + + + +Returns True if the specified branch node was successfully removed from the internal list. + + + + +Tree node that represents the root for a given branch. + + - - - Ordinal position for the image displayed for a directory entry in the list of tree nodes. - - - - + + +Ordinal position for the image displayed for a directory entry in the list of +tree nodes. + + + + - - - List of selected items in the FilteredTreeview control. - - - - + + +List of selected items in the FilteredTreeview control. + + + + - - - When a filtered text is a directory name, it is split and shown as a tree structure. - - -

- This has effect only in the "sub-branches" mode. The "whole tree" mode uses the existing tree nodes as is and only changes their visibility. -

-
-
+ + +When a filtered text is a directory name, it is split and shown as a tree +structure. + + +

+This has effect only in the "sub-branches" mode. The "whole tree" mode uses +the existing tree nodes as is and only changes their visibility. +

+
+
- - The associated TTreeView with the nodes filtered in the control. - - - + + +The associated TTreeView with the nodes filtered in the control. + + + + - - Tree branches are expanded also initially. - -

- The branches are expanded in any case when the tree is filtered and matches are found. This setting only affects the initial state. -

-
- -
+ +Tree branches are expanded also initially. + +

+The branches are expanded in any case when the tree is filtered and matches +are found. This setting only affects the initial state. +

+
+ +
- - ImageIndex can be queried while filtering based on the node data. - - - + + +ImageIndex can be queried while filtering based on the node data. + + + + - - - Event handler signalled to determine if a tree node matches the Filter for the control. - - - - TCustomControlFilterEdit.Filter - TCustomControlFilterEdit.DoFilterItem - TCustomControlFilterEdit.OnFilterItemEx - TCustomControlFilterEdit.OnFilterItem - - + + +Event handler signalled to determine if a tree node matches the Filter for +the control. + + + +TCustomControlFilterEdit.Filter +TCustomControlFilterEdit.DoFilterItem +TCustomControlFilterEdit.OnFilterItemEx +TCustomControlFilterEdit.OnFilterItem + + - - - - TreeFilterEditNodeData. - - - + + + +TreeFilterEditNodeData. + + + - - - - - + + + + + - - - - - + + + + + - - - Stores information about a file name and the tree node which represents it. - - - - - - - Pointer to the Object instance associated with the file aname in the instance. - - - - - - - Path and name for the file represented in the class instance. - - - - + + +Stores information about a file name and the tree node which represents it. + + + + + + +Pointer to the Object instance associated with the file aname in the instance. + + + + + + +Path and name for the file represented in the class instance. + + + + - - - Constructor for the class instance. - - - - - - - Value assigned to the Filename member. - - - - - Value assigned to the Data member. - - + + +Constructor for the class instance. + + + + + + +Value assigned to the Filename member. + + + + +Value assigned to the Data member. + + -
+
-
+