]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/generic/helpext.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxExtHelpController
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
11 @class wxExtHelpController
13 This class implements help via an external browser.
14 It requires the name of a directory containing the documentation
15 and a file mapping numerical Section numbers to relative URLS.
17 The map file contains two or three fields per line:
18 numeric_id relative_URL [; comment/documentation]
20 The numeric_id is the id used to look up the entry in
21 DisplaySection()/DisplayBlock(). The relative_URL is a filename of
22 an html file, relative to the help directory. The optional
23 comment/documentation field (after a ';') is used for keyword
24 searches, so some meaningful text here does not hurt.
25 If the documentation itself contains a ';', only the part before
26 that will be displayed in the listbox, but all of it used for search.
28 Lines starting with ';' will be ignored.
35 class wxExtHelpController
: public wxHelpController
38 wxExtHelpController(wxWindow
* parentWindow
= NULL
);
39 virtual ~wxExtHelpController();
42 Tell it which browser to use.
43 The Netscape support will check whether Netscape is already
44 running (by looking at the .netscape/lock file in the user's
45 home directory) and tell it to load the page into the existing window.
48 The command to call a browser/html viewer.
50 Set this to wxHELP_NETSCAPE if the browser is some variant of Netscape.
52 virtual void SetViewer(const wxString
& viewer
= wxEmptyString
,
53 long flags
= wxHELP_NETSCAPE
);
56 This must be called to tell the controller where to find the
58 If a locale is set, look in file/localename, i.e.
59 If passed "/usr/local/myapp/help" and the current wxLocale is
60 set to be "de", then look in "/usr/local/myapp/help/de/"
61 first and fall back to "/usr/local/myapp/help" if that
65 NOT a filename, but a directory name.
67 @return @true on success
69 virtual bool Initialize(const wxString
& dir
, int server
);
72 This must be called to tell the controller where to find the
74 If a locale is set, look in file/localename, i.e.
75 If passed "/usr/local/myapp/help" and the current wxLocale is
76 set to be "de", then look in "/usr/local/myapp/help/de/"
77 first and fall back to "/usr/local/myapp/help" if that
81 directory name where to fine the help files
83 @return @true on success
85 virtual bool Initialize(const wxString
& dir
);
88 If file is "", reloads file given in Initialize.
91 Name of help directory.
93 @return @true on success
95 virtual bool LoadFile(const wxString
& file
= wxEmptyString
);
98 Display list of all help entries.
100 @return @true on success
102 virtual bool DisplayContents(void);
105 Display help for id sectionNo.
107 @return @true on success
109 virtual bool DisplaySection(int sectionNo
);
112 Display help for id sectionNo -- identical with DisplaySection().
114 @return @true on success
116 virtual bool DisplaySection(const wxString
& section
);
119 Display help for URL (using DisplayHelp) or keyword (using KeywordSearch)
121 @return @true on success
123 virtual bool DisplayBlock(long blockNo
);
126 Search comment/documentation fields in map file and present a
130 string to search for, empty string will list all entries
132 @return @true on success
134 virtual bool KeywordSearch(const wxString
& k
,
135 wxHelpSearchMode mode
= wxHELP_SEARCH_ALL
);
145 virtual void OnQuit();
148 Call the browser using a relative URL.
150 virtual bool DisplayHelp(const wxString
&) ;
153 Allows one to override the default settings for the help frame.
155 virtual void SetFrameParameters(const wxString
& title
,
157 const wxPoint
& pos
= wxDefaultPosition
,
158 bool newFrameEachTime
= false);
161 Obtains the latest settings used by the help frame and the help frame.
163 virtual wxFrame
*GetFrameParameters(wxSize
*size
= NULL
,
165 bool *newFrameEachTime
= NULL
);