wxHtmlHelpWindowThis 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::wxHtmlHelpWindowwxHtmlHelpWindow(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.
wxHtmlHelpWindow::Createbool 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.
wxHtmlHelpWindow::CreateContentsvoid CreateContents() Creates contents panel. (May take some time.) Protected.
wxHtmlHelpWindow::CreateIndexvoid CreateIndex() Creates index panel. (May take some time.) Protected.
wxHtmlHelpWindow::CreateSearchvoid CreateSearch() Creates search panel.
wxHtmlHelpWindow::Displaybool 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.
wxHtmlHelpWindow::DisplayContentsbool DisplayContents() Displays contents panel.
wxHtmlHelpWindow::DisplayIndexbool DisplayIndex() Displays index panel.
wxHtmlHelpWindow::GetDatawxHtmlHelpData* GetData() Returns the wxHtmlHelpData object, which is usually a pointer to the controller's data.
wxHtmlHelpWindow::KeywordSearchbool 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).
wxHtmlHelpWindow::ReadCustomizationvoid ReadCustomization(wxConfigBase* cfg, const wxString& path = wxEmptyString) Reads the user's settings for this window (see wxHtmlHelpController::ReadCustomization)
wxHtmlHelpWindow::RefreshListsvoid RefreshLists() Refresh all panels. This is necessary if a new book was added. Protected.
wxHtmlHelpWindow::SetTitleFormatvoid SetTitleFormat(const wxString& format) Sets the frame's title format. format must contain exactly one "%s" (it will be replaced by the page title).
wxHtmlHelpWindow::UseConfigvoid UseConfig(wxConfigBase* config, const wxString& rootpath = wxEmptyString) Associates a wxConfig object with the help window. It is recommended that you use wxHtmlHelpController::UseConfig instead.
wxHtmlHelpWindow::WriteCustomizationvoid WriteCustomization(wxConfigBase* cfg, const wxString& path = wxEmptyString) Saves the user's settings for this window(see wxHtmlHelpController::WriteCustomization).
wxHtmlHelpWindow::AddToolbarButtonsvirtual 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.
|