]> git.saurik.com Git - wxWidgets.git/commitdiff
Add name argument to wxDataViewCtrl ctor for consistency.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Aug 2010 11:37:57 +0000 (11:37 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Aug 2010 11:37:57 +0000 (11:37 +0000)
As all the other wxWidgets controls take the parameter in their ctor/Create()
it's unexpected that wxDataViewCtrl does not. Add the name parameter and pass
it to wxWindowBase::CreateBase() as usual.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/dataview.h
include/wx/gtk/dataview.h
include/wx/osx/dataview.h
src/generic/datavgen.cpp
src/gtk/dataview.cpp
src/osx/dataview_osx.cpp

index a2d944ab93f58f15bbcddd4957e5b9db4c900ddf..aee0e0e96861b054c47940a2b0eb558d047afeab 100644 (file)
@@ -120,10 +120,11 @@ public:
     wxDataViewCtrl( wxWindow *parent, wxWindowID id,
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
-           const wxValidator& validator = wxDefaultValidator )
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxDataViewCtrlNameStr );
              : wxScrollHelper(this)
     {
-        Create(parent, id, pos, size, style, validator );
+        Create(parent, id, pos, size, style, validator, name);
     }
 
     virtual ~wxDataViewCtrl();
@@ -133,7 +134,8 @@ public:
     bool Create(wxWindow *parent, wxWindowID id,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize, long style = 0,
-                const wxValidator& validator = wxDefaultValidator );
+                const wxValidator& validator = wxDefaultValidator,
+                const wxString& name = wxDataViewCtrlNameStr);
 
     virtual bool AssociateModel( wxDataViewModel *model );
 
index b8064ad50dc3548e54ffcc94bf20ee501a988fa7..2c22beb144481f286b442c822b80c548dcc4db28 100644 (file)
@@ -113,17 +113,19 @@ public:
     wxDataViewCtrl( wxWindow *parent, wxWindowID id,
            const wxPoint& pos = wxDefaultPosition,
            const wxSize& size = wxDefaultSize, long style = 0,
-           const wxValidator& validator = wxDefaultValidator )
+           const wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxDataViewCtrlNameStr )
     {
         Init();
 
-        Create(parent, id, pos, size, style, validator );
+        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 wxValidator& validator = wxDefaultValidator,
+           const wxString& name = wxDataViewCtrlNameStr);
 
     virtual ~wxDataViewCtrl();
 
index fcb57dead1e6f5ed0364fbed502c57a8d79afc3a..cd97cd038c94aa8477d4f420a3833c65cc8250ab 100644 (file)
@@ -129,18 +129,27 @@ public:
   {
     Init();
   }
-  wxDataViewCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0,
-                 const wxValidator& validator = wxDefaultValidator)
+  wxDataViewCtrl(wxWindow *parent,
+                 wxWindowID winid,
+                 const wxPoint& pos = wxDefaultPosition,
+                 const wxSize& size = wxDefaultSize,
+                 long style = 0,
+                 const wxValidator& validator = wxDefaultValidator,
+                 const wxString& name = wxDataViewCtrlNameStr )
   {
     Init();
-    Create(parent, id, pos, size, style, validator );
+    Create(parent, winid, pos, size, style, validator, name);
   }
 
   ~wxDataViewCtrl();
 
- // explicit control creation
-  bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=0,
-              const wxValidator& validator=wxDefaultValidator);
+  bool Create(wxWindow *parent,
+              wxWindowID winid,
+              const wxPoint& pos = wxDefaultPosition,
+              const wxSize& size = wxDefaultSize,
+              long style = 0,
+              const wxValidator& validator = wxDefaultValidator,
+              const wxString& name = wxDataViewCtrlNameStr);
 
   virtual wxControl* GetMainWindow() // not used for the native implementation
   {
index c43f842d5fb0f9b41107bc95247ee310d75c1c49..b80eeaf6224cbdcc888b7ac0e64c121556b8cd49 100644 (file)
@@ -3888,9 +3888,13 @@ void wxDataViewCtrl::Init()
     m_headerArea = NULL;
 }
 
-bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id,
-                            const wxPoint& pos, const wxSize& size,
-                            long style, const wxValidator& validator )
+bool wxDataViewCtrl::Create(wxWindow *parent,
+                            wxWindowID id,
+                            const wxPoint& pos,
+                            const wxSize& size,
+                            long style,
+                            const wxValidator& validator,
+                            const wxString& name)
 {
 //    if ( (style & wxBORDER_MASK) == 0)
 //        style |= wxBORDER_SUNKEN;
@@ -3898,7 +3902,7 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id,
     Init();
 
     if (!wxControl::Create( parent, id, pos, size,
-                            style | wxScrolledWindowStyle, validator))
+                            style | wxScrolledWindowStyle, validator, name))
         return false;
 
     SetInitialSize(size);
index 586eefa182cd50a7dc05e4bf2087ecca4ed2e7d8..1763e1881e5edec34f18ddc36e0e3e6d304ba6fb 100644 (file)
@@ -4256,12 +4256,16 @@ void wxDataViewCtrl::Init()
     m_cols.DeleteContents( true );
 }
 
-bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id,
-           const wxPoint& pos, const wxSize& size,
-           long style, const wxValidator& validator )
+bool wxDataViewCtrl::Create(wxWindow *parent,
+                            wxWindowID id,
+                            const wxPoint& pos,
+                            const wxSize& size,
+                            long style,
+                            const wxValidator& validator,
+                            const wxString& name)
 {
     if (!PreCreation( parent, pos, size ) ||
-        !CreateBase( parent, id, pos, size, style, validator ))
+        !CreateBase( parent, id, pos, size, style, validator, name ))
     {
         wxFAIL_MSG( wxT("wxDataViewCtrl creation failed") );
         return false;
index 91c22b7e4376f33f0932dfca2446f6550e1e2524..41d7ca3260a257dea36ea90077d38446cd3df8ed 100644 (file)
@@ -333,9 +333,15 @@ void wxDataViewCtrl::Init()
   m_cgContext         = NULL;
 }
 
-bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator )
-{
-  if (!(wxControl::Create(parent,id,pos,size,style & ~(wxHSCROLL | wxVSCROLL),validator)))
+bool wxDataViewCtrl::Create(wxWindow *parent,
+                            wxWindowID id,
+                            const wxPoint& pos,
+                            const wxSize& size,
+                            long style,
+                            const wxValidator& validator,
+                            const wxString& name)
+{
+  if (!(wxControl::Create(parent,id,pos,size,style,validator,name)))
     return false;
   m_peer = ::CreateDataView(this,parent,id,pos,size,style,GetExtraStyle());