mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 10:19:23 +02:00
Docs: LCL/xmlpropstorage. Updates content in TCustomXMLPropStorage, TXMLPropStorage topics.
This commit is contained in:
parent
62e7f5665a
commit
0525ede13b
@ -93,10 +93,52 @@ at:
|
|||||||
|
|
||||||
<element name="TCustomXMLPropStorage">
|
<element name="TCustomXMLPropStorage">
|
||||||
<short>
|
<short>
|
||||||
Implements the base class for the XML Form's Session Properties Storage.
|
Implements the base class for XML storage of Form Session properties.
|
||||||
</short>
|
</short>
|
||||||
<descr/>
|
<descr>
|
||||||
<seealso/>
|
<p>
|
||||||
|
<var>TCustomXMLPropStorage</var> is a <var>TFormPropertyStorage</var>
|
||||||
|
descendant used to save or restore properties values in an XML file. It
|
||||||
|
introduces new properties, methods, and members needed to read or write values
|
||||||
|
in an XML file.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Values read or written using the class are defined in the SessionProperties for
|
||||||
|
a TForm or a TFrame instance. At design-time, use the SessionProperties
|
||||||
|
property editor in the Object Inspector to maintain the property names. At
|
||||||
|
run-time, the property names can be assigned using a string like:
|
||||||
|
</p>
|
||||||
|
<code>
|
||||||
|
Form1.SessionProperties := 'Width;Height;Image1.Width';
|
||||||
|
</code>
|
||||||
|
<p>
|
||||||
|
Use the FileName property to specify where the XML content is stored.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Use the RootNodePath property to specify the path to a node in the XML document
|
||||||
|
where the XML content is stored.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
At run-time, default handler routines (attached to the parent form) are used to
|
||||||
|
Save or Restore the content in the XML file when the form is created or
|
||||||
|
destroyed.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Use the StoredValues property to specify property names cannot be assigned
|
||||||
|
using the Object Inspector; this may be needed for properties which cannot be
|
||||||
|
represented as a singular value or does not have published visibility. Use the
|
||||||
|
OnSaveProperties and OnRestoreProperties event handlers to store or restore the
|
||||||
|
values for items in StoredValues.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
A demonstration program is located in the examples directory at:
|
||||||
|
</p>
|
||||||
|
<code>$(LazarusDir)/examples/propstorage</code>
|
||||||
|
</descr>
|
||||||
|
<seealso>
|
||||||
|
<link id="TXMLPropStorage"/>
|
||||||
|
<link id="#lcl.forms.TFormPropertyStorage">TFormPropertyStorage</link>
|
||||||
|
</seealso>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<!-- private -->
|
<!-- private -->
|
||||||
@ -116,8 +158,7 @@ Gets the value for the FileName property.
|
|||||||
</element>
|
</element>
|
||||||
<element name="TCustomXMLPropStorage.GetXMLFileName.Result">
|
<element name="TCustomXMLPropStorage.GetXMLFileName.Result">
|
||||||
<short>
|
<short>
|
||||||
The current value in the
|
The current value for the FileName property.
|
||||||
<link id="#lcl.xmlpropstorage.TCustomXMLPropStorage.FileName">TCustomXMLPropStorage.FileName</link> property.
|
|
||||||
</short>
|
</short>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
@ -127,7 +168,7 @@ The current value in the
|
|||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
<element name="TCustomXMLPropStorage.RootSection.Result">
|
<element name="TCustomXMLPropStorage.RootSection.Result">
|
||||||
<short>The current value of RootSection.</short>
|
<short>The current value for the RootSection property.</short>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.FixPath">
|
<element name="TCustomXMLPropStorage.FixPath">
|
||||||
@ -147,52 +188,47 @@ Turns '.' notation into '/' notation for the XPATH-like implementation in
|
|||||||
|
|
||||||
<element name="TCustomXMLPropStorage.XMLConfig">
|
<element name="TCustomXMLPropStorage.XMLConfig">
|
||||||
<short>
|
<short>
|
||||||
Property to access the <link
|
Property to access the XML configuration file where the content is stored.
|
||||||
id="#lcl.xmlpropstorage.TPropStorageXMLConfig">TPropStorageXMLConfig</link>.
|
|
||||||
</short>
|
</short>
|
||||||
<descr/>
|
<descr/>
|
||||||
<seealso/>
|
<seealso>
|
||||||
|
<link id="#lcl.xmlpropstorage.TPropStorageXMLConfig">TPropStorageXMLConfig</link>
|
||||||
|
</seealso>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.StorageNeeded">
|
<element name="TCustomXMLPropStorage.StorageNeeded">
|
||||||
<short>Ask the underlying storage object for an entry.</short>
|
<short>Ensures the underlying storage object is allocated at run-time.</short>
|
||||||
<descr/>
|
<descr/>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.StorageNeeded.ReadOnly">
|
<element name="TCustomXMLPropStorage.StorageNeeded.ReadOnly">
|
||||||
<short>If the item is read-only.</short>
|
<short><b>True</b> if the item is read-only. Not used in the method.</short>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.FreeStorage">
|
<element name="TCustomXMLPropStorage.FreeStorage">
|
||||||
<short>Frees an entry from the underlying storage object.</short>
|
<short>Frees the underlying storage object for the class instance.</short>
|
||||||
<descr/>
|
<descr/>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.DoReadString">
|
<element name="TCustomXMLPropStorage.DoReadString">
|
||||||
<short>
|
<short>
|
||||||
Implements the actual reading of a value from the underlying storage
|
Implements reading of a value from the underlying storage container.
|
||||||
container.
|
|
||||||
</short>
|
</short>
|
||||||
<descr/>
|
<descr/>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.DoReadString.Result">
|
<element name="TCustomXMLPropStorage.DoReadString.Result">
|
||||||
<short>The value of the section/ident requested.</short>
|
<short>The value of the section/ident requested.</short>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.DoReadString.Section">
|
<element name="TCustomXMLPropStorage.DoReadString.Section">
|
||||||
<short>The section to be read.</short>
|
<short>The section to be read.</short>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.DoReadString.Ident">
|
<element name="TCustomXMLPropStorage.DoReadString.Ident">
|
||||||
<short>The ident to be read.</short>
|
<short>The ident to be read.</short>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.DoReadString.TheDefault">
|
<element name="TCustomXMLPropStorage.DoReadString.TheDefault">
|
||||||
<short>If has no value then return this as default.</short>
|
<short>If no value is available then return this as the default value.</short>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.DoWriteString">
|
<element name="TCustomXMLPropStorage.DoWriteString">
|
||||||
@ -202,15 +238,12 @@ Implements writing of a string value to the underlying storage container.
|
|||||||
<descr/>
|
<descr/>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.DoWriteString.Section">
|
<element name="TCustomXMLPropStorage.DoWriteString.Section">
|
||||||
<short>The section to be written.</short>
|
<short>The section to be written.</short>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.DoWriteString.Ident">
|
<element name="TCustomXMLPropStorage.DoWriteString.Ident">
|
||||||
<short>The ident to be written.</short>
|
<short>The ident to be written.</short>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.DoWriteString.Value">
|
<element name="TCustomXMLPropStorage.DoWriteString.Value">
|
||||||
<short>The value to be written.</short>
|
<short>The value to be written.</short>
|
||||||
</element>
|
</element>
|
||||||
@ -220,7 +253,6 @@ Implements writing of a string value to the underlying storage container.
|
|||||||
<descr/>
|
<descr/>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.DoEraseSections.ARootSection">
|
<element name="TCustomXMLPropStorage.DoEraseSections.ARootSection">
|
||||||
<short>The path to the section that will be erased.</short>
|
<short>The path to the section that will be erased.</short>
|
||||||
</element>
|
</element>
|
||||||
@ -229,21 +261,67 @@ Implements writing of a string value to the underlying storage container.
|
|||||||
<short>
|
<short>
|
||||||
Name of the file where the property data is saved in XML format.
|
Name of the file where the property data is saved in XML format.
|
||||||
</short>
|
</short>
|
||||||
<descr/>
|
<descr>
|
||||||
|
<p>
|
||||||
|
Defaults to the application name with a '.xml' extension if no value is
|
||||||
|
specified in the property.
|
||||||
|
</p>
|
||||||
|
</descr>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomXMLPropStorage.RootNodePath">
|
<element name="TCustomXMLPropStorage.RootNodePath">
|
||||||
<short>Name of the root object path on your XML file.</short>
|
<short>Name of the root object path in the XML file.</short>
|
||||||
<descr/>
|
<descr>
|
||||||
|
<p>
|
||||||
|
Provides the name path to the XML node where the property values are stored in
|
||||||
|
FileName.
|
||||||
|
</p>
|
||||||
|
</descr>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TXMLPropStorage">
|
<element name="TXMLPropStorage">
|
||||||
<short>
|
<short>
|
||||||
Implements a class for XML Form Session Properties storage.
|
Implements a class for XML storage of Form Session properties.
|
||||||
</short>
|
</short>
|
||||||
<descr/>
|
<descr>
|
||||||
|
<p>
|
||||||
|
<var>TXMLPropStorage</var> is a <var>TCustomXMLPropStorage</var> descendant
|
||||||
|
used to save or restore properties values using an XML file. It introduces new
|
||||||
|
properties, methods, and members needed to read or write values in an XML file.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Values read or written using the class are defined in the SessionProperties for
|
||||||
|
a TForm or TFrame instance. At design-time, use the SessionProperties property
|
||||||
|
editor in the Object Inspector to maintain the property names. At run-time, the
|
||||||
|
property names can be assigned using a string like:
|
||||||
|
</p>
|
||||||
|
<code>
|
||||||
|
Form1.SessionProperties := 'Width;Height;Image1.Width';
|
||||||
|
</code>
|
||||||
|
<p>
|
||||||
|
Use the FileName property to specify where the XML content is stored.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Use the RootNodePath property to specify the path to a node in the XML document
|
||||||
|
where the XML content is stored.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
At run-time, default handler routines (attached to the parent form) are used to Save or Restore the content in the XML file.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Use the StoredValues property to specify property names cannot be assigned
|
||||||
|
using the Object Inspector; this may be needed for properties which cannot be
|
||||||
|
represented as a singular value or does not have published visibility. Use the
|
||||||
|
OnSaveProperties and OnRestoreProperties event handlers to store or restore the
|
||||||
|
values for items in StoredValues.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
A demonstration program is located in the examples directory at:
|
||||||
|
</p>
|
||||||
|
<code>$(LazarusDir)/examples/propstorage</code>
|
||||||
|
</descr>
|
||||||
<seealso>
|
<seealso>
|
||||||
<link id="#lcl.forms.TForm">TForm.SessionProperties</link>
|
<link id="#lcl.forms.TForm">TForm.SessionProperties</link>
|
||||||
<link id="#lcl.inipropstorage.TINIPropStorage">TINIPropStorage</link>
|
<link id="#lcl.inipropstorage.TINIPropStorage">TINIPropStorage</link>
|
||||||
@ -513,10 +591,13 @@ Saves the content in XMLConfig to the specified TStream instance.
|
|||||||
<element name="Register">
|
<element name="Register">
|
||||||
<short>
|
<short>
|
||||||
Registers
|
Registers
|
||||||
<link id="#lcl.xmlpropstorage.TXMLPropStorage">TXMLPropStorage</link> on the 'Misc' tab of the component palette.
|
<link id="#lcl.xmlpropstorage.TXMLPropStorage">TXMLPropStorage</link>
|
||||||
|
on the 'Misc' tab in the component palette.
|
||||||
</short>
|
</short>
|
||||||
<descr/>
|
<descr/>
|
||||||
<seealso/>
|
<seealso>
|
||||||
|
<link id="#lcl.xmlpropstorage.TXMLPropStorage">TXMLPropStorage</link>
|
||||||
|
</seealso>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
</module>
|
</module>
|
||||||
|
Loading…
Reference in New Issue
Block a user