Add a ctor that is compatible with the documented wxHelpController API

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-04-07 04:18:11 +00:00
parent e5f9b4ae2d
commit 895c1bc001
3 changed files with 18 additions and 0 deletions

View File

@@ -46,6 +46,8 @@ class WXDLLIMPEXP_HTML wxHtmlHelpController : public wxHelpControllerBase // wxE
public: public:
wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE, wxWindow* parentWindow = NULL); wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE, wxWindow* parentWindow = NULL);
wxHtmlHelpController(wxWindow* parentWindow, int style = wxHF_DEFAULT_STYLE);
virtual ~wxHtmlHelpController(); virtual ~wxHtmlHelpController();
void SetShouldPreventAppExit(bool enable); void SetShouldPreventAppExit(bool enable);
@@ -115,6 +117,8 @@ public:
wxWindow* FindTopLevelWindow(); wxWindow* FindTopLevelWindow();
protected: protected:
void Init(int style);
virtual wxWindow* CreateHelpWindow(); virtual wxWindow* CreateHelpWindow();
virtual wxHtmlHelpFrame* CreateHelpFrame(wxHtmlHelpData *data); virtual wxHtmlHelpFrame* CreateHelpFrame(wxHtmlHelpData *data);
virtual wxHtmlHelpDialog* CreateHelpDialog(wxHtmlHelpData *data); virtual wxHtmlHelpDialog* CreateHelpDialog(wxHtmlHelpData *data);

View File

@@ -79,6 +79,8 @@ public:
*/ */
wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE, wxHtmlHelpController(int style = wxHF_DEFAULT_STYLE,
wxWindow* parentWindow = NULL); wxWindow* parentWindow = NULL);
wxHtmlHelpController(wxWindow* parentWindow, int style = wxHF_DEFAULT_STYLE);
/** /**
Adds a book (i.e. a @ref overview_html_helpformats ".hhp file"; an HTML Help Adds a book (i.e. a @ref overview_html_helpformats ".hhp file"; an HTML Help

View File

@@ -42,6 +42,17 @@ IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpController, wxHelpControllerBase)
wxHtmlHelpController::wxHtmlHelpController(int style, wxWindow* parentWindow): wxHtmlHelpController::wxHtmlHelpController(int style, wxWindow* parentWindow):
wxHelpControllerBase(parentWindow) wxHelpControllerBase(parentWindow)
{
Init(style);
}
wxHtmlHelpController::wxHtmlHelpController(wxWindow* parentWindow, int style):
wxHelpControllerBase(parentWindow)
{
Init(style);
}
void wxHtmlHelpController::Init(int style)
{ {
m_helpWindow = NULL; m_helpWindow = NULL;
m_helpFrame = NULL; m_helpFrame = NULL;
@@ -55,6 +66,7 @@ wxHtmlHelpController::wxHtmlHelpController(int style, wxWindow* parentWindow):
m_shouldPreventAppExit = false; m_shouldPreventAppExit = false;
} }
wxHtmlHelpController::~wxHtmlHelpController() wxHtmlHelpController::~wxHtmlHelpController()
{ {
#if wxUSE_CONFIG #if wxUSE_CONFIG