]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/grid_wrap.cpp
reSWIGged
[wxWidgets.git] / wxPython / src / msw / grid_wrap.cpp
index 1ee05fc6a8f44e244b960ef0a1339d45629f6c78..8b1ba120bbe471e9aadf4a7fc07bf90616e2b786 100644 (file)
@@ -328,7 +328,7 @@ static swig_type_info *swig_types[54];
 
 
 #define wxPyMake_TEMPLATE(TYPE) \
-PyObject* wxPyMake_##TYPE(TYPE* source) { \
+PyObject* wxPyMake_##TYPE(TYPE* source, bool setThisOwn) { \
     PyObject* target = NULL; \
     if (source) { \
         /* Check if there is already a pointer to a Python object in the \
@@ -336,12 +336,13 @@ PyObject* wxPyMake_##TYPE(TYPE* source) { \
         wxPyOORClientData* data = (wxPyOORClientData*)source->GetClientObject(); \
         if (data) { \
             target = data->m_obj; \
-            Py_INCREF(target); \
+            if (target) \
+                Py_INCREF(target); \
         } \
         /* Otherwise make a new wrapper for it the old fashioned way and \
            give it the OOR treatment */ \
         if (! target) { \
-            target = wxPyConstructObject(source, wxT(#TYPE), False); \
+            target = wxPyConstructObject(source, wxT(#TYPE), setThisOwn); \
             if (target) \
                 source->SetClientObject(new wxPyOORClientData(target)); \
         } \
@@ -391,7 +392,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
         bool blocked = wxPyBeginBlockThreads();                                                \
         bool found;                                                             \
         if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) {                \
-            PyObject* obj = wxPyMake_wxGridCellAttr(attr);                      \
+            PyObject* obj = wxPyMake_wxGridCellAttr(attr,false);                \
             wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b));  \
             Py_DECREF(obj);                                                     \
         }                                                                       \
@@ -410,7 +411,7 @@ wxPyMake_TEMPLATE(wxGridTableBase)
         bool blocked = wxPyBeginBlockThreads();                                                \
         bool found;                                                             \
         if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) {                \
-            PyObject* obj = wxPyMake_wxGridCellAttr(attr);                      \
+            PyObject* obj = wxPyMake_wxGridCellAttr(attr,false);                \
             wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val));    \
             Py_DECREF(obj);                                                     \
         }                                                                       \
@@ -781,8 +782,21 @@ SWIG_FromCharPtr(const char* cptr)
   }
 }
 
+
+#define wxGRID_DEFAULT_NUMBER_ROWS        WXGRID_DEFAULT_NUMBER_ROWS
+#define wxGRID_DEFAULT_NUMBER_COLS        WXGRID_DEFAULT_NUMBER_COLS
+#define wxGRID_DEFAULT_ROW_HEIGHT         WXGRID_DEFAULT_ROW_HEIGHT
+#define wxGRID_DEFAULT_COL_WIDTH          WXGRID_DEFAULT_COL_WIDTH
+#define wxGRID_DEFAULT_COL_LABEL_HEIGHT   WXGRID_DEFAULT_COL_LABEL_HEIGHT
+#define wxGRID_DEFAULT_ROW_LABEL_WIDTH    WXGRID_DEFAULT_ROW_LABEL_WIDTH
+#define wxGRID_LABEL_EDGE_ZONE            WXGRID_LABEL_EDGE_ZONE
+#define wxGRID_MIN_ROW_HEIGHT             WXGRID_MIN_ROW_HEIGHT
+#define wxGRID_MIN_COL_WIDTH              WXGRID_MIN_COL_WIDTH
+#define wxGRID_DEFAULT_SCROLLBAR_WIDTH    WXGRID_DEFAULT_SCROLLBAR_WIDTH
+
 void wxGridCellRenderer__setOORInfo(wxGridCellRenderer *self,PyObject *_self){
-            self->SetClientObject(new wxPyOORClientData(_self));
+            if (!self->GetClientObject())
+                self->SetClientObject(new wxPyOORClientData(_self));
         }
 
 #include <limits.h>
