Docs: LCL, LazUtils. Converts PRE tags for ASCII character diagrams, literal output, et. al.

This commit is contained in:
dsiders 2021-08-07 19:45:18 +01:00
parent 9d48c0eff5
commit 862cedaca9
8 changed files with 158 additions and 129 deletions

View File

@ -505,14 +505,14 @@
<short>Init for an unmasked 24 bit RGB image (LSB Blue).</short>
<descr>
<p>Init_BPP24_B8G8R8_BIO_TTB - initiator for specified format</p>
<pre>
<code>
{ pf24bit:
Format=ricfRGBA HasPalette=false Depth=24 PaletteColorCount=0
BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
LineOrder=riloTopToBottom
BitsPerPixel=24 LineEnd=rileDWordBoundary
RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
}</pre>
}</code>
</descr>
</element>
@ -520,7 +520,7 @@
<short>Init for a masked 24 bit RGB image (LSB Blue).</short>
<descr>
<p>Init_BPP24_B8G8R8_M1_BIO_TTB - initiator for specified format</p>
<pre>
<code>
{ pf24bit:
Format=ricfRGBA HasPalette=false Depth=24 PaletteColorCount=0
BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
@ -528,7 +528,7 @@
BitsPerPixel=24 LineEnd=rileDWordBoundary
RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
Masked
}</pre>
}</code>
</descr>
</element>
@ -537,7 +537,7 @@
<descr>
<p>
<var>Init_BPP32_B8G8R8_BIO_TTB</var> - initiator for specified format</p>
<pre>
<code>
{ pf32bit:
Format=ricfRGBA HasPalette=false Depth=24 PaletteColorCount=0
BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
@ -546,7 +546,7 @@
RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
No alpha
No mask
}</pre>
}</code>
</descr>
</element>
<element name="TRawImageDescription.Init_BPP32_B8G8R8_M1_BIO_TTB">
@ -554,7 +554,7 @@
<descr>
<p>
<var>Init_BPP32_B8G8R8_M1_BIO_TTB</var> - initiator for specified format</p>
<pre>
<code>
{ pf32bit:
Format=ricfRGBA HasPalette=false Depth=24 PaletteColorCount=0
BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
@ -563,7 +563,7 @@
RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
no alpha
with mask
}</pre>
}</code>
</descr>
</element>
@ -572,7 +572,7 @@
<descr>
<p>
<var>Init_BPP32_B8G8R8A8_BIO_TTB</var> - initiator for specified format</p>
<pre>
<code>
{ pf32bit:
Format=ricfRGBA HasPalette=false Depth=32 PaletteColorCount=0
BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
@ -581,7 +581,7 @@
RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
alpha
no mask
}</pre>
}</code>
</descr>
</element>
@ -590,7 +590,7 @@
<descr>
<p>
<var>Init_BPP32_B8G8R8A8_M1_BIO_TTB</var> - initiator for specified format</p>
<pre>
<code>
{ pf32bit:
Format=ricfRGBA HasPalette=false Depth=32 PaletteColorCount=0
BitOrder=riboBitsInOrder ByteOrder=DefaultByteOrder
@ -599,7 +599,7 @@
RedPrec=8 RedShift=16 GreenPrec=8 GreenShift=8 BluePrec=8 BlueShift=0
alpha
masked
}</pre>
}</code>
</descr>
</element>

View File

@ -587,9 +587,9 @@
<p>
<var>PublicID</var> is a <var>String</var> property that represent the Public Identifier for content in the XML input source. PublicID contains a value in the following format:
</p>
<pre>
<code>
[Prefix]//[OwnerID]//[TextClass] [TextDescription]//[Language]//[DisplayVersion]
</pre>
</code>
<p>
Where the components have the following values and meanings:
</p>
@ -634,9 +634,9 @@
<p>
For example, the PublicID for DocBook version 5 is:
</p>
<pre>
-//OASIS//DTD DocBook V5.0//EN
</pre>
<code>
-//OASIS//DTD DocBook V5.0//EN
</code>
<p>
Use SystemID to get the URI (or URL) for the resource.
</p>

View File

