wx.adv.ExtHelpController¶
This class implements help via an external browser.
It requires the name of a directory containing the documentation and a file mapping numerical Section numbers to relative URLS
.
The map file contains two or three fields per line: numeric_id relative_URL [; comment/documentation]
The numeric_id is the id used to look up the entry in DisplaySection
/DisplayBlock(). The relative_URL is a filename of an html file, relative to the help directory. The optional comment/documentation field (after a ‘;’) is used for keyword searches, so some meaningful text here does not hurt. If the documentation itself contains a ‘;’, only the part before that will be displayed in the listbox, but all of it used for search.
Lines starting with ‘;’ will be ignored.
See also
Class Hierarchy¶
Methods Summary¶
Display help for URL (using DisplayHelp) or keyword (using KeywordSearch) |
|
Display list of all help entries. |
|
Call the browser using a relative URL. |
|
Display help for id sectionNo. |
|
Obtains the latest settings used by the help frame and the help frame. |
|
This must be called to tell the controller where to find the documentation. |
|
Search comment/documentation fields in map file and present a list to chose from. |
|
If file is “”, reloads file given in Initialize. |
|
Does nothing. |
|
Does nothing. |
|
Allows one to override the default settings for the help frame. |
|
Tell it which browser to use. |
Properties Summary¶
Class API¶
- class wx.adv.ExtHelpController(HelpControllerBase)¶
Possible constructors:
ExtHelpController(parentWindow=None) -> None
This class implements help via an external browser.
Methods¶
- DisplayBlock(self, blockNo)¶
Display help for URL (using DisplayHelp) or keyword (using KeywordSearch)
- Parameters:
blockNo (long)
- Return type:
bool
- Returns:
True
on success
- DisplayContents(self)¶
Display list of all help entries.
- Return type:
bool
- Returns:
True
on success
- DisplayHelp(self, relativeURL)¶
Call the browser using a relative URL.
- Parameters:
relativeURL (string)
- Return type:
bool
- DisplaySection(self, *args, **kw)¶
-
DisplaySection (self, sectionNo)
Display help for id sectionNo.
- Parameters:
sectionNo (int)
- Return type:
bool
- Returns:
True
on success
DisplaySection (self, section)
Display help for id sectionNo – identical with
DisplaySection
.- Parameters:
section (string)
- Return type:
bool
- Returns:
True
on success
- GetFrameParameters(self, size=None, pos=None, newFrameEachTime=None)¶
Obtains the latest settings used by the help frame and the help frame.
- Initialize(self, dir)¶
This must be called to tell the controller where to find the documentation.
If a locale is set, look in file/localename, i.e. If passed “/usr/local/myapp/help” and the current wx.Locale is set to be “de”, then look in “/usr/local/myapp/help/de/” first and fall back to “/usr/local/myapp/help” if that doesn’t exist.
- Parameters:
dir (string) – directory name where to fine the help files
- Return type:
bool
- Returns:
True
on success
- KeywordSearch(self, k, mode=HELP_SEARCH_ALL)¶
Search comment/documentation fields in map file and present a list to chose from.
- Parameters:
k (string) – string to search for, empty string will list all entries
mode (HelpSearchMode) – optional parameter allows the search the index (wx``wx.HELP_SEARCH_INDEX``) but this currently only supported by the wx.html.HtmlHelpController.
- Return type:
bool
- Returns:
True
on success
- LoadFile(self, file='')¶
If file is “”, reloads file given in Initialize.
- Parameters:
file (string) – Name of help directory.
- Return type:
bool
- Returns:
True
on success
- OnQuit(self)¶
Does nothing.
- Return type:
None
- Quit(self)¶
Does nothing.
- Return type:
bool
- SetFrameParameters(self, titleFormat, size, pos=DefaultPosition, newFrameEachTime=False)¶
Allows one to override the default settings for the help frame.
- SetViewer(self, viewer='', flags=HELP_NETSCAPE)¶
Tell it which browser to use.
The Netscape support will check whether Netscape is already running (by looking at the .netscape/lock file in the user’s home directory) and tell it to load the page into the existing window.
- Parameters:
viewer (string) – The command to call a browser/html viewer.
flags (long) – Set this to
wx.HELP_NETSCAPE
if the browser is some variant of Netscape.
- Return type:
None
Properties¶
- FrameParameters¶