#define SWIG_name "gridc"
-#include "export.h"
+#include "wxPython.h"
#include <wx/grid.h>
#include <wx/generic/gridctrl.h>
// 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) { \
#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); \
} \
#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); \
} \
#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(); \
}
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); \
Py_DECREF(ro); Py_DECREF(str); \
} \
} \
- wxPyEndBlockThreads(); \
+ wxPyEndBlockThreads(); \
if (! found) \
rval = PCLASS::CBNAME(a, b); \
return rval; \
#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(); \
} \
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; \
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; \
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); \
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();
}
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);
}
}
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();
}
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();
}
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;
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);
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);
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();
}
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;
wxGridCellRenderer * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
- char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellRenderer_Clone",_kwnames,&_argo0))
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;
}
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 };
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];
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;
wxGridCellEditor * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
- char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_Clone",_kwnames,&_argo0))
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;
}
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];
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;
wxGridCellAttr * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
- char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellAttr_Clone",_kwnames,&_argo0))
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;
}
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))
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;
}
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))
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;
}
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;
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))
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;
}
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))
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;
}
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;
wxGridTableBase * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
- char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridTableBase_GetAttrProvider",_kwnames,&_argo0))
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;
}
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))
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;
}
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))
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;
}
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxGridTableBase(_result); }
return _resultobj;
}
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
-}{ _resultobj = wxPyMake_wxObject(_result); }
+}{ _resultobj = wxPyMake_wxGridTableBase(_result); }
return _resultobj;
}
wxGrid * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
- char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultRenderer",_kwnames,&_argo0))
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;
}
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))
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;
}
wxGrid * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
- char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetDefaultEditor",_kwnames,&_argo0))
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;
}
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))
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;
}
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))
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;
}
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))
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;
}
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))
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;
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))
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;
{ "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 },
{ "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 },
{ "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 },
{ "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 },
{ "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
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);