}
static char* wxStringErrorMsg = "string type is required for parameter";
-
-class wxPyEvent : public wxEvent {
- DECLARE_DYNAMIC_CLASS(wxPyEvent)
-public:
- wxPyEvent(int id=0, PyObject* userData = Py_None)
- : wxEvent(id) {
- m_userData = userData;
- Py_INCREF(m_userData);
- }
-
- ~wxPyEvent() {
- bool doSave = wxPyRestoreThread();
- Py_DECREF(m_userData);
- wxPySaveThread(doSave);
- }
-
- void SetPyData(PyObject* userData) {
- bool doSave = wxPyRestoreThread();
- Py_DECREF(m_userData);
- m_userData = userData;
- Py_INCREF(m_userData);
- wxPySaveThread(doSave);
- }
-
- PyObject* GetPyData() const {
- Py_INCREF(m_userData);
- return m_userData;
- }
-
- // This one is so the event object can be Cloned...
- void CopyObject(wxObject& dest) const {
- wxEvent::CopyObject(dest);
- ((wxPyEvent*)&dest)->SetPyData(m_userData);
- }
-
-private:
- PyObject* m_userData;
-};
-
-IMPLEMENT_DYNAMIC_CLASS(wxPyEvent, wxEvent)
-
-
-class wxPyCommandEvent : public wxCommandEvent {
- DECLARE_DYNAMIC_CLASS(wxPyCommandEvent)
-public:
- wxPyCommandEvent(wxEventType commandType = wxEVT_NULL, int id=0, PyObject* userData = Py_None)
- : wxCommandEvent(commandType, id) {
- m_userData = userData;
- Py_INCREF(m_userData);
- }
-
- ~wxPyCommandEvent() {
- bool doSave = wxPyRestoreThread();
- Py_DECREF(m_userData);
- wxPySaveThread(doSave);
- }
-
- void SetPyData(PyObject* userData) {
- bool doSave = wxPyRestoreThread();
- Py_DECREF(m_userData);
- m_userData = userData;
- Py_INCREF(m_userData);
- wxPySaveThread(doSave);
- }
-
- PyObject* GetPyData() const {
- Py_INCREF(m_userData);
- return m_userData;
- }
-
- // This one is so the event object can be Cloned...
- void CopyObject(wxObject& dest) const {
- wxCommandEvent::CopyObject(dest);
- ((wxPyCommandEvent*)&dest)->SetPyData(m_userData);
- }
-
-private:
- PyObject* m_userData;
-};
-
-IMPLEMENT_DYNAMIC_CLASS(wxPyCommandEvent, wxCommandEvent)
-
#ifdef __cplusplus
extern "C" {
#endif
wxPy_END_ALLOW_THREADS;
}{
- _resultobj = PyString_FromString(WXSTRINGCAST *(_result));
+ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
return _resultobj;
}
+#define wxCommandEvent_SetString(_swigobj,_swigarg0) (_swigobj->SetString(_swigarg0))
+static PyObject *_wrap_wxCommandEvent_SetString(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxCommandEvent * _arg0;
+ wxString * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _obj1 = 0;
+ char *_kwnames[] = { "self","s", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCommandEvent_SetString",_kwnames,&_argo0,&_obj1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_SetString. Expected _wxCommandEvent_p.");
+ return NULL;
+ }
+ }
+{
+ if (!PyString_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+}
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxCommandEvent_SetString(_arg0,*_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+{
+ if (_obj1)
+ delete _arg1;
+}
+ return _resultobj;
+}
+
+#define wxCommandEvent_SetExtraLong(_swigobj,_swigarg0) (_swigobj->SetExtraLong(_swigarg0))
+static PyObject *_wrap_wxCommandEvent_SetExtraLong(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxCommandEvent * _arg0;
+ long _arg1;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","extraLong", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxCommandEvent_SetExtraLong",_kwnames,&_argo0,&_arg1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_SetExtraLong. Expected _wxCommandEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxCommandEvent_SetExtraLong(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxCommandEvent_SetInt(_swigobj,_swigarg0) (_swigobj->SetInt(_swigarg0))
+static PyObject *_wrap_wxCommandEvent_SetInt(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxCommandEvent * _arg0;
+ int _arg1;
+ PyObject * _argo0 = 0;
+ char *_kwnames[] = { "self","i", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCommandEvent_SetInt",_kwnames,&_argo0,&_arg1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_SetInt. Expected _wxCommandEvent_p.");
+ return NULL;
+ }
+ }
+{
+ wxPy_BEGIN_ALLOW_THREADS;
+ wxCommandEvent_SetInt(_arg0,_arg1);
+
+ wxPy_END_ALLOW_THREADS;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
static void *SwigwxScrollEventTowxCommandEvent(void *ptr) {
wxScrollEvent *src;
wxCommandEvent *dest;
return _resultobj;
}
-static void *SwigwxNavigationKeyEventTowxCommandEvent(void *ptr) {
- wxNavigationKeyEvent *src;
- wxCommandEvent *dest;
- src = (wxNavigationKeyEvent *) ptr;
- dest = (wxCommandEvent *) src;
- return (void *) dest;
-}
-
static void *SwigwxNavigationKeyEventTowxEvent(void *ptr) {
wxNavigationKeyEvent *src;
wxEvent *dest;
wxPy_END_ALLOW_THREADS;
}{
- _resultobj = PyString_FromString(WXSTRINGCAST *(_result));
+ _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
}
{
delete _result;
return (void *) dest;
}
-#define new_wxPyEvent(_swigarg0,_swigarg1) (new wxPyEvent(_swigarg0,_swigarg1))
+#define new_wxPyEvent(_swigarg0) (new wxPyEvent(_swigarg0))
static PyObject *_wrap_new_wxPyEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPyEvent * _result;
int _arg0 = (int ) 0;
- PyObject * _arg1 = (PyObject *) Py_None;
- PyObject * _obj1 = 0;
- char *_kwnames[] = { "id","userData", NULL };
+ char *_kwnames[] = { "id", NULL };
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iO:new_wxPyEvent",_kwnames,&_arg0,&_obj1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|i:new_wxPyEvent",_kwnames,&_arg0))
return NULL;
- if (_obj1)
-{
- _arg1 = _obj1;
-}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxPyEvent *)new_wxPyEvent(_arg0,_arg1);
+ _result = (wxPyEvent *)new_wxPyEvent(_arg0);
wxPy_END_ALLOW_THREADS;
} if (_result) {
return _resultobj;
}
-#define wxPyEvent_SetPyData(_swigobj,_swigarg0) (_swigobj->SetPyData(_swigarg0))
-static PyObject *_wrap_wxPyEvent_SetPyData(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxPyEvent_SetSelf(_swigobj,_swigarg0) (_swigobj->SetSelf(_swigarg0))
+static PyObject *_wrap_wxPyEvent_SetSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPyEvent * _arg0;
PyObject * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
- char *_kwnames[] = { "self","userData", NULL };
+ char *_kwnames[] = { "self","self", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyEvent_SetPyData",_kwnames,&_argo0,&_obj1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyEvent_SetSelf",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyEvent_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyEvent_SetPyData. Expected _wxPyEvent_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyEvent_SetSelf. Expected _wxPyEvent_p.");
return NULL;
}
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- wxPyEvent_SetPyData(_arg0,_arg1);
+ wxPyEvent_SetSelf(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
return _resultobj;
}
-#define wxPyEvent_GetPyData(_swigobj) (_swigobj->GetPyData())
-static PyObject *_wrap_wxPyEvent_GetPyData(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxPyEvent_GetSelf(_swigobj) (_swigobj->GetSelf())
+static PyObject *_wrap_wxPyEvent_GetSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
PyObject * _result;
wxPyEvent * _arg0;
char *_kwnames[] = { "self", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyEvent_GetPyData",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyEvent_GetSelf",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyEvent_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyEvent_GetPyData. Expected _wxPyEvent_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyEvent_GetSelf. Expected _wxPyEvent_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (PyObject *)wxPyEvent_GetPyData(_arg0);
+ _result = (PyObject *)wxPyEvent_GetSelf(_arg0);
wxPy_END_ALLOW_THREADS;
}{
return (void *) dest;
}
-#define new_wxPyCommandEvent(_swigarg0,_swigarg1,_swigarg2) (new wxPyCommandEvent(_swigarg0,_swigarg1,_swigarg2))
+#define new_wxPyCommandEvent(_swigarg0,_swigarg1) (new wxPyCommandEvent(_swigarg0,_swigarg1))
static PyObject *_wrap_new_wxPyCommandEvent(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPyCommandEvent * _result;
wxEventType _arg0 = (wxEventType ) wxEVT_NULL;
int _arg1 = (int ) 0;
- PyObject * _arg2 = (PyObject *) Py_None;
- PyObject * _obj2 = 0;
- char *_kwnames[] = { "commandType","id","userData", NULL };
+ char *_kwnames[] = { "commandType","id", NULL };
char _ptemp[128];
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiO:new_wxPyCommandEvent",_kwnames,&_arg0,&_arg1,&_obj2))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|ii:new_wxPyCommandEvent",_kwnames,&_arg0,&_arg1))
return NULL;
- if (_obj2)
-{
- _arg2 = _obj2;
-}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (wxPyCommandEvent *)new_wxPyCommandEvent(_arg0,_arg1,_arg2);
+ _result = (wxPyCommandEvent *)new_wxPyCommandEvent(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} if (_result) {
return _resultobj;
}
-#define wxPyCommandEvent_SetPyData(_swigobj,_swigarg0) (_swigobj->SetPyData(_swigarg0))
-static PyObject *_wrap_wxPyCommandEvent_SetPyData(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxPyCommandEvent_SetSelf(_swigobj,_swigarg0) (_swigobj->SetSelf(_swigarg0))
+static PyObject *_wrap_wxPyCommandEvent_SetSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPyCommandEvent * _arg0;
PyObject * _arg1;
PyObject * _argo0 = 0;
PyObject * _obj1 = 0;
- char *_kwnames[] = { "self","userData", NULL };
+ char *_kwnames[] = { "self","self", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyCommandEvent_SetPyData",_kwnames,&_argo0,&_obj1))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyCommandEvent_SetSelf",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyCommandEvent_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyCommandEvent_SetPyData. Expected _wxPyCommandEvent_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyCommandEvent_SetSelf. Expected _wxPyCommandEvent_p.");
return NULL;
}
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- wxPyCommandEvent_SetPyData(_arg0,_arg1);
+ wxPyCommandEvent_SetSelf(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
return _resultobj;
}
-#define wxPyCommandEvent_GetPyData(_swigobj) (_swigobj->GetPyData())
-static PyObject *_wrap_wxPyCommandEvent_GetPyData(PyObject *self, PyObject *args, PyObject *kwargs) {
+#define wxPyCommandEvent_GetSelf(_swigobj) (_swigobj->GetSelf())
+static PyObject *_wrap_wxPyCommandEvent_GetSelf(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
PyObject * _result;
wxPyCommandEvent * _arg0;
char *_kwnames[] = { "self", NULL };
self = self;
- if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyCommandEvent_GetPyData",_kwnames,&_argo0))
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyCommandEvent_GetSelf",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyCommandEvent_p")) {
- PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyCommandEvent_GetPyData. Expected _wxPyCommandEvent_p.");
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyCommandEvent_GetSelf. Expected _wxPyCommandEvent_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
- _result = (PyObject *)wxPyCommandEvent_GetPyData(_arg0);
+ _result = (PyObject *)wxPyCommandEvent_GetSelf(_arg0);
wxPy_END_ALLOW_THREADS;
}{
}
static PyMethodDef eventscMethods[] = {
- { "wxPyCommandEvent_GetPyData", (PyCFunction) _wrap_wxPyCommandEvent_GetPyData, METH_VARARGS | METH_KEYWORDS },
- { "wxPyCommandEvent_SetPyData", (PyCFunction) _wrap_wxPyCommandEvent_SetPyData, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyCommandEvent_GetSelf", (PyCFunction) _wrap_wxPyCommandEvent_GetSelf, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyCommandEvent_SetSelf", (PyCFunction) _wrap_wxPyCommandEvent_SetSelf, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxPyCommandEvent", (PyCFunction) _wrap_delete_wxPyCommandEvent, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPyCommandEvent", (PyCFunction) _wrap_new_wxPyCommandEvent, METH_VARARGS | METH_KEYWORDS },
- { "wxPyEvent_GetPyData", (PyCFunction) _wrap_wxPyEvent_GetPyData, METH_VARARGS | METH_KEYWORDS },
- { "wxPyEvent_SetPyData", (PyCFunction) _wrap_wxPyEvent_SetPyData, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyEvent_GetSelf", (PyCFunction) _wrap_wxPyEvent_GetSelf, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyEvent_SetSelf", (PyCFunction) _wrap_wxPyEvent_SetSelf, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxPyEvent", (PyCFunction) _wrap_delete_wxPyEvent, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPyEvent", (PyCFunction) _wrap_new_wxPyEvent, METH_VARARGS | METH_KEYWORDS },
{ "wxWindowDestroyEvent_GetWindow", (PyCFunction) _wrap_wxWindowDestroyEvent_GetWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxScrollEvent_GetPosition", (PyCFunction) _wrap_wxScrollEvent_GetPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxScrollEvent_GetOrientation", (PyCFunction) _wrap_wxScrollEvent_GetOrientation, METH_VARARGS | METH_KEYWORDS },
{ "new_wxScrollEvent", (PyCFunction) _wrap_new_wxScrollEvent, METH_VARARGS | METH_KEYWORDS },
+ { "wxCommandEvent_SetInt", (PyCFunction) _wrap_wxCommandEvent_SetInt, METH_VARARGS | METH_KEYWORDS },
+ { "wxCommandEvent_SetExtraLong", (PyCFunction) _wrap_wxCommandEvent_SetExtraLong, METH_VARARGS | METH_KEYWORDS },
+ { "wxCommandEvent_SetString", (PyCFunction) _wrap_wxCommandEvent_SetString, METH_VARARGS | METH_KEYWORDS },
{ "wxCommandEvent_IsSelection", (PyCFunction) _wrap_wxCommandEvent_IsSelection, METH_VARARGS | METH_KEYWORDS },
{ "wxCommandEvent_GetString", (PyCFunction) _wrap_wxCommandEvent_GetString, METH_VARARGS | METH_KEYWORDS },
{ "wxCommandEvent_GetSelection", (PyCFunction) _wrap_wxCommandEvent_GetSelection, METH_VARARGS | METH_KEYWORDS },
{ "_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent},
{ "_wxCommandEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
{ "_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
- { "_wxCommandEvent","_class_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxCommandEvent},
- { "_wxCommandEvent","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxCommandEvent},
{ "_wxCommandEvent","_class_wxSpinEvent",SwigwxSpinEventTowxCommandEvent},
{ "_wxCommandEvent","_wxSpinEvent",SwigwxSpinEventTowxCommandEvent},
{ "_wxCommandEvent","_class_wxScrollEvent",SwigwxScrollEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxPyCommandEvent",SwigwxPyCommandEventTowxCommandEvent},
{ "_class_wxCommandEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent},
- { "_class_wxCommandEvent","_class_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxCommandEvent},
- { "_class_wxCommandEvent","_wxNavigationKeyEvent",SwigwxNavigationKeyEventTowxCommandEvent},
{ "_class_wxCommandEvent","_class_wxSpinEvent",SwigwxSpinEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxSpinEvent",SwigwxSpinEventTowxCommandEvent},
{ "_class_wxCommandEvent","_class_wxScrollEvent",SwigwxScrollEventTowxCommandEvent},