@ -149,11 +149,11 @@
<p>
IsValidXmlEncoding is a Boolean function used to determine if the value specified in Value is a valid XML encoding name. The encoding name is used in the XML declaration for a document. For instance:
</p>
<pre>&lt;?xml encoding='UTF-8'?&gt;</pre>
<code>&lt;?xml encoding='UTF-8'?&gt;</code>
<p>
or:
</p>
<pre>&lt;?xml encoding='EUC-JP'?&gt;</pre>
<code>&lt;?xml encoding='EUC-JP'?&gt;</code>
</descr>
<seealso/>
</element>

View File

@ -499,7 +499,7 @@
<p>
<var>BeautifyLineXY</var> is a <var>String</var> function used to combine the values in the <var>Filename</var>, <var>Line</var>, <var>X</var> and <var>Y</var> arguments into a formatted message. The message is in the form:
</p>
<pre>examplefile.pas (123, 1) The error message goes here.</pre>
<code>examplefile.pas (123, 1) The error message goes here.</code>
<p>
<var>Filename</var> contains a file name used at the start of the formatted message.
</p>

View File

@ -206,14 +206,15 @@ Based on the specification defined by the Unicode consortium, at:
http://unicode.org/faq/utf_bom.html#utf16-7
</url>
</p>
<pre>
<p>
Q: Are there any 16-bit values that are invalid?
</p>
<p>
A: Unpaired surrogates are invalid in UTFs. These include any value in the
range D800 to DBFF not followed by a value in the range DC00 to DFFF, or
any value in the range DC00 to DFFF not preceded by a value in the range
D800 to DBFF. [AF]
</pre>
</p>
<p>
Use ANextChar = #0 to indicate that there is no next char.
</p>

View File

