#include "wx/html/msw/wxhtml.rc"
\end{verbatim}
+\wxheading{Note}
+
+It is strongly recommended to use preprocessed {\bf .hhp.cached} version of
+projects. It can be either created on-the-fly (see
+\helpref{SetTempDir}{wxhtmlhelpcontrollersettempdir}) or you can use
+{\bf hhp2cached} utility from {\it utils/hhp2cached} to create it and
+distribute the cached version together with helpfiles. See {\it samples/html/help}
+sample for demonstration of its use.
+
\wxheading{Derived from}
-wxEvtHandler
+\helpref{wxEvtHandler}{wxevthandler}
\latexignore{\rtfignore{\wxheading{Members}}}
that no cached data are stored). Note that these files are {\it not}
deleted when program exits.
+Once created these cached files will be used in all subsequent executions
+of your application. If cached files become older than corresponding .hhp
+file (e.g. if you regenerate documentation) it will be refreshed.
+
\membersection{wxHtmlHelpController::SetTitleFormat}\label{wxhtmlhelpcontrollersettitleformat}
\func{void}{SetTitleFormat}{\param{const wxString\& }{format}}
Stores controllers setting (position of window etc.)
+\membersection{wxHtmlHelpController::CreateHelpFrame}\label{wxhtmlhelpcontrollercreatehelpframe}
+
+\func{virtual wxHtmlHelpFrame*}{CreateHelpFrame}{\param{wxHtmlHelpData * }{data}}
+
+This protected virtual method may be overriden so that the controller
+uses slightly different frame. See {\it samples/html/helpview} sample for
+an example.
+
+
if (style & wxHF_TOOLBAR) {
wxToolBar *toolBar = CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL | wxTB_DOCKABLE);
toolBar->SetMargins( 2, 2 );
-
- toolBar -> AddTool(wxID_HTML_PANEL, wxBITMAP(wpanel), wxNullBitmap,
- FALSE, -1, -1, (wxObject *) NULL,
- _("Show/hide navigation panel"));
- toolBar -> AddSeparator();
- toolBar -> AddTool(wxID_HTML_BACK, wxBITMAP(wback), wxNullBitmap,
- FALSE, -1, -1, (wxObject *) NULL,
- _("Go back to the previous HTML page"));
- toolBar -> AddTool(wxID_HTML_FORWARD, wxBITMAP(wforward), wxNullBitmap,
- FALSE, -1, -1, (wxObject *) NULL,
- _("Go forward to the next HTML page"));
- toolBar -> AddSeparator();
-
- if (style & wxHF_BOOKMARKS) {
- m_Bookmarks = new wxComboBox(toolBar, wxID_HTML_BOOKMARKSLIST, wxEmptyString,
- wxDefaultPosition, wxSize(300,-1), 0, NULL, wxCB_READONLY | wxCB_SORT);
- m_Bookmarks -> Append(_("<bookmarks>"));
- for (unsigned i = 0; i < m_BookmarksNames.GetCount(); i++)
- m_Bookmarks -> Append(m_BookmarksNames[i]);
- m_Bookmarks -> SetSelection(0);
- toolBar -> AddControl(m_Bookmarks);
-#ifdef __WXGTK__
- toolBar -> AddSeparator();
-#endif
- toolBar -> AddTool(wxID_HTML_BOOKMARKSADD, wxBITMAP(wbkadd), wxNullBitmap,
- FALSE, -1, -1, (wxObject *) NULL,
- _("Add current page to bookmarks"));
- toolBar -> AddTool(wxID_HTML_BOOKMARKSREMOVE, wxBITMAP(wbkdel), wxNullBitmap,
- FALSE, -1, -1, (wxObject *) NULL,
- _("Remove current page from bookmarks"));
- }
-
- toolBar -> AddSeparator();
- toolBar -> AddTool(wxID_HTML_OPTIONS, wxBITMAP(woptions), wxNullBitmap,
- FALSE, -1, -1, (wxObject *) NULL,
- _("Display options dialog"));
-
+ AddToolbarButtons(toolBar, style);
toolBar -> Realize();
}
wxHtmlHelpFrame::~wxHtmlHelpFrame()
{
+ PopEventHandler(); // wxhtmlhelpcontroller
delete m_ContentsImageList;
if (m_DataCreated)
delete m_Data;
if (m_FixedFonts) delete m_FixedFonts;
}
+
+void wxHtmlHelpFrame::AddToolbarButtons(wxToolBar *toolBar, int style)
+{
+ toolBar -> AddTool(wxID_HTML_PANEL, wxBITMAP(wpanel), wxNullBitmap,
+ FALSE, -1, -1, (wxObject *) NULL,
+ _("Show/hide navigation panel"));
+ toolBar -> AddSeparator();
+ toolBar -> AddTool(wxID_HTML_BACK, wxBITMAP(wback), wxNullBitmap,
+ FALSE, -1, -1, (wxObject *) NULL,
+ _("Go back to the previous HTML page"));
+ toolBar -> AddTool(wxID_HTML_FORWARD, wxBITMAP(wforward), wxNullBitmap,
+ FALSE, -1, -1, (wxObject *) NULL,
+ _("Go forward to the next HTML page"));
+ toolBar -> AddSeparator();
+
+ if (style & wxHF_BOOKMARKS) {
+ m_Bookmarks = new wxComboBox(toolBar, wxID_HTML_BOOKMARKSLIST, wxEmptyString,
+ wxDefaultPosition, wxSize(300,-1), 0, NULL, wxCB_READONLY | wxCB_SORT);
+ m_Bookmarks -> Append(_("<bookmarks>"));
+ for (unsigned i = 0; i < m_BookmarksNames.GetCount(); i++)
+ m_Bookmarks -> Append(m_BookmarksNames[i]);
+ m_Bookmarks -> SetSelection(0);
+ toolBar -> AddControl(m_Bookmarks);
+#ifdef __WXGTK__
+ toolBar -> AddSeparator();
+#endif
+ toolBar -> AddTool(wxID_HTML_BOOKMARKSADD, wxBITMAP(wbkadd), wxNullBitmap,
+ FALSE, -1, -1, (wxObject *) NULL,
+ _("Add current page to bookmarks"));
+ toolBar -> AddTool(wxID_HTML_BOOKMARKSREMOVE, wxBITMAP(wbkdel), wxNullBitmap,
+ FALSE, -1, -1, (wxObject *) NULL,
+ _("Remove current page from bookmarks"));
+ }
+
+ toolBar -> AddSeparator();
+ toolBar -> AddTool(wxID_HTML_OPTIONS, wxBITMAP(woptions), wxNullBitmap,
+ FALSE, -1, -1, (wxObject *) NULL,
+ _("Display options dialog"));
+}
+
+
+
bool wxHtmlHelpFrame::Display(const wxString& x)
{
wxString url = m_Data->FindPageByName(x);
return TRUE;
}
+
+
bool wxHtmlHelpFrame::KeywordSearch(const wxString& keyword)
{
if (! (m_SearchList && m_SearchButton && m_SearchText && m_SearchChoice))