Docs: LCL documentation updates. Issue #37649, patch from Don Siders.

git-svn-id: trunk@63841 -
This commit is contained in:
juha 2020-08-29 14:40:15 +00:00
parent 75c2186b1d
commit d8ac913e9f
4 changed files with 84 additions and 70 deletions

View File

@ -1082,10 +1082,10 @@
<short>Handles UTF-8 characters for the data-aware control</short>
<descr>
<p>
<p>UTF8KeyPress</p> is an overridden method in TDBEdit. UTF8KeyPress calls the inherited method, and performs actions needed to handle the UTF-8-encoded character specified in the <var>UTF8Key</var> argument.
<var>UTF8KeyPress</var> is an overridden method in TDBEdit. UTF8KeyPress calls the inherited method, and performs actions needed to handle the UTF-8-encoded character specified in the <var>UTF8Key</var> argument.
</p>
<p>
UTF8KeyPress checks the value in UTF8Key to determine the number of bytes required for the code point. A single-byte code point is converted to a Char type, and passed to the <var>FieldCanAcceptKey</var> routine to validate its content for the Field in the control. Multi-byte Unicode code points are ignored, and the Extended ASCII <b>nbsp</b> character (Decimal 255) is passed to FieldCanAcceptKey. The value in UTF8Key is set to an empty string if it is valid for the Field.
UTF8KeyPress checks the value in UTF8Key to determine the number of bytes required for the code point. A single-byte code point is converted to a Char type, and passed to the <var>FieldCanAcceptKey</var> routine to validate its content for the Field in the control. Multi-byte Unicode code points are ignored, and the Extended ASCII <b>NbSp</b> character (Decimal 255) is passed to FieldCanAcceptKey. The value in UTF8Key is set to an empty string if it is valid for the Field.
</p>
<p>
Use the OnUTF8KeyPress event handler to handle/convert specific multi-byte character values.

View File

@ -462,7 +462,7 @@
This property has exactly the same rules and behavior as the <var>Mask</var> property in <var>TFilterComboBox</var>.
</p>
<p>
Changing the value in Mask causes the <vvar>UpdateFileList</vvar> method to be called to reload the file information in the Items property.
Changing the value in Mask causes the <var>UpdateFileList</var> method to be called to reload the file information in the Items property.
</p>
</descr>
<seealso>

View File

