X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c3ead1d1513a5eb79091a604f4e42b45d1bdf5d..58ce18f2fdadecffb21e27555115af708325cf18:/include/wx/ribbon/control.h?ds=sidebyside diff --git a/include/wx/ribbon/control.h b/include/wx/ribbon/control.h index e1066a615c..7edb02d2f2 100644 --- a/include/wx/ribbon/control.h +++ b/include/wx/ribbon/control.h @@ -24,13 +24,24 @@ class wxRibbonArtProvider; class WXDLLIMPEXP_RIBBON wxRibbonControl : public wxControl { public: - wxRibbonControl() { m_art = NULL; } + wxRibbonControl() { Init(); } wxRibbonControl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxControlNameStr); + const wxString& name = wxControlNameStr) + { + Init(); + + Create(parent, id, pos, size, style, validator, name); + } + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); virtual void SetArtProvider(wxRibbonArtProvider* art); wxRibbonArtProvider* GetArtProvider() const {return m_art;} @@ -52,6 +63,9 @@ protected: virtual wxSize DoGetNextLargerSize(wxOrientation direction, wxSize relative_to) const; +private: + void Init() { m_art = NULL; } + #ifndef SWIG DECLARE_CLASS(wxRibbonControl) #endif