diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-02-23 11:48:45 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-02-23 11:48:45 +0200 |
commit | 60defb75191abaa22d799c6def465aa14fd2c8da (patch) | |
tree | 3252f8708914f211adb9657ce412eaaa6d9fa78c | |
parent | d03fb89621f4d79824f1c394fc85a0ed008c32b5 (diff) | |
download | fpGUI-60defb75191abaa22d799c6def465aa14fd2c8da.tar.xz |
New Help menu item to show Command Line Parameter help.
* When showing this help, it closes open INF files.
-rw-r--r-- | docview/src/frm_main.pas | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas index ae584596..642f4765 100644 --- a/docview/src/frm_main.pas +++ b/docview/src/frm_main.pas @@ -102,6 +102,7 @@ type procedure miConfigureClicked(Sender: TObject); procedure miHelpProdInfoClicked(Sender: TObject); procedure miHelpAboutFPGui(Sender: TObject); + procedure miHelpCmdLineParams(Sender: TObject); procedure miDebugHeader(Sender: TObject); procedure miDebugHex(Sender: TObject); procedure miFileSaveTopicAsIPF(Sender: TObject); @@ -155,7 +156,7 @@ type procedure DisplaySelectedIndexTopic; procedure ProcessCommandLineParams; procedure SaveNavigatePoint; - procedure ShowParamHelp; + procedure ShowCmdLineParamHelp; function FindTopicForLink( Link: THelpLink ): TTopic; function FindTopicByResourceID( ID: word ): TTopic; function FindTopicByName(const AName: string): TTopic; @@ -382,6 +383,12 @@ begin TfpgMessageDialog.AboutFPGui; end; +procedure TMainForm.miHelpCmdLineParams(Sender: TObject); +begin + CloseFile(False); + ShowCmdLineParamHelp; +end; + procedure TMainForm.miDebugHeader(Sender: TObject); var f: THelpFile; @@ -2177,8 +2184,9 @@ begin SetPosition(292, 168, 132, 20); AddMenuItem('Contents...', '', nil); AddMenuItem('Help using help', '', nil); + AddMenuItem('Command line parameters', '', @miHelpCmdLineParams); AddMenuItem('-', '', nil); - AddMenuItem('About fpGUI Toolkit', '', @miHelpAboutFPGui); + AddMenuItem('About fpGUI Toolkit...', '', @miHelpAboutFPGui); AddMenuItem('Product Information...', '', @miHelpProdInfoClicked); end; @@ -2381,7 +2389,7 @@ begin begin if gCommandLineParams.IsParam('h') then begin - ShowParamHelp; + ShowCmdLineParamHelp; Exit; //==> end else if gCommandLineParams.IsParam('debuglog') then @@ -2439,7 +2447,7 @@ begin inc(CurrentHistoryIndex); end; -procedure TMainForm.ShowParamHelp; +procedure TMainForm.ShowCmdLineParamHelp; const le = LineEnding; var @@ -2450,7 +2458,7 @@ begin + 'Supported command line parameters:' + le + le + '<tt>' + ' <<filename> Load the help file <<filename>' + le - + ' -h Show this help' + le + + ' -h Show this help' + le + ' -k <<text> Search for keyword <<text> in open help files' + le + ' -n <<id> Open Topic with numeric ID equal to <<id>' + le + ' -s <<id> Open Topic with string ID equal to <<id>' + le |