## wxHtmlHelpFrame

This class is used by wxHtmlHelpController to display help. It is an internal class and should not be used directly - except for the case when you're writing your own HTML help controller.

Derived from

wxFrame

Include files

<wx/html/helpfrm.h>

Members

wxHtmlHelpFrame::wxHtmlHelpFrame
wxHtmlHelpFrame::Create
wxHtmlHelpFrame::CreateContents
wxHtmlHelpFrame::CreateIndex
wxHtmlHelpFrame::CreateSearch
wxHtmlHelpFrame::Display
wxHtmlHelpFrame::DisplayContents
wxHtmlHelpFrame::DisplayIndex
wxHtmlHelpFrame::GetData
wxHtmlHelpFrame::KeywordSearch
wxHtmlHelpFrame::ReadCustomization
wxHtmlHelpFrame::RefreshLists
wxHtmlHelpFrame::SetTitleFormat
wxHtmlHelpFrame::UseConfig
wxHtmlHelpFrame::WriteCustomization
wxHtmlHelpFrame::AddToolbarButtons

### wxHtmlHelpFrame::wxHtmlHelpFrame

wxHtmlHelpFrame(wxHtmlHelpData* data = NULL)

wxHtmlHelpFrame(wxWindow* parent, int wxWindowID, const wxString& title = wxEmptyString, int style = wxHF_DEFAULTSTYLE, wxHtmlHelpData* data = NULL)

Constructor.

style is combination of these flags:

wxHF_TOOLBAR | Help frame has toolbar.
wxHF_FLATTOOLBAR | Help frame has toolbar with flat buttons (aka coolbar).
wxHF_CONTENTS | Help frame has contents panel.
wxHF_INDEX | Help frame has index panel.
wxHF_SEARCH | Help frame has search panel.
wxHF_BOOKMARKS | Help frame has bookmarks controls.
wxHF_OPENFILES | Allow user to open arbitrary HTML document.
wxHF_PRINT | Toolbar contains "print" button.

### wxHtmlHelpFrame::Create

bool Create(wxWindow* parent, wxWindowID id, const wxString& title = wxEmptyString, int style = wxHF_DEFAULTSTYLE)

Creates the frame.

style is combination of these flags:

wxHF_TOOLBAR | Help frame has toolbar.
wxHF_FLATTOOLBAR | Help frame has toolbar with flat buttons (aka coolbar).
wxHF_CONTENTS | Help frame has contents panel.
wxHF_INDEX | Help frame has index panel.
wxHF_SEARCH | Help frame has search panel.
wxHF_BOOKMARKS | Help frame has bookmarks controls.
wxHF_OPENFILES | Allow user to open arbitrary HTML document.
wxHF_PRINT | Toolbar contains "print" button.

### wxHtmlHelpFrame::CreateContents

void CreateContents(bool show_progress = FALSE)

Creates contents panel. (May take some time.)

### wxHtmlHelpFrame::CreateIndex

void CreateIndex(bool show_progress = FALSE)

Creates index panel. (May take some time.)

### wxHtmlHelpFrame::CreateSearch

void CreateSearch()

Creates search panel.

### wxHtmlHelpFrame::Display

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:

1. try to locate file named x (if x is for example "doc/howto.htm")
2. try to open starting page of book 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 ...")

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.

### wxHtmlHelpFrame::DisplayContents

bool DisplayContents()

Displays contents panel.

### wxHtmlHelpFrame::DisplayIndex

bool DisplayIndex()

Displays index panel.

### wxHtmlHelpFrame::GetData

wxHtmlHelpData* GetData()

Return wxHtmlHelpData object.

### wxHtmlHelpFrame::KeywordSearch

bool KeywordSearch(const wxString& keyword)

Search for given keyword.

### wxHtmlHelpFrame::ReadCustomization

void ReadCustomization(wxConfigBase* cfg, const wxString& path = wxEmptyString)

Reads user's settings for this frame (see wxHtmlHelpController::ReadCustomization)

### wxHtmlHelpFrame::RefreshLists

void RefreshLists(bool show_progress = FALSE)

Refresh all panels. This is necessary if a new book was added.

### wxHtmlHelpFrame::SetTitleFormat

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).

### wxHtmlHelpFrame::UseConfig

void UseConfig(wxConfigBase* config, const wxString& rootpath = wxEmptyString)

Add books to search choice panel.

### wxHtmlHelpFrame::WriteCustomization

void WriteCustomization(wxConfigBase* cfg, const wxString& path = wxEmptyString)

Saves user's settings for this frame (see wxHtmlHelpController::WriteCustomization).

### wxHtmlHelpFrame::AddToolbarButtons

virtual void AddToolbarButtons(wxToolBar *toolBar, int style)

You may override this virtual method to add more buttons into help frame's toolbar. toolBar is a pointer to the toolbar and style is the style flag as passed to Create method.

wxToolBar::Realize is called immediately after returning from this function.

See samples/html/helpview for an example.