@@ -884,9 +898,9 @@ public:
               int row, int col, bool isSelected) {
         bool blocked = wxPyBeginBlockThreads();
         if (wxPyCBH_findCallback(m_myInst, "Draw")) {
-            PyObject* go = wxPyMake_wxObject(&grid);
-            PyObject* dco = wxPyMake_wxObject(&dc);
-            PyObject* ao = wxPyMake_wxGridCellAttr(&attr);
+            PyObject* go = wxPyMake_wxObject(&grid,false);
+            PyObject* dco = wxPyMake_wxObject(&dc,false);
+            PyObject* ao = wxPyMake_wxGridCellAttr(&attr,false);
             PyObject* ro = wxPyConstructObject((void*)&rect, wxT("wxRect"), 0);
 
             wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOOOiii)", go, ao, dco, ro,
@@ -906,9 +920,9 @@ public:
         if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) {
             PyObject* ro;
             wxSize*   ptr;
-            PyObject* go = wxPyMake_wxObject(&grid);
-            PyObject* dco = wxPyMake_wxObject(&dc);
-            PyObject* ao = wxPyMake_wxGridCellAttr(&attr);
+            PyObject* go = wxPyMake_wxObject(&grid,false);
+            PyObject* dco = wxPyMake_wxObject(&dc,false);
+            PyObject* ao = wxPyMake_wxGridCellAttr(&attr,false);
 
             ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOOii)",
                                                                  go, ao, dco,
@@ -969,7 +983,8 @@ IMP_PYCALLBACK__STRING( wxPyGridCellRenderer, wxGridCellRenderer, SetParameters)
 
 
 void wxGridCellEditor__setOORInfo(wxGridCellEditor *self,PyObject *_self){
-            self->SetClientObject(new wxPyOORClientData(_self));
+            if (!self->GetClientObject())
+                self->SetClientObject(new wxPyOORClientData(_self));
         }
 
 class wxPyGridCellEditor : public wxGridCellEditor
@@ -980,8 +995,8 @@ public:
     void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) {
         bool blocked = wxPyBeginBlockThreads();
         if (wxPyCBH_findCallback(m_myInst, "Create")) {
-            PyObject* po = wxPyMake_wxObject(parent);
-            PyObject* eo = wxPyMake_wxObject(evtHandler);
+            PyObject* po = wxPyMake_wxObject(parent,false);
+            PyObject* eo = wxPyMake_wxObject(evtHandler,false);
 
             wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OiO)", po, id, eo));
             Py_DECREF(po);
@@ -994,7 +1009,7 @@ public:
     void BeginEdit(int row, int col, wxGrid* grid) {
         bool blocked = wxPyBeginBlockThreads();
         if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) {
-            PyObject* go = wxPyMake_wxObject(grid);
+            PyObject* go = wxPyMake_wxObject(grid,false);
             wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, go));
             Py_DECREF(go);
         }
@@ -1006,7 +1021,7 @@ public:
         bool rv = False;
         bool blocked = wxPyBeginBlockThreads();
         if (wxPyCBH_findCallback(m_myInst, "EndEdit")) {
-            PyObject* go = wxPyMake_wxObject(grid);
+            PyObject* go = wxPyMake_wxObject(grid,false);
             rv = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, go));
             Py_DECREF(go);
         }
@@ -1037,7 +1052,7 @@ public:
         bool found;
         bool blocked = wxPyBeginBlockThreads();
         if ((found = wxPyCBH_findCallback(m_myInst, "Show"))) {
-            PyObject* ao = wxPyMake_wxGridCellAttr(attr);
+            PyObject* ao = wxPyMake_wxGridCellAttr(attr,false);
             wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)", show, ao));
             Py_DECREF(ao);
         }
@@ -1054,7 +1069,7 @@ public:
         bool found;
         bool blocked = wxPyBeginBlockThreads();
         if ((found = wxPyCBH_findCallback(m_myInst, "PaintBackground)"))) {
-            PyObject* ao = wxPyMake_wxGridCellAttr(attr);
+            PyObject* ao = wxPyMake_wxGridCellAttr(attr,false);
             PyObject* ro = wxPyConstructObject((void*)&rectCell, wxT("wxRect"), 0);
 
             wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", ro, ao));
@@ -1097,7 +1112,8 @@ IMP_PYCALLBACK_STRING__constpure(wxPyGridCellEditor, wxGridCellEditor, GetValue)
 
 
 void wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject *_self){
-            self->SetClientObject(new wxPyOORClientData(_self));
+            if (!self->GetClientObject())
+                self->SetClientObject(new wxPyOORClientData(_self));
         }
 
 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
@@ -1127,7 +1143,8 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
 }
 
 void wxGridCellAttrProvider__setOORInfo(wxGridCellAttrProvider *self,PyObject *_self){
-            self->SetClientObject(new wxPyOORClientData(_self));
+            if (!self->GetClientObject())
+                self->SetClientObject(new wxPyOORClientData(_self));
         }
 
 SWIGSTATICINLINE(unsigned long)
