X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/506c7b5b69c42378a3ec53bf6084b909c0c05ccf..62675f1e331549a873edd094c686fae771e862c5:/include/wx/msw/helpbest.h diff --git a/include/wx/msw/helpbest.h b/include/wx/msw/helpbest.h index b8bd0bc1a9..95b128084c 100644 --- a/include/wx/msw/helpbest.h +++ b/include/wx/msw/helpbest.h @@ -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: @@ -12,19 +12,16 @@ #ifndef _WX_HELPBEST_H_ #define _WX_HELPBEST_H_ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#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" class WXDLLIMPEXP_HTML wxBestHelpController: public wxHelpControllerBase { public: - wxBestHelpController() - : m_helpControllerType( wxUseNone ), + wxBestHelpController(wxWindow* parentWindow = NULL) + : wxHelpControllerBase( parentWindow ), m_helpControllerType( wxUseNone ), m_helpController( NULL ) { } @@ -33,6 +30,7 @@ public: // 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) @@ -85,7 +83,7 @@ public: 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 ); @@ -100,6 +98,12 @@ public: 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; @@ -114,7 +118,7 @@ protected: DECLARE_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_