+void wxHtmlHelpController::UseConfig(wxConfigBase *config, const wxString& rootpath)
+{
+ m_Config = config;
+ m_ConfigRoot = rootpath;
+ if (m_helpFrame) m_helpFrame->UseConfig(config, rootpath);
+ ReadCustomization(config, rootpath);
+}
+
+//// Backward compatibility with wxHelpController API
+
+bool wxHtmlHelpController::Initialize(const wxString& file)
+{
+ wxString dir, filename, ext;
+ wxSplitPath(file, & dir, & filename, & ext);
+
+ if (!dir.IsEmpty())
+ dir = dir + wxString(wxT("/"));
+
+ // Try to find a suitable file
+ wxString actualFilename = dir + filename + wxString(wxT(".zip"));
+ if (!wxFileExists(actualFilename))
+ {
+ actualFilename = dir + filename + wxString(wxT(".htb"));
+ if (!wxFileExists(actualFilename))
+ {
+ actualFilename = dir + filename + wxString(wxT(".hhp"));
+ if (!wxFileExists(actualFilename))
+ return FALSE;
+ }
+ }
+
+ return AddBook(actualFilename);
+}
+
+bool wxHtmlHelpController::LoadFile(const wxString& WXUNUSED(file))
+{
+ // Don't reload the file or we'll have it appear again, presumably.
+ return TRUE;
+}
+
+bool wxHtmlHelpController::DisplaySection(int sectionNo)
+{
+ return Display(sectionNo);
+}
+
+bool wxHtmlHelpController::DisplayTextPopup(const wxString& text, const wxPoint& WXUNUSED(pos))
+{
+#if wxUSE_HELP
+ static wxTipWindow* s_tipWindow = NULL;
+
+ if (s_tipWindow)
+ {
+ // Prevent s_tipWindow being nulled in OnIdle,
+ // thereby removing the chance for the window to be closed by ShowHelp
+ s_tipWindow->SetTipWindowPtr(NULL);
+ s_tipWindow->Close();
+ }
+ s_tipWindow = NULL;
+
+ if ( !text.empty() )
+ {
+ s_tipWindow = new wxTipWindow(wxTheApp->GetTopWindow(), text, 100, & s_tipWindow);
+
+ return TRUE;
+ }