@ -726,7 +726,7 @@
</element>
<element name="TColumnButtonStyle">
<short>Enumerated type with cell editor types available in a grid control</short>
<short>Enumeration with cell editor types available in a grid control</short>
<descr>
<p>
<var>TColumnButtonStyle</var> is an enumerated type with values that represent the different cell editor types available in a grid control. TColumnButtonStyle is the type used for the <var>TGridColumn.ButtonStyle</var> property, and passed as an argument when an editor is requested for a column definition. It is also used when the <var>TCustomGrid.GetDefaultEditor</var> method is called to get the default cell editor for a given column.
@ -945,7 +945,9 @@
<element name="TCellProcessType">
<short>Identifies the action performed for cell content</short>
<descr>
TCellProcessType is an enumerated type with values that identify the action performed for the content in a grid cell. Values in the enumeration indicate whether cell content is copied or pasted in event handlers. TCellProcessType arguments are passed to the TCustomStringGrid.OnCellProcess event handler.
<p>
<var>TCellProcessType</var> is an enumerated type with values that identify the action performed for the content in a grid cell. Values in the enumeration indicate whether cell content is copied or pasted in event handlers. TCellProcessType arguments are passed to the <var>TCustomStringGrid.OnCellProcess</var> event handler.
</p>
</descr>
<seealso>
<link id="TCellProcessEvent"/>
@ -964,7 +966,7 @@
<short>All save options available in LCL grid controls</short>
<descr>
<p>
<var>soAll</var> is a <var>TSaveOptions</var> set type representing all of the TGridSaveOptions values available in a LCL grid control.
<var>soAll</var> is a <var>TSaveOptions</var> constant with the set representing all of the TGridSaveOptions values available in a LCL grid control.
</p>
</descr>
<seealso>
@ -2884,7 +2886,6 @@
</element>
<element name="TGridColumnTitle.FixDesignFontsPPI">
<!-- TODO -->
<short></short>
<descr>
<p>
@ -2892,13 +2893,13 @@
</p>
</descr>
<seealso></seealso>
<notes><note>TODO</note></notes>
</element>
<element name="TGridColumnTitle.FixDesignFontsPPI.ADesignTime">
<short></short>
</element>
<element name="TGridColumnTitle.ScaleFontsPPI">
<!-- TODO -->
<short></short>
<descr>
<p>
@ -2906,6 +2907,7 @@
</p>
</descr>
<seealso></seealso>
<notes><note>TODO</note></notes>
</element>
<element name="TGridColumnTitle.ScaleFontsPPI.AToPPI">
<short></short>
@ -3709,7 +3711,6 @@
</element>
<element name="TGridColumn.FixDesignFontsPPI">
<!-- TODO -->
<short></short>
<descr>
<p>
@ -3717,13 +3718,13 @@
</p>
</descr>
<seealso></seealso>
<notes><note>TODO</note></notes>
</element>
<element name="TGridColumn.FixDesignFontsPPI.ADesignTime">
<short></short>
</element>
<element name="TGridColumn.ScaleFontsPPI">
<!-- TODO -->
<short></short>
<descr>
<p>
@ -3731,6 +3732,7 @@
</p>
</descr>
<seealso></seealso>
<notes><note>TODO</note></notes>
</element>
<element name="TGridColumn.ScaleFontsPPI.AToPPI">
<short></short>
@ -9301,37 +9303,6 @@
<short>XML configuration file where values are stored</short>
</element>
<element name="TCustomGrid.FixDesignFontsPPI">
<!-- TODO -->
<short></short>
<descr>
<p>
<var>FixDesignFontsPPI</var> is a procedure used to...
</p>
</descr>
<seealso></seealso>
</element>
<element name="TCustomGrid.FixDesignFontsPPI.ADesignTime">
<short></short>
</element>
<element name="TCustomGrid.ScaleFontsPPI">
<!-- TODO -->
<short></short>
<descr>
<p>
<var>ScaleFontsPPI</var> is an overridden procedure used to...
</p>
</descr>
<seealso></seealso>
</element>
<element name="TCustomGrid.ScaleFontsPPI.AToPPI">
<short></short>
</element>
<element name="TCustomGrid.ScaleFontsPPI.AProportion">
<short></short>
</element>
<!-- procedure Visibility: protected -->
<element name="TCustomGrid.ScrollBarRange">
<short>
@ -11319,6 +11290,31 @@
<short>Device context for the drawing operation</short>
</element>
<element name="TCustomGrid.FixDesignFontsPPI">
<short>Adjusts fonts in the control to the specified design-time PixelsPerInch</short>
<descr>
<p>
<var>FixDesignFontsPPI</var> is an overridden procedure used to adjust the assigned font size for grid columns and their titles to the specified design-time Pixels Per Inch (PPI). This is needed because the display density (PPI) used for fonts is not stored in Form resource (.LFM) files. When the design-time PPI is different than the run-time setting, font scaling issues can occur.
</p>
<p>
FixDesignFontsPPI restores the design-time font PPI so it can be used in the LCL Scaling mechanism. FixDesignFontsPPI calls the inherited method on entry, and sets the value for the <var>PixelsPerInch</var> property in <var>TitleFont</var> when needed. Column definitions stored in the <var>Columns</var> property are also adjusted (when needed) by calling the FixDesignFontsPPI method for each of the <var>TGridColumn</var> instances in the container.
</p>
<p>
FixDesignFontsPPI is called when scaling is enabled, and the Form which hosts the control calls its <var>Loaded</var> method during LCL streaming.
</p>
</descr>
<seealso>
<link id="TCustomGrid.ScaleFontsPPI"/>
<link id="TStringGrid.Columns"/>
<link id="TGridColumns"/>
<link id="TGridColumn.FixDesignFontsPPI"/>
<link id="TControl.FixDesignFontsPPI"/>
</seealso>
</element>
<element name="TCustomGrid.FixDesignFontsPPI.ADesignTime">
<short>Design-time PixelsPerInch needed for fonts in the control</short>
</element>
<element name="TCustomGrid.Focused">
<short>
Indicates if the grid is focused or has an active focused cell editor
@ -11608,6 +11604,23 @@
<short>TStream instance where grid information is stored</short>
</element>
<element name="TCustomGrid.ScaleFontsPPI">
<short></short>
<descr>
<p>
<var>ScaleFontsPPI</var> is an overridden procedure used to...
</p>
</descr>
<seealso></seealso>
<notes><note>TODO</note></notes>
</element>
<element name="TCustomGrid.ScaleFontsPPI.AToPPI">
<short></short>
</element>
<element name="TCustomGrid.ScaleFontsPPI.AProportion">
<short></short>
</element>
<!-- procedure Visibility: public -->
<element name="TCustomGrid.SetFocus">
<short>Sets focus to the grid control</short>

