]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/generic/helpext.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxExtHelpController
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
10 @class wxExtHelpController
12 This class implements help via an external browser.
13 It requires the name of a directory containing the documentation
14 and a file mapping numerical Section numbers to relative URLS.
16 The map file contains two or three fields per line:
17 numeric_id relative_URL [; comment/documentation]
19 The numeric_id is the id used to look up the entry in
20 DisplaySection()/DisplayBlock(). The relative_URL is a filename of
21 an html file, relative to the help directory. The optional
22 comment/documentation field (after a ';') is used for keyword
23 searches, so some meaningful text here does not hurt.
24 If the documentation itself contains a ';', only the part before
25 that will be displayed in the listbox, but all of it used for search.
27 Lines starting with ';' will be ignored.
34 class wxExtHelpController
: public wxHelpControllerBase
37 wxExtHelpController(wxWindow
* parentWindow
= NULL
);
38 virtual ~wxExtHelpController();
41 Tell it which browser to use.
42 The Netscape support will check whether Netscape is already
43 running (by looking at the .netscape/lock file in the user's
44 home directory) and tell it to load the page into the existing window.
47 The command to call a browser/html viewer.
49 Set this to wxHELP_NETSCAPE if the browser is some variant of Netscape.
51 virtual void SetViewer(const wxString
& viewer
= wxEmptyString
,
52 long flags
= wxHELP_NETSCAPE
);
55 This must be called to tell the controller where to find the
57 If a locale is set, look in file/localename, i.e.
58 If passed "/usr/local/myapp/help" and the current wxLocale is
59 set to be "de", then look in "/usr/local/myapp/help/de/"
60 first and fall back to "/usr/local/myapp/help" if that
64 directory name where to fine the help files
66 @return @true on success
68 virtual bool Initialize(const wxString
& dir
);
71 If file is "", reloads file given in Initialize.
74 Name of help directory.
76 @return @true on success
78 virtual bool LoadFile(const wxString
& file
= wxEmptyString
);
81 Display list of all help entries.
83 @return @true on success
85 virtual bool DisplayContents();
88 Display help for id sectionNo.
90 @return @true on success
92 virtual bool DisplaySection(int sectionNo
);
95 Display help for id sectionNo -- identical with DisplaySection().
97 @return @true on success
99 virtual bool DisplaySection(const wxString
& section
);
102 Display help for URL (using DisplayHelp) or keyword (using KeywordSearch)
104 @return @true on success
106 virtual bool DisplayBlock(long blockNo
);
109 Search comment/documentation fields in map file and present a
113 string to search for, empty string will list all entries
116 optional parameter allows the search the index (wxHELP_SEARCH_INDEX)
117 but this currently only supported by the wxHtmlHelpController.
119 @return @true on success
121 virtual bool KeywordSearch(const wxString
& k
,
122 wxHelpSearchMode mode
= wxHELP_SEARCH_ALL
);
132 virtual void OnQuit();
135 Call the browser using a relative URL.
137 virtual bool DisplayHelp(const wxString
& relativeURL
) ;
140 Allows one to override the default settings for the help frame.
142 virtual void SetFrameParameters(const wxString
& titleFormat
,
144 const wxPoint
& pos
= wxDefaultPosition
,
145 bool newFrameEachTime
= false);
148 Obtains the latest settings used by the help frame and the help frame.
150 virtual wxFrame
*GetFrameParameters(wxSize
*size
= NULL
,
152 bool *newFrameEachTime
= NULL
);