@ -4615,12 +4615,12 @@
<p>
Class holding the reference sides of the anchors of a TControl. Every TControl has four AnchorSides: AnchorSide[akLeft], AnchorSide[akRight], AnchorSide[akTop] and AnchorSide[akBottom]. Normally if Anchors contain akLeft, and the Parent is resized, the LCL tries to keep the distance between the left side of the control and the right side of its parent client area. With AnchorSide[akLeft] you can define a different reference side. The kept distance is defined by the BorderSpacing. For example:
</p>
<pre>
+-----+ +-----+
| B | | C |
| | +-----+
+-----+
</pre>
<code>
+-----+ +-----+
| B | | C |
| | +-----+
+-----+
</code>
<p>
If you want to have the top of B the same as the top of C use
</p>
@ -4642,13 +4642,13 @@
<p>
Another example:
</p>
<pre>
+-------+
+---+ | |
| A | | B |
+---+ | |
+-------+
</pre>
<code>
+-------+
+---+ | |
| A | | B |
+---+ | |
+-------+
</code>
<p>
Centering A relative to B:
</p>
@ -16129,78 +16129,106 @@ if MyControl.CanSetFocus then
<p>
Docking means here: Combining several windows to one. A window can here be a TCustomForm or a floating control (undocked) or a TDockForm. A window can be docked to another to the left, right, top, bottom or "into". The docking source window will be resized, to fit to the docking target window.
</p>
<pre>
Example1: Docking "A" (source window) left to "B" (target window)
<p>
Example1: Docking "A" (source window) left to "B" (target window)
</p>
<code>
+---+ +----+
| A | -&gt; | B |
+---+ | |
+----+
</code>
<p>
Result: A new docktree will be created. Height of "A" will be resized to the height of "B". A splitter will be inserted between "A" and "B". And all three are children of the newly created TLazDockForm of the newly created TDockTree.
</p>
<code>
+------------+
|+---+|+----+|
|| A ||| B ||
|| ||| ||
|+---+|+----+|
+------------+
</code>
<ul>
<li>If "A" or "B" were floating controls, the floating dock sites are freed.</li>
<li>
If "A" or "B" were forms, their decorations (title bars and borders) are replaced by docked decorations.
</li>
<li>
If "A" had a TDockTree, it is freed and its child dockzones are merged to the docktree of "B".
</li>
</ul>
<p>
Analog for docking "C" left to "A":
</p>
<code>
+------------------+
|+---+|+---+|+----+|
|| C ||| A ||| B ||
|| ||| ||| ||
|+---+|+---+|+----+|
+------------------+
</code>
<p>
Example2: Docking A into B
</p>
<code>
+-----+
+---+ | |
| A | ---+-&gt; B |
+---+ | |
+-----+
</code>
<p>
Result: A new docktree will be created. "A" will be resized to the size of "B". Both will be put into a TLazDockPages control which is the child of the newly created TDockTree.
</p>
<code>
+-------+
|[B][A] |
|+-----+|
|| ||
|| A ||
|| ||
|+-----+|
+-------+
</code>
<p>
Every DockZone has siblings and children. Siblings can either be:
</p>
<ul>
<li>horizontally (left to right, splitter),</li>
<li>vertically (top to bottom, splitter), </li>
<li>or upon each other (as notebook pages).</li>
</ul>
<p>
<b>InsertControl</b> - undock a control and dock it into the dock site.
For example, to dock Form1 left to a Form2:
</p>
<code>InsertControl(Form1,alLeft,Form2);</code>
<p>
To dock into a TDockPage, use:
</p>
<code>Align=alCustom;</code>
<p>
<b>PositionDockRect</b> - calculates where a control would be placed, if it would
be docked via InsertControl.
</p>
<p>
<b>RemoveControl</b> - removes a control from the dock site.
</p>
+---+ +----+
| A | -&gt; | B |
+---+ | |
+----+
Result: A new docktree will be created. Height of "A" will be resized to
the height of "B".
A splitter will be inserted between "A" and "B".
And all three are children of the newly created TLazDockForm of the
newly created TDockTree.
+------------+
|+---+|+----+|
|| A ||| B ||
|| ||| ||
|+---+|+----+|
+------------+
If "A" or "B" were floating controls, the floating dock sites are freed.
If "A" or "B" were forms, their decorations (title bars and borders) are
replaced by docked decorations.
If "A" had a TDockTree, it is freed and its child dockzones are merged to
the docktree of "B". Analog for docking "C" left to "A":
+------------------+
|+---+|+---+|+----+|
|| C ||| A ||| B ||
|| ||| ||| ||
|+---+|+---+|+----+|
+------------------+
Example2: Docking A into B
+-----+
+---+ | |
| A | ---+-&gt; B |
+---+ | |
+-----+
Result: A new docktree will be created. "A" will be resized to the size
of "B". Both will be put into a TLazDockPages control which is the
child of the newly created TDockTree.
+-------+
|[B][A] |
|+-----+|
|| ||
|| A ||
|| ||
|+-----+|
+-------+
Every DockZone has siblings and children. Siblings can either be
- horizontally (left to right, splitter),
- vertically (top to bottom, splitter)
- or upon each other (as notebook pages).
InsertControl - undock control and dock it into the dock site. For example
dock Form1 left to a Form2:
InsertControl(Form1,alLeft,Form2);
To dock "into", into a TDockPage, use Align=alCustom.
PositionDockRect - calculates where a control would be placed, if it would
be docked via InsertControl.
RemoveControl - removes a control from the dock site.
GetControlBounds - TODO for Delphi compatibility
ResetBounds - TODO for Delphi compatibility
SetReplacingControl - TODO for Delphi compatibility
PaintSite - TODO for Delphi compatibility
</pre>
<p>
<b>GetControlBounds</b> - TODO: for Delphi compatibility.
</p>
<p>
<b>ResetBounds</b> - TODO: for Delphi compatibility.
</p>
<p>
<b>SetReplacingControl</b> - TODO: for Delphi compatibility.
</p>
<p>
<b>PaintSite</b> - TODO: for Delphi compatibility.
</p>
</descr>
<seealso>
<link id="TDockManager"/>
@ -16236,7 +16264,7 @@ if MyControl.CanSetFocus then
<element name="TDockTree.HitTest">
<short>
Returns the control and the part of the dockzone at the given coordinates
Returns the control and the part of the dockzone at the given coordinates.
</short>
<descr/>
<seealso/>
@ -16659,7 +16687,7 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
<element name="FindControlAtPosition">
<short>
Gets the control at the specified screen position
Gets the control at the specified screen position.
</short>
<descr>
<p>
@ -16831,7 +16859,7 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
<var>CancelDrag</var> is a procedure used to cancel an active drag operation. <var>CancelDrag</var> calls the <var>DragStop</var> method in the currently active <var>DragManager</var>.
</p>
<remark>
Please note: No actions are performed in the routine when DragManager has been assigned (contains Nil), or when DrageManager returns False from the IsDragging method.
No actions are performed in the routine when DragManager has been assigned (contains Nil), or when DragManager returns False from its IsDragging method.
</remark>
</descr>
<seealso>
@ -16843,7 +16871,7 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
<element name="SetCaptureControl">
<short>
Set the mouse capture to AWinControl or its child at the given coordinates
Set the mouse capture to AWinControl or its child at the given coordinates.
</short>
<descr/>
<seealso/>
@ -16860,7 +16888,7 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
<element name="GetCaptureControl">
<short>
Returns the current capturing TControl instance
Returns the current capturing TControl instance.
</short>
<descr>
<p>
@ -16889,7 +16917,7 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
<element name="CursorToString">
<short>
Returns a string for the name of the cursor as identified by an integer constant
Returns a string for the name of the cursor as identified by an integer constant.
</short>
<descr>
Calls CursorToIdent to find correct entry in look-up table.
@ -16907,7 +16935,7 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
<element name="StringToCursor">
<short>
<var>StringToCursor</var> - returns the cursor value corresponding to the name supplied
<var>StringToCursor</var> - returns the cursor value corresponding to the name supplied.
</short>
<descr>
<p>
@ -16936,7 +16964,7 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
<element name="CursorToIdent">
<short>
Uses look-up table to find cursor identifier corresponding to integer cursor constant
Uses look-up table to find cursor identifier corresponding to integer cursor constant.
</short>
<descr/>
<seealso/>
@ -16953,7 +16981,7 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
<element name="IdentToCursor">
<short>
Searches the Cursor name table for the given cursor name; returns True if found
Searches the Cursor name table for the given cursor name; returns True if found.
</short>
<descr>
If found, the cursor value (handle) is returned in <var>Cursor</var>.
@ -16971,7 +16999,7 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
<element name="CheckTransparentWindow">
<short>
Checks whether the handle for a windowed control (or a parent control) is transparent
Checks whether the handle for a windowed control (or a parent control) is transparent.
</short>
<descr>
<p>
@ -17228,7 +17256,7 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
<element name="Register">
<short>
Register the components provided by this unit or package, so that they can be instantiated
Register the components provided by this unit or package, so that they can be instantiated.
</short>
<descr>
<p>
@ -17245,7 +17273,7 @@ AControl.Align := AnchorAlign[alRight]; // contains [akRight, akTop, akBottom]
<topic name="AutoSize">
<short>
<var>AutoSize</var> - boolean property that permits the size of a control to be adjusted automatically
<var>AutoSize</var> - boolean property that permits the size of a control to be adjusted automatically.
</short>
<descr>
<p>
@ -17519,10 +17547,10 @@ BoundsRect.Left:=3; // WRONG: common newbie mistake
<code>Example1
If you want to have the top of B the same as the top of C:
+-----+ +-----+
| B | | C |
| | +-----+
+-----+
+-----+ +-----+
| B | | C |
| | +-----+
+-----+
use
B.AnchorSide[akTop].Control:=C;

