1 /*-*- c++ -*-********************************************************
2 * helpext.h - an external help controller for wxWindows *
4 * (C) 1998 by Karsten Ballüder (Ballueder@usa.net) *
7 *******************************************************************/
9 #ifndef __WX_HELPEXT_H_
10 #define __WX_HELPEXT_H_
15 # pragma interface "wxexthlp.h"
18 #include "wx/generic/helphtml.h"
20 #ifndef WXEXTHELP_DEFAULTBROWSER
21 /// Default browser name.
22 # define WXEXTHELP_DEFAULTBROWSER _T("netscape")
23 /// Is default browse a variant of netscape?
24 # define WXEXTHELP_DEFAULTBROWSER_IS_NETSCAPE TRUE
28 This class implements help via an external browser.
29 It requires the name of a directory containing the documentation
30 and a file mapping numerical Section numbers to relative URLS.
32 The map file contains two or three fields per line:
33 numeric_id relative_URL [; comment/documentation]
35 The numeric_id is the id used to look up the entry in
36 DisplaySection()/DisplayBlock(). The relative_URL is a filename of
37 an html file, relative to the help directory. The optional
38 comment/documentation field (after a ';') is used for keyword
39 searches, so some meaningful text here does not hurt.
40 If the documentation itself contains a ';', only the part before
41 that will be displayed in the listbox, but all of it used for search.
43 Lines starting with ';' will be ignored.
46 class WXDLLEXPORT wxExtHelpController
: public wxHTMLHelpControllerBase
48 DECLARE_CLASS(wxExtHelpController
)
50 wxExtHelpController(void);
52 /** Tell it which browser to use.
53 The Netscape support will check whether Netscape is already
54 running (by looking at the .netscape/lock file in the user's
55 home directory) and tell it to load the page into the existing
57 @param browsername The command to call a browser/html viewer.
58 @param isNetscape Set this to TRUE if the browser is some variant of Netscape.
61 void SetBrowser(wxString
const & browsername
= WXEXTHELP_DEFAULTBROWSER
,
62 bool isNetscape
= WXEXTHELP_DEFAULTBROWSER_IS_NETSCAPE
);
64 // Set viewer: new name for SetBrowser
65 virtual void SetViewer(const wxString
& viewer
= WXEXTHELP_DEFAULTBROWSER
, long flags
= wxHELP_NETSCAPE
);
68 /// How to call the html viewer.
69 wxString m_BrowserName
;
70 /// Is the viewer a variant of netscape?
71 bool m_BrowserIsNetscape
;
72 /// Call the browser using a relative URL.
73 virtual bool DisplayHelp(const wxString
&);
78 #endif // __WX_HELPEXT_H_