]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/helpext.h
Window management and sizer layout corrections
[wxWidgets.git] / include / wx / generic / helpext.h
1 /*-*- c++ -*-********************************************************
2 * helpext.h - an external help controller for wxWindows *
3 * *
4 * (C) 1998 by Karsten Ballüder (Ballueder@usa.net) *
5 * *
6 * $Id$
7 *******************************************************************/
8
9 #ifndef __WX_HELPEXT_H_
10 #define __WX_HELPEXT_H_
11
12 #if wxUSE_HELP
13
14 #ifdef __GNUG__
15 # pragma interface "wxexthlp.h"
16 #endif
17
18 #include "wx/generic/helphtml.h"
19
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
25 #endif
26
27 /**
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.
31
32 The map file contains two or three fields per line:
33 numeric_id relative_URL [; comment/documentation]
34
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.
42
43 Lines starting with ';' will be ignored.
44 */
45
46 class WXDLLEXPORT wxExtHelpController : public wxHTMLHelpControllerBase
47 {
48 DECLARE_CLASS(wxExtHelpController)
49 public:
50 wxExtHelpController(void);
51
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
56 window.
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.
59 */
60 // Obsolete form
61 void SetBrowser(wxString const & browsername = WXEXTHELP_DEFAULTBROWSER,
62 bool isNetscape = WXEXTHELP_DEFAULTBROWSER_IS_NETSCAPE);
63
64 // Set viewer: new name for SetBrowser
65 virtual void SetViewer(const wxString& viewer = WXEXTHELP_DEFAULTBROWSER, long flags = wxHELP_NETSCAPE);
66
67 private:
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&);
74 };
75
76 #endif // wxUSE_HELP
77
78 #endif // __WX_HELPEXT_H_