]> git.saurik.com Git - wxWidgets.git/blobdiff - src/ribbon/control.cpp
copy item text for app menu items from wx menus
[wxWidgets.git] / src / ribbon / control.cpp
index beb97ab70a856cdb725d58cef6a8c0b74ff98e94..d80449445e475324f2a7f75f83998cbf3b9bfa77 100644 (file)
 
 IMPLEMENT_CLASS(wxRibbonControl, wxControl)
 
 
 IMPLEMENT_CLASS(wxRibbonControl, wxControl)
 
-wxRibbonControl::wxRibbonControl(wxWindow *parent, wxWindowID id,
+bool wxRibbonControl::Create(wxWindow *parent, wxWindowID id,
                     const wxPoint& pos,
                     const wxSize& size, long style,
                     const wxValidator& validator,
                     const wxString& name)
                     const wxPoint& pos,
                     const wxSize& size, long style,
                     const wxValidator& validator,
                     const wxString& name)
-    : wxControl(parent, id, pos, size, style, validator, name)
 {
 {
-    m_art = NULL;
+    if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
+        return false;
 
     wxRibbonControl *ribbon_parent = wxDynamicCast(parent, wxRibbonControl);
     if(ribbon_parent)
     {
         m_art = ribbon_parent->GetArtProvider();
     }
 
     wxRibbonControl *ribbon_parent = wxDynamicCast(parent, wxRibbonControl);
     if(ribbon_parent)
     {
         m_art = ribbon_parent->GetArtProvider();
     }
+
+    return true;
 }
 
 void wxRibbonControl::SetArtProvider(wxRibbonArtProvider* art)
 }
 
 void wxRibbonControl::SetArtProvider(wxRibbonArtProvider* art)