]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/grid.cpp
Font updates
[wxWidgets.git] / wxPython / src / msw / grid.cpp
index fa647926d97b7d84b33b9d8fd0820a55aa0c7ab5..9af5e6c4c44290fd8057e9df05b5cfe5bf6798b6 100644 (file)
@@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void);
 
 #define SWIG_name    "gridc"
 
-#include "export.h"
+#include "wxPython.h"
 #include <wx/grid.h>
 #include <wx/generic/gridctrl.h>
 
@@ -86,6 +86,44 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     return target;
 }
 
+    // Put some wx default wxChar* values into wxStrings.
+    DECLARE_DEF_STRING(PanelNameStr);
+    DECLARE_DEF_STRING2(DateTimeFormatStr, wxT("%c"));
+    static const wxString wxPyEmptyString(wxT(""));
+
+
+#define wxPyMake_TEMPLATE(TYPE) \
+PyObject* wxPyMake_##TYPE(TYPE* source) { \
+    PyObject* target = NULL; \
+    if (source) { \
+        /* Check if there is already a pointer to a Python object in the \
+           OOR data that we can use. */ \
+        wxPyOORClientData* data = (wxPyOORClientData*)source->GetClientObject(); \
+        if (data) { \
+            target = data->m_obj; \
+            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, #TYPE, FALSE); \
+            if (target) \
+                source->SetClientObject(new wxPyOORClientData(target)); \
+        } \
+    } else {  /* source was NULL so return None. */ \
+        Py_INCREF(Py_None); target = Py_None; \
+    } \
+    return target; \
+} \
+
+
+wxPyMake_TEMPLATE(wxGridCellRenderer)
+wxPyMake_TEMPLATE(wxGridCellEditor)
+wxPyMake_TEMPLATE(wxGridCellAttr)
+wxPyMake_TEMPLATE(wxGridCellAttrProvider)
+wxPyMake_TEMPLATE(wxGridTableBase)
+
+
 #define PYCALLBACK_GCA_INTINTKIND(PCLASS, CBNAME)                               \
     wxGridCellAttr* CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) {        \
         wxGridCellAttr* rval = NULL;                                            \
@@ -114,14 +152,14 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
 
 #define PYCALLBACK__GCAINTINT(PCLASS, CBNAME)                                   \
     void CBNAME(wxGridCellAttr *attr, int a, int b) {                           \
-        wxPyBeginBlockThreads();                            \
+        wxPyBeginBlockThreads();                                                \
         bool found;                                                             \
         if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) {                \
-            PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\
-            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b));   \
+            PyObject* obj = wxPyMake_wxGridCellAttr(attr);                      \
+            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b));  \
             Py_DECREF(obj);                                                     \
         }                                                                       \
-        wxPyEndBlockThreads();                                             \
+        wxPyEndBlockThreads();                                                  \
         if (! found)                                                            \
             PCLASS::CBNAME(attr, a, b);                                         \
     }                                                                           \
@@ -133,10 +171,10 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
 
 #define PYCALLBACK__GCAINT(PCLASS, CBNAME)                                      \
     void CBNAME(wxGridCellAttr *attr, int val) {                                \
-        wxPyBeginBlockThreads();                            \
+        wxPyBeginBlockThreads();                                                \
         bool found;                                                             \
         if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) {                \
-            PyObject* obj = wxPyConstructObject((void*)attr, "wxGridCellAttr", 0);\
+            PyObject* obj = wxPyMake_wxGridCellAttr(attr);                      \
             wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val));    \
             Py_DECREF(obj);                                                     \
         }                                                                       \
@@ -193,8 +231,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
 #define PYCALLBACK__INTINTSTRING_pure(CBNAME)                                   \
     void CBNAME(int a, int b, const wxString& c) {                              \
         wxPyBeginBlockThreads();                                                \
-        if (wxPyCBH_findCallback(m_myInst, #CBNAME))                            \
-            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",a,b,wx2PyString(c)));\
+        if (wxPyCBH_findCallback(m_myInst, #CBNAME)) {                          \
+            PyObject* s = wx2PyString(c);                                       \
+            rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",a,b,s));\
+            Py_DECREF(s);                                                       \
+        }                                                                       \
         wxPyEndBlockThreads();                                                  \
     }
 
@@ -227,8 +268,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
         bool rval = 0;                                                          \
         bool found;                                                             \
         wxPyBeginBlockThreads();                                                \
-        if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME)))                  \
-            rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", a,b,wx2PyString(c)));\
+        if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) {                \
+            PyObject* s = wx2PyString(c);                                       \
+            rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",a,b,s));\
+            Py_DECREF(s);                                                       \
+        }                                                                       \
         wxPyEndBlockThreads();                                                  \
         if (! found)                                                            \
             rval = PCLASS::CBNAME(a,b,c);                                       \
@@ -291,7 +335,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
                 Py_DECREF(ro);   Py_DECREF(str);                                \
             }                                                                   \
         }                                                                       \
-        wxPyEndBlockThreads();                                             \
+        wxPyEndBlockThreads();                                                  \
         if (! found)                                                            \
             rval = PCLASS::CBNAME(a, b);                                        \
         return rval;                                                            \
