summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/fcl-res/xml/stringtableresource.xml
blob: b1489db76d74656d7d3c17d190e985ded425bfc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?xml version="1.0" encoding="ISO-8859-1"?>
<fpdoc-descriptions>
<package name="fcl-res">

<!--
  ====================================================================
    stringtableresource
  ====================================================================
-->

<module name="stringtableresource">
<short>Contains a string table resource type</short>
<descr>
<p>This unit contains <link id="TStringTableResource"/>, a <link id="resource.TAbstractResource">TAbstractResource</link> descendant specialized in handling resource of type <link id="resource.RT_STRING">RT_STRING</link>.</p>
<p>Adding this unit to a program's <var>uses</var> clause registers class <link id="TStringTableResource"/> for type <link id="resource.RT_STRING">RT_STRING</link> with <link id="resfactory.TResourceFactory">TResourceFactory</link>.</p>
</descr>

<!-- unresolved type reference Visibility: default -->
<element name="Classes">
</element>

<!-- unresolved type reference Visibility: default -->
<element name="SysUtils">
</element>

<!-- unresolved type reference Visibility: default -->
<element name="resource">
</element>

<!-- object Visibility: default -->
<element name="EStringTableResourceException">
<short>Base class for string table resource-related exceptions</short>
</element>

<!-- object Visibility: default -->
<element name="EStringTableNameNotAllowedException">
<short>The name of the resource isn't allowed</short>
<descr>
<p>This exception is raised by constructor <link id="TStringTableResource.Create"/> if the name of the resource isn't of type <link id="resource.TDescType.dtID">dtID</link> and/or its name is not in the range 1-4096.</p>
</descr>
<seealso>
<link id="TStringTableResource.Create"/>
</seealso>
</element>

<!-- object Visibility: default -->
<element name="EStringTableIndexOutOfBoundsException">
<short>The ID of the string is out of range</short>
<descr>
<p>This exception is raised when the id specified to access a string of <link id="TStringTableResource.Strings"/> property is not in the range <link id="TStringTableResource.FirstID"/> - <link id="TStringTableResource.LastID"/>.</p>
</descr>
<seealso>
<link id="TStringTableResource"/>
<link id="TStringTableResource.Strings"/>
<link id="TStringTableResource.FirstID"/>
<link id="TStringTableResource.LastID"/>
</seealso>
</element>

<!-- resource string Visibility: default -->
<element name="SNameNotAllowed">
</element>

<!-- resource string Visibility: default -->
<element name="SIndexOutOfBounds">
</element>


<!-- object Visibility: default -->
<element name="TStringTableResource">
<short>String table resource type</short>
<descr>
<p>This class represents a resource of type <link id="resource.RT_STRING">RT_STRING</link>.</p>
<p>A string table is a resource containing strings, identified by an integer id in the range 0-65535. A string table contains exactly 16 strings, and its name is an ID in the range 1-4096, determined by the highest 12 bits of the strings ID it contains, plus one. That is, a string table with 1 as name holds strings with IDs from 0 to 15, string table 2 contains strings with IDs from 16 to 31 and so on. There is no difference between an empty string and a non-existant string.</p>
<p>For these reasons, it is not possible to set the name of a string table: it is autogenerated from the value of <link id="TStringTableResource.FirstID">FirstID</link> property. Moreover, <link id="TStringTableResource.Count">Count</link> property is always 16.</p>
<p><link id="TStringTableResource.Strings">Strings</link> property is provided to access and modify individual strings.</p>
<remark>This class doesn't allow its type to be changed to anything else than <link id="resource.RT_BITMAP">RT_BITMAP</link>. Its name can't be changed too. Attempts to do so result in a <link id="resource.EResourceDescChangeNotAllowedException">EResourceDescChangeNotAllowedException</link>.</remark>
</descr>
</element>

