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:
def EmbedHTML(self):
# self.embeddedHelpWindow is a wx.html.HtmlHelpWindow
# self.embeddedHtmlHelp is a wx.html.HtmlHelpController
# Create embedded HTML Help window
self.embeddedHelpWindow = wx.html.HtmlHelpWindow
self.embeddedHtmlHelp.UseConfig(config, rootPath) # Set your own config object here
self.embeddedHtmlHelp.SetHelpWindow(self.embeddedHelpWindow)
self.embeddedHelpWindow.Create(self, wx.ID_ANY, wx.DefaultPosition, self.GetClientSize(),
wx.TAB_TRAVERSAL | wx.BORDER_NONE, wx.html.HF_DEFAULT_STYLE)
self.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.
You may override this virtual method to add more buttons to the help window’s toolbar. |
|
Creates the help window. |
|
Creates contents panel. |
|
Creates index panel. |
|
Creates search panel. |
|
Displays page x. |
|
Displays contents panel. |
|
Displays index panel. |
|
Returns the wx.html.HtmlHelpData object, which is usually a pointer to the controller’s data. |
|
Search for given keyword. |
|
Reads the user’s settings for this window. |
|
Refresh all panels. |
|
Associates a Config object with the help window. |
|
Saves the user’s settings for this window. |
See |
|
See |
Possible constructors:
HtmlHelpWindow(data: Optional[HtmlHelpData]=None) -> None
HtmlHelpWindow(parent : Window, id: int=ID_ANY, pos:
Point=DefaultPosition, size: Size=DefaultSize, style:
int=TAB_TRAVERSAL|BORDER_NONE, helpStyle: int=HF_DEFAULT_STYLE, data:
Optional[HtmlHelpData]=None) -> None
This class is used by HtmlHelpController to display help within a frame or dialog, but you can use it yourself to create an embedded HTML help window.
__init__ (self, data: Optional[HtmlHelpData]=None)
data (wx.html.HtmlHelpData)
None
__init__ (self, parent : Window, id: int=ID_ANY, pos: Point=DefaultPosition, size: Size=DefaultSize, style: int=TAB_TRAVERSAL|BORDER_NONE, helpStyle: int=HF_DEFAULT_STYLE, data: Optional[HtmlHelpData]=None)
Constructor.
For the values of helpStyle, please see the documentation for wx.html.HtmlHelpController.
parent (wx.Window)
id (wx.WindowID)
pos (wx.Point)
size (wx.Size)
style (int)
helpStyle (int)
data (wx.html.HtmlHelpData)
None
You may override this virtual method to add more buttons to the help window’s toolbar.
toolBar is a pointer to the toolbar and style is the style flag as passed to the Create
method.
wx.ToolBar.Realize
is called immediately after returning from this function. See samples/html/helpview
for an example.
toolBar (wx.ToolBar)
style (int)
None
Creates the help window.
See the constructor for a description of the parameters.
Creates contents panel.
(May take some time.)
None
Creates index panel.
(May take some time.)
None
Creates search panel.
None
Display (self, x : str)
Displays page x.
If not found it will give the user the choice of searching books. Looking for the page runs in these steps:
try to locate file named x (if x is for example “doc/howto.htm”)
try to open starting page of book x
try to find x in contents (if x is for example “How To …”)
try to find x in index (if x is for example “How To …”)
x (string)
bool
Display (self, id : int)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
id (int)
bool
Displays contents panel.
bool
Displays index panel.
bool
variant (WindowVariant)
VisualAttributes
Returns the wx.html.HtmlHelpData object, which is usually a pointer to the controller’s data.
Search for given keyword.
Optionally it searches through the index (mode = HELP_SEARCH_INDEX
), default the content (mode = HELP_SEARCH_ALL
).
keyword (string)
mode (HelpSearchMode)
bool
Reads the user’s settings for this window.
cfg (wx.ConfigBase)
path (string)
None
Refresh all panels.
This is necessary if a new book was added.
None
controller (wx.html.HtmlHelpController)
None
Associates a Config object with the help window.
It is recommended that you use wx.html.HtmlHelpController.UseConfig
instead.
config (wx.ConfigBase)
rootpath (string)
None
Saves the user’s settings for this window.
cfg (wx.ConfigBase)
path (string)
None
See GetController
and SetController