@@ -1172,7 +1189,8 @@ public:
 };
 
 void wxGridTableBase__setOORInfo(wxGridTableBase *self,PyObject *_self){
-            self->SetClientObject(new wxPyOORClientData(_self));
+            if (!self->GetClientObject())
+                self->SetClientObject(new wxPyOORClientData(_self));
         }
 
 SWIGSTATICINLINE(int)
@@ -1252,6 +1270,11 @@ public:
             PyObject* ro;
             ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col));
             if (ro) {
+                if (!PyString_Check(ro) && !PyUnicode_Check(ro)) {
+                    PyObject* old = ro;
+                    ro = PyObject_Str(ro);
+                    Py_DECREF(old);
+                }
                 rval = Py2wxString(ro);
                 Py_DECREF(ro);
             }
@@ -1381,7 +1404,7 @@ bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) {
 
 bool wxGridCellCoords_typecheck(PyObject* source) {
     void* ptr;
-    
+
     if (wxPySwigInstance_Check(source) &&
         wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxGridCellCoords")))
         return True;
@@ -1389,7 +1412,7 @@ bool wxGridCellCoords_typecheck(PyObject* source) {
     PyErr_Clear();
     if (PySequence_Check(source) && PySequence_Length(source) == 2)
         return True;
-    
+
     return False;
 }
 
@@ -1749,7 +1772,7 @@ static PyObject *_wrap_GridCellRenderer_Clone(PyObject *self, PyObject *args, Py
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellRenderer(result); 
+        resultobj = wxPyMake_wxGridCellRenderer(result, 0); 
     }
     return resultobj;
     fail:
@@ -2305,7 +2328,7 @@ static PyObject *_wrap_GridCellEditor_GetControl(PyObject *self, PyObject *args,
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
@@ -2362,7 +2385,7 @@ static PyObject *_wrap_GridCellEditor_GetCellAttr(PyObject *self, PyObject *args
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellAttr(result); 
+        resultobj = wxPyMake_wxGridCellAttr(result, 0); 
     }
     return resultobj;
     fail:
@@ -2649,7 +2672,7 @@ static PyObject *_wrap_GridCellEditor_Clone(PyObject *self, PyObject *args, PyOb
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellEditor(result); 
+        resultobj = wxPyMake_wxGridCellEditor(result, 0); 
     }
     return resultobj;
     fail:
@@ -3823,7 +3846,7 @@ static PyObject *_wrap_new_GridCellAttr(PyObject *self, PyObject *args, PyObject
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellAttr(result); 
+        resultobj = wxPyMake_wxGridCellAttr(result, 1); 
     }
     return resultobj;
     fail:
@@ -3851,7 +3874,7 @@ static PyObject *_wrap_GridCellAttr_Clone(PyObject *self, PyObject *args, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellAttr(result); 
+        resultobj = wxPyMake_wxGridCellAttr(result, 0); 
     }
     return resultobj;
     fail:
@@ -4703,7 +4726,7 @@ static PyObject *_wrap_GridCellAttr_GetRenderer(PyObject *self, PyObject *args,
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellRenderer(result); 
+        resultobj = wxPyMake_wxGridCellRenderer(result, 0); 
     }
     return resultobj;
     fail:
@@ -4743,7 +4766,7 @@ static PyObject *_wrap_GridCellAttr_GetEditor(PyObject *self, PyObject *args, Py
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellEditor(result); 
+        resultobj = wxPyMake_wxGridCellEditor(result, 0); 
     }
     return resultobj;
     fail:
@@ -4857,7 +4880,7 @@ static PyObject *_wrap_new_GridCellAttrProvider(PyObject *self, PyObject *args,
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellAttrProvider(result); 
+        resultobj = wxPyMake_wxGridCellAttrProvider(result, 1); 
     }
     return resultobj;
     fail:
@@ -4925,7 +4948,7 @@ static PyObject *_wrap_GridCellAttrProvider_GetAttr(PyObject *self, PyObject *ar
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellAttr(result); 
+        resultobj = wxPyMake_wxGridCellAttr(result, 0); 
     }
     return resultobj;
     fail:
@@ -5194,7 +5217,7 @@ static PyObject *_wrap_PyGridCellAttrProvider_base_GetAttr(PyObject *self, PyObj
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellAttr(result); 
+        resultobj = wxPyMake_wxGridCellAttr(result, 0); 
     }
     return resultobj;
     fail:
@@ -5389,7 +5412,7 @@ static PyObject *_wrap_GridTableBase_GetAttrProvider(PyObject *self, PyObject *a
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellAttrProvider(result); 
+        resultobj = wxPyMake_wxGridCellAttrProvider(result, 0); 
     }
     return resultobj;
     fail:
@@ -5446,7 +5469,7 @@ static PyObject *_wrap_GridTableBase_GetView(PyObject *self, PyObject *args, PyO
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
@@ -6465,7 +6488,7 @@ static PyObject *_wrap_GridTableBase_GetAttr(PyObject *self, PyObject *args, PyO
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellAttr(result); 
+        resultobj = wxPyMake_wxGridCellAttr(result, 0); 
     }
     return resultobj;
     fail:
@@ -7280,7 +7303,7 @@ static PyObject *_wrap_PyGridTableBase_base_GetAttr(PyObject *self, PyObject *ar
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellAttr(result); 
+        resultobj = wxPyMake_wxGridCellAttr(result, 0); 
     }
     return resultobj;
     fail:
@@ -7555,7 +7578,7 @@ static PyObject *_wrap_GridTableMessage_GetTableObject(PyObject *self, PyObject
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridTableBase(result); 
+        resultobj = wxPyMake_wxGridTableBase(result, 0); 
     }
     return resultobj;
     fail:
@@ -8101,11 +8124,9 @@ static PyObject *_wrap_new_Grid(PyObject *self, PyObject *args, PyObject *kwargs
         result = (wxGrid *)new wxGrid(arg1,arg2,(wxPoint const &)*arg3,(wxSize const &)*arg4,arg5,(wxString const &)*arg6);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
-    }
-    {
-        resultobj = wxPyMake_wxObject(result); 
+        if (PyErr_Occurred()) SWIG_fail;
     }
+    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxGrid, 1);
     {
         if (temp6)
         delete arg6;
@@ -8134,11 +8155,9 @@ static PyObject *_wrap_new_PreGrid(PyObject *self, PyObject *args, PyObject *kwa
         result = (wxGrid *)new wxGrid();
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
-    }
-    {
-        resultobj = wxPyMake_wxObject(result); 
+        if (PyErr_Occurred()) SWIG_fail;
     }
+    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxGrid, 1);
     return resultobj;
     fail:
     return NULL;
@@ -8434,7 +8453,7 @@ static PyObject *_wrap_Grid_GetTable(PyObject *self, PyObject *args, PyObject *k
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridTableBase(result); 
+        resultobj = wxPyMake_wxGridTableBase(result, 0); 
     }
     return resultobj;
     fail:
@@ -13065,7 +13084,7 @@ static PyObject *_wrap_Grid_GetDefaultRenderer(PyObject *self, PyObject *args, P
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellRenderer(result); 
+        resultobj = wxPyMake_wxGridCellRenderer(result, 0); 
     }
     return resultobj;
     fail:
@@ -13101,7 +13120,7 @@ static PyObject *_wrap_Grid_GetCellRenderer(PyObject *self, PyObject *args, PyOb
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellRenderer(result); 
+        resultobj = wxPyMake_wxGridCellRenderer(result, 0); 
     }
     return resultobj;
     fail:
@@ -13195,7 +13214,7 @@ static PyObject *_wrap_Grid_GetDefaultEditor(PyObject *self, PyObject *args, PyO
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellEditor(result); 
+        resultobj = wxPyMake_wxGridCellEditor(result, 0); 
     }
     return resultobj;
     fail:
@@ -13231,7 +13250,7 @@ static PyObject *_wrap_Grid_GetCellEditor(PyObject *self, PyObject *args, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellEditor(result); 
+        resultobj = wxPyMake_wxGridCellEditor(result, 0); 
     }
     return resultobj;
     fail:
@@ -14122,7 +14141,7 @@ static PyObject *_wrap_Grid_GetDefaultEditorForCell(PyObject *self, PyObject *ar
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellEditor(result); 
+        resultobj = wxPyMake_wxGridCellEditor(result, 0); 
     }
     return resultobj;
     fail:
@@ -14158,7 +14177,7 @@ static PyObject *_wrap_Grid_GetDefaultRendererForCell(PyObject *self, PyObject *
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellRenderer(result); 
+        resultobj = wxPyMake_wxGridCellRenderer(result, 0); 
     }
     return resultobj;
     fail:
@@ -14194,7 +14213,7 @@ static PyObject *_wrap_Grid_GetDefaultEditorForType(PyObject *self, PyObject *ar
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellEditor(result); 
+        resultobj = wxPyMake_wxGridCellEditor(result, 0); 
     }
     {
         if (temp2)
@@ -14238,7 +14257,7 @@ static PyObject *_wrap_Grid_GetDefaultRendererForType(PyObject *self, PyObject *
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxGridCellRenderer(result); 
+        resultobj = wxPyMake_wxGridCellRenderer(result, 0); 
     }
     {
         if (temp2)
@@ -14307,7 +14326,7 @@ static PyObject *_wrap_Grid_GetGridWindow(PyObject *self, PyObject *args, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
@@ -14335,7 +14354,7 @@ static PyObject *_wrap_Grid_GetGridRowLabelWindow(PyObject *self, PyObject *args
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
@@ -14363,7 +14382,7 @@ static PyObject *_wrap_Grid_GetGridColLabelWindow(PyObject *self, PyObject *args
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
@@ -14391,7 +14410,7 @@ static PyObject *_wrap_Grid_GetGridCornerLabelWindow(PyObject *self, PyObject *a
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
@@ -14419,7 +14438,7 @@ static PyObject *_wrap_Grid_GetClassDefaultAttributes(PyObject *self, PyObject *
         result = wxGrid::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -15514,7 +15533,7 @@ static PyObject *_wrap_GridEditorCreatedEvent_GetControl(PyObject *self, PyObjec
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        resultobj = wxPyMake_wxObject(result); 
+        resultobj = wxPyMake_wxObject(result, 0); 
     }
     return resultobj;
     fail:
@@ -17264,6 +17283,16 @@ SWIGEXPORT(void) SWIG_init(void) {
     PyDict_SetItemString(d,"GRID_VALUE_DATETIME", SWIG_FromCharPtr("datetime"));
     SWIG_addvarlink(SWIG_globals,(char*)"GridNoCellCoords",_wrap_GridNoCellCoords_get, _wrap_GridNoCellCoords_set);
     SWIG_addvarlink(SWIG_globals,(char*)"GridNoCellRect",_wrap_GridNoCellRect_get, _wrap_GridNoCellRect_set);
+    PyDict_SetItemString(d,"GRID_DEFAULT_NUMBER_ROWS", SWIG_FromInt((int)wxGRID_DEFAULT_NUMBER_ROWS));
+    PyDict_SetItemString(d,"GRID_DEFAULT_NUMBER_COLS", SWIG_FromInt((int)wxGRID_DEFAULT_NUMBER_COLS));
+    PyDict_SetItemString(d,"GRID_DEFAULT_ROW_HEIGHT", SWIG_FromInt((int)wxGRID_DEFAULT_ROW_HEIGHT));
+    PyDict_SetItemString(d,"GRID_DEFAULT_COL_WIDTH", SWIG_FromInt((int)wxGRID_DEFAULT_COL_WIDTH));
+    PyDict_SetItemString(d,"GRID_DEFAULT_COL_LABEL_HEIGHT", SWIG_FromInt((int)wxGRID_DEFAULT_COL_LABEL_HEIGHT));
+    PyDict_SetItemString(d,"GRID_DEFAULT_ROW_LABEL_WIDTH", SWIG_FromInt((int)wxGRID_DEFAULT_ROW_LABEL_WIDTH));
+    PyDict_SetItemString(d,"GRID_LABEL_EDGE_ZONE", SWIG_FromInt((int)wxGRID_LABEL_EDGE_ZONE));
+    PyDict_SetItemString(d,"GRID_MIN_ROW_HEIGHT", SWIG_FromInt((int)wxGRID_MIN_ROW_HEIGHT));
+    PyDict_SetItemString(d,"GRID_MIN_COL_WIDTH", SWIG_FromInt((int)wxGRID_MIN_COL_WIDTH));
+    PyDict_SetItemString(d,"GRID_DEFAULT_SCROLLBAR_WIDTH", SWIG_FromInt((int)wxGRID_DEFAULT_SCROLLBAR_WIDTH));
     PyDict_SetItemString(d,"GridCellAttr_Any", SWIG_FromInt((int)wxGridCellAttr::Any));
     PyDict_SetItemString(d,"GridCellAttr_Default", SWIG_FromInt((int)wxGridCellAttr::Default));
     PyDict_SetItemString(d,"GridCellAttr_Cell", SWIG_FromInt((int)wxGridCellAttr::Cell));