@@ -305,10 +349,10 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
 #define PYCALLBACK__(PCLASS, CBNAME)                                            \
     void CBNAME()  {                                                            \
         bool found;                                                             \
-        wxPyBeginBlockThreads();                            \
+        wxPyBeginBlockThreads();                                                \
         if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME)))                  \
             wxPyCBH_callCallback(m_myInst, Py_BuildValue("()"));                \
-        wxPyEndBlockThreads();                                             \
+        wxPyEndBlockThreads();                                                  \
         if (! found)                                                            \
             PCLASS::CBNAME();                                                   \
     }                                                                           \
@@ -323,10 +367,10 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     bool CBNAME(size_t a, size_t b)  {                                          \
         bool rval = 0;                                                          \
         bool found;                                                             \
-        wxPyBeginBlockThreads();                            \
+        wxPyBeginBlockThreads();                                                \
         if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME)))                  \
             rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b));  \
-        wxPyEndBlockThreads();                                             \
+        wxPyEndBlockThreads();                                                  \
         if (! found)                                                            \
             rval = PCLASS::CBNAME(a,b);                                         \
         return rval;                                                            \
@@ -341,10 +385,10 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     bool CBNAME(size_t a)  {                                                    \
         bool rval = 0;                                                          \
         bool found;                                                             \
-        wxPyBeginBlockThreads();                            \
+        wxPyBeginBlockThreads();                                                \
         if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME)))                  \
             rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)", a));     \
-        wxPyEndBlockThreads();                                             \
+        wxPyEndBlockThreads();                                                  \
         if (! found)                                                            \
             rval = PCLASS::CBNAME(a);                                           \
         return rval;                                                            \
@@ -381,8 +425,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     void CBNAME(int a, const wxString& c)  {                                    \
         bool found;                                                             \
         wxPyBeginBlockThreads();                                                \
-        if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME)))                  \
-            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)", a, wx2PyString(c))); \
+        if (wxPyCBH_findCallback(m_myInst, #CBNAME)) {                          \
+            PyObject* s = wx2PyString(c);                                       \
+            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)",a,s));          \
+            Py_DECREF(s);                                                       \
+        }                                                                       \
         wxPyEndBlockThreads();                                                  \
         if (! found)                                                            \
             PCLASS::CBNAME(a,c);                                                \
@@ -491,13 +538,17 @@ public:
               int row, int col, bool isSelected) {
         wxPyBeginBlockThreads();
         if (wxPyCBH_findCallback(m_myInst, "Draw")) {
-            wxPyCBH_callCallback(m_myInst,
-                Py_BuildValue("(OOOOiii)",
-                              wxPyConstructObject((void*)&grid, "wxGrid", 0),
-                              wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0),
-                              wxPyConstructObject((void*)&dc,   "wxDC", 0),
-                              wxPyConstructObject((void*)&rect, "wxRect", 0),
-                              row, col, isSelected));
+            PyObject* go = wxPyMake_wxObject(&grid);
+            PyObject* dco = wxPyMake_wxObject(&dc);
+            PyObject* ao = wxPyMake_wxGridCellAttr(&attr);
+            PyObject* ro = wxPyConstructObject((void*)&rect, "wxRect", 0);
+
+            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOOOiii)", go, ao, dco, ro,
+                                                         row, col, isSelected));
+            Py_DECREF(go);
+            Py_DECREF(ao);
+            Py_DECREF(dco);
+            Py_DECREF(ro);
         }
         wxPyEndBlockThreads();
     }
@@ -509,15 +560,35 @@ public:
         if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) {
             PyObject* ro;
             wxSize*   ptr;
-            ro = wxPyCBH_callCallbackObj(m_myInst,
-                Py_BuildValue("(OOOii)",
-                              wxPyConstructObject((void*)&grid, "wxGrid", 0),
-                              wxPyConstructObject((void*)&attr, "wxGridCellAttr", 0),
-                              wxPyConstructObject((void*)&dc,   "wxDC", 0),
-                              row, col));
+            PyObject* go = wxPyMake_wxObject(&grid);
+            PyObject* dco = wxPyMake_wxObject(&dc);
+            PyObject* ao = wxPyMake_wxGridCellAttr(&attr);
+
+            ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOOii)",
+                                                                 go, ao, dco,
+                                                                 row, col));
+            Py_DECREF(go);
+            Py_DECREF(ao);
+            Py_DECREF(dco);
+
             if (ro) {
-                if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p"))
+                const char* errmsg = "GetBestSize should return a 2-tuple of integers or a wxSize object.";
+                if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) {
                     rval = *ptr;
+                }
+                else if (PySequence_Check(ro) && PyObject_Length(ro) == 2) {
+                    PyObject* o1 = PySequence_GetItem(ro, 0);
+                    PyObject* o2 = PySequence_GetItem(ro, 1);
+                    if (PyNumber_Check(o1) && PyNumber_Check(o2))
+                        rval = wxSize(PyInt_AsLong(o1), PyInt_AsLong(o2));
+                    else
+                        PyErr_SetString(PyExc_TypeError, errmsg);
+                    Py_DECREF(o1);
+                    Py_DECREF(o2);
+                }
+                else {
+                    PyErr_SetString(PyExc_TypeError, errmsg);
+                }
                 Py_DECREF(ro);
             }
         }
