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
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. |
wx.adv.
ExtHelpController
(HelpControllerBase)¶Possible constructors:
ExtHelpController(parentWindow: Optional[Window]=None) -> None
This class implements help via an external browser.
__init__
(self, parentWindow: Optional[Window]=None)¶parentWindow (wx.Window) –
None
DisplayBlock
(self, blockNo : int)¶Display help for URL (using DisplayHelp) or keyword (using KeywordSearch)
blockNo (long) –
bool
True
on success
DisplayContents
(self)¶Display list of all help entries.
bool
True
on success
DisplayHelp
(self, relativeURL : str)¶Call the browser using a relative URL.
relativeURL (string) –
bool
DisplaySection
(self, *args, **kw)¶DisplaySection (self, sectionNo : int)
Display help for id sectionNo.
sectionNo (int) –
bool
True
on success
DisplaySection (self, section : str)
Display help for id sectionNo – identical with DisplaySection
.
section (string) –
bool
True
on success
GetFrameParameters
(self, size: Optional[Size]=None, pos: Optional[Point]=None, newFrameEachTime: Optional[bool]=None)¶Obtains the latest settings used by the help frame and the help frame.
Initialize
(self, dir : str)¶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.
dir (string) – directory name where to fine the help files
bool
True
on success
KeywordSearch
(self, k : str, mode: HelpSearchMode=HELP_SEARCH_ALL)¶Search comment/documentation fields in map file and present a list to chose from.
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.
bool
True
on success
LoadFile
(self, file: str='')¶If file is “”, reloads file given in Initialize.
file (string) – Name of help directory.
bool
True
on success
OnQuit
(self)¶Does nothing.
None
Quit
(self)¶Does nothing.
bool
SetFrameParameters
(self, titleFormat : str, size : Size, pos: Point=DefaultPosition, newFrameEachTime: bool=False)¶Allows one to override the default settings for the help frame.
SetViewer
(self, viewer: str='', flags: int=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.
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.
None
FrameParameters
¶