X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d3e7b52d84580c28df8f754b81363502f917ac7..3b49331b7441e091fc5997b830801d76a1243f28:/include/wx/helpbase.h diff --git a/include/wx/helpbase.h b/include/wx/helpbase.h index 7aa494a01d..614ccae69d 100644 --- a/include/wx/helpbase.h +++ b/include/wx/helpbase.h @@ -12,10 +12,6 @@ #ifndef _WX_HELPBASEH__ #define _WX_HELPBASEH__ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "helpbase.h" -#endif - #include "wx/defs.h" #if wxUSE_HELP @@ -39,7 +35,7 @@ enum wxHelpSearchMode class WXDLLEXPORT wxHelpControllerBase: public wxObject { public: - inline wxHelpControllerBase() {} + inline wxHelpControllerBase(wxWindow* parentWindow = NULL) { m_parentWindow = parentWindow; } inline ~wxHelpControllerBase() {} // Must call this to set the filename and server name. @@ -61,7 +57,7 @@ public: virtual bool DisplaySection(int sectionNo) = 0; // Display the section using a context id - virtual bool DisplayContextPopup(int WXUNUSED(contextId)) { return false; }; + virtual bool DisplayContextPopup(int WXUNUSED(contextId)) { return false; } // Display the text in a popup, if possible virtual bool DisplayTextPopup(const wxString& WXUNUSED(text), const wxPoint& WXUNUSED(pos)) { return false; } @@ -92,6 +88,14 @@ public: virtual bool Quit() = 0; virtual void OnQuit() {} + /// Set the window that can optionally be used for the help window's parent. + virtual void SetParentWindow(wxWindow* win) { m_parentWindow = win; } + + /// Get the window that can optionally be used for the help window's parent. + virtual wxWindow* GetParentWindow() const { return m_parentWindow; } + +protected: + wxWindow* m_parentWindow; private: DECLARE_CLASS(wxHelpControllerBase) };