@@ -559,11 +630,12 @@ public:
     void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) {
         wxPyBeginBlockThreads();
         if (wxPyCBH_findCallback(m_myInst, "Create")) {
-            wxPyCBH_callCallback(m_myInst,
-                Py_BuildValue("(OiO)",
-                              wxPyConstructObject((void*)parent, "wxWindow", 0),
-                              id,
-                              wxPyConstructObject((void*)evtHandler, "wxEvtHandler", 0)));
+            PyObject* po = wxPyMake_wxObject(parent);
+            PyObject* eo = wxPyMake_wxObject(evtHandler);
+
+            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OiO)", po, id, eo));
+            Py_DECREF(po);
+            Py_DECREF(eo);
         }
         wxPyEndBlockThreads();
     }
@@ -572,9 +644,9 @@ public:
     void BeginEdit(int row, int col, wxGrid* grid) {
         wxPyBeginBlockThreads();
         if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) {
-            wxPyCBH_callCallback(m_myInst,
-                Py_BuildValue("(iiO)", row, col,
-                              wxPyConstructObject((void*)grid, "wxGrid", 0)));
+            PyObject* go = wxPyMake_wxObject(grid);
+            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, go));
+            Py_DECREF(go);
         }
         wxPyEndBlockThreads();
     }
@@ -584,9 +656,9 @@ public:
         bool rv = FALSE;
         wxPyBeginBlockThreads();
         if (wxPyCBH_findCallback(m_myInst, "EndEdit")) {
-            rv = wxPyCBH_callCallback(m_myInst,
-                Py_BuildValue("(iiO)", row, col,
-                              wxPyConstructObject((void*)grid, "wxGrid", 0)));
+            PyObject* go = wxPyMake_wxObject(grid);
+            rv = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, go));
+            Py_DECREF(go);
         }
         wxPyEndBlockThreads();
         return rv;
@@ -614,10 +686,11 @@ public:
     void Show(bool show, wxGridCellAttr *attr) {
         bool found;
         wxPyBeginBlockThreads();
-        if ((found = wxPyCBH_findCallback(m_myInst, "Show")))
-            wxPyCBH_callCallback(m_myInst,
-                Py_BuildValue("(iO)", show,
-                              wxPyConstructObject((void*)attr, "wxGridCellAttr", 0)));
+        if ((found = wxPyCBH_findCallback(m_myInst, "Show"))) {
+            PyObject* ao = wxPyMake_wxGridCellAttr(attr);
+            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)", show, ao));
+            Py_DECREF(ao);
+        }
         wxPyEndBlockThreads();
         if (! found)
             wxGridCellEditor::Show(show, attr);
@@ -628,13 +701,17 @@ public:
 
 
     void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) {
-        bool found;                                                             \
+        bool found;
         wxPyBeginBlockThreads();
-        if ((found = wxPyCBH_findCallback(m_myInst, "PaintBackground)")))
-            wxPyCBH_callCallback(m_myInst,
-                Py_BuildValue("(OO)",
-                              wxPyConstructObject((void*)&rectCell, "wxRect", 0),
-                              wxPyConstructObject((void*)attr, "wxGridCellAttr", 0)));
+        if ((found = wxPyCBH_findCallback(m_myInst, "PaintBackground)"))) {
+            PyObject* ao = wxPyMake_wxGridCellAttr(attr);
+            PyObject* ro = wxPyConstructObject((void*)&rectCell, "wxRect", 0);
+
+            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", ro, ao));
+
+            Py_DECREF(ro);
+            Py_DECREF(ao);
+        }
         wxPyEndBlockThreads();
         if (! found)
             wxGridCellEditor::PaintBackground(rectCell, attr);
@@ -727,7 +804,9 @@ public:
     void SetValue(int row, int col, const wxString& val) {
         wxPyBeginBlockThreads();
         if (wxPyCBH_findCallback(m_myInst, "SetValue")) {
-            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",row,col,wx2PyString(val)));
+            PyObject* s = wx2PyString(val);
+            wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",row,col,s));
+            Py_DECREF(s);
        }
         wxPyEndBlockThreads();
     }
@@ -860,6 +939,41 @@ static PyObject *_wrap_wxGridNoCellRect_get() {
     return pyobj;
 }
 
+static void  wxGridCellRenderer__setOORInfo(wxGridCellRenderer *self,PyObject * _self) {
+            self->SetClientObject(new wxPyOORClientData(_self));
+        }
+static PyObject *_wrap_wxGridCellRenderer__setOORInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxGridCellRenderer * _arg0;
+    PyObject * _arg1;
+    PyObject * _argo0 = 0;
+    PyObject * _obj1 = 0;
+    char *_kwnames[] = { "self","_self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellRenderer__setOORInfo",_kwnames,&_argo0,&_obj1)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellRenderer_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellRenderer__setOORInfo. Expected _wxGridCellRenderer_p.");
+        return NULL;
+        }
+    }
+{
+  _arg1 = _obj1;
+}
+{
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxGridCellRenderer__setOORInfo(_arg0,_arg1);
+
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}    Py_INCREF(Py_None);
+    _resultobj = Py_None;
+    return _resultobj;
+}
+
 #define wxGridCellRenderer_SetParameters(_swigobj,_swigarg0)  (_swigobj->SetParameters(_swigarg0))
 static PyObject *_wrap_wxGridCellRenderer_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -1089,7 +1203,6 @@ static PyObject *_wrap_wxGridCellRenderer_Clone(PyObject *self, PyObject *args,
     wxGridCellRenderer * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellRenderer_Clone",_kwnames,&_argo0)) 
@@ -1107,13 +1220,7 @@ static PyObject *_wrap_wxGridCellRenderer_Clone(PyObject *self, PyObject *args,
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellRenderer(_result); }
     return _resultobj;
 }
 
