/* Implementation : PYTHON */
#define SWIGPYTHON
+#include "Python.h"
+
#include <string.h>
#include <stdlib.h>
/* Definitions for Windows/Unix exporting */
# define SWIGEXPORT(a) a
#endif
-#include "Python.h"
-
#ifdef __cplusplus
extern "C" {
#endif
-
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
#define SWIG_name "windows2c"
#include "helpers.h"
-#ifdef OLD_GRID
-#include <wx/grid.h>
-#endif
#include <wx/notebook.h>
#include <wx/splitter.h>
#include <wx/imaglist.h>
DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard);
DEC_PYCALLBACK_SIZE_const(GetMaxSize);
+ DEC_PYCALLBACK_VOID_WXWINBASE(AddChild);
+ DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild);
+
PYPRIVATE;
};
IMP_PYCALLBACK_BOOL_const(wxPyWindow, wxWindow, AcceptsFocusFromKeyboard);
IMP_PYCALLBACK_SIZE_const(wxPyWindow, wxWindow, GetMaxSize);
+IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWindow, wxWindow, AddChild);
+IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWindow, wxWindow, RemoveChild);
+
// C++ version of Python aware wxControl
class wxPyControl : public wxControl
{
DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard);
DEC_PYCALLBACK_SIZE_const(GetMaxSize);
+ DEC_PYCALLBACK_VOID_WXWINBASE(AddChild);
+ DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild);
+
PYPRIVATE;
};
IMP_PYCALLBACK_BOOL_const(wxPyControl, wxControl, AcceptsFocusFromKeyboard);
IMP_PYCALLBACK_SIZE_const(wxPyControl, wxControl, GetMaxSize);
+IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, AddChild);
+IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, RemoveChild);
+
// C++ version of Python aware wxPanel
class wxPyPanel : public wxPanel
{
DEC_PYCALLBACK_BOOL_const(AcceptsFocusFromKeyboard);
DEC_PYCALLBACK_SIZE_const(GetMaxSize);
+ DEC_PYCALLBACK_VOID_WXWINBASE(AddChild);
+ DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild);
+
PYPRIVATE;
};
IMP_PYCALLBACK_BOOL_const(wxPyPanel, wxPanel, AcceptsFocusFromKeyboard);
IMP_PYCALLBACK_SIZE_const(wxPyPanel, wxPanel, GetMaxSize);
+IMP_PYCALLBACK_VOID_WXWINBASE(wxPyPanel, wxPanel, AddChild);
+IMP_PYCALLBACK_VOID_WXWINBASE(wxPyPanel, wxPanel, RemoveChild);
+
#ifdef __cplusplus
extern "C" {
#endif
int _arg1 = (int ) 0;
int _arg2 = (int ) -1;
int _arg3 = (int ) -1;
- char *_kwnames[] = { "commandType","id","nSel","nOldSel", NULL };
+ char *_kwnames[] = { "commandType","id","sel","oldSel", NULL };
char _ptemp[128];
self = self;
wxNotebook * _arg0;
int _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","nPage", NULL };
+ char *_kwnames[] = { "self","page", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_SetSelection",_kwnames,&_argo0,&_arg1))
bool _arg1 = (bool ) TRUE;
PyObject * _argo0 = 0;
int tempbool1 = (int) TRUE;
- char *_kwnames[] = { "self","bForward", NULL };
+ char *_kwnames[] = { "self","forward", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxNotebook_AdvanceSelection",_kwnames,&_argo0,&tempbool1))
wxString * _arg2;
PyObject * _argo0 = 0;
PyObject * _obj2 = 0;
- char *_kwnames[] = { "self","nPage","strText", NULL };
+ char *_kwnames[] = { "self","page","text", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxNotebook_SetPageText",_kwnames,&_argo0,&_arg1,&_obj2))
wxNotebook * _arg0;
int _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","nPage", NULL };
+ char *_kwnames[] = { "self","page", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPageText",_kwnames,&_argo0,&_arg1))
if (PyErr_Occurred()) return NULL;
}{
#if wxUSE_UNICODE
- _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
+ _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len());
#else
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
#endif
wxNotebook * _arg0;
int _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","nPage", NULL };
+ char *_kwnames[] = { "self","page", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPageImage",_kwnames,&_argo0,&_arg1))
int _arg1;
int _arg2;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","nPage","nImage", NULL };
+ char *_kwnames[] = { "self","page","image", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxNotebook_SetPageImage",_kwnames,&_argo0,&_arg1,&_arg2))
wxNotebook * _arg0;
int _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","nPage", NULL };
+ char *_kwnames[] = { "self","page", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_DeletePage",_kwnames,&_argo0,&_arg1))
wxNotebook * _arg0;
int _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","nPage", NULL };
+ char *_kwnames[] = { "self","page", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_RemovePage",_kwnames,&_argo0,&_arg1))
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
PyObject * _obj2 = 0;
- char *_kwnames[] = { "self","pPage","strText","bSelect","imageId", NULL };
+ char *_kwnames[] = { "self","page","text","select","imageId", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|ii:wxNotebook_AddPage",_kwnames,&_argo0,&_argo1,&_obj2,&_arg3,&_arg4))
PyObject * _argo2 = 0;
PyObject * _obj3 = 0;
int tempbool4 = (int) FALSE;
- char *_kwnames[] = { "self","nPage","pPage","strText","bSelect","imageId", NULL };
+ char *_kwnames[] = { "self","page","page","text","select","imageId", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOO|ii:wxNotebook_InsertPage",_kwnames,&_argo0,&_arg1,&_argo2,&_obj3,&tempbool4,&_arg5))
wxNotebook * _arg0;
int _arg1;
PyObject * _argo0 = 0;
- char *_kwnames[] = { "self","nPage", NULL };
+ char *_kwnames[] = { "self","page", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNotebook_GetPage",_kwnames,&_argo0,&_arg1))
}
}
if (_argo1) {
- if (_argo1 == Py_None) { _arg1 = NULL; }
- else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) {
+ if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTaskBarIcon_SetIcon. Expected _wxIcon_p.");
return NULL;
}
return _resultobj;
}
+#define wxPyWindow_base_AddChild(_swigobj,_swigarg0) (_swigobj->base_AddChild(_swigarg0))
+static PyObject *_wrap_wxPyWindow_base_AddChild(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxPyWindow * _arg0;
+ wxWindow * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","child", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyWindow_base_AddChild",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyWindow_base_AddChild. Expected _wxPyWindow_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyWindow_base_AddChild. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ wxPyWindow_base_AddChild(_arg0,_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxPyWindow_base_RemoveChild(_swigobj,_swigarg0) (_swigobj->base_RemoveChild(_swigarg0))
+static PyObject *_wrap_wxPyWindow_base_RemoveChild(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxPyWindow * _arg0;
+ wxWindow * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","child", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyWindow_base_RemoveChild",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyWindow_base_RemoveChild. Expected _wxPyWindow_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyWindow_base_RemoveChild. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ wxPyWindow_base_RemoveChild(_arg0,_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
static void *SwigwxPyControlTowxControl(void *ptr) {
wxPyControl *src;
wxControl *dest;
return NULL;
}
if (_argo5) {
- if (_argo5 == Py_None) { _arg5 = NULL; }
- else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxValidator_p")) {
+ if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxValidator_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of new_wxPyControl. Expected _wxValidator_p.");
return NULL;
}
return _resultobj;
}
+#define wxPyControl_base_AddChild(_swigobj,_swigarg0) (_swigobj->base_AddChild(_swigarg0))
+static PyObject *_wrap_wxPyControl_base_AddChild(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxPyControl * _arg0;
+ wxWindow * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","child", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyControl_base_AddChild",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyControl_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyControl_base_AddChild. Expected _wxPyControl_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyControl_base_AddChild. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ wxPyControl_base_AddChild(_arg0,_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxPyControl_base_RemoveChild(_swigobj,_swigarg0) (_swigobj->base_RemoveChild(_swigarg0))
+static PyObject *_wrap_wxPyControl_base_RemoveChild(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxPyControl * _arg0;
+ wxWindow * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","child", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyControl_base_RemoveChild",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyControl_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyControl_base_RemoveChild. Expected _wxPyControl_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyControl_base_RemoveChild. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ wxPyControl_base_RemoveChild(_arg0,_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
static void *SwigwxPyPanelTowxPanel(void *ptr) {
wxPyPanel *src;
wxPanel *dest;
return _resultobj;
}
+#define wxPyPanel_base_AddChild(_swigobj,_swigarg0) (_swigobj->base_AddChild(_swigarg0))
+static PyObject *_wrap_wxPyPanel_base_AddChild(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxPyPanel * _arg0;
+ wxWindow * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","child", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyPanel_base_AddChild",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyPanel_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyPanel_base_AddChild. Expected _wxPyPanel_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPanel_base_AddChild. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ wxPyPanel_base_AddChild(_arg0,_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
+#define wxPyPanel_base_RemoveChild(_swigobj,_swigarg0) (_swigobj->base_RemoveChild(_swigarg0))
+static PyObject *_wrap_wxPyPanel_base_RemoveChild(PyObject *self, PyObject *args, PyObject *kwargs) {
+ PyObject * _resultobj;
+ wxPyPanel * _arg0;
+ wxWindow * _arg1;
+ PyObject * _argo0 = 0;
+ PyObject * _argo1 = 0;
+ char *_kwnames[] = { "self","child", NULL };
+
+ self = self;
+ if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyPanel_base_RemoveChild",_kwnames,&_argo0,&_argo1))
+ return NULL;
+ if (_argo0) {
+ if (_argo0 == Py_None) { _arg0 = NULL; }
+ else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyPanel_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyPanel_base_RemoveChild. Expected _wxPyPanel_p.");
+ return NULL;
+ }
+ }
+ if (_argo1) {
+ if (_argo1 == Py_None) { _arg1 = NULL; }
+ else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) {
+ PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyPanel_base_RemoveChild. Expected _wxWindow_p.");
+ return NULL;
+ }
+ }
+{
+ PyThreadState* __tstate = wxPyBeginAllowThreads();
+ wxPyPanel_base_RemoveChild(_arg0,_arg1);
+
+ wxPyEndAllowThreads(__tstate);
+ if (PyErr_Occurred()) return NULL;
+} Py_INCREF(Py_None);
+ _resultobj = Py_None;
+ return _resultobj;
+}
+
static PyMethodDef windows2cMethods[] = {
+ { "wxPyPanel_base_RemoveChild", (PyCFunction) _wrap_wxPyPanel_base_RemoveChild, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyPanel_base_AddChild", (PyCFunction) _wrap_wxPyPanel_base_AddChild, METH_VARARGS | METH_KEYWORDS },
{ "wxPyPanel_base_GetMaxSize", (PyCFunction) _wrap_wxPyPanel_base_GetMaxSize, METH_VARARGS | METH_KEYWORDS },
{ "wxPyPanel_base_AcceptsFocusFromKeyboard", (PyCFunction) _wrap_wxPyPanel_base_AcceptsFocusFromKeyboard, METH_VARARGS | METH_KEYWORDS },
{ "wxPyPanel_base_AcceptsFocus", (PyCFunction) _wrap_wxPyPanel_base_AcceptsFocus, METH_VARARGS | METH_KEYWORDS },
{ "wxPyPanel_base_DoMoveWindow", (PyCFunction) _wrap_wxPyPanel_base_DoMoveWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxPyPanel__setCallbackInfo", (PyCFunction) _wrap_wxPyPanel__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPyPanel", (PyCFunction) _wrap_new_wxPyPanel, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyControl_base_RemoveChild", (PyCFunction) _wrap_wxPyControl_base_RemoveChild, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyControl_base_AddChild", (PyCFunction) _wrap_wxPyControl_base_AddChild, METH_VARARGS | METH_KEYWORDS },
{ "wxPyControl_base_GetMaxSize", (PyCFunction) _wrap_wxPyControl_base_GetMaxSize, METH_VARARGS | METH_KEYWORDS },
{ "wxPyControl_base_AcceptsFocusFromKeyboard", (PyCFunction) _wrap_wxPyControl_base_AcceptsFocusFromKeyboard, METH_VARARGS | METH_KEYWORDS },
{ "wxPyControl_base_AcceptsFocus", (PyCFunction) _wrap_wxPyControl_base_AcceptsFocus, METH_VARARGS | METH_KEYWORDS },
{ "wxPyControl_base_DoMoveWindow", (PyCFunction) _wrap_wxPyControl_base_DoMoveWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxPyControl__setCallbackInfo", (PyCFunction) _wrap_wxPyControl__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
{ "new_wxPyControl", (PyCFunction) _wrap_new_wxPyControl, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyWindow_base_RemoveChild", (PyCFunction) _wrap_wxPyWindow_base_RemoveChild, METH_VARARGS | METH_KEYWORDS },
+ { "wxPyWindow_base_AddChild", (PyCFunction) _wrap_wxPyWindow_base_AddChild, METH_VARARGS | METH_KEYWORDS },
{ "wxPyWindow_base_GetMaxSize", (PyCFunction) _wrap_wxPyWindow_base_GetMaxSize, METH_VARARGS | METH_KEYWORDS },
{ "wxPyWindow_base_AcceptsFocusFromKeyboard", (PyCFunction) _wrap_wxPyWindow_base_AcceptsFocusFromKeyboard, METH_VARARGS | METH_KEYWORDS },
{ "wxPyWindow_base_AcceptsFocus", (PyCFunction) _wrap_wxPyWindow_base_AcceptsFocus, METH_VARARGS | METH_KEYWORDS },