RegisterIntegerConsts procedure
Registers some integer-to-identifier mappings.
Declaration
procedure RegisterIntegerConsts(IntegerType: Pointer;
IdentToIntFn: TIdentToInt;
IntToIdentFn: TIntToIdent)Description
RegisterIntegerConsts registers a pair of callbacks to be used
when an integer of type
IntegerType must be mapped to an
identifier (using
IntToIdentFn) or when an identifier must be
mapper to an integer (using
IdentToIntFn).
Component programmers can use RegisterIntegerConsts to associate
a series of identifier strings with integer values for a property. A
necessary condition is that the property should have a separate type
declared using the type integer syntax. If a type of integer is
defined in this way, an IDE can show symbolic names for the values of these
properties.
The IntegerType should be a pointer to the type information of
the integer type. The IntToIdentFn and IdentToIntFn
are two callbacks that will be used when converting between the identifier
and integer value and vice versa. The functions IdentToInt
and IntToIdent can be used to implement these callback
functions.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