@@ -1516,8 +1623,8 @@ static void *SwigwxGridCellDateTimeRendererTowxGridCellRenderer(void *ptr) {
 static PyObject *_wrap_new_wxGridCellDateTimeRenderer(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxGridCellDateTimeRenderer * _result;
-    wxString * _arg0 = (wxString *) &"%c";
-    wxString * _arg1 = (wxString *) &"%c";
+    wxString * _arg0 = (wxString *) &wxPyDateTimeFormatStr;
+    wxString * _arg1 = (wxString *) &wxPyDateTimeFormatStr;
     PyObject * _obj0 = 0;
     PyObject * _obj1 = 0;
     char *_kwnames[] = { "outformat","informat", NULL };
@@ -1582,7 +1689,7 @@ static void *SwigwxGridCellEnumRendererTowxGridCellRenderer(void *ptr) {
 static PyObject *_wrap_new_wxGridCellEnumRenderer(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxGridCellEnumRenderer * _result;
-    wxString * _arg0 = (wxString *) &"";
+    wxString * _arg0 = (wxString *) &wxPyEmptyString;
     PyObject * _obj0 = 0;
     char *_kwnames[] = { "choices", NULL };
     char _ptemp[128];
@@ -1658,6 +1765,41 @@ static PyObject *_wrap_new_wxGridCellAutoWrapStringRenderer(PyObject *self, PyOb
     return _resultobj;
 }
 
+static void  wxGridCellEditor__setOORInfo(wxGridCellEditor *self,PyObject * _self) {
+            self->SetClientObject(new wxPyOORClientData(_self));
+        }
+static PyObject *_wrap_wxGridCellEditor__setOORInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxGridCellEditor * _arg0;
+    PyObject * _arg1;
+    PyObject * _argo0 = 0;
+    PyObject * _obj1 = 0;
+    char *_kwnames[] = { "self","_self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor__setOORInfo",_kwnames,&_argo0,&_obj1)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellEditor_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellEditor__setOORInfo. Expected _wxGridCellEditor_p.");
+        return NULL;
+        }
+    }
+{
+  _arg1 = _obj1;
+}
+{
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxGridCellEditor__setOORInfo(_arg0,_arg1);
+
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}    Py_INCREF(Py_None);
+    _resultobj = Py_None;
+    return _resultobj;
+}
+
 #define wxGridCellEditor_IsCreated(_swigobj)  (_swigobj->IsCreated())
 static PyObject *_wrap_wxGridCellEditor_IsCreated(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -2006,7 +2148,6 @@ static PyObject *_wrap_wxGridCellEditor_Clone(PyObject *self, PyObject *args, Py
     wxGridCellEditor * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_Clone",_kwnames,&_argo0)) 
@@ -2024,13 +2165,7 @@ static PyObject *_wrap_wxGridCellEditor_Clone(PyObject *self, PyObject *args, Py
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellEditor(_result); }
     return _resultobj;
 }
 
@@ -2953,7 +3088,7 @@ static void *SwigwxGridCellEnumEditorTowxGridCellEditor(void *ptr) {
 static PyObject *_wrap_new_wxGridCellEnumEditor(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
     wxGridCellEnumEditor * _result;
-    wxString * _arg0 = (wxString *) &"";
+    wxString * _arg0 = (wxString *) &wxPyEmptyString;
     PyObject * _obj0 = 0;
     char *_kwnames[] = { "choices", NULL };
     char _ptemp[128];
@@ -3029,6 +3164,41 @@ static PyObject *_wrap_new_wxGridCellAutoWrapStringEditor(PyObject *self, PyObje
     return _resultobj;
 }
 
+static void  wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject * _self) {
+            self->SetClientObject(new wxPyOORClientData(_self));
+        }
+static PyObject *_wrap_wxGridCellAttr__setOORInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxGridCellAttr * _arg0;
+    PyObject * _arg1;
+    PyObject * _argo0 = 0;
+    PyObject * _obj1 = 0;
+    char *_kwnames[] = { "self","_self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttr__setOORInfo",_kwnames,&_argo0,&_obj1)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttr_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttr__setOORInfo. Expected _wxGridCellAttr_p.");
+        return NULL;
+        }
+    }
+{
+  _arg1 = _obj1;
+}
+{
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxGridCellAttr__setOORInfo(_arg0,_arg1);
+
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}    Py_INCREF(Py_None);
+    _resultobj = Py_None;
+    return _resultobj;
+}
+
 #define new_wxGridCellAttr(_swigarg0) (new wxGridCellAttr(_swigarg0))
 static PyObject *_wrap_new_wxGridCellAttr(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -3071,7 +3241,6 @@ static PyObject *_wrap_wxGridCellAttr_Clone(PyObject *self, PyObject *args, PyOb
     wxGridCellAttr * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_Clone",_kwnames,&_argo0)) 
@@ -3089,13 +3258,7 @@ static PyObject *_wrap_wxGridCellAttr_Clone(PyObject *self, PyObject *args, PyOb
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellAttr(_result); }
     return _resultobj;
 }
 
@@ -3810,7 +3973,6 @@ static PyObject *_wrap_wxGridCellAttr_GetRenderer(PyObject *self, PyObject *args
     PyObject * _argo0 = 0;
     PyObject * _argo1 = 0;
     char *_kwnames[] = { "self","grid","row","col", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGridCellAttr_GetRenderer",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) 
@@ -3835,13 +3997,7 @@ static PyObject *_wrap_wxGridCellAttr_GetRenderer(PyObject *self, PyObject *args
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellRenderer(_result); }
     return _resultobj;
 }
 
@@ -3856,7 +4012,6 @@ static PyObject *_wrap_wxGridCellAttr_GetEditor(PyObject *self, PyObject *args,
     PyObject * _argo0 = 0;
     PyObject * _argo1 = 0;
     char *_kwnames[] = { "self","grid","row","col", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxGridCellAttr_GetEditor",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) 
@@ -3881,13 +4036,7 @@ static PyObject *_wrap_wxGridCellAttr_GetEditor(PyObject *self, PyObject *args,
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellEditor(_result); }
     return _resultobj;
 }
 
@@ -3982,6 +4131,41 @@ static PyObject *_wrap_new_wxGridCellAttrProvider(PyObject *self, PyObject *args
     return _resultobj;
 }
 
+static void  wxGridCellAttrProvider__setOORInfo(wxGridCellAttrProvider *self,PyObject * _self) {
+            self->SetClientObject(new wxPyOORClientData(_self));
+        }
+static PyObject *_wrap_wxGridCellAttrProvider__setOORInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxGridCellAttrProvider * _arg0;
+    PyObject * _arg1;
+    PyObject * _argo0 = 0;
+    PyObject * _obj1 = 0;
+    char *_kwnames[] = { "self","_self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellAttrProvider__setOORInfo",_kwnames,&_argo0,&_obj1)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridCellAttrProvider_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridCellAttrProvider__setOORInfo. Expected _wxGridCellAttrProvider_p.");
+        return NULL;
+        }
+    }
+{
+  _arg1 = _obj1;
+}
+{
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxGridCellAttrProvider__setOORInfo(_arg0,_arg1);
+
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}    Py_INCREF(Py_None);
+    _resultobj = Py_None;
+    return _resultobj;
+}
+
 #define wxGridCellAttrProvider_GetAttr(_swigobj,_swigarg0,_swigarg1,_swigarg2)  (_swigobj->GetAttr(_swigarg0,_swigarg1,_swigarg2))
 static PyObject *_wrap_wxGridCellAttrProvider_GetAttr(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -3992,7 +4176,6 @@ static PyObject *_wrap_wxGridCellAttrProvider_GetAttr(PyObject *self, PyObject *
     wxGridCellAttr::wxAttrKind  _arg3;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","row","col","kind", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxGridCellAttrProvider_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) 
@@ -4010,13 +4193,7 @@ static PyObject *_wrap_wxGridCellAttrProvider_GetAttr(PyObject *self, PyObject *
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellAttr(_result); }
     return _resultobj;
 }
 
@@ -4277,7 +4454,6 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_GetAttr(PyObject *self, PyO
     wxGridCellAttr::wxAttrKind  _arg3;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","row","col","kind", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxPyGridCellAttrProvider_base_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) 
@@ -4295,13 +4471,7 @@ static PyObject *_wrap_wxPyGridCellAttrProvider_base_GetAttr(PyObject *self, PyO
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellAttr(_result); }
     return _resultobj;
 }
 
@@ -4428,6 +4598,41 @@ static void *SwigwxGridTableBaseTowxObject(void *ptr) {
     return (void *) dest;
 }
 
+static void  wxGridTableBase__setOORInfo(wxGridTableBase *self,PyObject * _self) {
+            self->SetClientObject(new wxPyOORClientData(_self));
+        }
+static PyObject *_wrap_wxGridTableBase__setOORInfo(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject * _resultobj;
+    wxGridTableBase * _arg0;
+    PyObject * _arg1;
+    PyObject * _argo0 = 0;
+    PyObject * _obj1 = 0;
+    char *_kwnames[] = { "self","_self", NULL };
+
+    self = self;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridTableBase__setOORInfo",_kwnames,&_argo0,&_obj1)) 
+        return NULL;
+    if (_argo0) {
+        if (_argo0 == Py_None) { _arg0 = NULL; }
+        else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGridTableBase_p")) {
+            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGridTableBase__setOORInfo. Expected _wxGridTableBase_p.");
+        return NULL;
+        }
+    }
+{
+  _arg1 = _obj1;
+}
+{
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    wxGridTableBase__setOORInfo(_arg0,_arg1);
+
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) return NULL;
+}    Py_INCREF(Py_None);
+    _resultobj = Py_None;
+    return _resultobj;
+}
+
 #define wxGridTableBase_SetAttrProvider(_swigobj,_swigarg0)  (_swigobj->SetAttrProvider(_swigarg0))
 static PyObject *_wrap_wxGridTableBase_SetAttrProvider(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -4472,7 +4677,6 @@ static PyObject *_wrap_wxGridTableBase_GetAttrProvider(PyObject *self, PyObject
     wxGridTableBase * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_GetAttrProvider",_kwnames,&_argo0)) 
@@ -4490,13 +4694,7 @@ static PyObject *_wrap_wxGridTableBase_GetAttrProvider(PyObject *self, PyObject
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttrProvider_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellAttrProvider(_result); }
     return _resultobj;
 }
 
@@ -5437,7 +5635,6 @@ static PyObject *_wrap_wxGridTableBase_GetAttr(PyObject *self, PyObject *args, P
     wxGridCellAttr::wxAttrKind  _arg3;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","row","col","kind", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxGridTableBase_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) 
@@ -5455,13 +5652,7 @@ static PyObject *_wrap_wxGridTableBase_GetAttr(PyObject *self, PyObject *args, P
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellAttr(_result); }
     return _resultobj;
 }
 
@@ -6209,7 +6400,6 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetAttr(PyObject *self, PyObject *
     wxGridCellAttr::wxAttrKind  _arg3;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","row","col","kind", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxPyGridTableBase_base_GetAttr",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) 
@@ -6227,13 +6417,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetAttr(PyObject *self, PyObject *
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellAttr_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellAttr(_result); }
     return _resultobj;
 }
 
