summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/frm_main.pas28
-rw-r--r--src/newview_fpgui.lpi19
2 files changed, 46 insertions, 1 deletions
diff --git a/src/frm_main.pas b/src/frm_main.pas
index 7851a5a0..6af1a825 100644
--- a/src/frm_main.pas
+++ b/src/frm_main.pas
@@ -38,6 +38,7 @@ type
procedure miFileOpenClicked(Sender: TObject);
procedure miHelpProdInfoClicked(Sender: TObject);
procedure miHelpAboutFPGui(Sender: TObject);
+ procedure miDebugHeader(Sender: TObject);
procedure SetHelpFile(const AValue: TfpgString);
procedure btnShowIndex(Sender: TObject);
procedure FileOpen;
@@ -94,6 +95,27 @@ begin
TfpgMessageDialog.AboutFPGui;
end;
+procedure TMainForm.miDebugHeader(Sender: TObject);
+var
+ f: THelpFile;
+ i: integer;
+begin
+ Memo1.Lines.Clear;
+ f := THelpFile(Files[0]);
+ with Memo1.Lines do
+ begin
+ Add('Filename: ' + f.Filename);
+ Add('----------');
+ Add('Title: ' + f.Title);
+ Add('DictionaryCount:' + IntToStr(f.DictionaryCount));
+ Add('TopicCount: ' + IntToStr(f.TopicCount));
+ Add(' ');
+ Add('Dictionary contents:');
+ for i := 0 to f.DictionaryCount-1 do
+ Add('[' + IntToStr(i) + '] = <' + f.DictionaryWords[i] + '>');
+ end;
+end;
+
procedure TMainForm.SetHelpFile(const AValue: TfpgString);
begin
if FHelpFile = AValue then
@@ -182,7 +204,7 @@ var
Node: TfpgTreeNode;
Topic: TTopic;
begin
- ProfileEvent( 'Load contents outline' );
+ ProfileEvent( 'Load contents treeview' );
tvContents.RootNode.Clear;
@@ -195,6 +217,7 @@ begin
HelpFile:= THelpFile(Files[ FileIndex ]);
ProfileEvent( 'File ' + IntToStr( FileIndex ) );
TopicIndex:= 0;
+ ProfileEvent('TopicCount=' + IntToStr(HelpFile.TopicCount));
while TopicIndex < HelpFile.TopicCount do
begin
Topic := HelpFile.Topics[ TopicIndex ];
@@ -202,6 +225,7 @@ begin
begin
if Topic.ContentsLevel = 1 then
begin
+ ProfileEvent(' > Topic (level 1): ' + Topic.Title);
Node := tvContents.RootNode.AppendText(Topic.Title);
Node.Data := Topic;
inc( TopicIndex );
@@ -428,6 +452,8 @@ begin
AddMenuItem('Contents...', '', nil);
AddMenuItem('Help using help', '', nil);
AddMenuItem('-', '', nil);
+ AddMenuItem('Debug: Header', '', @miDebugHeader);
+ AddMenuItem('-', '', nil);
AddMenuItem('About fpGUI Toolkit', '', @miHelpAboutFPGui);
AddMenuItem('Product Information...', '', @miHelpProdInfoClicked);
end;
diff --git a/src/newview_fpgui.lpi b/src/newview_fpgui.lpi
index 05278266..dbdefa59 100644
--- a/src/newview_fpgui.lpi
+++ b/src/newview_fpgui.lpi
@@ -106,7 +106,26 @@
<IncludeFiles Value="$(ProjOutDir)/"/>
<UnitOutputDirectory Value="units"/>
</SearchPaths>
+ <Parsing>
+ <Style Value="1"/>
+ <SyntaxOptions>
+ <CStyleOperator Value="False"/>
+ <AllowLabel Value="False"/>
+ <CPPInline Value="False"/>
+ </SyntaxOptions>
+ </Parsing>
+ <CodeGeneration>
+ <Optimizations>
+ <OptimizationLevel Value="0"/>
+ </Optimizations>
+ </CodeGeneration>
+ <Linking>
+ <Debugging>
+ <GenerateDebugInfo Value="True"/>
+ </Debugging>
+ </Linking>
<Other>
+ <CustomOptions Value="-O-"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>