View File

@ -199,8 +199,8 @@
<element name="TCustomScrollBar" link="#LCL.Controls.TWinControl">
<short>The base class for <var>TScrollBar</var></short>
<descr>
<var>TCustomScrollBar</var> is a <var>TWinControl</var> descendant which defines the base class for a scrollbar, such as <var>TScrollBar</var>. TCustomScrollBar can be used for horizontal or vertical scrollbars displayed for a form or scrolling window control.
<p>
<var>TCustomScrollBar</var> is a <var>TWinControl</var> descendant which defines the base class for a scrollbar, such as <var>TScrollBar</var>. TCustomScrollBar can be used for horizontal or vertical scrollbars displayed for a form or scrolling window control.
</p>
<p>
A scrollbar allows the content in a client area to be scrolled when it extends beyond the window bounds. TCustomScrollBar provides the properties, methods, and events needed to interface with the widgetset class for the platform or operating system.
@ -1625,7 +1625,6 @@
<short/>
<descr/>
<seealso/>
<notes><note>??? Calls an inherited method that doeas not exist.</note></notes>
</element>
<element name="TCustomComboBox.CMWantSpecialKey.Message">
<short/>
@ -2386,24 +2385,23 @@
<var>Create</var> is the overridden constructor for the class instance, and calls the inherited contructor on entry. Create ensures that resources are allocated for members in the class instance. Create sets the default values for properties, including the following:
</p>
<dl>
<dt>ControlSyle</dt>
<dd>Removes csCaptureMouse from the style flags.</dd>
<dt>DropDownCunt</dt>
<dd>Set to display 8 items by default.</dd>
<dt>ArrowKeysTraverseList</dt>
<dd>Set to True to enable cursor key navigation in the control.</dd>
<dt>AutoCompleteText</dt>
<dd>Set to the values in the DefaultComboBoxAutoCompleteText constant.</dd>
<dt>AutoSelect</dt>
<dd>Set to True.</dd>
<dt>CharCase</dt>
<dd>Set to ecNormal.</dd>
<dt>AutoSize</dt>
<dd>
Set to True. AutoSize must be true by default since some widgetsets (win32, wince) ignore the combo-box height and others (gtk2) look ugly with a very small height.
</dd>
</dl>
<dt>ControlSyle</dt>
<dd>Removes csCaptureMouse from the style flags.</dd>
<dt>DropDownCunt</dt>
<dd>Set to display 8 items by default.</dd>
<dt>ArrowKeysTraverseList</dt>
<dd>Set to True to enable cursor key navigation in the control.</dd>
<dt>AutoCompleteText</dt>
<dd>Set to the values in the DefaultComboBoxAutoCompleteText constant.</dd>
<dt>AutoSelect</dt>
<dd>Set to True.</dd>
<dt>CharCase</dt>
<dd>Set to ecNormal.</dd>
<dt>AutoSize</dt>
<dd>
Set to True. AutoSize must be true by default since some widgetsets (win32, wince) ignore the combo-box height and others (gtk2) look ugly with a very small height.
</dd>
</descr>
<seealso>
<link id="TCustomComboBox.Destroy"/>
@ -5179,11 +5177,10 @@
<short>Handles the CM_WANTSPECIALKEY message for the control</short>
<descr>
<p>
For the Darwin platform/widgetset, the LCL must be prevented from handling the arrow (cursor) keys VK_LEFT, VK_RIGHT, VK_UP, and VK_DOWN. The Result in Message is set to 1 to indicate that these keys have already been handled. Calls the inherited method prior to exit.
For the Darwin platform/widgetset, the LCL must be prevented from handling the arrow (cursor) keys VK_LEFT, VK_RIGHT, VK_UP, and VK_DOWN. The Result in Message is set to 1 to indicate that these keys have already been handled.
</p>
</descr>
<seealso/>
<notes><note>Calls an inherited method that does not exist.</note></notes>
</element>
<element name="TCustomEdit.CMWantSpecialKey.Message">
<short>Message handled in the method</short>
@ -8501,7 +8498,7 @@
Set <var>FocusControl</var> to the control which is focused when the accelerator key in the label is pressed.
</p>
<p>
A label control cannot receive the input focus (it's read-only), but can display an accelerator key indicator, just like a menu entries. A windowed control (Edit...) can receive focus, but cannot indicate an accelerator key.
A label control cannot receive the input focus (it is read-only), but can display an accelerator key indicator, just like a menu entries. A windowed control (Edit...) can receive focus, but cannot indicate an accelerator key.
</p>
<p>
Using a combination of a label and another control allows setting the accelerator key in the label caption. The other control receives focus when the user presses the accelerator key.
@ -8510,7 +8507,7 @@
An accelerator key is marked by an Ampersand '&amp;' in the label caption, immediately preceding the character to be used as the accelerator key. The marked character appears underlined on screen, when ShowAccelChar is set to <b>True</b>.
</p>
<p>
For example: When you have a NameEdit1 control on a form, preceded by a label NameLabel1, you can set NameLabel1.FocusControl to NameEdit1, and NameLabel1.Caption to '&amp;Name'. This makes the NameLabel1 displayed as '<u><b>N</b></u>ame'.
For example: When you have a NameEdit1 control on a form, preceded by a label NameLabel1, you can set NameLabel1.FocusControl to NameEdit1, and NameLabel1.Caption to '&amp;Name'.
</p>
</descr>
<seealso>
@ -8688,7 +8685,8 @@
</element>
<topic name="HowToUseStdCtrls">
<short>How to use <var>StdCtrls</var>, <var>ComCtrls</var> or <var>ExtCtrls</var>
<short>
How to use <var>StdCtrls</var>, <var>ComCtrls</var> or <var>ExtCtrls</var>
</short>
<descr>
<p>
@ -8736,8 +8734,10 @@
<p>
If the description of a property on that page is insufficient, you can navigate to the corresponding description in the ancestor classes, by selecting the links in the Inheritance listing or by selecting the ancestor Type in the declaration of the object.
</p>
<p>
<b>Some commonly listed properties</b>
</p>
<table>
<caption>Some commonly listed properties</caption>
<th>
<td>Property</td>
<td>Meaning</td>
@ -8849,8 +8849,7 @@
</tr>
<tr>
<td>ShowHint</td>
<td>Allows to enable or suppress <var>Hints</var>.
</td>
<td>Allows to enable or suppress <var>Hints</var>.</td>
</tr>
<tr>
<td>Size (or Height and Width)</td>
@ -8901,8 +8900,10 @@
<p>
A common strategy in Object-Oriented programming is to provide an <link id="#lcl.ActnList.TActionList">ActionList</link> with the facility for entering, removing or editing a number of predefined actions, from which the most appropriate can be selected to use in any particular instance.
</p>
<p>
<b>Some commonly listed Actions</b>
</p>
<table>
<caption>Some commonly listed Actions</caption>
<th>
<td>Event</td>
<td>Meaning</td>
@ -8995,7 +8996,7 @@
Declare <var>Destroy</var> with the <b>override</b> directive, because it is a <b>virtual</b> method.
</li>
<li>
Always call the <code>inherited Destroy;</code> method as the last action in the destructor code.
Always call the inherited Destroy method as the last action in the destructor code.
</li>
<li>
Be aware that an <var>exception</var> may be raised by the <var>constructor</var> when there is not enough memory to create an object, or something else goes wrong. If the <var>exception</var> is not handled inside the constructor, the object will be destroyed immediately. In this case <var>Destroy</var> will be called with a partially initialized object, so your destructor must check if the resources were really allocated before disposing of them.