@@ -6523,7 +6707,7 @@ static PyObject *_wrap_wxGridTableMessage_GetTableObject(PyObject *self, PyObjec
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxGridTableBase(_result); }
     return _resultobj;
 }
 
@@ -7021,17 +7205,18 @@ static PyObject *_wrap_new_wxGrid(PyObject *self, PyObject *args, PyObject *kwar
     wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
     wxSize * _arg3 = (wxSize *) &wxDefaultSize;
     long  _arg4 = (long ) wxWANTS_CHARS;
-    char * _arg5 = (char *) wxPanelNameStr;
+    wxString * _arg5 = (wxString *) &wxPyPanelNameStr;
     PyObject * _argo0 = 0;
     wxPoint  temp;
     PyObject * _obj2 = 0;
     wxSize  temp0;
     PyObject * _obj3 = 0;
+    PyObject * _obj5 = 0;
     char *_kwnames[] = { "parent","id","pos","size","style","name", NULL };
     char _ptemp[128];
 
     self = self;
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxGrid",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlO:new_wxGrid",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -7051,10 +7236,16 @@ static PyObject *_wrap_new_wxGrid(PyObject *self, PyObject *args, PyObject *kwar
     _arg3 = &temp0;
     if (! wxSize_helper(_obj3, &_arg3))
         return NULL;
+}
+    if (_obj5)
+{
+    _arg5 = wxString_in_helper(_obj5);
+    if (_arg5 == NULL)
+        return NULL;
 }
 {
     PyThreadState* __tstate = wxPyBeginAllowThreads();
-    _result = (wxGrid *)new_wxGrid(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5);
+    _result = (wxGrid *)new_wxGrid(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5);
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
@@ -7065,6 +7256,10 @@ static PyObject *_wrap_new_wxGrid(PyObject *self, PyObject *args, PyObject *kwar
         Py_INCREF(Py_None);
         _resultobj = Py_None;
     }
+{
+    if (_obj5)
+        delete _arg5;
+}
     return _resultobj;
 }
 
@@ -7245,7 +7440,7 @@ static PyObject *_wrap_wxGrid_GetTable(PyObject *self, PyObject *args, PyObject
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxGridTableBase(_result); }
     return _resultobj;
 }
 
