+ if (m_PagesHash)
+ {
+ WX_CLEAR_HASH_TABLE(*m_PagesHash);
+ delete m_PagesHash;
+ }
+#if wxUSE_PRINTING_ARCHITECTURE
+ if (m_Printer) delete m_Printer;
+#endif
+}
+
+
+#if wxUSE_TOOLBAR
+void wxHtmlHelpFrame::AddToolbarButtons(wxToolBar *toolBar, int style)
+{
+ wxBitmap wpanelBitmap =
+ wxArtProvider::GetBitmap(wxART_HELP_SIDE_PANEL, wxART_TOOLBAR);
+ wxBitmap wbackBitmap =
+ wxArtProvider::GetBitmap(wxART_GO_BACK, wxART_TOOLBAR);
+ wxBitmap wforwardBitmap =
+ wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_TOOLBAR);
+ wxBitmap wupnodeBitmap =
+ wxArtProvider::GetBitmap(wxART_GO_TO_PARENT, wxART_TOOLBAR);
+ wxBitmap wupBitmap =
+ wxArtProvider::GetBitmap(wxART_GO_UP, wxART_TOOLBAR);
+ wxBitmap wdownBitmap =
+ wxArtProvider::GetBitmap(wxART_GO_DOWN, wxART_TOOLBAR);
+ wxBitmap wopenBitmap =
+ wxArtProvider::GetBitmap(wxART_FILE_OPEN, wxART_TOOLBAR);
+ wxBitmap wprintBitmap =
+ wxArtProvider::GetBitmap(wxART_PRINT, wxART_TOOLBAR);
+ wxBitmap woptionsBitmap =
+ wxArtProvider::GetBitmap(wxART_HELP_SETTINGS, wxART_TOOLBAR);
+
+ wxASSERT_MSG( (wpanelBitmap.Ok() && wbackBitmap.Ok() &&
+ wforwardBitmap.Ok() && wupnodeBitmap.Ok() &&
+ wupBitmap.Ok() && wdownBitmap.Ok() &&
+ wopenBitmap.Ok() && wprintBitmap.Ok() &&
+ woptionsBitmap.Ok()),
+ wxT("One or more HTML help frame toolbar bitmap could not be loaded.")) ;
+
+
+ toolBar->AddTool(wxID_HTML_PANEL, wpanelBitmap, wxNullBitmap,
+ false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
+ _("Show/hide navigation panel"));
+
+ toolBar->AddSeparator();
+ toolBar->AddTool(wxID_HTML_BACK, wbackBitmap, wxNullBitmap,
+ false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
+ _("Go back"));
+ toolBar->AddTool(wxID_HTML_FORWARD, wforwardBitmap, wxNullBitmap,
+ false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
+ _("Go forward"));
+ toolBar->AddSeparator();
+
+ toolBar->AddTool(wxID_HTML_UPNODE, wupnodeBitmap, wxNullBitmap,
+ false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
+ _("Go one level up in document hierarchy"));
+ toolBar->AddTool(wxID_HTML_UP, wupBitmap, wxNullBitmap,
+ false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
+ _("Previous page"));
+ toolBar->AddTool(wxID_HTML_DOWN, wdownBitmap, wxNullBitmap,
+ false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
+ _("Next page"));
+
+ if ((style & wxHF_PRINT) || (style & wxHF_OPEN_FILES))
+ toolBar->AddSeparator();
+
+ if (style & wxHF_OPEN_FILES)
+ toolBar->AddTool(wxID_HTML_OPENFILE, wopenBitmap, wxNullBitmap,
+ false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
+ _("Open HTML document"));
+
+#if wxUSE_PRINTING_ARCHITECTURE
+ if (style & wxHF_PRINT)
+ toolBar->AddTool(wxID_HTML_PRINT, wprintBitmap, wxNullBitmap,
+ false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
+ _("Print this page"));
+#endif
+
+ toolBar->AddSeparator();
+ toolBar->AddTool(wxID_HTML_OPTIONS, woptionsBitmap, wxNullBitmap,
+ false, wxDefaultCoord, wxDefaultCoord, (wxObject *) NULL,
+ _("Display options dialog"));
+}
+#endif //wxUSE_TOOLBAR
+
+
+void wxHtmlHelpFrame::SetTitleFormat(const wxString& format)
+{
+ if (m_HtmlWin)
+ m_HtmlWin->SetRelatedFrame(this, format);
+ m_TitleFormat = format;