![]() ![]() ![]() ![]() 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.
|