@@ -11322,7 +11517,6 @@ static PyObject *_wrap_wxGrid_GetDefaultRenderer(PyObject *self, PyObject *args,
     wxGrid * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultRenderer",_kwnames,&_argo0)) 
@@ -11340,13 +11534,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRenderer(PyObject *self, PyObject *args,
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellRenderer(_result); }
     return _resultobj;
 }
 
@@ -11359,7 +11547,6 @@ static PyObject *_wrap_wxGrid_GetCellRenderer(PyObject *self, PyObject *args, Py
     int  _arg2;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","row","col", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellRenderer",_kwnames,&_argo0,&_arg1,&_arg2)) 
@@ -11377,13 +11564,7 @@ static PyObject *_wrap_wxGrid_GetCellRenderer(PyObject *self, PyObject *args, Py
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellRenderer(_result); }
     return _resultobj;
 }
 
@@ -11470,7 +11651,6 @@ static PyObject *_wrap_wxGrid_GetDefaultEditor(PyObject *self, PyObject *args, P
     wxGrid * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultEditor",_kwnames,&_argo0)) 
@@ -11488,13 +11668,7 @@ static PyObject *_wrap_wxGrid_GetDefaultEditor(PyObject *self, PyObject *args, P
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellEditor(_result); }
     return _resultobj;
 }
 