<!-- constructor Visibility: public -->
<element name="TStringTableResource.Create">
<short>Creates a new string table resource</short>
<descr>
<p>Please note that <var>aType</var> parameter is not used, since this class always uses <link id="resource.RT_STRING">RT_STRING</link> as type.</p>
<remark><var>aName</var> must be a <link id="resource.TResourceDesc">TResourceDesc</link> of type <link id="resource.TDescType.dtID">dtID</link> and its value must be in the range 1-4096, otherwise an <link id="EStringTableNameNotAllowedException"/> exception is raised.</remark>
</descr>
<errors>
<p>If <var>aName</var> is not of type <link id="resource.TDescType.dtID">dtID</link> and/or its value isn't in the range 1-4096, an <link id="EStringTableNameNotAllowedException"/> exception is raised.</p>
</errors>
<seealso>
<link id="TStringTableResource.FirstID"/>
</seealso>
</element>

<!-- argument Visibility: default -->
<element name="TStringTableResource.Create.aType">
<short>Ignored. Can be <var>nil</var>.</short>
</element>

<!-- argument Visibility: default -->
<element name="TStringTableResource.Create.aName">
<short>The name of the resource. Must be of type dtID and in the range 1-4096</short>
</element>

<!-- property Visibility: public -->
<element name="TStringTableResource.FirstID">
<short>The ID of first the string contained in the string table</short>
<descr>
<p>This property holds the value of the ID of the first string of the table. It is a multiple of 16.</p>
<p>The name of the resource is determined by this property, so changing FirstID also changes the resource name.</p>
<remark>If an attempt of setting this property to an integer that isn't a multiple of 16 is made, the value is automatically corrected to the closest multiple of 16 less than the value specified (e.g. setting it to 36 sets it to 32).</remark>
</descr>
<seealso>
<link id="TStringTableResource"/>
<link id="TStringTableResource.LastID"/>
<link id="TStringTableResource.Strings"/>
</seealso>
</element>

<!-- property Visibility: public -->
<element name="TStringTableResource.LastID">
<short>The ID of the last string contained in the string table</short>
<descr>
<p>The value of this property is always <link id="TStringTableResource.FirstID">FirstID</link>+15.</p>
</descr>
<seealso>
<link id="TStringTableResource"/>
<link id="TStringTableResource.FirstID"/>
<link id="TStringTableResource.Strings"/>
</seealso>
</element>

<!-- property Visibility: public -->
<element name="TStringTableResource.Count">
<short>The number of strings contained in the string table</short>
<descr>
<p>Since a string table resource always contains exactly 16 strings, this property is always 16</p>
</descr>
<seealso>
<link id="TStringTableResource"/>
<link id="TStringTableResource.FirstID"/>
</seealso>
</element>

<!-- property Visibility: public -->
<element name="TStringTableResource.Strings">
<short>Indexed array of strings in the string table</short>
<descr>
<p>This property can be used to access all strings in the object.</p>
<remark>Strings are accessed by their ID: valid elements range from <link id="TStringTableResource.FirstID">FirstID</link> to <link id="TStringTableResource.LastID">LastID</link>. If the index specified isn't in this range, an <link id="EStringTableIndexOutOfBoundsException"/> exception is raised.</remark>
<remark>If you need to access <link id="resource.TAbstractResource.RawData">RawData</link> after you modified strings, be sure to call <link id="resource.TAbstractResource.UpdateRawData">UpdateRawData</link> first. This isn't needed however when resource is written to a stream, since <link id="resource.TResources">TResources</link> takes care of it.</remark>
</descr>
<seealso>
<link id="TStringTableResource"/>
<link id="TStringTableResource.FirstID"/>
<link id="TStringTableResource.LastID"/>
</seealso>
</element>

<!-- argument Visibility: default -->
<element name="TStringTableResource.Strings.id">
<short>The ID of the string to be accessed</short>
</element>

</module> <!-- stringtableresource -->

</package>
</fpdoc-descriptions>