]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpctrl.cpp
Changed order of #ifdefs to get native version on OS/2, even if
[wxWidgets.git] / src / html / helpctrl.cpp
index 213702353480c3115a3e639c52360ddeb945a307..5e68f9535225df18aacc58d0563734f56e7919d8 100644 (file)
@@ -47,9 +47,25 @@ wxHtmlHelpController::~wxHtmlHelpController()
 {
     WriteCustomization(m_Config, m_ConfigRoot);
     if (m_helpFrame)
-        m_helpFrame->Close();
+        DestroyHelpWindow();
 }
 
+
+void wxHtmlHelpController::DestroyHelpWindow()
+{
+    //if (m_Config) WriteCustomization(m_Config, m_ConfigRoot);
+    if (m_helpFrame)
+        m_helpFrame->Destroy();
+}
+
+void wxHtmlHelpController::OnCloseFrame(wxCloseEvent& evt) 
+{
+    evt.Skip(); 
+
+    m_helpFrame = NULL; 
+}
+
+
 void wxHtmlHelpController::SetTitleFormat(const wxString& title)
 {
     m_titleFormat = title;
@@ -77,6 +93,14 @@ bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg)
     return retval;
 }
 
+
+
+wxHtmlHelpFrame *wxHtmlHelpController::CreateHelpFrame(wxHtmlHelpData *data)
+{
+    return new wxHtmlHelpFrame(data);
+}
+
+
 void wxHtmlHelpController::CreateHelpWindow()
 {
     if (m_helpFrame) {
@@ -91,7 +115,7 @@ void wxHtmlHelpController::CreateHelpWindow()
             m_ConfigRoot = _T("wxWindows/wxHtmlHelpController");
     }
 
-    m_helpFrame = new wxHtmlHelpFrame(&m_helpData);
+    m_helpFrame = CreateHelpFrame(&m_helpData);
     m_helpFrame->PushEventHandler(this);
 
     if (m_Config)