stringtableresource.xml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <fpdoc-descriptions>
  3. <package name="fcl-res">
  4. <!--
  5. ====================================================================
  6. stringtableresource
  7. ====================================================================
  8. -->
  9. <module name="stringtableresource">
  10. <short>Contains a string table resource type</short>
  11. <descr>
  12. <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>
  13. <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>
  14. </descr>
  15. <!-- unresolved type reference Visibility: default -->
  16. <element name="Classes">
  17. </element>
  18. <!-- unresolved type reference Visibility: default -->
  19. <element name="SysUtils">
  20. </element>
  21. <!-- unresolved type reference Visibility: default -->
  22. <element name="resource">
  23. </element>
  24. <!-- object Visibility: default -->
  25. <element name="EStringTableResourceException">
  26. <short>Base class for string table resource-related exceptions</short>
  27. </element>
  28. <!-- object Visibility: default -->
  29. <element name="EStringTableNameNotAllowedException">
  30. <short>The name of the resource isn't allowed</short>
  31. <descr>
  32. <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>
  33. </descr>
  34. <seealso>
  35. <link id="TStringTableResource.Create"/>
  36. </seealso>
  37. </element>
  38. <!-- object Visibility: default -->
  39. <element name="EStringTableIndexOutOfBoundsException">
  40. <short>The ID of the string is out of range</short>
  41. <descr>
  42. <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>
  43. </descr>
  44. <seealso>
  45. <link id="TStringTableResource"/>
  46. <link id="TStringTableResource.Strings"/>
  47. <link id="TStringTableResource.FirstID"/>
  48. <link id="TStringTableResource.LastID"/>
  49. </seealso>
  50. </element>
  51. <!-- resource string Visibility: default -->
  52. <element name="SNameNotAllowed">
  53. </element>
  54. <!-- resource string Visibility: default -->
  55. <element name="SIndexOutOfBounds">
  56. </element>
  57. <!-- object Visibility: default -->
  58. <element name="TStringTableResource">
  59. <short>String table resource type</short>
  60. <descr>
  61. <p>This class represents a resource of type <link id="resource.RT_STRING">RT_STRING</link>.</p>
  62. <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>
  63. <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>
  64. <p><link id="TStringTableResource.Strings">Strings</link> property is provided to access and modify individual strings.</p>
  65. <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>
  66. </descr>
  67. </element>
  68. <!-- constructor Visibility: public -->
  69. <element name="TStringTableResource.Create">
  70. <short>Creates a new string table resource</short>
  71. <descr>
  72. <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>
  73. <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>
  74. </descr>
  75. <errors>
  76. <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>
  77. </errors>
  78. <seealso>
  79. <link id="TStringTableResource.FirstID"/>
  80. </seealso>
  81. </element>
  82. <!-- argument Visibility: default -->
  83. <element name="TStringTableResource.Create.aType">
  84. <short>Ignored. Can be <var>nil</var>.</short>
  85. </element>
  86. <!-- argument Visibility: default -->
  87. <element name="TStringTableResource.Create.aName">
  88. <short>The name of the resource. Must be of type dtID and in the range 1-4096</short>
  89. </element>
  90. <!-- property Visibility: public -->
  91. <element name="TStringTableResource.FirstID">
  92. <short>The ID of first the string contained in the string table</short>
  93. <descr>
  94. <p>This property holds the value of the ID of the first string of the table. It is a multiple of 16.</p>
  95. <p>The name of the resource is determined by this property, so changing FirstID also changes the resource name.</p>
  96. <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>
  97. </descr>
  98. <seealso>
  99. <link id="TStringTableResource"/>
  100. <link id="TStringTableResource.LastID"/>
  101. <link id="TStringTableResource.Strings"/>
  102. </seealso>
  103. </element>
  104. <!-- property Visibility: public -->
  105. <element name="TStringTableResource.LastID">
  106. <short>The ID of the last string contained in the string table</short>
  107. <descr>
  108. <p>The value of this property is always <link id="TStringTableResource.FirstID">FirstID</link>+15.</p>
  109. </descr>
  110. <seealso>
  111. <link id="TStringTableResource"/>
  112. <link id="TStringTableResource.FirstID"/>
  113. <link id="TStringTableResource.Strings"/>
  114. </seealso>
  115. </element>
  116. <!-- property Visibility: public -->
  117. <element name="TStringTableResource.Count">
  118. <short>The number of strings contained in the string table</short>
  119. <descr>
  120. <p>Since a string table resource always contains exactly 16 strings, this property is always 16</p>
  121. </descr>
  122. <seealso>
  123. <link id="TStringTableResource"/>
  124. <link id="TStringTableResource.FirstID"/>
  125. </seealso>
  126. </element>
  127. <!-- property Visibility: public -->
  128. <element name="TStringTableResource.Strings">
  129. <short>Indexed array of strings in the string table</short>
  130. <descr>
  131. <p>This property can be used to access all strings in the object.</p>
  132. <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>
  133. <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>
  134. </descr>
  135. <seealso>
  136. <link id="TStringTableResource"/>
  137. <link id="TStringTableResource.FirstID"/>
  138. <link id="TStringTableResource.LastID"/>
  139. </seealso>
  140. </element>
  141. <!-- argument Visibility: default -->
  142. <element name="TStringTableResource.Strings.id">
  143. <short>The ID of the string to be accessed</short>
  144. </element>
  145. </module> <!-- stringtableresource -->
  146. </package>
  147. </fpdoc-descriptions>