This class is used by wxHtmlHelpController to display help within a frame or dialog, but you can use it yourself to create an embedded HTML help window.
For example:
// m_embeddedHelpWindow is a wxHtmlHelpWindow // m_embeddedHtmlHelp is a wxHtmlHelpController // Create embedded HTML Help window m_embeddedHelpWindow = new wxHtmlHelpWindow; m_embeddedHtmlHelp.UseConfig(config, rootPath); // Set your own config object here m_embeddedHtmlHelp.SetHelpWindow(m_embeddedHelpWindow); m_embeddedHelpWindow->Create(this, wxID_ANY, wxDefaultPosition, GetClientSize(), wxTAB_TRAVERSAL|wxNO_BORDER, wxHF_DEFAULT_STYLE); m_embeddedHtmlHelp.AddBook(wxFileName(_T("doc.zip")));You should pass the style wxHF_EMBEDDED to the style parameter of wxHtmlHelpController to allow the embedded window to be destroyed independently of the help controller.
Derived from
Include files
<wx/html/helpwnd.h>
Members
wxHtmlHelpWindow::wxHtmlHelpWindow
wxHtmlHelpWindow::Create
wxHtmlHelpWindow::CreateContents
wxHtmlHelpWindow::CreateIndex
wxHtmlHelpWindow::CreateSearch
wxHtmlHelpWindow::Display
wxHtmlHelpWindow::DisplayContents
wxHtmlHelpWindow::DisplayIndex
wxHtmlHelpWindow::GetData
wxHtmlHelpWindow::KeywordSearch
wxHtmlHelpWindow::ReadCustomization
wxHtmlHelpWindow::RefreshLists
wxHtmlHelpWindow::SetTitleFormat
wxHtmlHelpWindow::UseConfig
wxHtmlHelpWindow::WriteCustomization
wxHtmlHelpWindow::AddToolbarButtons
wxHtmlHelpWindow(wxHtmlHelpData* data = NULL)
wxHtmlHelpWindow(wxWindow* parent, int wxWindowID, const wxPoint& pos = wxDefaultPosition, const wxSize& pos = wxDefaultSize, int style = wxTAB_TRAVERSAL|wxTAB_wxNO_BORDER, int helpStyle = wxHF_DEFAULT_STYLE, wxHtmlHelpData* data = NULL)
Constructor.
Constructor. For the values of helpStyle, please see the documentation for wxHtmlHelpController.
bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& pos = wxDefaultSize, int style = wxTAB_TRAVERSAL|wxTAB_wxNO_BORDER, int helpStyle = wxHF_DEFAULT_STYLE, wxHtmlHelpData* data = NULL)
Creates the help window. See the constructor for a description of the parameters.
void CreateContents()
Creates contents panel. (May take some time.)
Protected.
void CreateIndex()
Creates index panel. (May take some time.)
Protected.
void CreateSearch()
Creates search panel.
bool Display(const wxString& x)
bool Display(const int id)
Displays page x. If not found it will give the user the choice of searching books. Looking for the page runs in these steps:
The second form takes numeric ID as the parameter. (uses extension to MS format, <param name="ID" value=id>)
wxPython note: The second form of this method is named DisplayId in wxPython.
bool DisplayContents()
Displays contents panel.
bool DisplayIndex()
Displays index panel.
wxHtmlHelpData* GetData()
Returns the wxHtmlHelpData object, which is usually a pointer to the controller's data.
bool KeywordSearch(const wxString& keyword, wxHelpSearchMode mode = wxHELP_SEARCH_ALL)
Search for given keyword. Optionally it searches through the index (mode = wxHELP_SEARCH_INDEX), default the content (mode = wxHELP_SEARCH_ALL).
void ReadCustomization(wxConfigBase* cfg, const wxString& path = wxEmptyString)
Reads the user's settings for this window (see wxHtmlHelpController::ReadCustomization)
void RefreshLists()
Refresh all panels. This is necessary if a new book was added.
Protected.
void SetTitleFormat(const wxString& format)
Sets the frame's title format. format must contain exactly one "%s" (it will be replaced by the page title).
void UseConfig(wxConfigBase* config, const wxString& rootpath = wxEmptyString)
Associates a wxConfig object with the help window. It is recommended that you use wxHtmlHelpController::UseConfig instead.
void WriteCustomization(wxConfigBase* cfg, const wxString& path = wxEmptyString)
Saves the user's settings for this window(see wxHtmlHelpController::WriteCustomization).
virtual void AddToolbarButtons(wxToolBar *toolBar, int style)
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.
wxToolBar::Realize is called immediately after returning from this function.
See samples/html/helpview for an example.