Phoenix Logo

phoenix_title 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

HelpController


class_hierarchy Class Hierarchy

Inheritance diagram for class ExtHelpController:


method_summary Methods Summary

__init__  
DisplayBlock Display help for URL (using DisplayHelp) or keyword (using KeywordSearch)
DisplayContents Display list of all help entries.
DisplayHelp Call the browser using a relative URL.
DisplaySection Display help for id sectionNo.
GetFrameParameters Obtains the latest settings used by the help frame and the help frame.
Initialize This must be called to tell the controller where to find the documentation.
KeywordSearch Search comment/documentation fields in map file and present a list to chose from.
LoadFile If file is “”, reloads file given in Initialize.
OnQuit Does nothing.
Quit Does nothing.
SetFrameParameters Allows one to override the default settings for the help frame.
SetViewer Tell it which browser to use.

property_summary Properties Summary

FrameParameters See GetFrameParameters

api Class API



class wx.adv.ExtHelpController(HelpControllerBase)

Possible constructors:

ExtHelpController(parentWindow=None)

This class implements help via an external browser.


Methods



__init__(self, parentWindow=None)
Parameters:parentWindow (wx.Window) –


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)

overload Overloaded Implementations:



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 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.

Parameters:
Return type:

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.



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.

Parameters:
  • titleFormat (string) –
  • size (wx.Size) –
  • pos (wx.Point) –
  • newFrameEachTime (bool) –


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.

Properties



FrameParameters

See GetFrameParameters