X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..0995b9dc18a7ce898c1c1be0e2790b258cab0fee:/include/wx/helpbase.h?ds=inline diff --git a/include/wx/helpbase.h b/include/wx/helpbase.h index 295088d4dd..f16eafdead 100644 --- a/include/wx/helpbase.h +++ b/include/wx/helpbase.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: helpbase.h +// Name: wx/helpbase.h // Purpose: Help system base classes // Author: Julian Smart // Modified by: @@ -32,10 +32,10 @@ enum wxHelpSearchMode }; // Defines the API for help controllers -class WXDLLEXPORT wxHelpControllerBase: public wxObject +class WXDLLIMPEXP_CORE 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. @@ -57,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; } @@ -82,12 +82,20 @@ public: wxPoint *WXUNUSED(pos) = NULL, bool *WXUNUSED(newFrameEachTime) = NULL) { - return (wxFrame*) NULL; // does nothing by default + return NULL; // does nothing by default } 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) };