TRKiniSettingVariant = (sv_Undef,sv_String,sv_Bool,sv_Integer,
sv_Real,sv_Color,sv_Pen,sv_WinPos,sv_Font,sv_Binary);
{...}
PRKiniSettingRecord = ^TRKiniSettingRecord;
TRKiniSettingRecord =
packed record
SetupControl : TControl;
dirty : boolean;
removed : boolean;
case TRKiniSettingVariant
of
sv_Undef : (vUndef : int64);
{ 8 bytes }
sv_Bool : (vBool : boolean);
{ svWinpos }
sv_Integer : (vInteger : longint);
sv_Real : (vReal : double);
sv_Color : (vColor : TColor);
sv_Pen : (vPen : longint);
{ sv_WinPos : see above }
{ sv_Binary,sv_String,sv_Font : see below }
end;
{ record size : 20 b }
PRKiniSettingRecordB = ^TRKiniSettingRecordB;
TRKiniSettingRecordB =
packed record
SetupControl : TControl;
dirty : boolean;
removed : boolean;
vBinary : TRKIniBinaryArray;
BDummy : DWord;
end;
PRKiniSettingRecordS = ^TRKiniSettingRecordS;
TRKiniSettingRecordS =
packed record
SetupControl : TControl;
dirty : boolean;
removed : boolean;
vString : TRKIniDynString;
BDummy : DWord;
end;
{...}
TRKiniSettingValue =
class
sType : TRKiniSettingVariant;
gType : TRKIniSettingsGrouping;
digits : Smallint;
Uplink : TRKIniSettingTable;
ForwardLink : TRKiniSettingValue;
pGroupItems : PRKiniSettingRecord;
{ 0 : Default. 1..n : Items }
IniGroup,IniItem : TRKiniSettingName;
FirstRecord,FieldLength,ExtraRecords : word;
procedure SetupGrouping (imax : Smallint);
procedure Create_General (imax : Smallint; IG,II : TRKiniSettingName;
const Def; pCC : PAoTC; maxCC : Smallint; OwnerTable : TRKIniSettingTable);
constructor Create_String (imax : Smallint; IG,II : TRKiniSettingName;
Def : ShortString;
EC :
array of TEdit; OwnerTable : TRKIniSettingTable);
constructor Create_Bool (imax : Smallint; IG,II : TRKiniSettingName;
Def : Boolean; BC :
array of TButtonControl; OwnerTable : TRKIniSettingTable);
constructor Create_Integer (imax : Smallint; IG,II : TRKiniSettingName;
Def : longint;
EC :
array of TEdit; OwnerTable : TRKIniSettingTable);
{...}
function GetString (ix : Smallint) : ShortString;
function GetBool (ix : Smallint) : boolean;
function GetInteger (ix : Smallint) : longint;
function GetReal (ix : Smallint) : Double;
function GetColor (ix : Smallint) : TColor;
function GetPenWidth (ix : Smallint) : Smallint;
{...}
{ speziell für ein Projekt: }
TBPMLogSettings =
class (TRKIniSettingTable)
public
Station_Node : TRKiniSettingValue;
{ group }
Station_Description : TRKiniSettingValue;
{ group }
{...}
constructor TBPMLogSettings.CreateTable (IC : TRKIniClass);
var CSection : ShortString;
begin
inherited Create (IC);
with BLMainForm
do
begin
CSection := '
Station';
Station_Node := TRKiniSettingValue.Create_Integer (-maxStationNo,CSection,
'
Node',0, [] ,self);
Station_Description := TRKiniSettingValue.Create_String (-maxStationNo,CSection,
'
Description','
', [] ,self);
{...}