]>
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 licence
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 wxHelpControllerBase
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 directory name where to fine the help files
67 @return @true on success
69 virtual bool Initialize(const wxString
& dir
);
72 If file is "", reloads file given in Initialize.
75 Name of help directory.
77 @return @true on success
79 virtual bool LoadFile(const wxString
& file
= wxEmptyString
);
82 Display list of all help entries.
84 @return @true on success
86 virtual bool DisplayContents();
89 Display help for id sectionNo.
91 @return @true on success
93 virtual bool DisplaySection(int sectionNo
);
96 Display help for id sectionNo -- identical with DisplaySection().
98 @return @true on success
100 virtual bool DisplaySection(const wxString
& section
);
103 Display help for URL (using DisplayHelp) or keyword (using KeywordSearch)
105 @return @true on success
107 virtual bool DisplayBlock(long blockNo
);
110 Search comment/documentation fields in map file and present a
114 string to search for, empty string will list all entries
117 optional parameter allows the search the index (wxHELP_SEARCH_INDEX)
118 but this currently only supported by the wxHtmlHelpController.
120 @return @true on success
122 virtual bool KeywordSearch(const wxString
& k
,
123 wxHelpSearchMode mode
= wxHELP_SEARCH_ALL
);
133 virtual void OnQuit();
136 Call the browser using a relative URL.
138 virtual bool DisplayHelp(const wxString
& relativeURL
) ;
141 Allows one to override the default settings for the help frame.
143 virtual void SetFrameParameters(const wxString
& title
,
145 const wxPoint
& pos
= wxDefaultPosition
,
146 bool newFrameEachTime
= false);
149 Obtains the latest settings used by the help frame and the help frame.
151 virtual wxFrame
*GetFrameParameters(wxSize
*size
= NULL
,
153 bool *newFrameEachTime
= NULL
);