View File

@ -786,8 +786,8 @@
<p>
When AAddDescription = <b>True</b> and AAddFilter = <b>False</b>, the following values would be stored in AStrings:
</p>
<pre>Text files (*.txt *.pas)
Binaries (*.exe)</pre>
<code>Text files (*.txt *.pas)
Binaries (*.exe)</code>
<p>
Adapted from the converter initially created for QtWSDialogs.pas.
</p>

View File

@ -1275,7 +1275,7 @@
<p>
<var>Mask</var> is a <var>String</var> property used to supply a mask which determines the file system objects displayed in the shell control. Mask can contain one or more mask values delimited by the Semicolon (<b>';'</b>) character. For example:
</p>
<pre>*.exe; br*.com; c??.*</pre>
<code>*.exe; br*.com; c??.*</code>
<p>
Changing the value in Mask causes the <var>Clear</var> method to be called for the shell control. In addition, the <var>Items</var> property calls its <var>Clear</var> method to remove entries stored in the property. The <var>PopulateWithRoot</var> method is called to re-populate the shell control using the new mask value.
</p>
@ -1693,15 +1693,15 @@
<p>
For <var>TObjectTypes</var>, a string is built to represents the set type using the format:
</p>
<pre>[otFolders,otNonFolders,otHidden]</pre>
<code>[otFolders,otNonFolders,otHidden]</code>
<p>
For <var>TMaskCaseSensitivity</var>, a string version of the enumeration value is used as the return value. For example:
</p>
<code>
<code>
'mcsPlatformDefault'
'mcsCaseInsensitive'
'mcsCaseSensitive'
</code>
</code>
</descr>
<seealso>
<link id="TObjectTypes"/>