]>
git.saurik.com Git - wxWidgets.git/blob - interface/generic/helpext.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxExtHelpController
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
11 @class wxExtHelpController
14 This class implements help via an external browser.
15 It requires the name of a directory containing the documentation
16 and a file mapping numerical Section numbers to relative URLS.
18 The map file contains two or three fields per line:
19 numeric_id relative_URL [; comment/documentation]
21 The numeric_id is the id used to look up the entry in
22 DisplaySection()/DisplayBlock(). The relative_URL is a filename of
23 an html file, relative to the help directory. The optional
24 comment/documentation field (after a ';') is used for keyword
25 searches, so some meaningful text here does not hurt.
26 If the documentation itself contains a ';', only the part before
27 that will be displayed in the listbox, but all of it used for search.
29 Lines starting with ';' will be ignored.
36 class wxExtHelpController
: public wxHelpController
39 wxExtHelpController(wxWindow
* parentWindow
= NULL
);
40 virtual ~wxExtHelpController();
43 Tell it which browser to use.
44 The Netscape support will check whether Netscape is already
45 running (by looking at the .netscape/lock file in the user's
46 home directory) and tell it to load the page into the existing window.
49 The command to call a browser/html viewer.
51 Set this to wxHELP_NETSCAPE if the browser is some variant of Netscape.
53 virtual void SetViewer(const wxString
& viewer
= wxEmptyString
,
54 long flags
= wxHELP_NETSCAPE
);
57 This must be called to tell the controller where to find the
59 If a locale is set, look in file/localename, i.e.
60 If passed "/usr/local/myapp/help" and the current wxLocale is
61 set to be "de", then look in "/usr/local/myapp/help/de/"
62 first and fall back to "/usr/local/myapp/help" if that
66 NOT a filename, but a directory name.
68 @return @true on success
70 virtual bool Initialize(const wxString
& dir
, int server
);
73 This must be called to tell the controller where to find the
75 If a locale is set, look in file/localename, i.e.
76 If passed "/usr/local/myapp/help" and the current wxLocale is
77 set to be "de", then look in "/usr/local/myapp/help/de/"
78 first and fall back to "/usr/local/myapp/help" if that
82 directory name where to fine the help files
84 @return @true on success
86 virtual bool Initialize(const wxString
& dir
);
89 If file is "", reloads file given in Initialize.
92 Name of help directory.
94 @return @true on success
96 virtual bool LoadFile(const wxString
& file
= wxEmptyString
);
99 Display list of all help entries.
101 @return @true on success
103 virtual bool DisplayContents(void);
106 Display help for id sectionNo.
108 @return @true on success
110 virtual bool DisplaySection(int sectionNo
);
113 Display help for id sectionNo -- identical with DisplaySection().
115 @return @true on success
117 virtual bool DisplaySection(const wxString
& section
);
120 Display help for URL (using DisplayHelp) or keyword (using KeywordSearch)
122 @return @true on success
124 virtual bool DisplayBlock(long blockNo
);
127 Search comment/documentation fields in map file and present a
131 string to search for, empty string will list all entries
133 @return @true on success
135 virtual bool KeywordSearch(const wxString
& k
,
136 wxHelpSearchMode mode
= wxHELP_SEARCH_ALL
);
146 virtual void OnQuit();
149 Call the browser using a relative URL.
151 virtual bool DisplayHelp(const wxString
&) ;
154 Allows one to override the default settings for the help frame.
156 virtual void SetFrameParameters(const wxString
& title
,
158 const wxPoint
& pos
= wxDefaultPosition
,
159 bool newFrameEachTime
= false);
162 Obtains the latest settings used by the help frame and the help frame.
164 virtual wxFrame
*GetFrameParameters(wxSize
*size
= NULL
,
166 bool *newFrameEachTime
= NULL
);