-
- This file is part of the
+
+This file is part of the
- 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. -
-+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. +
+- Calls the inherited method, and stores the control as a TCustomCheckBoxThemed instance in the member variable used in the class instance. -
-+Calls the inherited method, and stores the control as a TCustomCheckBoxThemed +instance in the member variable used in the class instance. +
+- TCheckBoxThemedActionLinkClass is a TCheckBoxThemedActionLink class type. -
-+TCheckBoxThemedActionLinkClass is a +TCheckBoxThemedActionLink class type. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- Calls the inherited method on entry. Calls Invalidate to force the control to be redrawn. -
-+Calls the inherited method on entry. Calls Invalidate to force the +control to be redrawn. +
+- Calls the inherited method on entry to apply the message to the control. Calls Invalidate to force the control to be redrawn. -
-+Calls the inherited method on entry to apply the message to the control. +Calls Invalidate to force the control to be redrawn. +
+- 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). -
-+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). +
+- 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: -
-+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 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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: -
-- 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. -
-+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: +
++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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+
-
+
- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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). -
-+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). +
+- Create is the overridden constructor for the class instance, and calls the inherited method on entry. It sets the default values for properties, including: -
-- 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. -
-+Create is the overridden constructor for the class instance, and calls the +inherited method on entry. It sets the default values for properties, +including: +
++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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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: -
-+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: +
+- 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. -
-+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. +
+
-
- This file is part of the
+
+This file is part of the
- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- Called from the MouseMove method when a mouse down event has occurred on a tab in the control. -
-+Called from the MouseMove method when a mouse down event has occurred on a +tab in the control. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- TExtendedTabToolbar is a TToolBar descendant. -
-- Create is the overridden constructor for the class instance. -
-- TExtendedTabToolButton is a TToolButton descendant. -
-- Create is the constructor for the class instance. -
-- 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. -
-- 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: -
-- 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. -
-- TExtendedInternalCustomPage is a TCustomPage descendant. -
-- TExtendedInternalTabControl is a TNoteBookStringsTabControl descendant. -
-- TExtendedTabControlNoteBookStrings is a TTabControlNoteBookStrings descendant. -
-- Implements the class reference used for the PageClass and Pages properties in TCustomExtendedTabControl. -
-- Experimental. Platform dependent. -
-- Experimental. Platform dependent. -
-+TExtendedTabToolbar is a TToolBar descendant. +
++Create is the overridden constructor for the class instance. +
++TExtendedTabToolButton is a TToolButton descendant. +
++Create is the constructor for the class instance. +
++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. +
++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: +
++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. +
++TExtendedInternalCustomPage is a TCustomPage descendant. +
++TExtendedInternalTabControl is a +TNoteBookStringsTabControl descendant. +
++TExtendedTabControlNoteBookStrings is a +TTabControlNoteBookStrings descendant. +
++Implements the class reference used for the PageClass and +Pages properties in TCustomExtendedTabControl. +
++Experimental. Platform dependent. +
++Experimental. Platform dependent. +
+
-
- This file is part of the
+
+This file is part of the
- 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. -
-+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. +
+
- 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
- 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. -
-
+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
+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- Destroy is the overridden destructor for the class instance. Destroy ensures that resources allocated to members in the class instance are freed, including: -
-- Destroy calls the inherited method prior to exit. -
-+Destroy is the overridden destructor for the class instance. +Destroy ensures that resources allocated to members in the class instance are +freed, including: +
++Destroy calls the inherited method prior to exit. +
+- 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. -
-+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. +
+- 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
+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
+
- 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. -
-+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. +
+- 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 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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+
-
- This file is part of the
+
+This file is part of the
- TListViewDataItem is the typed maintained in TListViewDataList, and passed an argument to the method in TListViewFilterEdit which finds matches for its Filter criteria. -
-+TListViewDataItem is the typed maintained in TListViewDataList, and passed an +argument to the method in TListViewFilterEdit which finds matches for its +Filter criteria. +
+- The return value is True when both the Data and the StringArray for the compared TListViewDataItem instances are the same. -
-+The return value is True when both the Data and the +StringArray for the compared TListViewDataItem +instances are the same. +
+- 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. -
-+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. +
+- 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 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. +
+- Overridden in TListViewFilterEdit to ensure that the FilteredListview property is set to Nil when the component is 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. +
+- The return value is retrieved from the Index property in LastSelected (when assigned). The value is -1 if LastSelected has not been assigned. -
-+The return value is retrieved from the Index property in LastSelected (when +assigned). The value is -1 if LastSelected has not been assigned. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- Called when the ApplyFilter method in the ancestor class is executed. -
-+Called when the ApplyFilter method in the ancestor class is executed. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+
-
- This file is part of the
+
+This file is part of the
- 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. +
+- Create is the constructor for the class instance. -
-+Create is the constructor 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. +
+- 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);
- - DrawnCaptionRect is a read-only TRect property. -
-- InWeight is a read-only Single property. -
-- OutWeight is a read-only Single property. -
-- Create is the constructor 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). -
-- TLvlGraphLevel is a TPersistent descendant. -
-- Create is the constructor 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. -
-- Index is a read-only Integer property. -
-- Graph is a read-only TLvlGraph property. -
-- TLvlGraphSubGraph is a TPersistent descendant. -
-- Create is the constructor 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. -
-- TLvlGraph is a TPersistent descendant. -
-- Create is the constructor 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. -
-- Requires BackEdge to have been processed in MarkBackEdges. -
-- TLvlGraphNodeStyle is a TPersistent descendant. -
-- Create is the constructor 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. -
-- Create is the constructor 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. -
-- Create is the constructor for the class instance. -
-- Destroy is the overridden destructor for the class instance. -
-- Control is a read-only TCustomLvlGraphControl property. -
-- 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. -
-- 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: -
-
- There is a simple example in:
-
- TLvlGraphControl is used to display unit dependencies in the Package Graph for the Lazarus IDE. -
-- Create is the overridden constructor 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. -
-- PixelPerWeight is a read-only Single property. -
-- The default value for the property is True. -
-- 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: -
-
- There is a simple example in:
-
- TLvlGraphControl is used to display unit dependencies in the Package Graph for the Lazarus IDE. -
-- 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). -
-+DrawnCaptionRect is a read-only TRect property. +
++InWeight is a read-only Single property. +
++OutWeight is a read-only Single property. +
++Create is the constructor 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). +
++TLvlGraphLevel is a TPersistent descendant. +
++Create is the constructor 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. +
++Index is a read-only Integer property. +
++Graph is a read-only TLvlGraph property. +
++TLvlGraphSubGraph is a TPersistent descendant. +
++Create is the constructor 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. +
++TLvlGraph is a TPersistent descendant. +
++Create is the constructor 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. +
++Requires BackEdge to have been processed in MarkBackEdges. +
++TLvlGraphNodeStyle is a TPersistent descendant. +
++Create is the constructor 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. +
++Create is the constructor 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. +
++Create is the constructor for the class instance. +
++Destroy is the overridden destructor for the class instance. +
++Control is a read-only TCustomLvlGraphControl property. +
++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. +
++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: +
+
+There is a simple example in:
+
+TLvlGraphControl is used to display unit dependencies in the Package Graph +for the Lazarus IDE. +
++Create is the overridden constructor 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. +
++PixelPerWeight is a read-only Single property. +
++The default value for the property is True. +
++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: +
+
+There is a simple example in:
+
+TLvlGraphControl is used to display unit dependencies in the Package Graph +for the Lazarus IDE. +
++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). +
+
-
- This file is part of the
+
+This file is part of the
- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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. -
-+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. +
+- 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
- 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. -
-- 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. -
-- 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. -
-- The return value is True when MaxValue is larger than MinValue. IsLimited is used in the implementation of the IsOutOfLimits method. -
-- 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. -
-- 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. -
-- Calls the BuddyClick method for the grouped edit control. -
-- 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. -
-- 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. -
-- 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. -
-- 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). -
-- 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: -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- Ensures that the Value property is up-to-date before releasing the Handle for the control. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- Create is the overridden constructor for the class instance, and calls the inherited constructor on entry. Create sets the default values for properties, including: -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-
- 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
- Do not create instances of TCustomFloatSpinEditEx; use the TFloatSpinEditEx descendant which sets the visibility and default values for properties in the class. -
-- 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: -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-
- 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
- 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. -
-- Calls the inherited method on entry, and registers the following properties to be skipped during LCL component streaming: -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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: -
-- 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. -
-- 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. -
-- 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
- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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. -
-- 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, -
-
- The
- 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: -
-- 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. -
-+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
+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. +
++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. +
++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. +
++The return value is True when MaxValue is larger than MinValue. +IsLimited is used in the implementation of the IsOutOfLimits +method. +
++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. +
++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. +
++Calls the BuddyClick method for the grouped edit control. +
++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. +
++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. +
++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. +
++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). +
++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: +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++Ensures that the Value property is up-to-date before releasing the Handle for +the control. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++Create is the overridden constructor for the class instance, and +calls the inherited constructor on entry. Create sets the default values for +properties, including: +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
+
+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
+Do not create instances of TCustomFloatSpinEditEx; use the +TFloatSpinEditEx descendant which sets the visibility and default +values for properties in the class. +
++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: +
++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. +
++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. +
++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. +
++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. +
+
+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
+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. +
++Calls the inherited method on entry, and registers the following properties +to be skipped during LCL component streaming: +
++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. +
++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. +
++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. +
++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. +
++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. +
++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: +
++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. +
++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. +
++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
+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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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. +
++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, +
+
+The
+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: +
++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. +
+
-
+
- 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. -
-+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. +
+- 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. -
-+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. +
+- Text, a data reference, and an associated file name can be added for the node. -
-+Text, a data reference, and an associated file name can be added for the node. +
+- Removes the specified tree node from Items, the internal list for sorted data, and the items in the FilteredTreeview for the owner control. -
-+Removes the specified tree node from Items, the internal list for sorted +data, and the items in the FilteredTreeview for the owner control. +
+- Used in the implementation of the TTreeFilterEdit control. -
-+Used in the implementation of the TTreeFilterEdit 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. -
-+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. +
+- Allocates resource for the SelectionList property. Sets the default values for the ExpandAllInitially and ImageIndexDirectory properties. -
-+Allocates resource for the SelectionList property. Sets the default values +for the ExpandAllInitially and ImageIndexDirectory properties. +
+- Frees resource allocated in the class instance for: -
-+Frees resource allocated in the class instance for: +
+- No actions are performed in the method for the following conditions: -
-+No actions are performed in the method for the following conditions: +
+- 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. -
-+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. +
+- This can be used only with the "sub-branches" mode. -
-+This can be used only with the "sub-branches" mode. +
+- 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. -
-+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. +
+- 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. -
-+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 branches are expanded in any case when the tree is filtered and matches are found. This setting only affects the initial state. -
-+The branches are expanded in any case when the tree is filtered and matches +are found. This setting only affects the initial state. +
+