]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/helpbest.h
Interface fixes for Phoenix
[wxWidgets.git] / include / wx / msw / helpbest.h
index 0345d504b56969f568057468c7d35e4a63d67ad0..d5f78ffb5f23fee9ee96f01e5d3bda232f491f91 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        helpbest.h
+// Name:        wx/msw/helpbest.h
 // Purpose:     Tries to load MS HTML Help, falls back to wxHTML upon failure
 // Author:      Mattia Barbon
 // Modified by:
 // Purpose:     Tries to load MS HTML Help, falls back to wxHTML upon failure
 // Author:      Mattia Barbon
 // Modified by:
 #ifndef _WX_HELPBEST_H_
 #define _WX_HELPBEST_H_
 
 #ifndef _WX_HELPBEST_H_
 #define _WX_HELPBEST_H_
 
-#ifdef __GNUG__
-#pragma interface "helpbest.h"
-#endif
-
-#if wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__) && wxUSE_WXHTML_HELP
+#if wxUSE_HELP && wxUSE_MS_HTML_HELP \
+    && wxUSE_WXHTML_HELP && !defined(__WXUNIVERSAL__)
 
 #include "wx/helpbase.h"
 
 #include "wx/helpbase.h"
+#include "wx/html/helpfrm.h"        // for wxHF_DEFAULT_STYLE
 
 
-class WXDLLEXPORT wxBestHelpController: public wxHelpControllerBase
+class WXDLLIMPEXP_HTML wxBestHelpController: public wxHelpControllerBase
 {
 public:
 {
 public:
-    wxBestHelpController()
-        : m_helpControllerType( wxUseNone ),
-          m_helpController( NULL )
+    wxBestHelpController(wxWindow* parentWindow = NULL,
+                         int style = wxHF_DEFAULT_STYLE)
+        : wxHelpControllerBase(parentWindow),
+          m_helpControllerType(wxUseNone),
+          m_helpController(NULL),
+          m_style(style)
     {
     }
 
     {
     }
 
@@ -33,6 +34,7 @@ public:
 
     // Must call this to set the filename
     virtual bool Initialize(const wxString& file);
 
     // Must call this to set the filename
     virtual bool Initialize(const wxString& file);
+    virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize( file ); }
 
     // If file is "", reloads file given in Initialize
     virtual bool LoadFile(const wxString& file = wxEmptyString)
 
     // If file is "", reloads file given in Initialize
     virtual bool LoadFile(const wxString& file = wxEmptyString)
@@ -70,9 +72,10 @@ public:
         return m_helpController->DisplayTextPopup( text, pos );
     }
 
         return m_helpController->DisplayTextPopup( text, pos );
     }
 
-    virtual bool KeywordSearch(const wxString& k)
+    virtual bool KeywordSearch(const wxString& k,
+                               wxHelpSearchMode mode = wxHELP_SEARCH_ALL)
     {
     {
-        return m_helpController->KeywordSearch( k );
+        return m_helpController->KeywordSearch( k, mode );
     }
 
     virtual bool Quit()
     }
 
     virtual bool Quit()
@@ -84,7 +87,7 @@ public:
     virtual void SetFrameParameters(const wxString& title,
                                     const wxSize& size,
                                     const wxPoint& pos = wxDefaultPosition,
     virtual void SetFrameParameters(const wxString& title,
                                     const wxSize& size,
                                     const wxPoint& pos = wxDefaultPosition,
-                                    bool newFrameEachTime = FALSE)
+                                    bool newFrameEachTime = false)
     {
         m_helpController->SetFrameParameters( title, size, pos,
                                               newFrameEachTime );
     {
         m_helpController->SetFrameParameters( title, size, pos,
                                               newFrameEachTime );
@@ -99,6 +102,12 @@ public:
                                                      newFrameEachTime );
     }
 
                                                      newFrameEachTime );
     }
 
+    /// Set the window that can optionally be used for the help window's parent.
+    virtual void SetParentWindow(wxWindow* win) { m_helpController->SetParentWindow(win); }
+
+    /// Get the window that can optionally be used for the help window's parent.
+    virtual wxWindow* GetParentWindow() const { return m_helpController->GetParentWindow(); }
+
 protected:
     // Append/change extension if necessary.
     wxString GetValidFilename(const wxString& file) const;
 protected:
     // Append/change extension if necessary.
     wxString GetValidFilename(const wxString& file) const;
@@ -108,12 +117,13 @@ protected:
 
     HelpControllerType m_helpControllerType;
     wxHelpControllerBase* m_helpController;
 
     HelpControllerType m_helpControllerType;
     wxHelpControllerBase* m_helpController;
+    int m_style;
 
     DECLARE_DYNAMIC_CLASS(wxBestHelpController)
 
     DECLARE_DYNAMIC_CLASS(wxBestHelpController)
-    DECLARE_NO_COPY_CLASS(wxBestHelpController)
+    wxDECLARE_NO_COPY_CLASS(wxBestHelpController);
 };
 
 };
 
-#endif // wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__) && wxUSE_WXHTML_HELP
+#endif // wxUSE_HELP && wxUSE_MS_HTML_HELP && wxUSE_WXHTML_HELP
 
 #endif
     // _WX_HELPBEST_H_
 
 #endif
     // _WX_HELPBEST_H_