X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c7fc996a73e9f6a83067bc28a3c5581a3fee65..d929eddf3a3dbb04f37624d255f4e24e07595ca1:/include/wx/html/helpfrm.h diff --git a/include/wx/html/helpfrm.h b/include/wx/html/helpfrm.h index f543ee41a8..bac1a1a778 100644 --- a/include/wx/html/helpfrm.h +++ b/include/wx/html/helpfrm.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: helpfrm.h +// Name: wx/html/helpfrm.h // Purpose: wxHtmlHelpFrame // Notes: Based on htmlhelp.cpp, implementing a monolithic // HTML Help controller class, by Vaclav Slavik @@ -32,10 +32,10 @@ #include "wx/html/helpwnd.h" #include "wx/html/htmprint.h" -class WXDLLIMPEXP_CORE wxButton; -class WXDLLIMPEXP_CORE wxTextCtrl; -class WXDLLIMPEXP_CORE wxTreeEvent; -class WXDLLIMPEXP_CORE wxTreeCtrl; +class WXDLLIMPEXP_FWD_CORE wxButton; +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; +class WXDLLIMPEXP_FWD_CORE wxTreeEvent; +class WXDLLIMPEXP_FWD_CORE wxTreeCtrl; // style flags for the Help Frame @@ -62,9 +62,9 @@ class WXDLLIMPEXP_CORE wxTreeCtrl; struct wxHtmlHelpMergedIndexItem; class wxHtmlHelpMergedIndex; -class WXDLLIMPEXP_CORE wxHelpControllerBase; -class WXDLLIMPEXP_HTML wxHtmlHelpController; -class WXDLLIMPEXP_CORE wxHtmlHelpWindow; +class WXDLLIMPEXP_FWD_CORE wxHelpControllerBase; +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpController; +class WXDLLIMPEXP_FWD_HTML wxHtmlHelpWindow; class WXDLLIMPEXP_HTML wxHtmlHelpFrame : public wxFrame { @@ -74,9 +74,17 @@ public: wxHtmlHelpFrame(wxHtmlHelpData* data = NULL) { Init(data); } wxHtmlHelpFrame(wxWindow* parent, wxWindowID wxWindowID, const wxString& title = wxEmptyString, - int style = wxHF_DEFAULT_STYLE, wxHtmlHelpData* data = NULL); + int style = wxHF_DEFAULT_STYLE, wxHtmlHelpData* data = NULL +#if wxUSE_CONFIG + , wxConfigBase *config=NULL, const wxString& rootpath = wxEmptyString +#endif // wxUSE_CONFIG + ); bool Create(wxWindow* parent, wxWindowID id, const wxString& title = wxEmptyString, - int style = wxHF_DEFAULT_STYLE); + int style = wxHF_DEFAULT_STYLE +#if wxUSE_CONFIG + , wxConfigBase *config=NULL, const wxString& rootpath = wxEmptyString +#endif // wxUSE_CONFIG + ); virtual ~wxHtmlHelpFrame(); /// Returns the data associated with the window. @@ -86,7 +94,7 @@ public: wxHtmlHelpController* GetController() const { return m_helpController; } /// Sets the help controller associated with the window. - void SetController(wxHtmlHelpController* controller) { m_helpController = controller; } + void SetController(wxHtmlHelpController* controller); /// Returns the help window. wxHtmlHelpWindow* GetHelpWindow() const { return m_HtmlHelpWin; } @@ -95,19 +103,23 @@ public: // (for title of displayed HTML page) void SetTitleFormat(const wxString& format); +#if wxUSE_CONFIG // For compatibility void UseConfig(wxConfigBase *config, const wxString& rootpath = wxEmptyString); +#endif // wxUSE_CONFIG // Make the help controller's frame 'modal' if // needed void AddGrabIfNeeded(); // Override to add custom buttons to the toolbar - virtual void AddToolbarButtons(wxToolBar* WXUNUSED(toolBar), int WXUNUSED(style)) {}; + virtual void AddToolbarButtons(wxToolBar* WXUNUSED(toolBar), int WXUNUSED(style)) {} + + void SetShouldPreventAppExit(bool enable); // we don't want to prevent the app from closing just because a help window // remains opened - virtual bool ShouldPreventAppExit() const { return false; } + virtual bool ShouldPreventAppExit() const { return m_shouldPreventAppExit; } protected: void Init(wxHtmlHelpData* data = NULL); @@ -133,11 +145,12 @@ protected: wxString m_TitleFormat; // title of the help frame wxHtmlHelpWindow *m_HtmlHelpWin; wxHtmlHelpController* m_helpController; + bool m_shouldPreventAppExit; private: DECLARE_EVENT_TABLE() - DECLARE_NO_COPY_CLASS(wxHtmlHelpFrame) + wxDECLARE_NO_COPY_CLASS(wxHtmlHelpFrame); }; #endif // wxUSE_WXHTML_HELP