********************** wx.html.HtmlHelpWindow ********************** Inheritance diagram for `wx.html.HtmlHelpWindow`: | .. inheritance-diagram:: 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. Derived From ^^^^^^^^^^^^^ * `wx.Window <../Widgets/wx.Window.html>`_ * `wx.EvtHandler <../Widgets/wx.EvtHandler.html>`_ * `wx.Object <../Widgets/wx.Object.html>`_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `Create <#Create>`_ * `Display <#Display>`_ * `DisplayContents <#DisplayContents>`_ * `DisplayID <#DisplayID>`_ * `DisplayIndex <#DisplayIndex>`_ * `GetCfgData <#GetCfgData>`_ * `GetController <#GetController>`_ * `GetData <#GetData>`_ * `GetHtmlWindow <#GetHtmlWindow>`_ * `GetSplitterWindow <#GetSplitterWindow>`_ * `GetToolBar <#GetToolBar>`_ * `GetTreeCtrl <#GetTreeCtrl>`_ * `KeywordSearch <#KeywordSearch>`_ * `NotifyPageChanged <#NotifyPageChanged>`_ * `ReadCustomization <#ReadCustomization>`_ * `RefreshLists <#RefreshLists>`_ * `SetController <#SetController>`_ * `UseConfig <#UseConfig>`_ * `WriteCustomization <#WriteCustomization>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `CfgData <#CfgData>`_ * `Controller <#Controller>`_ * `Data <#Data>`_ * `HtmlWindow <#HtmlWindow>`_ * `SplitterWindow <#SplitterWindow>`_ * `ToolBar <#ToolBar>`_ * `TreeCtrl <#TreeCtrl>`_ Class API ========= Methods ^^^^^^^ .. method:: __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:** * `parent` (`wx.Window <../Widgets/wx.Window.html>`_): Parent window. * `id` (int): Window Id. * `pos` (`wx.Point <../Widgets/wx.Point.html>`_ ): Window position. * `size` (`wx.Size <../Widgets/wx.Size.html>`_ ): Window size. * `style` (long): Window style. * `htmlStyle` (long): For the possible values of `style`, see `wx.html.HtmlHelpController.__init__ `_ * `data` (`wx.html.HtmlHelpData `_): | **Returns:** `wx.html.HtmlHelpWindow `_ -------- .. method:: Create() Creates the help window. **Parameters:** * `parent` (`wx.Window <../Widgets/wx.Window.html>`_): Parent window. * `id` (int): Window Id. * `pos` (`wx.Point <../Widgets/wx.Point.html>`_ ): Window position. * `size` (`wx.Size <../Widgets/wx.Size.html>`_ ): Window size. * `style` (long): Window style. * `htmlStyle` (long): For the possible values of `style`, see `wx.html.HtmlHelpController.__init__ `_ * `data` (`wx.html.HtmlHelpData `_): | **Returns:** `bool` -------- .. method:: 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` -------- .. method:: DisplayContents() Displays contents panel. | **Returns:** `bool` -------- .. method:: DisplayID(id) Search help contents by numeric Id. See `Display <#Display>`_ for an explanation of how the display search works. **Parameters:** * `id` (int) | **Returns:** `bool` -------- .. method:: DisplayIndex() Displays index panel. | **Returns:** `bool` -------- .. method:: GetCfgData() `No docstrings available for this method.` -------- .. method:: GetController() `No docstrings available for this method.` -------- .. method:: GetData() Returns the `wx.html.HtmlHelpData` object, which is usually a pointer to the controller's data. | **Returns:** `wx.html.HtmlHelpData `_ -------- .. method:: GetHtmlWindow() `No docstrings available for this method.` -------- .. method:: GetSplitterWindow() `No docstrings available for this method.` -------- .. method:: GetToolBar() `No docstrings available for this method.` -------- .. method:: GetTreeCtrl() `No docstrings available for this method.` -------- .. 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. -------- .. method:: NotifyPageChanged() `No docstrings available for this method.` -------- .. method:: ReadCustomization(cfg, path="") Reads the user's settings for this frame, see `wx.html.HtmlHelpController.ReadCustomization `_ **Parameters:** * `cfg` (`wx.ConfigBase <../Widgets/wx.ConfigBase.html>`_) * `path` (string) -------- .. method:: RefreshLists() Refresh all panels. This is necessary if a new book was added. Protected. -------- .. method:: SetController(controller) Sets the help controller associated with the window. **Parameters:** * `controller` (`wx.html.HtmlHelpController `_) -------- .. method:: UseConfig(config, rootpath="") Associates a `wx.Config` object with the help window. It is recommended that you use `wx.html.HtmlHelpController.UseConfig `_ instead. **Parameters:** * `config` (`wx.ConfigBase <../Widgets/wx.ConfigBase.html>`_) * `rootpath` (string) -------- .. method:: WriteCustomization(cfg, path="") Saves the user's settings for this window (see `wx.html.HtmlHelpController.WriteCustomization `_). **Parameters:** * `cfg` (`wx.ConfigBase <../Widgets/wx.ConfigBase.html>`_) * `path` (string) -------- Properties ^^^^^^^^^^ .. attribute:: CfgData See `GetCfgData <#GetCfgData>`_ .. attribute:: Controller See `GetController <#GetController>`_ and `SetController <#SetController>`_ .. attribute:: Data See `GetData <#GetData>`_ .. attribute:: HtmlWindow See `GetHtmlWindow <#GetHtmlWindow>`_ .. attribute:: SplitterWindow See `GetSplitterWindow <#GetSplitterWindow>`_ .. attribute:: ToolBar See `GetToolBar <#GetToolBar>`_ .. attribute:: TreeCtrl See `GetTreeCtrl <#GetTreeCtrl>`_