wx.html.HtmlHelpWindow

Inheritance diagram for wx.html.HtmlHelpWindow:



Description

This class is used by wx.html.HtmlHelpController to display help within a frame or dialog, but you can use it yourself to create an embedded HTML help window.

For example:

# embeddedHelpWindow is a wx.html.HtmlHelpWindow
# embeddedHtmlHelp is a wx.html.HtmlHelpController

# Create embedded HTML Help window
embeddedHelpWindow = wx.html.HtmlHelpWindow(self, -1, size=self.GetClientSize(), style=wx.TAB_TRAVERSAL|wx.NO_BORDER, helpStyle=wx.html.HF_DEFAULT_STYLE)

# Set your own config object here
embeddedHtmlHelp.UseConfig(config, rootPath)

embeddedHtmlHelp.SetHelpWindow(embeddedHelpWindow)
embeddedHtmlHelp.AddBook("doc.zip")

You should pass the style wx.html.HF_EMBEDDED to the style parameter of wx.html.HtmlHelpController to allow the embedded window to be destroyed independently of the help controller.

Class API

Methods

__init__(parent, id, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.TAB_TRAVERSAL|wx.NO_BORDER, htmlStyle=wx.html.HF_DEFAULT_STYLE, data=None)

Constructor.

Parameters:


Returns:

wx.html.HtmlHelpWindow


Create()

Creates the help window.

Parameters:


Returns:

bool


Display(x)

Displays page x. If not found it will give the user the choice of searching books.

Looking for the page runs in these steps:

  1. Try to locate file named x (if x is for example “doc/howto.htm”)
  2. Try to open starting page of book named x
  3. Try to find x in contents (if x is for example “How To ...”)
  4. Try to find x in index (if x is for example “How To ...”)

Parameters:

  • x (string)

Returns:

bool


DisplayContents()

Displays contents panel.


Returns:

bool


DisplayID(id)

Search help contents by numeric Id.

See Display for an explanation of how the display search works.

Parameters:

  • id (int)

Returns:

bool


DisplayIndex()

Displays index panel.


Returns:

bool


GetCfgData()
No docstrings available for this method.

GetController()
No docstrings available for this method.

GetData()

Returns the wx.html.HtmlHelpData object, which is usually a pointer to the controller’s data.


Returns:

wx.html.HtmlHelpData


GetHtmlWindow()
No docstrings available for this method.

GetSplitterWindow()
No docstrings available for this method.

GetToolBar()
No docstrings available for this method.

GetTreeCtrl()
No docstrings available for this method.

KeywordSearch(keyword, mode=wx.html.HELP_SEARCH_ALL)

Displays help window, focuses search panel and starts searching.

Returns True if the keyword was found. Optionally it searches through the index (mode = wx.html.HELP_SEARCH_INDEX), default the content (mode = wx.html.HELP_SEARCH_ALL).

Parameters:

  • keyword (string)
  • mode (int)

Returns:

bool

Important

KeywordSearch searches only pages listed in .hhc file(s). You should list all pages in the contents file.


NotifyPageChanged()
No docstrings available for this method.

ReadCustomization(cfg, path="")

Reads the user’s settings for this frame, see wx.html.HtmlHelpController.ReadCustomization

Parameters:


RefreshLists()
Refresh all panels. This is necessary if a new book was added. Protected.

SetController(controller)

Sets the help controller associated with the window.

Parameters:


UseConfig(config, rootpath="")

Associates a wx.Config object with the help window.

It is recommended that you use wx.html.HtmlHelpController.UseConfig instead.

Parameters:


WriteCustomization(cfg, path="")

Saves the user’s settings for this window (see wx.html.HtmlHelpController.WriteCustomization).

Parameters:


Properties

CfgData
See GetCfgData
Controller
See GetController and SetController
Data
See GetData
HtmlWindow
See GetHtmlWindow
SplitterWindow
See GetSplitterWindow
ToolBar
See GetToolBar
TreeCtrl
See GetTreeCtrl