summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2009-11-05 17:45:24 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2009-11-05 17:45:24 +0200
commit53631c0d2fdd41f8fb405afe29fbeed04f103e4d (patch)
tree93f12016cc92de8294fab6a4448503338af594c3
parent27e7d746dc2afcead9fe6c2c2e4abdc2574fcd0f (diff)
downloadfpGUI-53631c0d2fdd41f8fb405afe29fbeed04f103e4d.tar.xz
Surfaced more INF header information as properties.
-rw-r--r--src/HelpFile.pas19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/HelpFile.pas b/src/HelpFile.pas
index 718577a3..b3ee7317 100644
--- a/src/HelpFile.pas
+++ b/src/HelpFile.pas
@@ -51,6 +51,9 @@ type
THelpFile = class(TObject)
+ private
+ function GetStringResourceIDCount: integer;
+ function GetNumericResourceIDCount: integer;
protected
_Filename : string;
_FileSize : longint;
@@ -130,6 +133,8 @@ type
property Topics[ Index: longint ]: TTopic read GetTopic;
property TopicList: TList read _Topics;
property TopicCount: longint read GetTopicCount;
+ property StringResourceIDCount: integer read GetStringResourceIDCount;
+ property NumericResourceIDCount: integer read GetNumericResourceIDCount;
property Index: TIndex read GetIndex;
property Filename: string read _FileName;
@@ -344,6 +349,16 @@ Begin
Result := Topic.HelpFile as THelpFile;
end;
+function THelpFile.GetStringResourceIDCount: integer;
+begin
+ Result := _pHeader^.nname;
+end;
+
+function THelpFile.GetNumericResourceIDCount: integer;
+begin
+ Result := _pHeader^.nres;
+end;
+
procedure THelpFile.InitMembers;
begin
_SlotDataSize := 0;
@@ -743,9 +758,11 @@ begin
exit;
if _pResourceData = nil then
+ begin
ReadFileBlock( _pResourceData,
_pHeader^.resstart,
- _pHeader^.nres * sizeof( uint16 ) * 2 ); // list of IDs, list of topics
+ (_pHeader^.nres * sizeof( uint16 )) * 2 ); // list of IDs, list of topics
+ end;
pResourceIDs := _pResourceData;
pTopicIndices := _pResourceData