Sign in Join
FPDoc Onlineexperiment

TStringTableResource class

In unit stringtableresource

String table resource type

Declaration

pascal
TStringTableResource = class(TAbstractResource)

Inheritance

  1. TStringTableResource
  2. TAbstractResource

Description

This class represents a resource of type RT_STRING.

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.

For these reasons, it is not possible to set the name of a string table: it is autogenerated from the value of FirstID property. Moreover, Count property is always 16.

Strings property is provided to access and modify individual strings.

This class doesn't allow its type to be changed to anything else than RT_BITMAP. Its name can't be changed too. Attempts to do so result in a EResourceDescChangeNotAllowedException.

Properties

FirstIDpublicThe ID of first the string contained in the string table
LastIDpublicThe ID of the last string contained in the string table
CountpublicThe number of strings contained in the string table
StringspublicIndexed array of strings in the string table

Methods

GetTypeprotectedReturns the type of the resource
GetNameprotectedReturns the name of the resource
ChangeDescTypeAllowedprotectedReports whether changing the type of resource type or name is allowed
ChangeDescValueAllowedprotectedReports whether changing the value of resource type or name is allowed
NotifyResourcesLoadedprotectedTells the resource that all resources have been loaded
CreatepublicCreates a new string table resource
DestroypublicDestroys the object
UpdateRawDatapublicUpdates RawData stream.

Inherited

From TAbstractResource (20)

_Type CacheData Characteristics CodePage CompareContents DataOffset DataSize DataVersion HeaderSize LangID MemoryFlags Name Owner OwnerList RawData SetChildOwner SetCustomRawDataStream SetDescOwner SetOwnerList Version

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.