@@ -11507,7 +11681,6 @@ static PyObject *_wrap_wxGrid_GetCellEditor(PyObject *self, PyObject *args, PyOb
     int  _arg2;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","row","col", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetCellEditor",_kwnames,&_argo0,&_arg1,&_arg2)) 
@@ -11525,13 +11698,7 @@ static PyObject *_wrap_wxGrid_GetCellEditor(PyObject *self, PyObject *args, PyOb
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellEditor(_result); }
     return _resultobj;
 }
 
@@ -12135,7 +12302,6 @@ static PyObject *_wrap_wxGrid_GetDefaultEditorForCell(PyObject *self, PyObject *
     int  _arg2;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","row","col", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetDefaultEditorForCell",_kwnames,&_argo0,&_arg1,&_arg2)) 
@@ -12153,13 +12319,7 @@ static PyObject *_wrap_wxGrid_GetDefaultEditorForCell(PyObject *self, PyObject *
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellEditor(_result); }
     return _resultobj;
 }
 
@@ -12172,7 +12332,6 @@ static PyObject *_wrap_wxGrid_GetDefaultRendererForCell(PyObject *self, PyObject
     int  _arg2;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","row","col", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_GetDefaultRendererForCell",_kwnames,&_argo0,&_arg1,&_arg2)) 
@@ -12190,13 +12349,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRendererForCell(PyObject *self, PyObject
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellRenderer(_result); }
     return _resultobj;
 }
 
