mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 08:09:26 +02:00
Docs: Documentation updates for LCL. Issue #38176, patch from Don Siders.
git-svn-id: trunk@64176 -
This commit is contained in:
parent
aa83422093
commit
ddedcde469
@ -2,20 +2,20 @@
|
||||
<fpdoc-descriptions>
|
||||
<package name="lcl">
|
||||
<!--
|
||||
====================================================================
|
||||
LCLType
|
||||
====================================================================
|
||||
-->
|
||||
====================================================================
|
||||
LCLType
|
||||
====================================================================
|
||||
-->
|
||||
<module name="LCLType">
|
||||
<short>This unit is being created specifically for compatibility with Delphi. It should only be used for constants and type definitions that are included in the Delphi Windows unit. This is only done for compatibility.</short>
|
||||
<descr/>
|
||||
<!-- unresolved type reference Visibility: default -->
|
||||
<element name="Classes">
|
||||
<short/>
|
||||
</element>
|
||||
<element name="SysUtils">
|
||||
<short/>
|
||||
</element>
|
||||
<short>Provides compatiblity with the Delphi Windows unit</short>
|
||||
<descr>
|
||||
This unit is being created specifically for compatibility with Delphi. It should only be used for constants and type definitions that are included in the Delphi Windows unit. This is only done for compatibility.
|
||||
</descr>
|
||||
<!-- unresolved external references -->
|
||||
<element name="UTF8Bidi"/>
|
||||
<element name="Windows"/>
|
||||
<element name="Classes"/>
|
||||
<element name="SysUtils"/>
|
||||
<!-- alias type Visibility: default -->
|
||||
<element name="TUTF8Char">
|
||||
<short>A type that can hold an UTF-8 encoded character.</short>
|
||||
@ -78,15 +78,12 @@
|
||||
<short/>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
<notes><note>?</note>
|
||||
<notes><note>?</note>
|
||||
</notes>
|
||||
</element>
|
||||
<!-- "type" alias type Visibility: default -->
|
||||
<element name="HDC">
|
||||
<short>The type of a
|
||||
Device Context
|
||||
Handle.
|
||||
</short>
|
||||
<short>The type of a Device Context Handle</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
@ -100,38 +97,26 @@
|
||||
</element>
|
||||
<!-- "type" alias type Visibility: default -->
|
||||
<element name="HFONT">
|
||||
<short>The type of a
|
||||
Font
|
||||
Handle.
|
||||
</short>
|
||||
<short>The type of a Font Handle</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- "type" alias type Visibility: default -->
|
||||
<element name="HGDIOBJ">
|
||||
<short>The type of a
|
||||
general GraphicsDeviceInterface Object
|
||||
Handle.
|
||||
</short>
|
||||
<short>The type of a general GraphicsDeviceInterface Object Handle</short>
|
||||
<descr>GDI objects are e.g. fonts or brushes, used in GDI drawing operations.
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- "type" alias type Visibility: default -->
|
||||
<element name="HPEN">
|
||||
<short>The type of a
|
||||
line drawing Pen
|
||||
Handle.
|
||||
</short>
|
||||
<short>The type of a line drawing Pen Handle</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- "type" alias type Visibility: default -->
|
||||
<element name="HRGN">
|
||||
<short>The type of a
|
||||
display Region
|
||||
Handle.
|
||||
</short>
|
||||
<short>The type of a display Region Handle</short>
|
||||
<descr>
|
||||
<p>A region can be as simple as a rectangle, or can be composed of multiple shapes.
|
||||
</p>
|
||||
@ -142,54 +127,39 @@
|
||||
</element>
|
||||
<!-- "type" alias type Visibility: default -->
|
||||
<element name="HINST">
|
||||
<short>The type of a
|
||||
(process) Instance
|
||||
Handle.
|
||||
</short>
|
||||
<short>The type of a (process) Instance Handle</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- "type" alias type Visibility: default -->
|
||||
<element name="HICON">
|
||||
<short>The type of an
|
||||
Icon
|
||||
Handle.
|
||||
</short>
|
||||
<short>The type of an Icon Handle</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- "type" alias type Visibility: default -->
|
||||
<element name="HIMAGELIST">
|
||||
<short>The type of an
|
||||
Image List
|
||||
Handle.
|
||||
</short>
|
||||
<descr>Image lists are frequently used with controls,
|
||||
whose display items (list entries...) can also show an image.
|
||||
Then every item refers to its image by an index into the shared image list,
|
||||
instead of holding a copy of the image.
|
||||
<short>The type of an Image List Handle</short>
|
||||
<descr>
|
||||
<p>
|
||||
Image lists are frequently used with controls, whose display items (list entries...) can also show an image. Then every item refers to its image by an index into the shared image list, instead of holding a copy of the image.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- alias type Visibility: default -->
|
||||
<element name="HCURSOR">
|
||||
<short>The type of a
|
||||
mouse Cursor
|
||||
Handle.
|
||||
</short>
|
||||
<short>The type of a mouse Cursor Handle</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
<notes><note>?</note>
|
||||
<notes><note>?</note>
|
||||
</notes>
|
||||
</element>
|
||||
<!-- alias type Visibility: default -->
|
||||
<element name="HGLOBAL">
|
||||
<short>The type of a
|
||||
Global memory block
|
||||
Handle.
|
||||
</short>
|
||||
<descr>Global memory blocks are managed by the platform,
|
||||
used e.g. for data shared across multiple processes.
|
||||
<short>The type of a Global memory block Handle</short>
|
||||
<descr>
|
||||
Global memory blocks are managed by the platform, used e.g. for data shared across multiple processes.
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
@ -868,6 +838,23 @@
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
|
||||
<element name="DT_HIDEPREFIX">
|
||||
<short>
|
||||
DrawText formatting flag: Ignore the accelerator key prefix (&) and hide the underline
|
||||
</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
|
||||
<element name="DT_PREFIXONLY">
|
||||
<short>
|
||||
DrawText formatting flag: Draw only the underlined accelerator key, ignore any other text
|
||||
</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
|
||||
<!-- constant Visibility: default -->
|
||||
<element name="DFC_CAPTION">
|
||||
<short>
|
||||
|
@ -7993,44 +7993,32 @@
|
||||
<short>Always False in TCustomLabel</short>
|
||||
</element>
|
||||
|
||||
<element name="TCustomLabel.DoMeasureTextPosition">
|
||||
<short>Determines the location for the text within the control</short>
|
||||
<element name="TCustomLabel.DoDrawText">
|
||||
<short>Performs actions needed to draw the text for the label</short>
|
||||
<descr>
|
||||
<p>
|
||||
<var>DoMeasureTextPosition</var> is a procedure used to determine the coordinates where the control text is drawn. Values in <var>TextTop</var> and <var>TextLeft</var> are updated in the method.
|
||||
<var>DoDrawText</var> performs action needed to draw the text for the label.
|
||||
</p>
|
||||
<p>
|
||||
DoMeasureTextPosition uses the value in <var>Layout</var> to determine the vertical alignment for the text. When Layout is <var>tlTop</var>, the value in TextTop is set to <b>0</b> (zero). TextLeft is always set to <b>0</b> (zero).
|
||||
The <var>GetLabelText</var> method is called to get the text value drawn in the method.
|
||||
</p>
|
||||
<p>
|
||||
DoMeasureTextPosition calls <var>CalculateSize</var> to get the width and height needed for the text when other values are used in Layout. The calculated text height and the control <var>Height</var> are used to get the value for TextTop as follows:
|
||||
The <var>Font</var> color may be temporarily changed when when the <var>Enabled</var> property is <b>False</b>. If themes are enabled, the Font color is set to <var>clGrayText</var>. When themes are not enabled, the Font color is set to <var>clBtnHighlight</var>. The original Font color is restored prior to exiting the method.
|
||||
</p>
|
||||
<dl>
|
||||
<dt>tlCenter</dt>
|
||||
<dd>
|
||||
Half of the ununsed height is used in TextTop so that equal spacing occurs both above and below the text (vertically centered).
|
||||
</dd>
|
||||
<dt>tlBottom</dt>
|
||||
<dd>
|
||||
The amount of unused space is used in TextTop so the text is aligned to the bottom of the control.
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
DoMeasureTextPosition is used in the implementation of the <var>Paint</var> method.
|
||||
DoDrawText calls the <var>DrawText</var> routine to draw the text on the <var>Canvas</var> using the text rectangle and flags passed as arguments. DrawText is called a second time to render the shadow for the label text when themes are not enabled. The shadow text uses the color <var>clBtnShadow</var>.
|
||||
</p>
|
||||
<p>
|
||||
DoDrawText is called from the <var>CalculateSize</var> and <var>Paint</var> methods.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="TCustomLabel.Layout"/>
|
||||
<link id="TCustomLabel.CalculateSize"/>
|
||||
<link id="TCustomLabel.Paint"/>
|
||||
<link id="#lcl.controls.TControl.Height"/>
|
||||
</seealso>
|
||||
<seealso/>
|
||||
</element>
|
||||
<element name="TCustomLabel.DoMeasureTextPosition.TextTop">
|
||||
<short>Top coordinate for the text</short>
|
||||
<element name="TCustomLabel.DoDrawText.Rect">
|
||||
<short>Text rectangle used to draw the label text</short>
|
||||
</element>
|
||||
<element name="TCustomLabel.DoMeasureTextPosition.TextLeft">
|
||||
<short>Left coordinate for the text</short>
|
||||
<element name="TCustomLabel.DoDrawText.Flags">
|
||||
<short>DrawText flags used to render the text</short>
|
||||
</element>
|
||||
|
||||
<element name="TCustomLabel.HasMultiLine">
|
||||
@ -8084,12 +8072,24 @@
|
||||
</element>
|
||||
|
||||
<element name="TCustomLabel.CalculateSize">
|
||||
<short>Determines the text extent for a maximum width constraint</short>
|
||||
<descr/>
|
||||
<short>Gets the height and width needed for the label text</short>
|
||||
<descr>
|
||||
<p>
|
||||
Calculates the size for the label text using the formatting defined in property values.
|
||||
</p>
|
||||
<p>
|
||||
<var>NeededWidth</var> and <var>NeededHeight</var> are variable parameters updated in the method to reflect the values needed after applying DrawText flags to the label text. The flag values applied are determined by the following property values:
|
||||
</p>
|
||||
<ul>
|
||||
<li>WordWrap</li>
|
||||
<li>HasMultiLine</li>
|
||||
<li>ShowAccelChar</li>
|
||||
</ul>
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
<element name="TCustomLabel.CalculateSize.MaxWidth">
|
||||
<short>Maximum width where wordwrap may start</short>
|
||||
<short>Maximum width for the text rectangle in the label</short>
|
||||
</element>
|
||||
<element name="TCustomLabel.CalculateSize.NeededWidth">
|
||||
<short>Width needed for the text</short>
|
||||
|
Loading…
Reference in New Issue
Block a user