@@ -12209,7 +12362,6 @@ static PyObject *_wrap_wxGrid_GetDefaultEditorForType(PyObject *self, PyObject *
     PyObject * _argo0 = 0;
     PyObject * _obj1 = 0;
     char *_kwnames[] = { "self","typeName", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_GetDefaultEditorForType",_kwnames,&_argo0,&_obj1)) 
@@ -12232,13 +12384,7 @@ static PyObject *_wrap_wxGrid_GetDefaultEditorForType(PyObject *self, PyObject *
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellEditor_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellEditor(_result); }
 {
     if (_obj1)
         delete _arg1;
@@ -12255,7 +12401,6 @@ static PyObject *_wrap_wxGrid_GetDefaultRendererForType(PyObject *self, PyObject
     PyObject * _argo0 = 0;
     PyObject * _obj1 = 0;
     char *_kwnames[] = { "self","typeName", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGrid_GetDefaultRendererForType",_kwnames,&_argo0,&_obj1)) 
@@ -12278,13 +12423,7 @@ static PyObject *_wrap_wxGrid_GetDefaultRendererForType(PyObject *self, PyObject
 
     wxPyEndAllowThreads(__tstate);
     if (PyErr_Occurred()) return NULL;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxGridCellRenderer_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+}{ _resultobj = wxPyMake_wxGridCellRenderer(_result); }
 {
     if (_obj1)
         delete _arg1;
@@ -13941,6 +14080,7 @@ static PyMethodDef gridcMethods[] = {
         { "wxGridTableBase_SetView", (PyCFunction) _wrap_wxGridTableBase_SetView, METH_VARARGS | METH_KEYWORDS },
         { "wxGridTableBase_GetAttrProvider", (PyCFunction) _wrap_wxGridTableBase_GetAttrProvider, METH_VARARGS | METH_KEYWORDS },
         { "wxGridTableBase_SetAttrProvider", (PyCFunction) _wrap_wxGridTableBase_SetAttrProvider, METH_VARARGS | METH_KEYWORDS },
+        { "wxGridTableBase__setOORInfo", (PyCFunction) _wrap_wxGridTableBase__setOORInfo, METH_VARARGS | METH_KEYWORDS },
         { "wxPyGridCellAttrProvider_base_SetColAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_SetColAttr, METH_VARARGS | METH_KEYWORDS },
         { "wxPyGridCellAttrProvider_base_SetRowAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_SetRowAttr, METH_VARARGS | METH_KEYWORDS },
         { "wxPyGridCellAttrProvider_base_SetAttr", (PyCFunction) _wrap_wxPyGridCellAttrProvider_base_SetAttr, METH_VARARGS | METH_KEYWORDS },
@@ -13953,6 +14093,7 @@ static PyMethodDef gridcMethods[] = {
         { "wxGridCellAttrProvider_SetRowAttr", (PyCFunction) _wrap_wxGridCellAttrProvider_SetRowAttr, METH_VARARGS | METH_KEYWORDS },
         { "wxGridCellAttrProvider_SetAttr", (PyCFunction) _wrap_wxGridCellAttrProvider_SetAttr, METH_VARARGS | METH_KEYWORDS },
         { "wxGridCellAttrProvider_GetAttr", (PyCFunction) _wrap_wxGridCellAttrProvider_GetAttr, METH_VARARGS | METH_KEYWORDS },
+        { "wxGridCellAttrProvider__setOORInfo", (PyCFunction) _wrap_wxGridCellAttrProvider__setOORInfo, METH_VARARGS | METH_KEYWORDS },
         { "new_wxGridCellAttrProvider", (PyCFunction) _wrap_new_wxGridCellAttrProvider, METH_VARARGS | METH_KEYWORDS },
         { "wxGridCellAttr_SetDefAttr", (PyCFunction) _wrap_wxGridCellAttr_SetDefAttr, METH_VARARGS | METH_KEYWORDS },
         { "wxGridCellAttr_IsReadOnly", (PyCFunction) _wrap_wxGridCellAttr_IsReadOnly, METH_VARARGS | METH_KEYWORDS },
@@ -13982,6 +14123,7 @@ static PyMethodDef gridcMethods[] = {
         { "wxGridCellAttr_MergeWith", (PyCFunction) _wrap_wxGridCellAttr_MergeWith, METH_VARARGS | METH_KEYWORDS },
         { "wxGridCellAttr_Clone", (PyCFunction) _wrap_wxGridCellAttr_Clone, METH_VARARGS | METH_KEYWORDS },
         { "new_wxGridCellAttr", (PyCFunction) _wrap_new_wxGridCellAttr, METH_VARARGS | METH_KEYWORDS },
+        { "wxGridCellAttr__setOORInfo", (PyCFunction) _wrap_wxGridCellAttr__setOORInfo, METH_VARARGS | METH_KEYWORDS },
         { "new_wxGridCellAutoWrapStringEditor", (PyCFunction) _wrap_new_wxGridCellAutoWrapStringEditor, METH_VARARGS | METH_KEYWORDS },
         { "new_wxGridCellEnumEditor", (PyCFunction) _wrap_new_wxGridCellEnumEditor, METH_VARARGS | METH_KEYWORDS },
         { "new_wxGridCellChoiceEditor", (PyCFunction) _wrap_new_wxGridCellChoiceEditor, METH_VARARGS | METH_KEYWORDS },
@@ -14019,6 +14161,7 @@ static PyMethodDef gridcMethods[] = {
         { "wxGridCellEditor_SetControl", (PyCFunction) _wrap_wxGridCellEditor_SetControl, METH_VARARGS | METH_KEYWORDS },
         { "wxGridCellEditor_GetControl", (PyCFunction) _wrap_wxGridCellEditor_GetControl, METH_VARARGS | METH_KEYWORDS },
         { "wxGridCellEditor_IsCreated", (PyCFunction) _wrap_wxGridCellEditor_IsCreated, METH_VARARGS | METH_KEYWORDS },
+        { "wxGridCellEditor__setOORInfo", (PyCFunction) _wrap_wxGridCellEditor__setOORInfo, METH_VARARGS | METH_KEYWORDS },
         { "new_wxGridCellAutoWrapStringRenderer", (PyCFunction) _wrap_new_wxGridCellAutoWrapStringRenderer, METH_VARARGS | METH_KEYWORDS },
         { "new_wxGridCellEnumRenderer", (PyCFunction) _wrap_new_wxGridCellEnumRenderer, METH_VARARGS | METH_KEYWORDS },
         { "new_wxGridCellDateTimeRenderer", (PyCFunction) _wrap_new_wxGridCellDateTimeRenderer, METH_VARARGS | METH_KEYWORDS },
@@ -14039,6 +14182,7 @@ static PyMethodDef gridcMethods[] = {
         { "wxGridCellRenderer_DecRef", (PyCFunction) _wrap_wxGridCellRenderer_DecRef, METH_VARARGS | METH_KEYWORDS },
         { "wxGridCellRenderer_IncRef", (PyCFunction) _wrap_wxGridCellRenderer_IncRef, METH_VARARGS | METH_KEYWORDS },
         { "wxGridCellRenderer_SetParameters", (PyCFunction) _wrap_wxGridCellRenderer_SetParameters, METH_VARARGS | METH_KEYWORDS },
+        { "wxGridCellRenderer__setOORInfo", (PyCFunction) _wrap_wxGridCellRenderer__setOORInfo, METH_VARARGS | METH_KEYWORDS },
         { NULL, NULL }
 };
 #ifdef __cplusplus
@@ -14231,6 +14375,8 @@ SWIGEXPORT(void) initgridc() {
         PyDict_SetItemString(d,"wxGRID_VALUE_CHOICE", PyString_FromString("choice"));
         PyDict_SetItemString(d,"wxGRID_VALUE_TEXT", PyString_FromString("string"));
         PyDict_SetItemString(d,"wxGRID_VALUE_LONG", PyString_FromString("long"));
+        PyDict_SetItemString(d,"wxGRID_VALUE_CHOICEINT", PyString_FromString("choiceint"));
+        PyDict_SetItemString(d,"wxGRID_VALUE_DATETIME", PyString_FromString("datetime"));
         PyDict_SetItemString(d,"cvar", SWIG_globals);
         SWIG_addvarlink(SWIG_globals,"wxGridNoCellCoords",_wrap_wxGridNoCellCoords_get, _wrap_wxGridNoCellCoords_set);
         SWIG_addvarlink(SWIG_globals,"wxGridNoCellRect",_wrap_wxGridNoCellRect_get, _wrap_wxGridNoCellRect_set);