From 7e50db3f1dee16c59176f0f5dad2be787e7a5f9b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 25 Mar 2003 21:53:30 +0000 Subject: [PATCH] SWIGged updates for wxMSW git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/glcanvas/msw/glcanvas.cpp | 49 +- wxPython/contrib/glcanvas/msw/glcanvas.py | 9 +- wxPython/contrib/stc/msw/stc_.cpp | 140 +- wxPython/contrib/stc/msw/stc_.py | 131 +- .../distrib/mac/wxPythonOSX/PieShell.icns | Bin 55621 -> 2092 bytes wxPython/distrib/mac/wxPythonOSX/RunDemo.icns | Bin 41898 -> 2045 bytes wxPython/distrib/mac/wxPythonOSX/XRCed.icns | Bin 37830 -> 1244 bytes wxPython/src/msw/calendar.cpp | 32 +- wxPython/src/msw/calendar.py | 1 + wxPython/src/msw/clip_dnd.cpp | 140 +- wxPython/src/msw/clip_dnd.py | 42 +- wxPython/src/msw/cmndlgs.cpp | 40 +- wxPython/src/msw/cmndlgs.py | 27 +- wxPython/src/msw/controls.cpp | 248 +-- wxPython/src/msw/controls.py | 15 +- wxPython/src/msw/controls2.cpp | 403 ++-- wxPython/src/msw/controls2.py | 52 +- wxPython/src/msw/events.cpp | 49 +- wxPython/src/msw/events.py | 31 +- wxPython/src/msw/filesys.cpp | 59 +- wxPython/src/msw/filesys.py | 5 +- wxPython/src/msw/fonts.cpp | 265 ++- wxPython/src/msw/fonts.py | 74 +- wxPython/src/msw/frames.cpp | 52 +- wxPython/src/msw/frames.py | 4 +- wxPython/src/msw/gdi.cpp | 1217 +++++++----- wxPython/src/msw/gdi.py | 271 ++- wxPython/src/msw/grid.cpp | 656 ++++++- wxPython/src/msw/grid.py | 78 +- wxPython/src/msw/help.cpp | 11 +- wxPython/src/msw/help.py | 10 +- wxPython/src/msw/html.cpp | 301 ++- wxPython/src/msw/html.py | 44 +- wxPython/src/msw/htmlhelp.cpp | 25 +- wxPython/src/msw/htmlhelp.py | 18 +- wxPython/src/msw/image.cpp | 72 +- wxPython/src/msw/image.py | 12 +- wxPython/src/msw/mdi.cpp | 5 +- wxPython/src/msw/misc.cpp | 1665 ++++++++++++++--- wxPython/src/msw/misc.py | 270 ++- wxPython/src/msw/misc2.cpp | 505 ++--- wxPython/src/msw/misc2.py | 174 +- wxPython/src/msw/printfw.cpp | 32 +- wxPython/src/msw/printfw.py | 36 +- wxPython/src/msw/sizers.cpp | 1636 ++++++++++++---- wxPython/src/msw/sizers.py | 228 ++- wxPython/src/msw/stattool.cpp | 51 +- wxPython/src/msw/stattool.py | 6 +- wxPython/src/msw/streams.cpp | 243 ++- wxPython/src/msw/streams.py | 28 +- wxPython/src/msw/utils.cpp | 189 +- wxPython/src/msw/utils.py | 71 +- wxPython/src/msw/windows.cpp | 277 ++- wxPython/src/msw/windows.py | 20 +- wxPython/src/msw/windows2.cpp | 37 +- wxPython/src/msw/windows2.py | 9 +- wxPython/src/msw/windows3.cpp | 5 +- wxPython/src/msw/windows3.py | 9 +- wxPython/src/msw/wizard.cpp | 100 +- wxPython/src/msw/wizard.py | 14 + wxPython/src/msw/wx.cpp | 393 +++- wxPython/src/msw/wx.py | 158 +- 62 files changed, 7736 insertions(+), 3008 deletions(-) diff --git a/wxPython/contrib/glcanvas/msw/glcanvas.cpp b/wxPython/contrib/glcanvas/msw/glcanvas.cpp index 5d7ac821aa..7b58b9da64 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/msw/glcanvas.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -129,8 +128,7 @@ static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args, PyObject } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPalette_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxPalette_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxGLContext. Expected _wxPalette_p."); return NULL; } @@ -211,12 +209,13 @@ static PyObject *_wrap_wxGLContext_SetCurrent(PyObject *self, PyObject *args, Py static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxGLContext * _arg0; - char * _arg1; + wxString * _arg1; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLContext_SetColour",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLContext_SetColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -225,14 +224,23 @@ static PyObject *_wrap_wxGLContext_SetColour(PyObject *self, PyObject *args, PyO return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLContext_SetColour(_arg0,_arg1); + wxGLContext_SetColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -382,8 +390,7 @@ static PyObject *_wrap_new_wxGLCanvas(PyObject *self, PyObject *args, PyObject * } } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxPalette_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxGLCanvas. Expected _wxPalette_p."); return NULL; } @@ -486,8 +493,7 @@ static PyObject *_wrap_new_wxGLCanvasWithContext(PyObject *self, PyObject *args, } } if (_argo8) { - if (_argo8 == Py_None) { _arg8 = NULL; } - else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) { + if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxPalette_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxGLCanvasWithContext. Expected _wxPalette_p."); return NULL; } @@ -547,12 +553,13 @@ static PyObject *_wrap_wxGLCanvas_SetCurrent(PyObject *self, PyObject *args, PyO static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxGLCanvas * _arg0; - char * _arg1; + wxString * _arg1; PyObject * _argo0 = 0; + PyObject * _obj1 = 0; char *_kwnames[] = { "self","colour", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Os:wxGLCanvas_SetColour",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGLCanvas_SetColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -561,14 +568,23 @@ static PyObject *_wrap_wxGLCanvas_SetColour(PyObject *self, PyObject *args, PyOb return NULL; } } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGLCanvas_SetColour(_arg0,_arg1); + wxGLCanvas_SetColour(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } @@ -702,8 +718,7 @@ static PyObject *_wrap_wxGLCanvas_SetupPalette(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGLCanvas_SetupPalette. Expected _wxPalette_p."); return NULL; } diff --git a/wxPython/contrib/glcanvas/msw/glcanvas.py b/wxPython/contrib/glcanvas/msw/glcanvas.py index 6ae845efc3..a7b7b8dd67 100644 --- a/wxPython/contrib/glcanvas/msw/glcanvas.py +++ b/wxPython/contrib/glcanvas/msw/glcanvas.py @@ -47,9 +47,12 @@ class wxGLContextPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,glcanvasc=glcanvasc): - if self.thisown == 1 : - glcanvasc.delete_wxGLContext(self) + def __del__(self, delfunc=glcanvasc.delete_wxGLContext): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetCurrent(self, *_args, **_kwargs): val = apply(glcanvasc.wxGLContext_SetCurrent,(self,) + _args, _kwargs) return val diff --git a/wxPython/contrib/stc/msw/stc_.cpp b/wxPython/contrib/stc/msw/stc_.cpp index 17c9161e10..70f55c2596 100644 --- a/wxPython/contrib/stc/msw/stc_.cpp +++ b/wxPython/contrib/stc/msw/stc_.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -1015,7 +1014,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetCurLine(PyObject *self, PyObject *arg 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 @@ -4804,7 +4803,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetLine(PyObject *self, PyObject *args, 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 @@ -5041,7 +5040,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetSelectedText(PyObject *self, PyObject 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 @@ -5080,7 +5079,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetTextRange(PyObject *self, PyObject *a 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 @@ -5597,7 +5596,7 @@ static PyObject *_wrap_wxStyledTextCtrl_GetText(PyObject *self, PyObject *args, 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 @@ -9161,8 +9160,7 @@ static PyObject *_wrap_wxStyledTextCtrl_StyleSetFont(PyObject *self, PyObject *a } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxStyledTextCtrl_StyleSetFont. Expected _wxFont_p."); return NULL; } @@ -10408,7 +10406,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetText(PyObject *self, PyObject *args, 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 @@ -10781,7 +10779,7 @@ static PyObject *_wrap_wxStyledTextEvent_GetDragText(PyObject *self, PyObject *a 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 @@ -11450,8 +11448,6 @@ SWIGEXPORT(void) initstc_c() { PyDict_SetItemString(d,"wxSTC_START", PyInt_FromLong((long) 2000)); PyDict_SetItemString(d,"wxSTC_OPTIONAL_START", PyInt_FromLong((long) 3000)); PyDict_SetItemString(d,"wxSTC_LEXER_START", PyInt_FromLong((long) 4000)); - PyDict_SetItemString(d,"wxSTC_CMD_REDO", PyInt_FromLong((long) 2011)); - PyDict_SetItemString(d,"wxSTC_CMD_SELECTALL", PyInt_FromLong((long) 2013)); PyDict_SetItemString(d,"wxSTC_WS_INVISIBLE", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"wxSTC_WS_VISIBLEALWAYS", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"wxSTC_WS_VISIBLEAFTERINDENT", PyInt_FromLong((long) 2)); @@ -11545,10 +11541,6 @@ SWIGEXPORT(void) initstc_c() { PyDict_SetItemString(d,"wxSTC_FIND_MATCHCASE", PyInt_FromLong((long) 4)); PyDict_SetItemString(d,"wxSTC_FIND_WORDSTART", PyInt_FromLong((long) 0x00100000)); PyDict_SetItemString(d,"wxSTC_FIND_REGEXP", PyInt_FromLong((long) 0x00200000)); - PyDict_SetItemString(d,"wxSTC_CMD_UNDO", PyInt_FromLong((long) 2176)); - PyDict_SetItemString(d,"wxSTC_CMD_CUT", PyInt_FromLong((long) 2177)); - PyDict_SetItemString(d,"wxSTC_CMD_COPY", PyInt_FromLong((long) 2178)); - PyDict_SetItemString(d,"wxSTC_CMD_PASTE", PyInt_FromLong((long) 2179)); PyDict_SetItemString(d,"wxSTC_FOLDLEVELBASE", PyInt_FromLong((long) 0x400)); PyDict_SetItemString(d,"wxSTC_FOLDLEVELWHITEFLAG", PyInt_FromLong((long) 0x1000)); PyDict_SetItemString(d,"wxSTC_FOLDLEVELHEADERFLAG", PyInt_FromLong((long) 0x2000)); @@ -11560,55 +11552,6 @@ SWIGEXPORT(void) initstc_c() { PyDict_SetItemString(d,"wxSTC_CACHE_CARET", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"wxSTC_CACHE_PAGE", PyInt_FromLong((long) 2)); PyDict_SetItemString(d,"wxSTC_CACHE_DOCUMENT", PyInt_FromLong((long) 3)); - PyDict_SetItemString(d,"wxSTC_CMD_LINEDOWN", PyInt_FromLong((long) 2300)); - PyDict_SetItemString(d,"wxSTC_CMD_LINEDOWNEXTEND", PyInt_FromLong((long) 2301)); - PyDict_SetItemString(d,"wxSTC_CMD_LINEUP", PyInt_FromLong((long) 2302)); - PyDict_SetItemString(d,"wxSTC_CMD_LINEUPEXTEND", PyInt_FromLong((long) 2303)); - PyDict_SetItemString(d,"wxSTC_CMD_CHARLEFT", PyInt_FromLong((long) 2304)); - PyDict_SetItemString(d,"wxSTC_CMD_CHARLEFTEXTEND", PyInt_FromLong((long) 2305)); - PyDict_SetItemString(d,"wxSTC_CMD_CHARRIGHT", PyInt_FromLong((long) 2306)); - PyDict_SetItemString(d,"wxSTC_CMD_CHARRIGHTEXTEND", PyInt_FromLong((long) 2307)); - PyDict_SetItemString(d,"wxSTC_CMD_WORDLEFT", PyInt_FromLong((long) 2308)); - PyDict_SetItemString(d,"wxSTC_CMD_WORDLEFTEXTEND", PyInt_FromLong((long) 2309)); - PyDict_SetItemString(d,"wxSTC_CMD_WORDRIGHT", PyInt_FromLong((long) 2310)); - PyDict_SetItemString(d,"wxSTC_CMD_WORDRIGHTEXTEND", PyInt_FromLong((long) 2311)); - PyDict_SetItemString(d,"wxSTC_CMD_HOME", PyInt_FromLong((long) 2312)); - PyDict_SetItemString(d,"wxSTC_CMD_HOMEEXTEND", PyInt_FromLong((long) 2313)); - PyDict_SetItemString(d,"wxSTC_CMD_LINEEND", PyInt_FromLong((long) 2314)); - PyDict_SetItemString(d,"wxSTC_CMD_LINEENDEXTEND", PyInt_FromLong((long) 2315)); - PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTSTART", PyInt_FromLong((long) 2316)); - PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTSTARTEXTEND", PyInt_FromLong((long) 2317)); - PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTEND", PyInt_FromLong((long) 2318)); - PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTENDEXTEND", PyInt_FromLong((long) 2319)); - PyDict_SetItemString(d,"wxSTC_CMD_PAGEUP", PyInt_FromLong((long) 2320)); - PyDict_SetItemString(d,"wxSTC_CMD_PAGEUPEXTEND", PyInt_FromLong((long) 2321)); - PyDict_SetItemString(d,"wxSTC_CMD_PAGEDOWN", PyInt_FromLong((long) 2322)); - PyDict_SetItemString(d,"wxSTC_CMD_PAGEDOWNEXTEND", PyInt_FromLong((long) 2323)); - PyDict_SetItemString(d,"wxSTC_CMD_EDITTOGGLEOVERTYPE", PyInt_FromLong((long) 2324)); - PyDict_SetItemString(d,"wxSTC_CMD_CANCEL", PyInt_FromLong((long) 2325)); - PyDict_SetItemString(d,"wxSTC_CMD_DELETEBACK", PyInt_FromLong((long) 2326)); - PyDict_SetItemString(d,"wxSTC_CMD_TAB", PyInt_FromLong((long) 2327)); - PyDict_SetItemString(d,"wxSTC_CMD_BACKTAB", PyInt_FromLong((long) 2328)); - PyDict_SetItemString(d,"wxSTC_CMD_NEWLINE", PyInt_FromLong((long) 2329)); - PyDict_SetItemString(d,"wxSTC_CMD_FORMFEED", PyInt_FromLong((long) 2330)); - PyDict_SetItemString(d,"wxSTC_CMD_VCHOME", PyInt_FromLong((long) 2331)); - PyDict_SetItemString(d,"wxSTC_CMD_VCHOMEEXTEND", PyInt_FromLong((long) 2332)); - PyDict_SetItemString(d,"wxSTC_CMD_ZOOMIN", PyInt_FromLong((long) 2333)); - PyDict_SetItemString(d,"wxSTC_CMD_ZOOMOUT", PyInt_FromLong((long) 2334)); - PyDict_SetItemString(d,"wxSTC_CMD_DELWORDLEFT", PyInt_FromLong((long) 2335)); - PyDict_SetItemString(d,"wxSTC_CMD_DELWORDRIGHT", PyInt_FromLong((long) 2336)); - PyDict_SetItemString(d,"wxSTC_CMD_LINECUT", PyInt_FromLong((long) 2337)); - PyDict_SetItemString(d,"wxSTC_CMD_LINEDELETE", PyInt_FromLong((long) 2338)); - PyDict_SetItemString(d,"wxSTC_CMD_LINETRANSPOSE", PyInt_FromLong((long) 2339)); - PyDict_SetItemString(d,"wxSTC_CMD_LOWERCASE", PyInt_FromLong((long) 2340)); - PyDict_SetItemString(d,"wxSTC_CMD_UPPERCASE", PyInt_FromLong((long) 2341)); - PyDict_SetItemString(d,"wxSTC_CMD_LINESCROLLDOWN", PyInt_FromLong((long) 2342)); - PyDict_SetItemString(d,"wxSTC_CMD_LINESCROLLUP", PyInt_FromLong((long) 2343)); - PyDict_SetItemString(d,"wxSTC_CMD_DELETEBACKNOTLINE", PyInt_FromLong((long) 2344)); - PyDict_SetItemString(d,"wxSTC_CMD_HOMEDISPLAY", PyInt_FromLong((long) 2345)); - PyDict_SetItemString(d,"wxSTC_CMD_HOMEDISPLAYEXTEND", PyInt_FromLong((long) 2346)); - PyDict_SetItemString(d,"wxSTC_CMD_LINEENDDISPLAY", PyInt_FromLong((long) 2347)); - PyDict_SetItemString(d,"wxSTC_CMD_LINEENDDISPLAYEXTEND", PyInt_FromLong((long) 2348)); PyDict_SetItemString(d,"wxSTC_EDGE_NONE", PyInt_FromLong((long) 0)); PyDict_SetItemString(d,"wxSTC_EDGE_LINE", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"wxSTC_EDGE_BACKGROUND", PyInt_FromLong((long) 2)); @@ -12030,7 +11973,68 @@ SWIGEXPORT(void) initstc_c() { PyDict_SetItemString(d,"wxSTC_SCRIPTOL_COMMENTDOCKEYWORD", PyInt_FromLong((long) 17)); PyDict_SetItemString(d,"wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR", PyInt_FromLong((long) 18)); PyDict_SetItemString(d,"wxSTC_SCRIPTOL_COMMENTBASIC", PyInt_FromLong((long) 19)); - PyDict_SetItemString(d,"wxSTCNameStr", PyString_FromString("wxSTCNameStr")); + PyDict_SetItemString(d,"wxSTC_CMD_REDO", PyInt_FromLong((long) 2011)); + PyDict_SetItemString(d,"wxSTC_CMD_SELECTALL", PyInt_FromLong((long) 2013)); + PyDict_SetItemString(d,"wxSTC_CMD_UNDO", PyInt_FromLong((long) 2176)); + PyDict_SetItemString(d,"wxSTC_CMD_CUT", PyInt_FromLong((long) 2177)); + PyDict_SetItemString(d,"wxSTC_CMD_COPY", PyInt_FromLong((long) 2178)); + PyDict_SetItemString(d,"wxSTC_CMD_PASTE", PyInt_FromLong((long) 2179)); + PyDict_SetItemString(d,"wxSTC_CMD_CLEAR", PyInt_FromLong((long) 2180)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEDOWN", PyInt_FromLong((long) 2300)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEDOWNEXTEND", PyInt_FromLong((long) 2301)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEUP", PyInt_FromLong((long) 2302)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEUPEXTEND", PyInt_FromLong((long) 2303)); + PyDict_SetItemString(d,"wxSTC_CMD_CHARLEFT", PyInt_FromLong((long) 2304)); + PyDict_SetItemString(d,"wxSTC_CMD_CHARLEFTEXTEND", PyInt_FromLong((long) 2305)); + PyDict_SetItemString(d,"wxSTC_CMD_CHARRIGHT", PyInt_FromLong((long) 2306)); + PyDict_SetItemString(d,"wxSTC_CMD_CHARRIGHTEXTEND", PyInt_FromLong((long) 2307)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDLEFT", PyInt_FromLong((long) 2308)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDLEFTEXTEND", PyInt_FromLong((long) 2309)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDRIGHT", PyInt_FromLong((long) 2310)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDRIGHTEXTEND", PyInt_FromLong((long) 2311)); + PyDict_SetItemString(d,"wxSTC_CMD_HOME", PyInt_FromLong((long) 2312)); + PyDict_SetItemString(d,"wxSTC_CMD_HOMEEXTEND", PyInt_FromLong((long) 2313)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEEND", PyInt_FromLong((long) 2314)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEENDEXTEND", PyInt_FromLong((long) 2315)); + PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTSTART", PyInt_FromLong((long) 2316)); + PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTSTARTEXTEND", PyInt_FromLong((long) 2317)); + PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTEND", PyInt_FromLong((long) 2318)); + PyDict_SetItemString(d,"wxSTC_CMD_DOCUMENTENDEXTEND", PyInt_FromLong((long) 2319)); + PyDict_SetItemString(d,"wxSTC_CMD_PAGEUP", PyInt_FromLong((long) 2320)); + PyDict_SetItemString(d,"wxSTC_CMD_PAGEUPEXTEND", PyInt_FromLong((long) 2321)); + PyDict_SetItemString(d,"wxSTC_CMD_PAGEDOWN", PyInt_FromLong((long) 2322)); + PyDict_SetItemString(d,"wxSTC_CMD_PAGEDOWNEXTEND", PyInt_FromLong((long) 2323)); + PyDict_SetItemString(d,"wxSTC_CMD_EDITTOGGLEOVERTYPE", PyInt_FromLong((long) 2324)); + PyDict_SetItemString(d,"wxSTC_CMD_CANCEL", PyInt_FromLong((long) 2325)); + PyDict_SetItemString(d,"wxSTC_CMD_DELETEBACK", PyInt_FromLong((long) 2326)); + PyDict_SetItemString(d,"wxSTC_CMD_TAB", PyInt_FromLong((long) 2327)); + PyDict_SetItemString(d,"wxSTC_CMD_BACKTAB", PyInt_FromLong((long) 2328)); + PyDict_SetItemString(d,"wxSTC_CMD_NEWLINE", PyInt_FromLong((long) 2329)); + PyDict_SetItemString(d,"wxSTC_CMD_FORMFEED", PyInt_FromLong((long) 2330)); + PyDict_SetItemString(d,"wxSTC_CMD_VCHOME", PyInt_FromLong((long) 2331)); + PyDict_SetItemString(d,"wxSTC_CMD_VCHOMEEXTEND", PyInt_FromLong((long) 2332)); + PyDict_SetItemString(d,"wxSTC_CMD_ZOOMIN", PyInt_FromLong((long) 2333)); + PyDict_SetItemString(d,"wxSTC_CMD_ZOOMOUT", PyInt_FromLong((long) 2334)); + PyDict_SetItemString(d,"wxSTC_CMD_DELWORDLEFT", PyInt_FromLong((long) 2335)); + PyDict_SetItemString(d,"wxSTC_CMD_DELWORDRIGHT", PyInt_FromLong((long) 2336)); + PyDict_SetItemString(d,"wxSTC_CMD_LINECUT", PyInt_FromLong((long) 2337)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEDELETE", PyInt_FromLong((long) 2338)); + PyDict_SetItemString(d,"wxSTC_CMD_LINETRANSPOSE", PyInt_FromLong((long) 2339)); + PyDict_SetItemString(d,"wxSTC_CMD_LOWERCASE", PyInt_FromLong((long) 2340)); + PyDict_SetItemString(d,"wxSTC_CMD_UPPERCASE", PyInt_FromLong((long) 2341)); + PyDict_SetItemString(d,"wxSTC_CMD_LINESCROLLDOWN", PyInt_FromLong((long) 2342)); + PyDict_SetItemString(d,"wxSTC_CMD_LINESCROLLUP", PyInt_FromLong((long) 2343)); + PyDict_SetItemString(d,"wxSTC_CMD_DELETEBACKNOTLINE", PyInt_FromLong((long) 2344)); + PyDict_SetItemString(d,"wxSTC_CMD_HOMEDISPLAY", PyInt_FromLong((long) 2345)); + PyDict_SetItemString(d,"wxSTC_CMD_HOMEDISPLAYEXTEND", PyInt_FromLong((long) 2346)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEENDDISPLAY", PyInt_FromLong((long) 2347)); + PyDict_SetItemString(d,"wxSTC_CMD_LINEENDDISPLAYEXTEND", PyInt_FromLong((long) 2348)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDPARTLEFT", PyInt_FromLong((long) 2390)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDPARTLEFTEXTEND", PyInt_FromLong((long) 2391)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDPARTRIGHT", PyInt_FromLong((long) 2392)); + PyDict_SetItemString(d,"wxSTC_CMD_WORDPARTRIGHTEXTEND", PyInt_FromLong((long) 2393)); + PyDict_SetItemString(d,"wxSTC_CMD_DELLINELEFT", PyInt_FromLong((long) 2395)); + PyDict_SetItemString(d,"wxSTC_CMD_DELLINERIGHT", PyInt_FromLong((long) 2396)); PyDict_SetItemString(d,"STC_USE_DND", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"wxEVT_STC_CHANGE", PyInt_FromLong((long) wxEVT_STC_CHANGE)); PyDict_SetItemString(d,"wxEVT_STC_STYLENEEDED", PyInt_FromLong((long) wxEVT_STC_STYLENEEDED)); diff --git a/wxPython/contrib/stc/msw/stc_.py b/wxPython/contrib/stc/msw/stc_.py index 283ac7527d..a3a4fef4a9 100644 --- a/wxPython/contrib/stc/msw/stc_.py +++ b/wxPython/contrib/stc/msw/stc_.py @@ -1046,9 +1046,12 @@ class wxStyledTextEventPtr(wxCommandEventPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,stc_c=stc_c): - if self.thisown == 1 : - stc_c.delete_wxStyledTextEvent(self) + def __del__(self, delfunc=stc_c.delete_wxStyledTextEvent): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetPosition(self, *_args, **_kwargs): val = apply(stc_c.wxStyledTextEvent_SetPosition,(self,) + _args, _kwargs) return val @@ -1205,8 +1208,6 @@ wxSTC_INVALID_POSITION = stc_c.wxSTC_INVALID_POSITION wxSTC_START = stc_c.wxSTC_START wxSTC_OPTIONAL_START = stc_c.wxSTC_OPTIONAL_START wxSTC_LEXER_START = stc_c.wxSTC_LEXER_START -wxSTC_CMD_REDO = stc_c.wxSTC_CMD_REDO -wxSTC_CMD_SELECTALL = stc_c.wxSTC_CMD_SELECTALL wxSTC_WS_INVISIBLE = stc_c.wxSTC_WS_INVISIBLE wxSTC_WS_VISIBLEALWAYS = stc_c.wxSTC_WS_VISIBLEALWAYS wxSTC_WS_VISIBLEAFTERINDENT = stc_c.wxSTC_WS_VISIBLEAFTERINDENT @@ -1300,10 +1301,6 @@ wxSTC_FIND_WHOLEWORD = stc_c.wxSTC_FIND_WHOLEWORD wxSTC_FIND_MATCHCASE = stc_c.wxSTC_FIND_MATCHCASE wxSTC_FIND_WORDSTART = stc_c.wxSTC_FIND_WORDSTART wxSTC_FIND_REGEXP = stc_c.wxSTC_FIND_REGEXP -wxSTC_CMD_UNDO = stc_c.wxSTC_CMD_UNDO -wxSTC_CMD_CUT = stc_c.wxSTC_CMD_CUT -wxSTC_CMD_COPY = stc_c.wxSTC_CMD_COPY -wxSTC_CMD_PASTE = stc_c.wxSTC_CMD_PASTE wxSTC_FOLDLEVELBASE = stc_c.wxSTC_FOLDLEVELBASE wxSTC_FOLDLEVELWHITEFLAG = stc_c.wxSTC_FOLDLEVELWHITEFLAG wxSTC_FOLDLEVELHEADERFLAG = stc_c.wxSTC_FOLDLEVELHEADERFLAG @@ -1315,55 +1312,6 @@ wxSTC_CACHE_NONE = stc_c.wxSTC_CACHE_NONE wxSTC_CACHE_CARET = stc_c.wxSTC_CACHE_CARET wxSTC_CACHE_PAGE = stc_c.wxSTC_CACHE_PAGE wxSTC_CACHE_DOCUMENT = stc_c.wxSTC_CACHE_DOCUMENT -wxSTC_CMD_LINEDOWN = stc_c.wxSTC_CMD_LINEDOWN -wxSTC_CMD_LINEDOWNEXTEND = stc_c.wxSTC_CMD_LINEDOWNEXTEND -wxSTC_CMD_LINEUP = stc_c.wxSTC_CMD_LINEUP -wxSTC_CMD_LINEUPEXTEND = stc_c.wxSTC_CMD_LINEUPEXTEND -wxSTC_CMD_CHARLEFT = stc_c.wxSTC_CMD_CHARLEFT -wxSTC_CMD_CHARLEFTEXTEND = stc_c.wxSTC_CMD_CHARLEFTEXTEND -wxSTC_CMD_CHARRIGHT = stc_c.wxSTC_CMD_CHARRIGHT -wxSTC_CMD_CHARRIGHTEXTEND = stc_c.wxSTC_CMD_CHARRIGHTEXTEND -wxSTC_CMD_WORDLEFT = stc_c.wxSTC_CMD_WORDLEFT -wxSTC_CMD_WORDLEFTEXTEND = stc_c.wxSTC_CMD_WORDLEFTEXTEND -wxSTC_CMD_WORDRIGHT = stc_c.wxSTC_CMD_WORDRIGHT -wxSTC_CMD_WORDRIGHTEXTEND = stc_c.wxSTC_CMD_WORDRIGHTEXTEND -wxSTC_CMD_HOME = stc_c.wxSTC_CMD_HOME -wxSTC_CMD_HOMEEXTEND = stc_c.wxSTC_CMD_HOMEEXTEND -wxSTC_CMD_LINEEND = stc_c.wxSTC_CMD_LINEEND -wxSTC_CMD_LINEENDEXTEND = stc_c.wxSTC_CMD_LINEENDEXTEND -wxSTC_CMD_DOCUMENTSTART = stc_c.wxSTC_CMD_DOCUMENTSTART -wxSTC_CMD_DOCUMENTSTARTEXTEND = stc_c.wxSTC_CMD_DOCUMENTSTARTEXTEND -wxSTC_CMD_DOCUMENTEND = stc_c.wxSTC_CMD_DOCUMENTEND -wxSTC_CMD_DOCUMENTENDEXTEND = stc_c.wxSTC_CMD_DOCUMENTENDEXTEND -wxSTC_CMD_PAGEUP = stc_c.wxSTC_CMD_PAGEUP -wxSTC_CMD_PAGEUPEXTEND = stc_c.wxSTC_CMD_PAGEUPEXTEND -wxSTC_CMD_PAGEDOWN = stc_c.wxSTC_CMD_PAGEDOWN -wxSTC_CMD_PAGEDOWNEXTEND = stc_c.wxSTC_CMD_PAGEDOWNEXTEND -wxSTC_CMD_EDITTOGGLEOVERTYPE = stc_c.wxSTC_CMD_EDITTOGGLEOVERTYPE -wxSTC_CMD_CANCEL = stc_c.wxSTC_CMD_CANCEL -wxSTC_CMD_DELETEBACK = stc_c.wxSTC_CMD_DELETEBACK -wxSTC_CMD_TAB = stc_c.wxSTC_CMD_TAB -wxSTC_CMD_BACKTAB = stc_c.wxSTC_CMD_BACKTAB -wxSTC_CMD_NEWLINE = stc_c.wxSTC_CMD_NEWLINE -wxSTC_CMD_FORMFEED = stc_c.wxSTC_CMD_FORMFEED -wxSTC_CMD_VCHOME = stc_c.wxSTC_CMD_VCHOME -wxSTC_CMD_VCHOMEEXTEND = stc_c.wxSTC_CMD_VCHOMEEXTEND -wxSTC_CMD_ZOOMIN = stc_c.wxSTC_CMD_ZOOMIN -wxSTC_CMD_ZOOMOUT = stc_c.wxSTC_CMD_ZOOMOUT -wxSTC_CMD_DELWORDLEFT = stc_c.wxSTC_CMD_DELWORDLEFT -wxSTC_CMD_DELWORDRIGHT = stc_c.wxSTC_CMD_DELWORDRIGHT -wxSTC_CMD_LINECUT = stc_c.wxSTC_CMD_LINECUT -wxSTC_CMD_LINEDELETE = stc_c.wxSTC_CMD_LINEDELETE -wxSTC_CMD_LINETRANSPOSE = stc_c.wxSTC_CMD_LINETRANSPOSE -wxSTC_CMD_LOWERCASE = stc_c.wxSTC_CMD_LOWERCASE -wxSTC_CMD_UPPERCASE = stc_c.wxSTC_CMD_UPPERCASE -wxSTC_CMD_LINESCROLLDOWN = stc_c.wxSTC_CMD_LINESCROLLDOWN -wxSTC_CMD_LINESCROLLUP = stc_c.wxSTC_CMD_LINESCROLLUP -wxSTC_CMD_DELETEBACKNOTLINE = stc_c.wxSTC_CMD_DELETEBACKNOTLINE -wxSTC_CMD_HOMEDISPLAY = stc_c.wxSTC_CMD_HOMEDISPLAY -wxSTC_CMD_HOMEDISPLAYEXTEND = stc_c.wxSTC_CMD_HOMEDISPLAYEXTEND -wxSTC_CMD_LINEENDDISPLAY = stc_c.wxSTC_CMD_LINEENDDISPLAY -wxSTC_CMD_LINEENDDISPLAYEXTEND = stc_c.wxSTC_CMD_LINEENDDISPLAYEXTEND wxSTC_EDGE_NONE = stc_c.wxSTC_EDGE_NONE wxSTC_EDGE_LINE = stc_c.wxSTC_EDGE_LINE wxSTC_EDGE_BACKGROUND = stc_c.wxSTC_EDGE_BACKGROUND @@ -1785,7 +1733,68 @@ wxSTC_SCRIPTOL_WORD2 = stc_c.wxSTC_SCRIPTOL_WORD2 wxSTC_SCRIPTOL_COMMENTDOCKEYWORD = stc_c.wxSTC_SCRIPTOL_COMMENTDOCKEYWORD wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR = stc_c.wxSTC_SCRIPTOL_COMMENTDOCKEYWORDERROR wxSTC_SCRIPTOL_COMMENTBASIC = stc_c.wxSTC_SCRIPTOL_COMMENTBASIC -wxSTCNameStr = stc_c.wxSTCNameStr +wxSTC_CMD_REDO = stc_c.wxSTC_CMD_REDO +wxSTC_CMD_SELECTALL = stc_c.wxSTC_CMD_SELECTALL +wxSTC_CMD_UNDO = stc_c.wxSTC_CMD_UNDO +wxSTC_CMD_CUT = stc_c.wxSTC_CMD_CUT +wxSTC_CMD_COPY = stc_c.wxSTC_CMD_COPY +wxSTC_CMD_PASTE = stc_c.wxSTC_CMD_PASTE +wxSTC_CMD_CLEAR = stc_c.wxSTC_CMD_CLEAR +wxSTC_CMD_LINEDOWN = stc_c.wxSTC_CMD_LINEDOWN +wxSTC_CMD_LINEDOWNEXTEND = stc_c.wxSTC_CMD_LINEDOWNEXTEND +wxSTC_CMD_LINEUP = stc_c.wxSTC_CMD_LINEUP +wxSTC_CMD_LINEUPEXTEND = stc_c.wxSTC_CMD_LINEUPEXTEND +wxSTC_CMD_CHARLEFT = stc_c.wxSTC_CMD_CHARLEFT +wxSTC_CMD_CHARLEFTEXTEND = stc_c.wxSTC_CMD_CHARLEFTEXTEND +wxSTC_CMD_CHARRIGHT = stc_c.wxSTC_CMD_CHARRIGHT +wxSTC_CMD_CHARRIGHTEXTEND = stc_c.wxSTC_CMD_CHARRIGHTEXTEND +wxSTC_CMD_WORDLEFT = stc_c.wxSTC_CMD_WORDLEFT +wxSTC_CMD_WORDLEFTEXTEND = stc_c.wxSTC_CMD_WORDLEFTEXTEND +wxSTC_CMD_WORDRIGHT = stc_c.wxSTC_CMD_WORDRIGHT +wxSTC_CMD_WORDRIGHTEXTEND = stc_c.wxSTC_CMD_WORDRIGHTEXTEND +wxSTC_CMD_HOME = stc_c.wxSTC_CMD_HOME +wxSTC_CMD_HOMEEXTEND = stc_c.wxSTC_CMD_HOMEEXTEND +wxSTC_CMD_LINEEND = stc_c.wxSTC_CMD_LINEEND +wxSTC_CMD_LINEENDEXTEND = stc_c.wxSTC_CMD_LINEENDEXTEND +wxSTC_CMD_DOCUMENTSTART = stc_c.wxSTC_CMD_DOCUMENTSTART +wxSTC_CMD_DOCUMENTSTARTEXTEND = stc_c.wxSTC_CMD_DOCUMENTSTARTEXTEND +wxSTC_CMD_DOCUMENTEND = stc_c.wxSTC_CMD_DOCUMENTEND +wxSTC_CMD_DOCUMENTENDEXTEND = stc_c.wxSTC_CMD_DOCUMENTENDEXTEND +wxSTC_CMD_PAGEUP = stc_c.wxSTC_CMD_PAGEUP +wxSTC_CMD_PAGEUPEXTEND = stc_c.wxSTC_CMD_PAGEUPEXTEND +wxSTC_CMD_PAGEDOWN = stc_c.wxSTC_CMD_PAGEDOWN +wxSTC_CMD_PAGEDOWNEXTEND = stc_c.wxSTC_CMD_PAGEDOWNEXTEND +wxSTC_CMD_EDITTOGGLEOVERTYPE = stc_c.wxSTC_CMD_EDITTOGGLEOVERTYPE +wxSTC_CMD_CANCEL = stc_c.wxSTC_CMD_CANCEL +wxSTC_CMD_DELETEBACK = stc_c.wxSTC_CMD_DELETEBACK +wxSTC_CMD_TAB = stc_c.wxSTC_CMD_TAB +wxSTC_CMD_BACKTAB = stc_c.wxSTC_CMD_BACKTAB +wxSTC_CMD_NEWLINE = stc_c.wxSTC_CMD_NEWLINE +wxSTC_CMD_FORMFEED = stc_c.wxSTC_CMD_FORMFEED +wxSTC_CMD_VCHOME = stc_c.wxSTC_CMD_VCHOME +wxSTC_CMD_VCHOMEEXTEND = stc_c.wxSTC_CMD_VCHOMEEXTEND +wxSTC_CMD_ZOOMIN = stc_c.wxSTC_CMD_ZOOMIN +wxSTC_CMD_ZOOMOUT = stc_c.wxSTC_CMD_ZOOMOUT +wxSTC_CMD_DELWORDLEFT = stc_c.wxSTC_CMD_DELWORDLEFT +wxSTC_CMD_DELWORDRIGHT = stc_c.wxSTC_CMD_DELWORDRIGHT +wxSTC_CMD_LINECUT = stc_c.wxSTC_CMD_LINECUT +wxSTC_CMD_LINEDELETE = stc_c.wxSTC_CMD_LINEDELETE +wxSTC_CMD_LINETRANSPOSE = stc_c.wxSTC_CMD_LINETRANSPOSE +wxSTC_CMD_LOWERCASE = stc_c.wxSTC_CMD_LOWERCASE +wxSTC_CMD_UPPERCASE = stc_c.wxSTC_CMD_UPPERCASE +wxSTC_CMD_LINESCROLLDOWN = stc_c.wxSTC_CMD_LINESCROLLDOWN +wxSTC_CMD_LINESCROLLUP = stc_c.wxSTC_CMD_LINESCROLLUP +wxSTC_CMD_DELETEBACKNOTLINE = stc_c.wxSTC_CMD_DELETEBACKNOTLINE +wxSTC_CMD_HOMEDISPLAY = stc_c.wxSTC_CMD_HOMEDISPLAY +wxSTC_CMD_HOMEDISPLAYEXTEND = stc_c.wxSTC_CMD_HOMEDISPLAYEXTEND +wxSTC_CMD_LINEENDDISPLAY = stc_c.wxSTC_CMD_LINEENDDISPLAY +wxSTC_CMD_LINEENDDISPLAYEXTEND = stc_c.wxSTC_CMD_LINEENDDISPLAYEXTEND +wxSTC_CMD_WORDPARTLEFT = stc_c.wxSTC_CMD_WORDPARTLEFT +wxSTC_CMD_WORDPARTLEFTEXTEND = stc_c.wxSTC_CMD_WORDPARTLEFTEXTEND +wxSTC_CMD_WORDPARTRIGHT = stc_c.wxSTC_CMD_WORDPARTRIGHT +wxSTC_CMD_WORDPARTRIGHTEXTEND = stc_c.wxSTC_CMD_WORDPARTRIGHTEXTEND +wxSTC_CMD_DELLINELEFT = stc_c.wxSTC_CMD_DELLINELEFT +wxSTC_CMD_DELLINERIGHT = stc_c.wxSTC_CMD_DELLINERIGHT STC_USE_DND = stc_c.STC_USE_DND wxEVT_STC_CHANGE = stc_c.wxEVT_STC_CHANGE wxEVT_STC_STYLENEEDED = stc_c.wxEVT_STC_STYLENEEDED @@ -1819,5 +1828,5 @@ wxEVT_STC_ZOOM = stc_c.wxEVT_STC_ZOOM wx.wxStyledTextEventPtr = wxStyledTextEventPtr wx.wxStyledTextCtrlPtr = wxStyledTextCtrlPtr - -wxSTC_CARET_CENTER = wxSTC_CARET_STRICT +# This constant no longer exists in Scintilla, but I'll put it here for a while to avoid disrupting user code... +wxSTC_CARET_CENTER = 0 diff --git a/wxPython/distrib/mac/wxPythonOSX/PieShell.icns b/wxPython/distrib/mac/wxPythonOSX/PieShell.icns index afc8c3f5c3bd4b2d328bf97c4bf75c1c71df28f8..bac0505811a1b0a7ed3fa65b5477ee66f56cfa78 100644 GIT binary patch delta 8 PcmX@QiFu8{1|1Fn5iA26 literal 55621 zcmeFacX(UZl`jfXltjw3RqWW4SdL`JPU2YdyovnB{oZ@uy_uQZ?>dR&Se0^-dy_2} zbxI_~1F(q{yGiw^D-uQ0B$@ycfCzvT8-ylQq8Uv9Nudc%C<5?)2c&JeWis#0-0yue z1Cj@)?7i07Yp=cbI%}=Hx%sV+w^Jw+|MPeM{QS=-l$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%k>nl!JCUny{M#SQKmUh+3q{t4O$P+VPZSKEkozZK+Z`EO z8^I~G@a(V5r~eP{`CFTIPvSY^bgQ45z5ja?cE4vk^WzzAHvjmv^6$U=a-uB%Yy+14 eW3{!B_hg9mKK~!Dx%5K- diff --git a/wxPython/distrib/mac/wxPythonOSX/XRCed.icns b/wxPython/distrib/mac/wxPythonOSX/XRCed.icns index ffe1737dae490aab27996a64644311221d6b059e..72f3c13ba8a7e513d906b8654d93e71979e69a04 100644 GIT binary patch delta 8 PcmX@MoaqkdhC3_(6A=UD literal 37830 zcmeFacR*D~_BcMT@ZO{MBA_UO*n*-!D4_&o0fP|AQbGwOpaElv;-W@fsML|OzwT2B#@T7kcCpBDV(g&#V!;U7-;p}@~h0+B8gfQmqD@WTr~bb_eF zKj<3#!13Y9!-o)JbNm{S*tW$YHX+5UUs>@-BesNv)ukUjq7XYRh*$|cu~cj<8iCl( z_O1|TK4cQ4;ho_K+4>P|vtNq2`3l`aD3VDq7KSqAkt^}7U?`&POeToFHz-U*E+*^OPX|y;{f#n?PSg zBFg98D9)Q8{Ui~AD0^mXB76w+VI(47pBsg2vNtUV(MSjh)%<4>2xM*9!+Zl;wz46KAD365<@>h{nTG-q$J^Z8pU4PZ>V34Z z!X(J|Oa(the9~XK1~nhI>i%hbW`5}@@%_P15x=xw-QZ96ySnc84UJ9AJS4uM-b8{F z*WjDpSN+59ly&{|<4-?N4-GV#-b6x@!W?X53XOZ)-vWyIr{+6mi9RRt4MZXf-aric z+gF0#aSk~t7yu0dHxY#nX5^1RjdUrj#zP+`+X#UglSV7L>YT9}Lp#a>ZCVmF`6Cd= zxz@6JThpH&EH;aUBkuQquDsXrOHpBnQ|yDcPT&9W#}9L6qc{MRbg`wmpsM>{Ma9?YpmeU}_gtE4+D5uv z*uoJzd;Gh!*dN;a9{5Be_7kDVxvlyBM4ey+VwXrzacOL5@1HV_L=5XMzpSlp?wpPQ zD8AT|+|v5yp*jY1m=xxH``!0H3@Af~aP&7hrQg+!o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JAN(bF;4>(c!DDaf!Wt`j-JAb>^kLtKK@cx!n z%|0g?p`Jic+G8=(3yzGp;r_Shuq=3gx&*)`(~JdE#P^zI>+kTQEKCpk1@>oV+^xIi zjcyreWa#pxD_5_LYKFagt=br z>$TT6zWKr4uP@*Q-CEm4(0}xhpJ0IG_n0j%p(>e9)z&7H$yBDE&i8G~(d!qUUEJ1@ z-|*HaU!A_Hz6qj8csN#}YcmiQNM(KC?c<12&}n!vTAf5eYy&E)v$@A{I`LC;o98cl zzIAEWJBKe6XXw)E7+GY})BmF52?DK|vD%z080AK8Jk|X;V#Gtd6pK0H` zXFxR&hg{t@T@L^S8wfSX^M>0i@lD`<@u+?dS4N|;s_L3#DxJxo>X*i(v9V?SuAh{} zSy969x&IB!N|b=;j6^BQK?CCjivhIYaJf)|?e>6s65vB2h!Tb$1f3+3RJH!}D}CSN zc)wyh+TM4Ef-`>e)9PvEG66^iDsVNK$pg1qZ8p0Dv~DT~M^%Fl!URJCB&ig{?DF0N z$IcI3zkXx*_^Lp(ZQI_XCr=zd^5wyvgbB4L+MmCPAqkCze2OCi5i$z11-2n@vVm6FnWvh%qnUj6)6MuV8HJRueYnW0d?m;tN;K2 diff --git a/wxPython/src/msw/calendar.cpp b/wxPython/src/msw/calendar.cpp index 046a052370..92f2810573 100644 --- a/wxPython/src/msw/calendar.cpp +++ b/wxPython/src/msw/calendar.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -130,8 +129,7 @@ static PyObject *_wrap_new_wxCalendarDateAttr(PyObject *self, PyObject *args, Py return NULL; } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxCalendarDateAttr. Expected _wxFont_p."); return NULL; } @@ -316,8 +314,7 @@ static PyObject *_wrap_wxCalendarDateAttr_SetFont(PyObject *self, PyObject *args } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarDateAttr_SetFont. Expected _wxFont_p."); return NULL; } @@ -897,8 +894,7 @@ static PyObject *_wrap_new_wxCalendarCtrl(PyObject *self, PyObject *args, PyObje } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxCalendarCtrl. Expected _wxDateTime_p."); return NULL; } @@ -1007,8 +1003,7 @@ static PyObject *_wrap_wxCalendarCtrl_Create(PyObject *self, PyObject *args, PyO } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxCalendarCtrl_Create. Expected _wxDateTime_p."); return NULL; } @@ -1065,8 +1060,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetDate(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetDate. Expected _wxDateTime_p."); return NULL; } @@ -1139,8 +1133,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetLowerDateLimit(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetLowerDateLimit. Expected _wxDateTime_p."); return NULL; } @@ -1212,8 +1205,7 @@ static PyObject *_wrap_wxCalendarCtrl_SetUpperDateLimit(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetUpperDateLimit. Expected _wxDateTime_p."); return NULL; } @@ -1287,15 +1279,13 @@ static PyObject *_wrap_wxCalendarCtrl_SetDateRange(PyObject *self, PyObject *arg } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxCalendarCtrl_SetDateRange. Expected _wxDateTime_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxCalendarCtrl_SetDateRange. Expected _wxDateTime_p."); return NULL; } diff --git a/wxPython/src/msw/calendar.py b/wxPython/src/msw/calendar.py index f20a55db56..355ee1bfa5 100644 --- a/wxPython/src/msw/calendar.py +++ b/wxPython/src/msw/calendar.py @@ -282,3 +282,4 @@ wxEVT_CALENDAR_WEEKDAY_CLICKED = calendarc.wxEVT_CALENDAR_WEEKDAY_CLICKED # Stuff these names into the wx namespace so wxPyConstructObject can find them wx.wxCalendarEventPtr = wxCalendarEventPtr +wx.wxCalendarCtrlPtr = wxCalendarCtrlPtr diff --git a/wxPython/src/msw/clip_dnd.cpp b/wxPython/src/msw/clip_dnd.cpp index 321a322c0f..cd16f22c0a 100644 --- a/wxPython/src/msw/clip_dnd.cpp +++ b/wxPython/src/msw/clip_dnd.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -191,7 +190,7 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() { void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) { wxPyBeginBlockThreads(); if (m_myInst.findCallback("SetBitmap")) { - PyObject* bo = wxPyConstructObject((void*)&bitmap, "wxBitmap"); + PyObject* bo = wxPyConstructObject((void*)&bitmap, wxT("wxBitmap")); m_myInst.callCallback(Py_BuildValue("(O)", bo)); Py_DECREF(bo); } @@ -206,15 +205,17 @@ void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) { class wxPyDropSource : public wxDropSource { public: #ifdef __WXMSW__ - wxPyDropSource(wxWindow *win = NULL, - const wxCursor &cursorCopy = wxNullCursor, - const wxCursor &cursorMove = wxNullCursor, - const wxCursor &cursorStop = wxNullCursor) - : wxDropSource(win, cursorCopy, cursorMove, cursorStop) {} + wxPyDropSource(wxWindow *win = NULL, + const wxCursor © = wxNullCursor, + const wxCursor &move = wxNullCursor, + const wxCursor &none = wxNullCursor) + : wxDropSource(win, copy, move, none) {} #else wxPyDropSource(wxWindow *win = NULL, - const wxIcon &go = wxNullIcon) - : wxDropSource(win, go) {} + const wxIcon& copy = wxNullIcon, + const wxIcon& move = wxNullIcon, + const wxIcon& none = wxNullIcon) + : wxDropSource(win, copy, move, none) {} #endif ~wxPyDropSource() { } @@ -537,7 +538,7 @@ static PyObject *_wrap_wxDataFormat_GetId(PyObject *self, PyObject *args, PyObje 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 @@ -713,36 +714,44 @@ static PyObject *_wrap_wxDataObject_GetAllFormats(PyObject *self, PyObject *args return _resultobj; } -#define wxDataObject_GetDataSize(_swigobj,_swigarg0) (_swigobj->GetDataSize(_swigarg0)) -static PyObject *_wrap_wxDataObject_GetDataSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDataObject_GetDataHere(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetDataHere(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDataObject_GetDataHere(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - size_t _result; + bool _result; wxDataObject * _arg0; wxDataFormat * _arg1; + void * _arg2; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "self","format", NULL }; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","format","buf", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDataObject_GetDataSize",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDataObject_GetDataHere",_kwnames,&_argo0,&_argo1,&_argo2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataObject_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDataObject_GetDataSize. Expected _wxDataObject_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDataObject_GetDataHere. Expected _wxDataObject_p."); return NULL; } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_GetDataSize. Expected _wxDataFormat_p."); + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_GetDataHere. Expected _wxDataFormat_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,(char *) 0 )) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDataObject_GetDataHere. Expected _void_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (size_t )wxDataObject_GetDataSize(_arg0,*_arg1); + _result = (bool )wxDataObject_GetDataHere(_arg0,*_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -750,45 +759,35 @@ static PyObject *_wrap_wxDataObject_GetDataSize(PyObject *self, PyObject *args, return _resultobj; } -#define wxDataObject_GetDataHere(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetDataHere(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDataObject_GetDataHere(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDataObject_GetDataSize(_swigobj,_swigarg0) (_swigobj->GetDataSize(_swigarg0)) +static PyObject *_wrap_wxDataObject_GetDataSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; + size_t _result; wxDataObject * _arg0; wxDataFormat * _arg1; - void * _arg2; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - PyObject * _argo2 = 0; - char *_kwnames[] = { "self","format","buf", NULL }; + char *_kwnames[] = { "self","format", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDataObject_GetDataHere",_kwnames,&_argo0,&_argo1,&_argo2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDataObject_GetDataSize",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataObject_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDataObject_GetDataHere. Expected _wxDataObject_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDataObject_GetDataSize. Expected _wxDataObject_p."); return NULL; } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_GetDataHere. Expected _wxDataFormat_p."); - return NULL; - } - } - if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,(char *) 0 )) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDataObject_GetDataHere. Expected _void_p."); + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_GetDataSize. Expected _wxDataFormat_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDataObject_GetDataHere(_arg0,*_arg1,_arg2); + _result = (size_t )wxDataObject_GetDataSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -820,8 +819,7 @@ static PyObject *_wrap_wxDataObject_SetData(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_SetData. Expected _wxDataFormat_p."); return NULL; } @@ -864,8 +862,7 @@ static PyObject *_wrap_wxDataObject_IsSupportedFormat(PyObject *self, PyObject * } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObject_IsSupportedFormat. Expected _wxDataFormat_p."); return NULL; } @@ -901,8 +898,7 @@ static PyObject *_wrap_new_wxDataObjectSimple(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxDataObjectSimple",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDataObjectSimple. Expected _wxDataFormat_p."); return NULL; } @@ -979,8 +975,7 @@ static PyObject *_wrap_wxDataObjectSimple_SetFormat(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDataObjectSimple_SetFormat. Expected _wxDataFormat_p."); return NULL; } @@ -1025,8 +1020,7 @@ static PyObject *_wrap_new_wxPyDataObjectSimple(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxPyDataObjectSimple",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPyDataObjectSimple. Expected _wxDataFormat_p."); return NULL; } @@ -1265,7 +1259,7 @@ static PyObject *_wrap_wxTextDataObject_GetText(PyObject *self, PyObject *args, 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 @@ -1444,8 +1438,7 @@ static PyObject *_wrap_new_wxBitmapDataObject(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxBitmapDataObject",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxBitmapDataObject. Expected _wxBitmap_p."); return NULL; } @@ -1516,8 +1509,7 @@ static PyObject *_wrap_wxBitmapDataObject_SetBitmap(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapDataObject_SetBitmap. Expected _wxBitmap_p."); return NULL; } @@ -1570,8 +1562,7 @@ static PyObject *_wrap_new_wxPyBitmapDataObject(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxPyBitmapDataObject",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPyBitmapDataObject. Expected _wxBitmap_p."); return NULL; } @@ -1773,8 +1764,7 @@ static PyObject *_wrap_new_wxCustomDataObject(PyObject *self, PyObject *args, Py if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:new_wxCustomDataObject",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCustomDataObject. Expected _wxDataFormat_p."); return NULL; } @@ -1998,7 +1988,7 @@ static PyObject *_wrap_wxURLDataObject_GetURL(PyObject *self, PyObject *args, Py 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 @@ -2110,8 +2100,7 @@ static PyObject *_wrap_wxMetafileDataObject_SetMetafile(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMetafile_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMetafile_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMetafileDataObject_SetMetafile. Expected _wxMetafile_p."); return NULL; } @@ -2370,8 +2359,7 @@ static PyObject *_wrap_wxClipboard_IsSupported(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataFormat_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxClipboard_IsSupported. Expected _wxDataFormat_p."); return NULL; } @@ -2407,8 +2395,7 @@ static PyObject *_wrap_wxClipboard_GetData(PyObject *self, PyObject *args, PyObj } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxClipboard_GetData. Expected _wxDataObject_p."); return NULL; } @@ -2520,7 +2507,7 @@ static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject PyObject * _argo1 = 0; PyObject * _argo2 = 0; PyObject * _argo3 = 0; - char *_kwnames[] = { "win","cursorCopy","cursorMove","cursorStop", NULL }; + char *_kwnames[] = { "win","copy","move","none", NULL }; char _ptemp[128]; self = self; @@ -2534,22 +2521,19 @@ static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDropSource. Expected _wxCursor_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxDropSource. Expected _wxCursor_p."); return NULL; } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxDropSource. Expected _wxCursor_p."); return NULL; } @@ -2657,8 +2641,7 @@ static PyObject *_wrap_wxDropSource_SetData(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDataObject_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDropSource_SetData. Expected _wxDataObject_p."); return NULL; } @@ -2730,8 +2713,7 @@ static PyObject *_wrap_wxDropSource_SetCursor(PyObject *self, PyObject *args, Py } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDropSource_SetCursor. Expected _wxCursor_p."); return NULL; } @@ -3674,8 +3656,8 @@ static PyMethodDef clip_dndcMethods[] = { { "new_wxDataObjectSimple", (PyCFunction) _wrap_new_wxDataObjectSimple, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_IsSupportedFormat", (PyCFunction) _wrap_wxDataObject_IsSupportedFormat, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_SetData", (PyCFunction) _wrap_wxDataObject_SetData, METH_VARARGS | METH_KEYWORDS }, - { "wxDataObject_GetDataHere", (PyCFunction) _wrap_wxDataObject_GetDataHere, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_GetDataSize", (PyCFunction) _wrap_wxDataObject_GetDataSize, METH_VARARGS | METH_KEYWORDS }, + { "wxDataObject_GetDataHere", (PyCFunction) _wrap_wxDataObject_GetDataHere, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_GetAllFormats", (PyCFunction) _wrap_wxDataObject_GetAllFormats, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_GetFormatCount", (PyCFunction) _wrap_wxDataObject_GetFormatCount, METH_VARARGS | METH_KEYWORDS }, { "wxDataObject_GetPreferredFormat", (PyCFunction) _wrap_wxDataObject_GetPreferredFormat, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/clip_dnd.py b/wxPython/src/msw/clip_dnd.py index 2743257032..fd3400e661 100644 --- a/wxPython/src/msw/clip_dnd.py +++ b/wxPython/src/msw/clip_dnd.py @@ -11,9 +11,12 @@ class wxDataFormatPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,clip_dndc=clip_dndc): - if self.thisown == 1 : - clip_dndc.delete_wxDataFormat(self) + def __del__(self, delfunc=clip_dndc.delete_wxDataFormat): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetType(self, *_args, **_kwargs): val = apply(clip_dndc.wxDataFormat_SetType,(self,) + _args, _kwargs) return val @@ -43,9 +46,12 @@ class wxDataObjectPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,clip_dndc=clip_dndc): - if self.thisown == 1 : - clip_dndc.delete_wxDataObject(self) + def __del__(self, delfunc=clip_dndc.delete_wxDataObject): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetPreferredFormat(self, *_args, **_kwargs): val = apply(clip_dndc.wxDataObject_GetPreferredFormat,(self,) + _args, _kwargs) if val: val = wxDataFormatPtr(val) ; val.thisown = 1 @@ -56,12 +62,12 @@ class wxDataObjectPtr : def GetAllFormats(self, *_args, **_kwargs): val = apply(clip_dndc.wxDataObject_GetAllFormats,(self,) + _args, _kwargs) return val - def GetDataSize(self, *_args, **_kwargs): - val = apply(clip_dndc.wxDataObject_GetDataSize,(self,) + _args, _kwargs) - return val def GetDataHere(self, *_args, **_kwargs): val = apply(clip_dndc.wxDataObject_GetDataHere,(self,) + _args, _kwargs) return val + def GetDataSize(self, *_args, **_kwargs): + val = apply(clip_dndc.wxDataObject_GetDataSize,(self,) + _args, _kwargs) + return val def SetData(self, *_args, **_kwargs): val = apply(clip_dndc.wxDataObject_SetData,(self,) + _args, _kwargs) return val @@ -353,9 +359,12 @@ class wxDropSourcePtr : def _setCallbackInfo(self, *_args, **_kwargs): val = apply(clip_dndc.wxDropSource__setCallbackInfo,(self,) + _args, _kwargs) return val - def __del__(self,clip_dndc=clip_dndc): - if self.thisown == 1 : - clip_dndc.delete_wxDropSource(self) + def __del__(self, delfunc=clip_dndc.delete_wxDropSource): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetData(self, *_args, **_kwargs): val = apply(clip_dndc.wxDropSource_SetData,(self,) + _args, _kwargs) return val @@ -403,9 +412,12 @@ class wxPyDropTargetPtr(wxDropTargetPtr): def _setCallbackInfo(self, *_args, **_kwargs): val = apply(clip_dndc.wxPyDropTarget__setCallbackInfo,(self,) + _args, _kwargs) return val - def __del__(self,clip_dndc=clip_dndc): - if self.thisown == 1 : - clip_dndc.delete_wxPyDropTarget(self) + def __del__(self, delfunc=clip_dndc.delete_wxPyDropTarget): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetDataObject(self, *_args, **_kwargs): val = apply(clip_dndc.wxPyDropTarget_GetDataObject,(self,) + _args, _kwargs) if val: val = wxDataObjectPtr(val) diff --git a/wxPython/src/msw/cmndlgs.cpp b/wxPython/src/msw/cmndlgs.cpp index 27aef578b9..6b9346d5a3 100644 --- a/wxPython/src/msw/cmndlgs.cpp +++ b/wxPython/src/msw/cmndlgs.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -658,7 +657,7 @@ static PyObject *_wrap_wxDirDialog_GetPath(PyObject *self, PyObject *args, PyObj 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 @@ -695,7 +694,7 @@ static PyObject *_wrap_wxDirDialog_GetMessage(PyObject *self, PyObject *args, Py 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 @@ -999,7 +998,7 @@ static PyObject *_wrap_wxFileDialog_GetDirectory(PyObject *self, PyObject *args, 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 @@ -1036,7 +1035,7 @@ static PyObject *_wrap_wxFileDialog_GetFilename(PyObject *self, PyObject *args, 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 @@ -1101,7 +1100,7 @@ static PyObject *_wrap_wxFileDialog_GetMessage(PyObject *self, PyObject *args, P 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 @@ -1138,7 +1137,7 @@ static PyObject *_wrap_wxFileDialog_GetPath(PyObject *self, PyObject *args, PyOb 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 @@ -1203,7 +1202,7 @@ static PyObject *_wrap_wxFileDialog_GetWildcard(PyObject *self, PyObject *args, 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 @@ -1958,7 +1957,7 @@ static PyObject *_wrap_wxSingleChoiceDialog_GetStringSelection(PyObject *self, P 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 @@ -2172,7 +2171,7 @@ static PyObject *_wrap_wxTextEntryDialog_GetValue(PyObject *self, PyObject *args 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 @@ -2568,8 +2567,7 @@ static PyObject *_wrap_wxFontData_SetChosenFont(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetChosenFont. Expected _wxFont_p."); return NULL; } @@ -2641,8 +2639,7 @@ static PyObject *_wrap_wxFontData_SetInitialFont(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFontData_SetInitialFont. Expected _wxFont_p."); return NULL; } @@ -2781,8 +2778,7 @@ static PyObject *_wrap_new_wxFontDialog(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFontData_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFontData_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxFontDialog. Expected _wxFontData_p."); return NULL; } @@ -3277,7 +3273,7 @@ static PyObject *_wrap_wxFindDialogEvent_GetFindString(PyObject *self, PyObject 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 @@ -3315,7 +3311,7 @@ static PyObject *_wrap_wxFindDialogEvent_GetReplaceString(PyObject *self, PyObje 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 @@ -3555,7 +3551,7 @@ static PyObject *_wrap_wxFindReplaceData_GetFindString(PyObject *self, PyObject 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 @@ -3590,7 +3586,7 @@ static PyObject *_wrap_wxFindReplaceData_GetReplaceString(PyObject *self, PyObje 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 diff --git a/wxPython/src/msw/cmndlgs.py b/wxPython/src/msw/cmndlgs.py index f1c5c95ea7..9555d3bc82 100644 --- a/wxPython/src/msw/cmndlgs.py +++ b/wxPython/src/msw/cmndlgs.py @@ -41,9 +41,12 @@ class wxColourDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,cmndlgsc=cmndlgsc): - if self.thisown == 1 : - cmndlgsc.delete_wxColourData(self) + def __del__(self, delfunc=cmndlgsc.delete_wxColourData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetChooseFull(self, *_args, **_kwargs): val = apply(cmndlgsc.wxColourData_GetChooseFull,(self,) + _args, _kwargs) return val @@ -271,9 +274,12 @@ class wxFontDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,cmndlgsc=cmndlgsc): - if self.thisown == 1 : - cmndlgsc.delete_wxFontData(self) + def __del__(self, delfunc=cmndlgsc.delete_wxFontData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def EnableEffects(self, *_args, **_kwargs): val = apply(cmndlgsc.wxFontData_EnableEffects,(self,) + _args, _kwargs) return val @@ -427,9 +433,12 @@ class wxFindReplaceDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,cmndlgsc=cmndlgsc): - if self.thisown == 1 : - cmndlgsc.delete_wxFindReplaceData(self) + def __del__(self, delfunc=cmndlgsc.delete_wxFindReplaceData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetFindString(self, *_args, **_kwargs): val = apply(cmndlgsc.wxFindReplaceData_GetFindString,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/controls.cpp b/wxPython/src/msw/controls.cpp index f74eec347d..7adbcc7212 100644 --- a/wxPython/src/msw/controls.cpp +++ b/wxPython/src/msw/controls.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -210,8 +209,7 @@ static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *k 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_wxControl. Expected _wxValidator_p."); return NULL; } @@ -320,8 +318,7 @@ static PyObject *_wrap_wxControl_Create(PyObject *self, PyObject *args, PyObject return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxControl_Create. Expected _wxValidator_p."); return NULL; } @@ -366,8 +363,7 @@ static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args, PyObjec } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCommandEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCommandEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxControl_Command. Expected _wxCommandEvent_p."); return NULL; } @@ -409,7 +405,7 @@ static PyObject *_wrap_wxControl_GetLabel(PyObject *self, PyObject *args, PyObje 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 @@ -575,7 +571,7 @@ static PyObject *_wrap_wxControlWithItems_GetString(PyObject *self, PyObject *ar 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 @@ -748,7 +744,7 @@ static PyObject *_wrap_wxControlWithItems_GetStringSelection(PyObject *self, PyO 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 @@ -917,11 +913,10 @@ static PyObject *_wrap_wxControlWithItems_AppendItems(PyObject *self, PyObject * PyObject* item = PySequence_GetItem(_obj1, i); #if wxUSE_UNICODE PyObject* str = PyObject_Unicode(item); - _arg1->Add(PyUnicode_AsUnicode(str)); #else PyObject* str = PyObject_Str(item); - _arg1->Add(PyString_AsString(str)); #endif + _arg1->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); } @@ -1024,8 +1019,7 @@ static PyObject *_wrap_new_wxButton(PyObject *self, PyObject *args, PyObject *kw return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxButton. Expected _wxValidator_p."); return NULL; } @@ -1145,8 +1139,7 @@ static PyObject *_wrap_wxButton_Create(PyObject *self, PyObject *args, PyObject return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxButton_Create. Expected _wxValidator_p."); return NULL; } @@ -1295,8 +1288,7 @@ static PyObject *_wrap_wxButton_SetImageLabel(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxButton_SetImageLabel. Expected _wxBitmap_p."); return NULL; } @@ -1436,8 +1428,7 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxBitmapButton. Expected _wxBitmap_p."); return NULL; } @@ -1455,8 +1446,7 @@ static PyObject *_wrap_new_wxBitmapButton(PyObject *self, PyObject *args, PyObje return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxBitmapButton. Expected _wxValidator_p."); return NULL; } @@ -1555,8 +1545,7 @@ static PyObject *_wrap_wxBitmapButton_Create(PyObject *self, PyObject *args, PyO } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxBitmapButton_Create. Expected _wxBitmap_p."); return NULL; } @@ -1574,8 +1563,7 @@ static PyObject *_wrap_wxBitmapButton_Create(PyObject *self, PyObject *args, PyO return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxBitmapButton_Create. Expected _wxValidator_p."); return NULL; } @@ -1740,8 +1728,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapDisabled(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapDisabled. Expected _wxBitmap_p."); return NULL; } @@ -1777,8 +1764,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapFocus(PyObject *self, PyObject *a } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapFocus. Expected _wxBitmap_p."); return NULL; } @@ -1814,8 +1800,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapSelected(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapSelected. Expected _wxBitmap_p."); return NULL; } @@ -1851,8 +1836,7 @@ static PyObject *_wrap_wxBitmapButton_SetBitmapLabel(PyObject *self, PyObject *a } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmapButton_SetBitmapLabel. Expected _wxBitmap_p."); return NULL; } @@ -2037,8 +2021,7 @@ static PyObject *_wrap_new_wxCheckBox(PyObject *self, PyObject *args, PyObject * return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxCheckBox. Expected _wxValidator_p."); return NULL; } @@ -2158,8 +2141,7 @@ static PyObject *_wrap_wxCheckBox_Create(PyObject *self, PyObject *args, PyObjec return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxCheckBox_Create. Expected _wxValidator_p."); return NULL; } @@ -2216,6 +2198,34 @@ static PyObject *_wrap_wxCheckBox_GetValue(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxCheckBox_IsChecked(_swigobj) (_swigobj->IsChecked()) +static PyObject *_wrap_wxCheckBox_IsChecked(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxCheckBox * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCheckBox_IsChecked",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCheckBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCheckBox_IsChecked. Expected _wxCheckBox_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxCheckBox_IsChecked(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxCheckBox_SetValue(_swigobj,_swigarg0) (_swigobj->SetValue(_swigarg0)) static PyObject *_wrap_wxCheckBox_SetValue(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2341,8 +2351,7 @@ static PyObject *_wrap_new_wxChoice(PyObject *self, PyObject *args, PyObject *kw } } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxChoice. Expected _wxValidator_p."); return NULL; } @@ -2472,8 +2481,7 @@ static PyObject *_wrap_wxChoice_Create(PyObject *self, PyObject *args, PyObject } } if (_argo8) { - if (_argo8 == Py_None) { _arg8 = NULL; } - else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of wxChoice_Create. Expected _wxValidator_p."); return NULL; } @@ -2812,8 +2820,7 @@ static PyObject *_wrap_new_wxComboBox(PyObject *self, PyObject *args, PyObject * } } if (_argo8) { - if (_argo8 == Py_None) { _arg8 = NULL; } - else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxComboBox. Expected _wxValidator_p."); return NULL; } @@ -2955,8 +2962,7 @@ static PyObject *_wrap_wxComboBox_Create(PyObject *self, PyObject *args, PyObjec } } if (_argo9) { - if (_argo9 == Py_None) { _arg9 = NULL; } - else if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 10 of wxComboBox_Create. Expected _wxValidator_p."); return NULL; } @@ -3134,7 +3140,7 @@ static PyObject *_wrap_wxComboBox_GetValue(PyObject *self, PyObject *args, PyObj 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 @@ -3507,8 +3513,7 @@ static PyObject *_wrap_new_wxGauge(PyObject *self, PyObject *args, PyObject *kwa return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxGauge. Expected _wxValidator_p."); return NULL; } @@ -3618,8 +3623,7 @@ static PyObject *_wrap_wxGauge_Create(PyObject *self, PyObject *args, PyObject * return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxGauge_Create. Expected _wxValidator_p."); return NULL; } @@ -4524,7 +4528,7 @@ static PyObject *_wrap_wxStaticText_GetLabel(PyObject *self, PyObject *args, PyO 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 @@ -4668,8 +4672,7 @@ static PyObject *_wrap_new_wxListBox(PyObject *self, PyObject *args, PyObject *k } } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxListBox. Expected _wxValidator_p."); return NULL; } @@ -4799,8 +4802,7 @@ static PyObject *_wrap_wxListBox_Create(PyObject *self, PyObject *args, PyObject } } if (_argo8) { - if (_argo8 == Py_None) { _arg8 = NULL; } - else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of wxListBox_Create. Expected _wxValidator_p."); return NULL; } @@ -5371,8 +5373,7 @@ static PyObject *_wrap_new_wxCheckListBox(PyObject *self, PyObject *args, PyObje } } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of new_wxCheckListBox. Expected _wxValidator_p."); return NULL; } @@ -5502,8 +5503,7 @@ static PyObject *_wrap_wxCheckListBox_Create(PyObject *self, PyObject *args, PyO } } if (_argo8) { - if (_argo8 == Py_None) { _arg8 = NULL; } - else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of wxCheckListBox_Create. Expected _wxValidator_p."); return NULL; } @@ -5772,8 +5772,7 @@ static PyObject *_wrap_new_wxTextAttr(PyObject *self, PyObject *args, PyObject * return NULL; } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxTextAttr. Expected _wxFont_p."); return NULL; } @@ -5914,8 +5913,7 @@ static PyObject *_wrap_wxTextAttr_SetFont(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextAttr_SetFont. Expected _wxFont_p."); return NULL; } @@ -6149,15 +6147,13 @@ static PyObject *_wrap_wxTextAttr_Combine(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxTextAttr_Combine",_kwnames,&_argo0,&_argo1,&_argo2)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTextAttr_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTextAttr_Combine. Expected _wxTextAttr_p."); return NULL; } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextAttr_Combine. Expected _wxTextAttr_p."); return NULL; } @@ -6264,8 +6260,7 @@ static PyObject *_wrap_new_wxTextCtrl(PyObject *self, PyObject *args, PyObject * return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxTextCtrl. Expected _wxValidator_p."); return NULL; } @@ -6386,8 +6381,7 @@ static PyObject *_wrap_wxTextCtrl_Create(PyObject *self, PyObject *args, PyObjec return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxTextCtrl_Create. Expected _wxValidator_p."); return NULL; } @@ -6442,7 +6436,7 @@ static PyObject *_wrap_wxTextCtrl_GetValue(PyObject *self, PyObject *args, PyObj 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 @@ -6520,7 +6514,7 @@ static PyObject *_wrap_wxTextCtrl_GetRange(PyObject *self, PyObject *args, PyObj 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 @@ -6587,7 +6581,7 @@ static PyObject *_wrap_wxTextCtrl_GetLineText(PyObject *self, PyObject *args, Py 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 @@ -6756,7 +6750,7 @@ static PyObject *_wrap_wxTextCtrl_GetStringSelection(PyObject *self, PyObject *a 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 @@ -7101,8 +7095,7 @@ static PyObject *_wrap_wxTextCtrl_EmulateKeyPress(PyObject *self, PyObject *args } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextCtrl_EmulateKeyPress. Expected _wxKeyEvent_p."); return NULL; } @@ -7140,8 +7133,7 @@ static PyObject *_wrap_wxTextCtrl_SetStyle(PyObject *self, PyObject *args, PyObj } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxTextAttr_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxTextAttr_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxTextCtrl_SetStyle. Expected _wxTextAttr_p."); return NULL; } @@ -7177,8 +7169,7 @@ static PyObject *_wrap_wxTextCtrl_SetDefaultStyle(PyObject *self, PyObject *args } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTextAttr_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTextCtrl_SetDefaultStyle. Expected _wxTextAttr_p."); return NULL; } @@ -7946,7 +7937,7 @@ static PyObject *_wrap_wxTextCtrl_GetString(PyObject *self, PyObject *args, PyOb 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 @@ -8033,8 +8024,7 @@ static PyObject *_wrap_new_wxScrollBar(PyObject *self, PyObject *args, PyObject 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_wxScrollBar. Expected _wxValidator_p."); return NULL; } @@ -8143,8 +8133,7 @@ static PyObject *_wrap_wxScrollBar_Create(PyObject *self, PyObject *args, PyObje return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxScrollBar_Create. Expected _wxValidator_p."); return NULL; } @@ -8774,8 +8763,7 @@ static PyObject *_wrap_new_wxStaticBitmap(PyObject *self, PyObject *args, PyObje } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxStaticBitmap. Expected _wxBitmap_p."); return NULL; } @@ -8884,8 +8872,7 @@ static PyObject *_wrap_wxStaticBitmap_Create(PyObject *self, PyObject *args, PyO } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxStaticBitmap_Create. Expected _wxBitmap_p."); return NULL; } @@ -8972,8 +8959,7 @@ static PyObject *_wrap_wxStaticBitmap_SetBitmap(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxStaticBitmap_SetBitmap. Expected _wxBitmap_p."); return NULL; } @@ -9009,8 +8995,7 @@ static PyObject *_wrap_wxStaticBitmap_SetIcon(PyObject *self, PyObject *args, Py } } 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 wxStaticBitmap_SetIcon. Expected _wxIcon_p."); return NULL; } @@ -9120,8 +9105,7 @@ static PyObject *_wrap_new_wxRadioBox(PyObject *self, PyObject *args, PyObject * } } if (_argo9) { - if (_argo9 == Py_None) { _arg9 = NULL; } - else if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 10 of new_wxRadioBox. Expected _wxValidator_p."); return NULL; } @@ -9263,8 +9247,7 @@ static PyObject *_wrap_wxRadioBox_Create(PyObject *self, PyObject *args, PyObjec } } if (_argo10) { - if (_argo10 == Py_None) { _arg10 = NULL; } - else if (SWIG_GetPtrObj(_argo10,(void **) &_arg10,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo10,(void **) &_arg10,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 11 of wxRadioBox_Create. Expected _wxValidator_p."); return NULL; } @@ -9433,7 +9416,7 @@ static PyObject *_wrap_wxRadioBox_GetString(PyObject *self, PyObject *args, PyOb 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 @@ -9540,6 +9523,45 @@ static PyObject *_wrap_wxRadioBox_GetRowCount(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxRadioBox_GetNextItem(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetNextItem(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxRadioBox_GetNextItem(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxRadioBox * _arg0; + int _arg1; + wxDirection * _arg2; + long _arg3; + PyObject * _argo0 = 0; + PyObject * _argo2 = 0; + char *_kwnames[] = { "self","item","dir","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOl:wxRadioBox_GetNextItem",_kwnames,&_argo0,&_arg1,&_argo2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRadioBox_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetNextItem. Expected _wxRadioBox_p."); + return NULL; + } + } + if (_argo2) { + if (_argo2 == Py_None) { _arg2 = NULL; } + else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDirection_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxRadioBox_GetNextItem. Expected _wxDirection_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRadioBox_GetNextItem(_arg0,_arg1,*_arg2,_arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxRadioBox_GetSelection(_swigobj) (_swigobj->GetSelection()) static PyObject *_wrap_wxRadioBox_GetSelection(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9594,7 +9616,7 @@ static PyObject *_wrap_wxRadioBox_GetStringSelection(PyObject *self, PyObject *a 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 @@ -9847,8 +9869,7 @@ static PyObject *_wrap_new_wxRadioButton(PyObject *self, PyObject *args, PyObjec return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxRadioButton. Expected _wxValidator_p."); return NULL; } @@ -9968,8 +9989,7 @@ static PyObject *_wrap_wxRadioButton_Create(PyObject *self, PyObject *args, PyOb return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxRadioButton_Create. Expected _wxValidator_p."); return NULL; } @@ -10136,8 +10156,7 @@ static PyObject *_wrap_new_wxSlider(PyObject *self, PyObject *args, PyObject *kw return NULL; } if (_argo8) { - if (_argo8 == Py_None) { _arg8 = NULL; } - else if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo8,(void **) &_arg8,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 9 of new_wxSlider. Expected _wxValidator_p."); return NULL; } @@ -10249,8 +10268,7 @@ static PyObject *_wrap_wxSlider_Create(PyObject *self, PyObject *args, PyObject return NULL; } if (_argo9) { - if (_argo9 == Py_None) { _arg9 = NULL; } - else if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo9,(void **) &_arg9,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 10 of wxSlider_Create. Expected _wxValidator_p."); return NULL; } @@ -11276,8 +11294,7 @@ static PyObject *_wrap_new_wxToggleButton(PyObject *self, PyObject *args, PyObje return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of new_wxToggleButton. Expected _wxValidator_p."); return NULL; } @@ -11397,8 +11414,7 @@ static PyObject *_wrap_wxToggleButton_Create(PyObject *self, PyObject *args, PyO return NULL; } if (_argo7) { - if (_argo7 == Py_None) { _arg7 = NULL; } - else if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo7,(void **) &_arg7,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 8 of wxToggleButton_Create. Expected _wxValidator_p."); return NULL; } @@ -11574,6 +11590,7 @@ static PyMethodDef controlscMethods[] = { { "wxRadioBox_GetCount", (PyCFunction) _wrap_wxRadioBox_GetCount, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_GetStringSelection", (PyCFunction) _wrap_wxRadioBox_GetStringSelection, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_GetSelection", (PyCFunction) _wrap_wxRadioBox_GetSelection, METH_VARARGS | METH_KEYWORDS }, + { "wxRadioBox_GetNextItem", (PyCFunction) _wrap_wxRadioBox_GetNextItem, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_GetRowCount", (PyCFunction) _wrap_wxRadioBox_GetRowCount, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_GetColumnCount", (PyCFunction) _wrap_wxRadioBox_GetColumnCount, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_SetString", (PyCFunction) _wrap_wxRadioBox_SetString, METH_VARARGS | METH_KEYWORDS }, @@ -11745,6 +11762,7 @@ static PyMethodDef controlscMethods[] = { { "new_wxPreChoice", (PyCFunction) _wrap_new_wxPreChoice, METH_VARARGS | METH_KEYWORDS }, { "new_wxChoice", (PyCFunction) _wrap_new_wxChoice, METH_VARARGS | METH_KEYWORDS }, { "wxCheckBox_SetValue", (PyCFunction) _wrap_wxCheckBox_SetValue, METH_VARARGS | METH_KEYWORDS }, + { "wxCheckBox_IsChecked", (PyCFunction) _wrap_wxCheckBox_IsChecked, METH_VARARGS | METH_KEYWORDS }, { "wxCheckBox_GetValue", (PyCFunction) _wrap_wxCheckBox_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxCheckBox_Create", (PyCFunction) _wrap_wxCheckBox_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreCheckBox", (PyCFunction) _wrap_new_wxPreCheckBox, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/controls.py b/wxPython/src/msw/controls.py index 4e06f17121..cbd8a3c0e6 100644 --- a/wxPython/src/msw/controls.py +++ b/wxPython/src/msw/controls.py @@ -206,6 +206,9 @@ class wxCheckBoxPtr(wxControlPtr): def GetValue(self, *_args, **_kwargs): val = apply(controlsc.wxCheckBox_GetValue,(self,) + _args, _kwargs) return val + def IsChecked(self, *_args, **_kwargs): + val = apply(controlsc.wxCheckBox_IsChecked,(self,) + _args, _kwargs) + return val def SetValue(self, *_args, **_kwargs): val = apply(controlsc.wxCheckBox_SetValue,(self,) + _args, _kwargs) return val @@ -569,9 +572,12 @@ class wxTextAttrPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,controlsc=controlsc): - if self.thisown == 1 : - controlsc.delete_wxTextAttr(self) + def __del__(self, delfunc=controlsc.delete_wxTextAttr): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetTextColour(self, *_args, **_kwargs): val = apply(controlsc.wxTextAttr_SetTextColour,(self,) + _args, _kwargs) return val @@ -930,6 +936,9 @@ class wxRadioBoxPtr(wxControlPtr): def GetRowCount(self, *_args, **_kwargs): val = apply(controlsc.wxRadioBox_GetRowCount,(self,) + _args, _kwargs) return val + def GetNextItem(self, *_args, **_kwargs): + val = apply(controlsc.wxRadioBox_GetNextItem,(self,) + _args, _kwargs) + return val def GetSelection(self, *_args, **_kwargs): val = apply(controlsc.wxRadioBox_GetSelection,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/controls2.cpp b/wxPython/src/msw/controls2.cpp index 0158dca0b6..80d55244c6 100644 --- a/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -214,8 +213,8 @@ public: bool found; wxPyBeginBlockThreads(); if ((found = m_myInst.findCallback("OnCompareItems"))) { - PyObject *o1 = wxPyConstructObject((void*)&item1, "wxTreeItemId"); - PyObject *o2 = wxPyConstructObject((void*)&item2, "wxTreeItemId"); + PyObject *o1 = wxPyConstructObject((void*)&item1, wxT("wxTreeItemId")); + PyObject *o2 = wxPyConstructObject((void*)&item2, wxT("wxTreeItemId")); rval = m_myInst.callCallback(Py_BuildValue("(OO)",o1,o2)); Py_DECREF(o1); Py_DECREF(o2); @@ -264,8 +263,7 @@ static PyObject *_wrap_new_wxListItemAttr(PyObject *self, PyObject *args, PyObje return NULL; } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxListItemAttr. Expected _wxFont_p."); return NULL; } @@ -378,8 +376,7 @@ static PyObject *_wrap_wxListItemAttr_SetFont(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListItemAttr_SetFont. Expected _wxFont_p."); return NULL; } @@ -1079,8 +1076,7 @@ static PyObject *_wrap_wxListItem_SetFont(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListItem_SetFont. Expected _wxFont_p."); return NULL; } @@ -1235,7 +1231,7 @@ static PyObject *_wrap_wxListItem_GetText(PyObject *self, PyObject *args, PyObje 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 @@ -1826,7 +1822,7 @@ static PyObject *_wrap_wxListItem_m_text_set(PyObject *self, PyObject *args, PyO 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 @@ -1864,7 +1860,7 @@ static PyObject *_wrap_wxListItem_m_text_get(PyObject *self, PyObject *args, PyO 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 @@ -2476,7 +2472,7 @@ static PyObject *_wrap_wxListEvent_GetLabel(PyObject *self, PyObject *args, PyOb 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 @@ -2511,7 +2507,7 @@ static PyObject *_wrap_wxListEvent_GetText(PyObject *self, PyObject *args, PyObj 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 @@ -2764,8 +2760,7 @@ static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject * 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_wxListCtrl. Expected _wxValidator_p."); return NULL; } @@ -2874,8 +2869,7 @@ static PyObject *_wrap_wxListCtrl_Create(PyObject *self, PyObject *args, PyObjec return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxListCtrl_Create. Expected _wxValidator_p."); return NULL; } @@ -3068,8 +3062,7 @@ static PyObject *_wrap_wxListCtrl_SetColumn(PyObject *self, PyObject *args, PyOb } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxListItem_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxListItem_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_SetColumn. Expected _wxListItem_p."); return NULL; } @@ -3257,8 +3250,7 @@ static PyObject *_wrap_wxListCtrl_SetItem(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxListItem_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxListItem_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_SetItem. Expected _wxListItem_p."); return NULL; } @@ -3434,7 +3426,7 @@ static PyObject *_wrap_wxListCtrl_GetItemText(PyObject *self, PyObject *args, Py 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 @@ -4593,8 +4585,7 @@ static PyObject *_wrap_wxListCtrl_InsertItem(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxListItem_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxListItem_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxListCtrl_InsertItem. Expected _wxListItem_p."); return NULL; } @@ -4742,8 +4733,7 @@ static PyObject *_wrap_wxListCtrl_InsertColumnInfo(PyObject *self, PyObject *arg } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxListItem_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxListItem_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxListCtrl_InsertColumnInfo. Expected _wxListItem_p."); return NULL; } @@ -5150,8 +5140,7 @@ static PyObject *_wrap_new_wxListView(PyObject *self, PyObject *args, PyObject * 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_wxListView. Expected _wxValidator_p."); return NULL; } @@ -5260,8 +5249,7 @@ static PyObject *_wrap_wxListView_Create(PyObject *self, PyObject *args, PyObjec return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxListView_Create. Expected _wxValidator_p."); return NULL; } @@ -5551,8 +5539,7 @@ static PyObject *_wrap_new_wxTreeItemAttr(PyObject *self, PyObject *args, PyObje return NULL; } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxTreeItemAttr. Expected _wxFont_p."); return NULL; } @@ -5665,8 +5652,7 @@ static PyObject *_wrap_wxTreeItemAttr_SetFont(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeItemAttr_SetFont. Expected _wxFont_p."); return NULL; } @@ -6137,8 +6123,7 @@ static PyObject *_wrap_wxTreeItemData_SetId(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeItemData_SetId. Expected _wxTreeItemId_p."); return NULL; } @@ -6395,7 +6380,7 @@ static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args, PyOb 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 @@ -6507,8 +6492,7 @@ static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject * 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_wxTreeCtrl. Expected _wxValidator_p."); return NULL; } @@ -6617,8 +6601,7 @@ static PyObject *_wrap_wxTreeCtrl_Create(PyObject *self, PyObject *args, PyObjec return NULL; } if (_argo6) { - if (_argo6 == Py_None) { _arg6 = NULL; } - else if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo6,(void **) &_arg6,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 7 of wxTreeCtrl_Create. Expected _wxValidator_p."); return NULL; } @@ -7048,8 +7031,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetItemText. Expected _wxTreeItemId_p."); return NULL; } @@ -7062,7 +7044,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, Py 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 @@ -7095,8 +7077,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemImage(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetItemImage. Expected _wxTreeItemId_p."); return NULL; } @@ -7132,8 +7113,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemSelectedImage(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetItemSelectedImage. Expected _wxTreeItemId_p."); return NULL; } @@ -7170,8 +7150,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemText. Expected _wxTreeItemId_p."); return NULL; } @@ -7218,8 +7197,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemImage. Expected _wxTreeItemId_p."); return NULL; } @@ -7256,8 +7234,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemSelectedImage(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemSelectedImage. Expected _wxTreeItemId_p."); return NULL; } @@ -7295,8 +7272,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemHasChildren(PyObject *self, PyObject *a } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemHasChildren. Expected _wxTreeItemId_p."); return NULL; } @@ -7343,8 +7319,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetItemData. Expected _wxTreeItemId_p."); return NULL; } @@ -7390,8 +7365,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemData. Expected _wxTreeItemId_p."); return NULL; } @@ -7443,8 +7417,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetPyData. Expected _wxTreeItemId_p."); return NULL; } @@ -7491,8 +7464,7 @@ static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetPyData. Expected _wxTreeItemId_p."); return NULL; } @@ -7511,6 +7483,120 @@ static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxTreeCtrl_GetItemTextColour(_swigobj,_swigarg0) (_swigobj->GetItemTextColour(_swigarg0)) +static PyObject *_wrap_wxTreeCtrl_GetItemTextColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxPyTreeCtrl * _arg0; + wxTreeItemId * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","item", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeCtrl_GetItemTextColour",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemTextColour. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetItemTextColour. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxTreeCtrl_GetItemTextColour(_arg0,*_arg1)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxTreeCtrl_GetItemBackgroundColour(_swigobj,_swigarg0) (_swigobj->GetItemBackgroundColour(_swigarg0)) +static PyObject *_wrap_wxTreeCtrl_GetItemBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxPyTreeCtrl * _arg0; + wxTreeItemId * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","item", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeCtrl_GetItemBackgroundColour",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemBackgroundColour. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetItemBackgroundColour. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxTreeCtrl_GetItemBackgroundColour(_arg0,*_arg1)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxTreeCtrl_GetItemFont(_swigobj,_swigarg0) (_swigobj->GetItemFont(_swigarg0)) +static PyObject *_wrap_wxTreeCtrl_GetItemFont(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxPyTreeCtrl * _arg0; + wxTreeItemId * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","item", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeCtrl_GetItemFont",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetItemFont. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetItemFont. Expected _wxTreeItemId_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxFont (wxTreeCtrl_GetItemFont(_arg0,*_arg1)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxTreeCtrl_IsVisible(_swigobj,_swigarg0) (_swigobj->IsVisible(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7532,8 +7618,7 @@ static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_IsVisible. Expected _wxTreeItemId_p."); return NULL; } @@ -7569,8 +7654,7 @@ static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_ItemHasChildren. Expected _wxTreeItemId_p."); return NULL; } @@ -7606,8 +7690,7 @@ static PyObject *_wrap_wxTreeCtrl_IsExpanded(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_IsExpanded. Expected _wxTreeItemId_p."); return NULL; } @@ -7643,8 +7726,7 @@ static PyObject *_wrap_wxTreeCtrl_IsSelected(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_IsSelected. Expected _wxTreeItemId_p."); return NULL; } @@ -7719,7 +7801,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args, P return _resultobj; } -#define wxTreeCtrl_GetItemParent(_swigobj,_swigarg0) (_swigobj->GetParent(_swigarg0)) +#define wxTreeCtrl_GetItemParent(_swigobj,_swigarg0) (_swigobj->GetItemParent(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_GetItemParent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTreeItemId * _result; @@ -7741,8 +7823,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemParent(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetItemParent. Expected _wxTreeItemId_p."); return NULL; } @@ -7766,7 +7847,7 @@ static PyObject * wxPyTreeCtrl_GetSelections(wxPyTreeCtrl *self) { num = self->GetSelections(array); for (x=0; x < num; x++) { wxTreeItemId *tii = new wxTreeItemId(array.Item(x)); - PyObject* item = wxPyConstructObject((void*)tii, "wxTreeItemId", TRUE); + PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), TRUE); PyList_Append(rval, item); } wxPyEndBlockThreads(); @@ -7824,8 +7905,7 @@ static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *arg } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetChildrenCount. Expected _wxTreeItemId_p."); return NULL; } @@ -7866,8 +7946,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetFirstChild. Expected _wxTreeItemId_p."); return NULL; } @@ -7918,8 +7997,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextChild(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetNextChild. Expected _wxTreeItemId_p."); return NULL; } @@ -7966,8 +8044,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextSibling(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetNextSibling. Expected _wxTreeItemId_p."); return NULL; } @@ -8005,8 +8082,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevSibling(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetPrevSibling. Expected _wxTreeItemId_p."); return NULL; } @@ -8074,8 +8150,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextVisible(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetNextVisible. Expected _wxTreeItemId_p."); return NULL; } @@ -8113,8 +8188,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevVisible(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetPrevVisible. Expected _wxTreeItemId_p."); return NULL; } @@ -8152,8 +8226,7 @@ static PyObject *_wrap_wxTreeCtrl_GetLastChild(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetLastChild. Expected _wxTreeItemId_p."); return NULL; } @@ -8249,8 +8322,7 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_PrependItem. Expected _wxTreeItemId_p."); return NULL; } @@ -8312,15 +8384,13 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_InsertItem. Expected _wxTreeItemId_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_InsertItem. Expected _wxTreeItemId_p."); return NULL; } @@ -8381,8 +8451,7 @@ static PyObject *_wrap_wxTreeCtrl_InsertItemBefore(PyObject *self, PyObject *arg } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_InsertItemBefore. Expected _wxTreeItemId_p."); return NULL; } @@ -8442,8 +8511,7 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_AppendItem. Expected _wxTreeItemId_p."); return NULL; } @@ -8495,8 +8563,7 @@ static PyObject *_wrap_wxTreeCtrl_Delete(PyObject *self, PyObject *args, PyObjec } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_Delete. Expected _wxTreeItemId_p."); return NULL; } @@ -8532,8 +8599,7 @@ static PyObject *_wrap_wxTreeCtrl_DeleteChildren(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_DeleteChildren. Expected _wxTreeItemId_p."); return NULL; } @@ -8597,8 +8663,7 @@ static PyObject *_wrap_wxTreeCtrl_Expand(PyObject *self, PyObject *args, PyObjec } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_Expand. Expected _wxTreeItemId_p."); return NULL; } @@ -8634,8 +8699,7 @@ static PyObject *_wrap_wxTreeCtrl_Collapse(PyObject *self, PyObject *args, PyObj } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_Collapse. Expected _wxTreeItemId_p."); return NULL; } @@ -8671,8 +8735,7 @@ static PyObject *_wrap_wxTreeCtrl_CollapseAndReset(PyObject *self, PyObject *arg } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_CollapseAndReset. Expected _wxTreeItemId_p."); return NULL; } @@ -8708,8 +8771,7 @@ static PyObject *_wrap_wxTreeCtrl_Toggle(PyObject *self, PyObject *args, PyObjec } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_Toggle. Expected _wxTreeItemId_p."); return NULL; } @@ -8801,8 +8863,7 @@ static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SelectItem. Expected _wxTreeItemId_p."); return NULL; } @@ -8838,8 +8899,7 @@ static PyObject *_wrap_wxTreeCtrl_EnsureVisible(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_EnsureVisible. Expected _wxTreeItemId_p."); return NULL; } @@ -8875,8 +8935,7 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObj } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_ScrollTo. Expected _wxTreeItemId_p."); return NULL; } @@ -8892,36 +8951,27 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObj return _resultobj; } -#define wxTreeCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) -static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl()) +static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTextCtrl * _result; wxPyTreeCtrl * _arg0; - wxTreeItemId * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","item", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeCtrl_EditLabel",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetEditControl",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EditLabel. Expected _wxPyTreeCtrl_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_EditLabel. Expected _wxTreeItemId_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetEditControl. Expected _wxPyTreeCtrl_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)wxTreeCtrl_EditLabel(_arg0,*_arg1); + _result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8929,31 +8979,39 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxTreeCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl()) -static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTreeCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) +static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxTextCtrl * _result; wxPyTreeCtrl * _arg0; + wxTreeItemId * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","item", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetEditControl",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTreeCtrl_EditLabel",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyTreeCtrl_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetEditControl. Expected _wxPyTreeCtrl_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_EditLabel. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } + if (_argo1) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_EditLabel. Expected _wxTreeItemId_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0); + wxTreeCtrl_EditLabel(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } @@ -8978,8 +9036,7 @@ static PyObject *_wrap_wxTreeCtrl_EndEditLabel(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_EndEditLabel. Expected _wxTreeItemId_p."); return NULL; } @@ -9015,8 +9072,7 @@ static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SortChildren. Expected _wxTreeItemId_p."); return NULL; } @@ -9053,8 +9109,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemBold. Expected _wxTreeItemId_p."); return NULL; } @@ -9091,8 +9146,7 @@ static PyObject *_wrap_wxTreeCtrl_IsBold(PyObject *self, PyObject *args, PyObjec } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_IsBold. Expected _wxTreeItemId_p."); return NULL; } @@ -9178,8 +9232,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemTextColour. Expected _wxTreeItemId_p."); return NULL; } @@ -9223,8 +9276,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemBackgroundColour. Expected _wxTreeItemId_p."); return NULL; } @@ -9267,15 +9319,13 @@ static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemFont. Expected _wxTreeItemId_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxTreeCtrl_SetItemFont. Expected _wxFont_p."); return NULL; } @@ -9312,8 +9362,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemDropHighlight(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_SetItemDropHighlight. Expected _wxTreeItemId_p."); return NULL; } @@ -9334,7 +9383,7 @@ static PyObject * wxPyTreeCtrl_GetBoundingRect(wxPyTreeCtrl *self,const wxTreeIt if (self->GetBoundingRect(item, rect, textOnly)) { wxPyBeginBlockThreads(); wxRect* r = new wxRect(rect); - PyObject* val = wxPyConstructObject((void*)r, "wxRect"); + PyObject* val = wxPyConstructObject((void*)r, wxT("wxRect")); wxPyEndBlockThreads(); return val; } @@ -9364,8 +9413,7 @@ static PyObject *_wrap_wxTreeCtrl_GetBoundingRect(PyObject *self, PyObject *args } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetBoundingRect. Expected _wxTreeItemId_p."); return NULL; } @@ -9513,7 +9561,7 @@ static PyObject *_wrap_wxDirItemData_m_path_set(PyObject *self, PyObject *args, 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 @@ -9551,7 +9599,7 @@ static PyObject *_wrap_wxDirItemData_m_path_get(PyObject *self, PyObject *args, 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 @@ -9592,7 +9640,7 @@ static PyObject *_wrap_wxDirItemData_m_name_set(PyObject *self, PyObject *args, 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 @@ -9630,7 +9678,7 @@ static PyObject *_wrap_wxDirItemData_m_name_get(PyObject *self, PyObject *args, 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 @@ -10124,7 +10172,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetDefaultPath(PyObject *self, PyObject 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 @@ -10200,7 +10248,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetPath(PyObject *self, PyObject *args, 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 @@ -10237,7 +10285,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetFilePath(PyObject *self, PyObject *ar 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 @@ -10372,7 +10420,7 @@ static PyObject *_wrap_wxGenericDirCtrl_GetFilter(PyObject *self, PyObject *args 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 @@ -10843,8 +10891,8 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_SetItemBold", (PyCFunction) _wrap_wxTreeCtrl_SetItemBold, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SortChildren", (PyCFunction) _wrap_wxTreeCtrl_SortChildren, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_EndEditLabel", (PyCFunction) _wrap_wxTreeCtrl_EndEditLabel, METH_VARARGS | METH_KEYWORDS }, - { "wxTreeCtrl_GetEditControl", (PyCFunction) _wrap_wxTreeCtrl_GetEditControl, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_EditLabel", (PyCFunction) _wrap_wxTreeCtrl_EditLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl_GetEditControl", (PyCFunction) _wrap_wxTreeCtrl_GetEditControl, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_ScrollTo", (PyCFunction) _wrap_wxTreeCtrl_ScrollTo, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_EnsureVisible", (PyCFunction) _wrap_wxTreeCtrl_EnsureVisible, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SelectItem", (PyCFunction) _wrap_wxTreeCtrl_SelectItem, METH_VARARGS | METH_KEYWORDS }, @@ -10879,6 +10927,9 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_IsExpanded", (PyCFunction) _wrap_wxTreeCtrl_IsExpanded, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_ItemHasChildren", (PyCFunction) _wrap_wxTreeCtrl_ItemHasChildren, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_IsVisible", (PyCFunction) _wrap_wxTreeCtrl_IsVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl_GetItemFont", (PyCFunction) _wrap_wxTreeCtrl_GetItemFont, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl_GetItemBackgroundColour", (PyCFunction) _wrap_wxTreeCtrl_GetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeCtrl_GetItemTextColour", (PyCFunction) _wrap_wxTreeCtrl_GetItemTextColour, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetPyData", (PyCFunction) _wrap_wxTreeCtrl_SetPyData, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_GetPyData", (PyCFunction) _wrap_wxTreeCtrl_GetPyData, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SetItemData", (PyCFunction) _wrap_wxTreeCtrl_SetItemData, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/controls2.py b/wxPython/src/msw/controls2.py index b3eeec1c2f..ff7d2087ff 100644 --- a/wxPython/src/msw/controls2.py +++ b/wxPython/src/msw/controls2.py @@ -186,9 +186,12 @@ class wxListItemPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,controls2c=controls2c): - if self.thisown == 1 : - controls2c.delete_wxListItem(self) + def __del__(self, delfunc=controls2c.delete_wxListItem): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Clear(self, *_args, **_kwargs): val = apply(controls2c.wxListItem_Clear,(self,) + _args, _kwargs) return val @@ -670,6 +673,14 @@ class wxListCtrlPtr(wxControlPtr): '''get the currently focused item or -1 if none''' return self.GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED) + def GetFirstSelected(self, *args): + '''return first selected item, or -1 when none''' + return self.GetNextSelected(-1) + + def GetNextSelected(self, item): + '''return subsequent selected items, or -1 when no more''' + return self.GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED) + def IsSelected(self, idx): '''return TRUE if the item is selected''' return self.GetItemState(idx, wxLIST_STATE_SELECTED) != 0 @@ -687,10 +698,14 @@ class wxListCtrlPtr(wxControlPtr): '''Append an item to the list control. The entry parameter should be a sequence with an item for each column''' if len(entry): + if wx.wxUSE_UNICODE: + cvtfunc = unicode + else: + cvtfunc = str pos = self.GetItemCount() - self.InsertStringItem(pos, str(entry[0])) + self.InsertStringItem(pos, cvtfunc(entry[0])) for i in range(1, len(entry)): - self.SetStringItem(pos, i, str(entry[i])) + self.SetStringItem(pos, i, cvtfunc(entry[i])) return pos class wxListCtrl(wxListCtrlPtr): @@ -805,9 +820,12 @@ class wxTreeItemIdPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,controls2c=controls2c): - if self.thisown == 1 : - controls2c.delete_wxTreeItemId(self) + def __del__(self, delfunc=controls2c.delete_wxTreeItemId): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def IsOk(self, *_args, **_kwargs): val = apply(controls2c.wxTreeItemId_IsOk,(self,) + _args, _kwargs) return val @@ -971,6 +989,18 @@ class wxTreeCtrlPtr(wxControlPtr): def SetPyData(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_SetPyData,(self,) + _args, _kwargs) return val + def GetItemTextColour(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_GetItemTextColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetItemBackgroundColour(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_GetItemBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val + def GetItemFont(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_GetItemFont,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) ; val.thisown = 1 + return val def IsVisible(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_IsVisible,(self,) + _args, _kwargs) return val @@ -1087,12 +1117,12 @@ class wxTreeCtrlPtr(wxControlPtr): def ScrollTo(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_ScrollTo,(self,) + _args, _kwargs) return val - def EditLabel(self, *_args, **_kwargs): - val = apply(controls2c.wxTreeCtrl_EditLabel,(self,) + _args, _kwargs) - return val def GetEditControl(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_GetEditControl,(self,) + _args, _kwargs) return val + def EditLabel(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeCtrl_EditLabel,(self,) + _args, _kwargs) + return val def EndEditLabel(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_EndEditLabel,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/events.cpp b/wxPython/src/msw/events.cpp index 2f6d0191c8..d04e053f9b 100644 --- a/wxPython/src/msw/events.cpp +++ b/wxPython/src/msw/events.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -955,7 +954,7 @@ static PyObject *_wrap_wxCommandEvent_GetString(PyObject *self, PyObject *args, 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 @@ -2277,8 +2276,7 @@ static PyObject *_wrap_wxMouseEvent_GetLogicalPosition(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMouseEvent_GetLogicalPosition. Expected _wxDC_p."); return NULL; } @@ -3332,8 +3330,7 @@ static PyObject *_wrap_wxSetCursorEvent_SetCursor(PyObject *self, PyObject *args } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSetCursorEvent_SetCursor. Expected _wxCursor_p."); return NULL; } @@ -3568,34 +3565,6 @@ static PyObject *_wrap_wxKeyEvent_ShiftDown(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxKeyEvent_KeyCode(_swigobj) (_swigobj->KeyCode()) -static PyObject *_wrap_wxKeyEvent_KeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - wxKeyEvent * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxKeyEvent_KeyCode",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxKeyEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxKeyEvent_KeyCode. Expected _wxKeyEvent_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxKeyEvent_KeyCode(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - #define wxKeyEvent_GetKeyCode(_swigobj) (_swigobj->GetKeyCode()) static PyObject *_wrap_wxKeyEvent_GetKeyCode(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6015,7 +5984,7 @@ static PyObject * wxDropFilesEvent_GetFiles(wxDropFilesEvent *self) { for (int i=0; ic_str(), _result->Len()); + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); #else _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); #endif @@ -7322,8 +7291,7 @@ static PyObject *_wrap_new_wxTextUrlEvent(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iOll:new_wxTextUrlEvent",_kwnames,&_arg0,&_argo1,&_arg2,&_arg3)) return NULL; if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMouseEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMouseEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxTextUrlEvent. Expected _wxMouseEvent_p."); return NULL; } @@ -7828,7 +7796,6 @@ static PyMethodDef eventscMethods[] = { { "wxKeyEvent_GetRawKeyCode", (PyCFunction) _wrap_wxKeyEvent_GetRawKeyCode, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_HasModifiers", (PyCFunction) _wrap_wxKeyEvent_HasModifiers, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_GetKeyCode", (PyCFunction) _wrap_wxKeyEvent_GetKeyCode, METH_VARARGS | METH_KEYWORDS }, - { "wxKeyEvent_KeyCode", (PyCFunction) _wrap_wxKeyEvent_KeyCode, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_ShiftDown", (PyCFunction) _wrap_wxKeyEvent_ShiftDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_AltDown", (PyCFunction) _wrap_wxKeyEvent_AltDown, METH_VARARGS | METH_KEYWORDS }, { "wxKeyEvent_MetaDown", (PyCFunction) _wrap_wxKeyEvent_MetaDown, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/events.py b/wxPython/src/msw/events.py index 402df0334c..3f52c08034 100644 --- a/wxPython/src/msw/events.py +++ b/wxPython/src/msw/events.py @@ -10,9 +10,12 @@ class wxEventPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,eventsc=eventsc): - if self.thisown == 1 : - eventsc.delete_wxEvent(self) + def __del__(self, delfunc=eventsc.delete_wxEvent): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetEventObject(self, *_args, **_kwargs): val = apply(eventsc.wxEvent_GetEventObject,(self,) + _args, _kwargs) return val @@ -452,9 +455,6 @@ class wxKeyEventPtr(wxEventPtr): def ShiftDown(self, *_args, **_kwargs): val = apply(eventsc.wxKeyEvent_ShiftDown,(self,) + _args, _kwargs) return val - def KeyCode(self, *_args, **_kwargs): - val = apply(eventsc.wxKeyEvent_KeyCode,(self,) + _args, _kwargs) - return val def GetKeyCode(self, *_args, **_kwargs): val = apply(eventsc.wxKeyEvent_GetKeyCode,(self,) + _args, _kwargs) return val @@ -536,6 +536,7 @@ class wxKeyEventPtr(wxEventPtr): raise AttributeError,name def __repr__(self): return "" % (self.this,) + KeyCode = GetKeyCode class wxKeyEvent(wxKeyEventPtr): def __init__(self,*_args,**_kwargs): self.this = apply(eventsc.new_wxKeyEvent,_args,_kwargs) @@ -1095,9 +1096,12 @@ class wxPyEventPtr(wxEventPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,eventsc=eventsc): - if self.thisown == 1 : - eventsc.delete_wxPyEvent(self) + def __del__(self, delfunc=eventsc.delete_wxPyEvent): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetSelf(self, *_args, **_kwargs): val = apply(eventsc.wxPyEvent_SetSelf,(self,) + _args, _kwargs) return val @@ -1119,9 +1123,12 @@ class wxPyCommandEventPtr(wxCommandEventPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,eventsc=eventsc): - if self.thisown == 1 : - eventsc.delete_wxPyCommandEvent(self) + def __del__(self, delfunc=eventsc.delete_wxPyCommandEvent): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetSelf(self, *_args, **_kwargs): val = apply(eventsc.wxPyCommandEvent_SetSelf,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/filesys.cpp b/wxPython/src/msw/filesys.cpp index 4cde3a4675..1d34534b48 100644 --- a/wxPython/src/msw/filesys.cpp +++ b/wxPython/src/msw/filesys.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -170,8 +169,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObj return NULL; } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxImage. Expected _wxImage_p."); return NULL; } @@ -209,8 +207,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyOb return NULL; } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of __wxMemoryFSHandler_AddFile_wxBitmap. Expected _wxBitmap_p."); return NULL; } @@ -391,7 +388,7 @@ static PyObject *_wrap_wxFSFile_GetStream(PyObject *self, PyObject *args, PyObje if (_result) { _ptr = new wxPyInputStream(_result); } - _resultobj = wxPyConstructObject(_ptr, "wxInputStream", TRUE); + _resultobj = wxPyConstructObject(_ptr, wxT("wxInputStream"), TRUE); } return _resultobj; } @@ -423,7 +420,7 @@ static PyObject *_wrap_wxFSFile_GetMimeType(PyObject *self, PyObject *args, PyOb 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 @@ -458,7 +455,7 @@ static PyObject *_wrap_wxFSFile_GetLocation(PyObject *self, PyObject *args, PyOb 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 @@ -493,7 +490,7 @@ static PyObject *_wrap_wxFSFile_GetAnchor(PyObject *self, PyObject *args, PyObje 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 @@ -681,8 +678,7 @@ static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFileSystemHandler_OpenFile. Expected _wxFileSystem_p."); return NULL; } @@ -740,7 +736,7 @@ static PyObject *_wrap_wxFileSystemHandler_FindFirst(PyObject *self, PyObject *a 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 @@ -781,7 +777,7 @@ static PyObject *_wrap_wxFileSystemHandler_FindNext(PyObject *self, PyObject *ar 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 @@ -825,7 +821,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetProtocol(PyObject *self, PyObject 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 @@ -873,7 +869,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetLeftLocation(PyObject *self, PyObj 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 @@ -921,7 +917,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetAnchor(PyObject *self, PyObject *a 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 @@ -969,7 +965,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetRightLocation(PyObject *self, PyOb 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 @@ -1017,7 +1013,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, Py 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 @@ -1134,7 +1130,7 @@ static PyObject *_wrap_wxFileSystem_GetPath(PyObject *self, PyObject *args, PyOb 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 @@ -1218,7 +1214,7 @@ static PyObject *_wrap_wxFileSystem_FindFirst(PyObject *self, PyObject *args, Py 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 @@ -1259,7 +1255,7 @@ static PyObject *_wrap_wxFileSystem_FindNext(PyObject *self, PyObject *args, PyO 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 @@ -1419,8 +1415,7 @@ static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxInternetFSHandler_OpenFile. Expected _wxFileSystem_p."); return NULL; } @@ -1548,8 +1543,7 @@ static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxZipFSHandler_OpenFile. Expected _wxFileSystem_p."); return NULL; } @@ -1607,7 +1601,7 @@ static PyObject *_wrap_wxZipFSHandler_FindFirst(PyObject *self, PyObject *args, 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 @@ -1648,7 +1642,7 @@ static PyObject *_wrap_wxZipFSHandler_FindNext(PyObject *self, PyObject *args, P 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 @@ -1792,8 +1786,7 @@ static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileSystem_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMemoryFSHandler_OpenFile. Expected _wxFileSystem_p."); return NULL; } @@ -1851,7 +1844,7 @@ static PyObject *_wrap_wxMemoryFSHandler_FindFirst(PyObject *self, PyObject *arg 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 @@ -1892,7 +1885,7 @@ static PyObject *_wrap_wxMemoryFSHandler_FindNext(PyObject *self, PyObject *args 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 diff --git a/wxPython/src/msw/filesys.py b/wxPython/src/msw/filesys.py index d1d52ee1fe..8950e6059b 100644 --- a/wxPython/src/msw/filesys.py +++ b/wxPython/src/msw/filesys.py @@ -13,13 +13,12 @@ from fonts import * from streams import * import wx -import string import types def wxMemoryFSHandler_AddFile(filename, a, b=''): - if isinstance(a, wxImage): + if wx.wxPy_isinstance(a, (wxImage, wxImagePtr)): __wxMemoryFSHandler_AddFile_wxImage(filename, a, b) - elif isinstance(a, wxBitmap): + elif wx.wxPy_isinstance(a, (wxBitmap, wxBitmapPtr)): __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b) elif type(a) == types.StringType: #__wxMemoryFSHandler_AddFile_wxString(filename, a) diff --git a/wxPython/src/msw/fonts.cpp b/wxPython/src/msw/fonts.cpp index ed567c86b6..1a1754a60d 100644 --- a/wxPython/src/msw/fonts.cpp +++ b/wxPython/src/msw/fonts.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -93,6 +92,32 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { // Put some wx default wxChar* values into wxStrings. static const wxString wxPyEmptyString(wxT("")); +// Fix some link errors... Remove this when these methods get real implementations... +#if defined(__WXGTK__) || defined(__WXX11__) +#if wxUSE_PANGO +void wxNativeFontInfo::SetPointSize(int pointsize) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetStyle(wxFontStyle style) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetWeight(wxFontWeight weight) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetUnderlined(bool WXUNUSED(underlined)) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetFaceName(wxString facename) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetFamily(wxFontFamily family) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding) + { wxFAIL_MSG( _T("not implemented") ); } +#endif +#endif + class wxPyFontEnumerator : public wxFontEnumerator { public: wxPyFontEnumerator() {} @@ -158,7 +183,7 @@ static PyObject *_wrap_wxGetTranslation(PyObject *self, PyObject *args, PyObject 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 @@ -365,7 +390,7 @@ static PyObject *_wrap_wxNativeFontInfo_GetFaceName(PyObject *self, PyObject *ar 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 @@ -712,7 +737,7 @@ static PyObject *_wrap_wxNativeFontInfo_ToString(PyObject *self, PyObject *args, 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 @@ -751,7 +776,7 @@ static PyObject *_wrap_wxNativeFontInfo___str__(PyObject *self, PyObject *args, 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 @@ -827,7 +852,7 @@ static PyObject *_wrap_wxNativeFontInfo_ToUserString(PyObject *self, PyObject *a 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 @@ -1105,7 +1130,7 @@ static PyObject *_wrap_wxFontMapper_GetEncodingName(PyObject *self, PyObject *ar 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 @@ -1133,7 +1158,7 @@ static PyObject *_wrap_wxFontMapper_GetEncodingDescription(PyObject *self, PyObj 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 @@ -1312,7 +1337,7 @@ static PyObject *_wrap_wxFontMapper_GetDefaultConfigPath(PyObject *self, PyObjec 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 @@ -1388,8 +1413,7 @@ static PyObject *_wrap_new_wxFontFromNativeInfo(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxFontFromNativeInfo",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFontFromNativeInfo. Expected _wxNativeFontInfo_p."); return NULL; } @@ -1410,6 +1434,56 @@ static PyObject *_wrap_new_wxFontFromNativeInfo(PyObject *self, PyObject *args, return _resultobj; } +static wxFont * wxFont_wxFontFromNativeInfoString(wxFont *self,const wxString & info) { + wxNativeFontInfo nfi; + nfi.FromString(info); + return new wxFont(nfi); + } +static PyObject *_wrap_wxFont_wxFontFromNativeInfoString(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _result; + wxFont * _arg0; + wxString * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","info", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFont_wxFontFromNativeInfoString",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_wxFontFromNativeInfoString. Expected _wxFont_p."); + return NULL; + } + } +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFont *)wxFont_wxFontFromNativeInfoString(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + #define delete_wxFont(_swigobj) (delete _swigobj) static PyObject *_wrap_delete_wxFont(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1632,7 +1706,7 @@ static PyObject *_wrap_wxFont_GetFaceName(PyObject *self, PyObject *args, PyObje 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 @@ -1760,7 +1834,7 @@ static PyObject *_wrap_wxFont_GetNativeFontInfoDesc(PyObject *self, PyObject *ar 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 @@ -1797,7 +1871,7 @@ static PyObject *_wrap_wxFont_GetNativeFontInfoUserDesc(PyObject *self, PyObject 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 @@ -2043,8 +2117,7 @@ static PyObject *_wrap_wxFont_SetNativeFontInfo(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxNativeFontInfo_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxNativeFontInfo_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFont_SetNativeFontInfo. Expected _wxNativeFontInfo_p."); return NULL; } @@ -2125,7 +2198,7 @@ static PyObject *_wrap_wxFont_GetFamilyString(PyObject *self, PyObject *args, Py 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 @@ -2162,7 +2235,7 @@ static PyObject *_wrap_wxFont_GetStyleString(PyObject *self, PyObject *args, PyO 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 @@ -2199,7 +2272,7 @@ static PyObject *_wrap_wxFont_GetWeightString(PyObject *self, PyObject *args, Py 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 @@ -2210,6 +2283,65 @@ static PyObject *_wrap_wxFont_GetWeightString(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxFont_SetNoAntiAliasing(_swigobj,_swigarg0) (_swigobj->SetNoAntiAliasing(_swigarg0)) +static PyObject *_wrap_wxFont_SetNoAntiAliasing(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFont * _arg0; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","no", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxFont_SetNoAntiAliasing",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetNoAntiAliasing. Expected _wxFont_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxFont_SetNoAntiAliasing(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFont_GetNoAntiAliasing(_swigobj) (_swigobj->GetNoAntiAliasing()) +static PyObject *_wrap_wxFont_GetNoAntiAliasing(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFont * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetNoAntiAliasing",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetNoAntiAliasing. Expected _wxFont_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxFont_GetNoAntiAliasing(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyObject *_wrap_wxFont_GetDefaultEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFontEncoding _result; @@ -2735,7 +2867,7 @@ static PyObject *_wrap_wxLanguageInfo_CanonicalName_set(PyObject *self, PyObject 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 @@ -2773,7 +2905,7 @@ static PyObject *_wrap_wxLanguageInfo_CanonicalName_get(PyObject *self, PyObject 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 @@ -2814,7 +2946,7 @@ static PyObject *_wrap_wxLanguageInfo_Description_set(PyObject *self, PyObject * 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 @@ -2852,7 +2984,7 @@ static PyObject *_wrap_wxLanguageInfo_Description_get(PyObject *self, PyObject * 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 @@ -2888,8 +3020,36 @@ static PyObject *_wrap_new_wxLocale(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } -#define wxLocale_Init(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->Init(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) -static PyObject *_wrap_wxLocale_Init(PyObject *self, PyObject *args, PyObject *kwargs) { +#define delete_wxLocale(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxLocale(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxLocale * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxLocale",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLocale_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxLocale. Expected _wxLocale_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxLocale(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxLocale_Init1(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->Init(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxLocale_Init1(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxLocale * _arg0; @@ -2907,12 +3067,12 @@ static PyObject *_wrap_wxLocale_Init(PyObject *self, PyObject *args, PyObject *k char *_kwnames[] = { "self","szName","szShort","szLocale","bLoadDefault","bConvertEncoding", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|OOii:wxLocale_Init",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3,&tempbool4,&tempbool5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|OOii:wxLocale_Init1",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3,&tempbool4,&tempbool5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLocale_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLocale_Init. Expected _wxLocale_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLocale_Init1. Expected _wxLocale_p."); return NULL; } } @@ -2937,7 +3097,7 @@ static PyObject *_wrap_wxLocale_Init(PyObject *self, PyObject *args, PyObject *k _arg5 = (bool ) tempbool5; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLocale_Init(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (bool )wxLocale_Init1(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2957,31 +3117,33 @@ static PyObject *_wrap_wxLocale_Init(PyObject *self, PyObject *args, PyObject *k return _resultobj; } -#define delete_wxLocale(_swigobj) (delete _swigobj) -static PyObject *_wrap_delete_wxLocale(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxLocale_Init2(_swigobj,_swigarg0,_swigarg1) (_swigobj->Init(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxLocale_Init2(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxLocale * _arg0; + int _arg1 = (int ) (wxLANGUAGE_DEFAULT); + int _arg2 = (int ) (wxLOCALE_LOAD_DEFAULT)|(wxLOCALE_CONV_ENCODING); PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","language","flags", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxLocale",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:wxLocale_Init2",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLocale_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxLocale. Expected _wxLocale_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLocale_Init2. Expected _wxLocale_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxLocale(_arg0); + _result = (bool )wxLocale_Init2(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -3037,7 +3199,7 @@ static PyObject *_wrap_wxLocale_GetSystemEncodingName(PyObject *self, PyObject * 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 @@ -3102,7 +3264,7 @@ static PyObject *_wrap_wxLocale_GetLocale(PyObject *self, PyObject *args, PyObje 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 @@ -3167,7 +3329,7 @@ static PyObject *_wrap_wxLocale_GetSysName(PyObject *self, PyObject *args, PyObj 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 @@ -3204,7 +3366,7 @@ static PyObject *_wrap_wxLocale_GetCanonicalName(PyObject *self, PyObject *args, 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 @@ -3358,8 +3520,7 @@ static PyObject *_wrap_wxLocale_AddLanguage(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLocale_AddLanguage",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLanguageInfo_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxLanguageInfo_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxLocale_AddLanguage. Expected _wxLanguageInfo_p."); return NULL; } @@ -3416,7 +3577,7 @@ static PyObject *_wrap_wxLocale_GetString(PyObject *self, PyObject *args, PyObje 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 @@ -3462,7 +3623,7 @@ static PyObject *_wrap_wxLocale_GetName(PyObject *self, PyObject *args, PyObject 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 @@ -3596,7 +3757,7 @@ static PyObject *_wrap_wxEncodingConverter_Convert(PyObject *self, PyObject *arg 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 @@ -3686,8 +3847,9 @@ static PyMethodDef fontscMethods[] = { { "wxLocale_GetSystemEncodingName", (PyCFunction) _wrap_wxLocale_GetSystemEncodingName, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_GetSystemEncoding", (PyCFunction) _wrap_wxLocale_GetSystemEncoding, METH_VARARGS | METH_KEYWORDS }, { "wxLocale_GetSystemLanguage", (PyCFunction) _wrap_wxLocale_GetSystemLanguage, METH_VARARGS | METH_KEYWORDS }, + { "wxLocale_Init2", (PyCFunction) _wrap_wxLocale_Init2, METH_VARARGS | METH_KEYWORDS }, + { "wxLocale_Init1", (PyCFunction) _wrap_wxLocale_Init1, METH_VARARGS | METH_KEYWORDS }, { "delete_wxLocale", (PyCFunction) _wrap_delete_wxLocale, METH_VARARGS | METH_KEYWORDS }, - { "wxLocale_Init", (PyCFunction) _wrap_wxLocale_Init, METH_VARARGS | METH_KEYWORDS }, { "new_wxLocale", (PyCFunction) _wrap_new_wxLocale, METH_VARARGS | METH_KEYWORDS }, { "wxLanguageInfo_Description_get", (PyCFunction) _wrap_wxLanguageInfo_Description_get, METH_VARARGS | METH_KEYWORDS }, { "wxLanguageInfo_Description_set", (PyCFunction) _wrap_wxLanguageInfo_Description_set, METH_VARARGS | METH_KEYWORDS }, @@ -3708,6 +3870,8 @@ static PyMethodDef fontscMethods[] = { { "wxFontList_AddFont", (PyCFunction) _wrap_wxFontList_AddFont, METH_VARARGS | METH_KEYWORDS }, { "wxFont_SetDefaultEncoding", (PyCFunction) _wrap_wxFont_SetDefaultEncoding, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetDefaultEncoding", (PyCFunction) _wrap_wxFont_GetDefaultEncoding, METH_VARARGS | METH_KEYWORDS }, + { "wxFont_GetNoAntiAliasing", (PyCFunction) _wrap_wxFont_GetNoAntiAliasing, METH_VARARGS | METH_KEYWORDS }, + { "wxFont_SetNoAntiAliasing", (PyCFunction) _wrap_wxFont_SetNoAntiAliasing, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetWeightString", (PyCFunction) _wrap_wxFont_GetWeightString, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetStyleString", (PyCFunction) _wrap_wxFont_GetStyleString, METH_VARARGS | METH_KEYWORDS }, { "wxFont_GetFamilyString", (PyCFunction) _wrap_wxFont_GetFamilyString, METH_VARARGS | METH_KEYWORDS }, @@ -3733,6 +3897,7 @@ static PyMethodDef fontscMethods[] = { { "wxFont_GetPointSize", (PyCFunction) _wrap_wxFont_GetPointSize, METH_VARARGS | METH_KEYWORDS }, { "wxFont_Ok", (PyCFunction) _wrap_wxFont_Ok, METH_VARARGS | METH_KEYWORDS }, { "delete_wxFont", (PyCFunction) _wrap_delete_wxFont, METH_VARARGS | METH_KEYWORDS }, + { "wxFont_wxFontFromNativeInfoString", (PyCFunction) _wrap_wxFont_wxFontFromNativeInfoString, METH_VARARGS | METH_KEYWORDS }, { "new_wxFontFromNativeInfo", (PyCFunction) _wrap_new_wxFontFromNativeInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxFont", (PyCFunction) _wrap_new_wxFont, METH_VARARGS | METH_KEYWORDS }, { "wxFontMapper_GetDefaultConfigPath", (PyCFunction) _wrap_wxFontMapper_GetDefaultConfigPath, METH_VARARGS | METH_KEYWORDS }, @@ -3948,6 +4113,10 @@ SWIGEXPORT(void) initfontsc() { PyDict_SetItemString(d,"wxFONTENCODING_CP12_MAX", PyInt_FromLong((long) wxFONTENCODING_CP12_MAX)); PyDict_SetItemString(d,"wxFONTENCODING_UTF7", PyInt_FromLong((long) wxFONTENCODING_UTF7)); PyDict_SetItemString(d,"wxFONTENCODING_UTF8", PyInt_FromLong((long) wxFONTENCODING_UTF8)); + PyDict_SetItemString(d,"wxFONTENCODING_GB2312", PyInt_FromLong((long) wxFONTENCODING_GB2312)); + PyDict_SetItemString(d,"wxFONTENCODING_BIG5", PyInt_FromLong((long) wxFONTENCODING_BIG5)); + PyDict_SetItemString(d,"wxFONTENCODING_SHIFT_JIS", PyInt_FromLong((long) wxFONTENCODING_SHIFT_JIS)); + PyDict_SetItemString(d,"wxFONTENCODING_EUC_JP", PyInt_FromLong((long) wxFONTENCODING_EUC_JP)); PyDict_SetItemString(d,"wxFONTENCODING_UNICODE", PyInt_FromLong((long) wxFONTENCODING_UNICODE)); PyDict_SetItemString(d,"wxFONTENCODING_MAX", PyInt_FromLong((long) wxFONTENCODING_MAX)); PyDict_SetItemString(d,"wxLANGUAGE_DEFAULT", PyInt_FromLong((long) wxLANGUAGE_DEFAULT)); diff --git a/wxPython/src/msw/fonts.py b/wxPython/src/msw/fonts.py index a52f613181..4f2f474f91 100644 --- a/wxPython/src/msw/fonts.py +++ b/wxPython/src/msw/fonts.py @@ -80,9 +80,12 @@ class wxFontMapperPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,fontsc=fontsc): - if self.thisown == 1 : - fontsc.delete_wxFontMapper(self) + def __del__(self, delfunc=fontsc.delete_wxFontMapper): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetAltForEncoding(self, *_args, **_kwargs): val = apply(fontsc.wxFontMapper_GetAltForEncoding,(self,) + _args, _kwargs) return val @@ -118,9 +121,16 @@ class wxFontPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,fontsc=fontsc): - if self.thisown == 1 : - fontsc.delete_wxFont(self) + def wxFontFromNativeInfoString(self, *_args, **_kwargs): + val = apply(fontsc.wxFont_wxFontFromNativeInfoString,(self,) + _args, _kwargs) + if val: val = wxFontPtr(val) ; val.thisown = 1 + return val + def __del__(self, delfunc=fontsc.delete_wxFont): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Ok(self, *_args, **_kwargs): val = apply(fontsc.wxFont_Ok,(self,) + _args, _kwargs) return val @@ -194,6 +204,12 @@ class wxFontPtr(wxObjectPtr): def GetWeightString(self, *_args, **_kwargs): val = apply(fontsc.wxFont_GetWeightString,(self,) + _args, _kwargs) return val + def SetNoAntiAliasing(self, *_args, **_kwargs): + val = apply(fontsc.wxFont_SetNoAntiAliasing,(self,) + _args, _kwargs) + return val + def GetNoAntiAliasing(self, *_args, **_kwargs): + val = apply(fontsc.wxFont_GetNoAntiAliasing,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxFont(wxFontPtr): @@ -239,9 +255,12 @@ class wxFontEnumeratorPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,fontsc=fontsc): - if self.thisown == 1 : - fontsc.delete_wxFontEnumerator(self) + def __del__(self, delfunc=fontsc.delete_wxFontEnumerator): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def _setCallbackInfo(self, *_args, **_kwargs): val = apply(fontsc.wxFontEnumerator__setCallbackInfo,(self,) + _args, _kwargs) return val @@ -304,12 +323,18 @@ class wxLocalePtr : def __init__(self,this): self.this = this self.thisown = 0 - def Init(self, *_args, **_kwargs): - val = apply(fontsc.wxLocale_Init,(self,) + _args, _kwargs) + def __del__(self, delfunc=fontsc.delete_wxLocale): + if self.thisown == 1: + try: + delfunc(self) + except: + pass + def Init1(self, *_args, **_kwargs): + val = apply(fontsc.wxLocale_Init1,(self,) + _args, _kwargs) + return val + def Init2(self, *_args, **_kwargs): + val = apply(fontsc.wxLocale_Init2,(self,) + _args, _kwargs) return val - def __del__(self,fontsc=fontsc): - if self.thisown == 1 : - fontsc.delete_wxLocale(self) def IsOk(self, *_args, **_kwargs): val = apply(fontsc.wxLocale_IsOk,(self,) + _args, _kwargs) return val @@ -339,6 +364,14 @@ class wxLocalePtr : return val def __repr__(self): return "" % (self.this,) + + def Init(self, *_args, **_kwargs): + if type(_args[0]) in [type(''), type(u'')]: + val = apply(self.Init1, _args, _kwargs) + else: + val = apply(self.Init2, _args, _kwargs) + return val + class wxLocale(wxLocalePtr): def __init__(self,*_args,**_kwargs): self.this = apply(fontsc.new_wxLocale,_args,_kwargs) @@ -351,9 +384,12 @@ class wxEncodingConverterPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,fontsc=fontsc): - if self.thisown == 1 : - fontsc.delete_wxEncodingConverter(self) + def __del__(self, delfunc=fontsc.delete_wxEncodingConverter): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Init(self, *_args, **_kwargs): val = apply(fontsc.wxEncodingConverter_Init,(self,) + _args, _kwargs) return val @@ -483,6 +519,10 @@ wxFONTENCODING_CP1257 = fontsc.wxFONTENCODING_CP1257 wxFONTENCODING_CP12_MAX = fontsc.wxFONTENCODING_CP12_MAX wxFONTENCODING_UTF7 = fontsc.wxFONTENCODING_UTF7 wxFONTENCODING_UTF8 = fontsc.wxFONTENCODING_UTF8 +wxFONTENCODING_GB2312 = fontsc.wxFONTENCODING_GB2312 +wxFONTENCODING_BIG5 = fontsc.wxFONTENCODING_BIG5 +wxFONTENCODING_SHIFT_JIS = fontsc.wxFONTENCODING_SHIFT_JIS +wxFONTENCODING_EUC_JP = fontsc.wxFONTENCODING_EUC_JP wxFONTENCODING_UNICODE = fontsc.wxFONTENCODING_UNICODE wxFONTENCODING_MAX = fontsc.wxFONTENCODING_MAX wxLANGUAGE_DEFAULT = fontsc.wxLANGUAGE_DEFAULT diff --git a/wxPython/src/msw/frames.cpp b/wxPython/src/msw/frames.cpp index 1a9e0c9c15..4c967a909b 100644 --- a/wxPython/src/msw/frames.cpp +++ b/wxPython/src/msw/frames.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -498,8 +497,7 @@ static PyObject *_wrap_wxTopLevelWindow_SetIcon(PyObject *self, PyObject *args, } } 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 wxTopLevelWindow_SetIcon. Expected _wxIcon_p."); return NULL; } @@ -535,8 +533,7 @@ static PyObject *_wrap_wxTopLevelWindow_SetIcons(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIconBundle_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIconBundle_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTopLevelWindow_SetIcons. Expected _wxIconBundle_p."); return NULL; } @@ -677,7 +674,7 @@ static PyObject *_wrap_wxTopLevelWindow_GetTitle(PyObject *self, PyObject *args, 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 @@ -999,35 +996,6 @@ static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxFrame_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0)) -static PyObject *_wrap_wxFrame_Command(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxFrame * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","id", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_Command",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Command. Expected _wxFrame_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxFrame_Command(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - #define wxFrame_ProcessCommand(_swigobj,_swigarg0) (_swigobj->ProcessCommand(_swigarg0)) static PyObject *_wrap_wxFrame_ProcessCommand(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2314,8 +2282,7 @@ static PyObject *_wrap_new_wxSplashScreenWindow(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOl:new_wxSplashScreenWindow",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSplashScreenWindow. Expected _wxBitmap_p."); return NULL; } @@ -2375,8 +2342,7 @@ static PyObject *_wrap_wxSplashScreenWindow_SetBitmap(PyObject *self, PyObject * } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSplashScreenWindow_SetBitmap. Expected _wxBitmap_p."); return NULL; } @@ -2493,8 +2459,7 @@ static PyObject *_wrap_new_wxSplashScreen(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OliOi|OOl:new_wxSplashScreen",_kwnames,&_argo0,&_arg1,&_arg2,&_argo3,&_arg4,&_obj5,&_obj6,&_arg7)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxSplashScreen. Expected _wxBitmap_p."); return NULL; } @@ -2663,7 +2628,6 @@ static PyMethodDef framescMethods[] = { { "wxFrame_GetStatusBar", (PyCFunction) _wrap_wxFrame_GetStatusBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_CreateStatusBar", (PyCFunction) _wrap_wxFrame_CreateStatusBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_ProcessCommand", (PyCFunction) _wrap_wxFrame_ProcessCommand, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_Command", (PyCFunction) _wrap_wxFrame_Command, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_GetMenuBar", (PyCFunction) _wrap_wxFrame_GetMenuBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetMenuBar", (PyCFunction) _wrap_wxFrame_SetMenuBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_GetClientAreaOrigin", (PyCFunction) _wrap_wxFrame_GetClientAreaOrigin, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/frames.py b/wxPython/src/msw/frames.py index 26b4e08cff..0fae1a5d20 100644 --- a/wxPython/src/msw/frames.py +++ b/wxPython/src/msw/frames.py @@ -95,9 +95,6 @@ class wxFramePtr(wxTopLevelWindowPtr): def GetMenuBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_GetMenuBar,(self,) + _args, _kwargs) return val - def Command(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_Command,(self,) + _args, _kwargs) - return val def ProcessCommand(self, *_args, **_kwargs): val = apply(framesc.wxFrame_ProcessCommand,(self,) + _args, _kwargs) return val @@ -145,6 +142,7 @@ class wxFramePtr(wxTopLevelWindowPtr): return val def __repr__(self): return "" % (self.this,) + Command = ProcessCommand class wxFrame(wxFramePtr): def __init__(self,*_args,**_kwargs): self.this = apply(framesc.new_wxFrame,_args,_kwargs) diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index 94f27d89b8..f13ea16d9e 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -183,6 +182,14 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { // Alternate 'constructor' wxCursor* wxPyStockCursor(int id) { return new wxCursor(id); + } + + wxCursor* wxCursorFromImage(const wxImage& image) { + #ifndef __WXMAC__ + return new wxCursor(image); + #else + return NULL; + #endif } // Alternate 'constructor' wxColour* wxNamedColour(const wxString& colorName) { @@ -348,8 +355,7 @@ static PyObject *_wrap_wxBitmapFromIcon(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxBitmapFromIcon",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapFromIcon. Expected _wxIcon_p."); return NULL; } @@ -418,8 +424,7 @@ static PyObject *_wrap_wxMaskColour(PyObject *self, PyObject *args, PyObject *kw if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxMaskColour",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMaskColour. Expected _wxBitmap_p."); return NULL; } @@ -512,8 +517,7 @@ static PyObject *_wrap_wxIconFromBitmap(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxIconFromBitmap",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxIconFromBitmap. Expected _wxBitmap_p."); return NULL; } @@ -560,6 +564,39 @@ static PyObject *_wrap_wxStockCursor(PyObject *self, PyObject *args, PyObject *k return _resultobj; } +static PyObject *_wrap_wxCursorFromImage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxCursor * _result; + wxImage * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "image", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCursorFromImage",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCursorFromImage. Expected _wxImage_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxCursor *)wxCursorFromImage(*_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxCursor_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + static PyObject *_wrap_wxNamedColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxColour * _result; @@ -1767,8 +1804,7 @@ static PyObject *_wrap_wxBitmap_SetPalette(PyObject *self, PyObject *args, PyObj } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmap_SetPalette. Expected _wxPalette_p."); return NULL; } @@ -2135,8 +2171,7 @@ static PyObject *_wrap_wxBitmap_CopyFromIcon(PyObject *self, PyObject *args, PyO } } 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 wxBitmap_CopyFromIcon. Expected _wxIcon_p."); return NULL; } @@ -2172,8 +2207,7 @@ static PyObject *_wrap_wxBitmap_CopyFromCursor(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBitmap_CopyFromCursor. Expected _wxCursor_p."); return NULL; } @@ -2266,8 +2300,7 @@ static PyObject *_wrap_new_wxMask(PyObject *self, PyObject *args, PyObject *kwar if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxMask",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxMask. Expected _wxBitmap_p."); return NULL; } @@ -2752,8 +2785,7 @@ static PyObject *_wrap_wxIcon_CopyFromBitmap(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxIcon_CopyFromBitmap. Expected _wxBitmap_p."); return NULL; } @@ -2846,8 +2878,7 @@ static PyObject *_wrap_new_wxIconBundleFromIcon(PyObject *self, PyObject *args, if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxIconBundleFromIcon",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxIconBundleFromIcon. Expected _wxIcon_p."); return NULL; } @@ -2916,8 +2947,7 @@ static PyObject *_wrap_wxIconBundle_AddIcon(PyObject *self, PyObject *args, PyOb } } 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 wxIconBundle_AddIcon. Expected _wxIcon_p."); return NULL; } @@ -3597,9 +3627,17 @@ static PyObject *_wrap_wxColour_Set(PyObject *self, PyObject *args, PyObject *kw static PyObject * wxColour_Get(wxColour *self) { PyObject* rv = PyTuple_New(3); - PyTuple_SetItem(rv, 0, PyInt_FromLong(self->Red())); - PyTuple_SetItem(rv, 1, PyInt_FromLong(self->Green())); - PyTuple_SetItem(rv, 2, PyInt_FromLong(self->Blue())); + int red = -1; + int green = -1; + int blue = -1; + if (self->Ok()) { + red = self->Red(); + green = self->Green(); + blue = self->Blue(); + } + PyTuple_SetItem(rv, 0, PyInt_FromLong(red)); + PyTuple_SetItem(rv, 1, PyInt_FromLong(green)); + PyTuple_SetItem(rv, 2, PyInt_FromLong(blue)); return rv; } static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kwargs) { @@ -3630,6 +3668,84 @@ static PyObject *_wrap_wxColour_Get(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +static bool wxColour___eq__(wxColour *self,PyObject * obj) { + wxColour tmp; + wxColour* ptr = &tmp; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxColour_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; + return *self == *ptr; + } +static PyObject *_wrap_wxColour___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxColour * _arg0; + PyObject * _arg1; + wxColour temp; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","obj", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxColour___eq__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = _obj1; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxColour___eq__(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static bool wxColour___ne__(wxColour *self,PyObject * obj) { + wxColour tmp; + wxColour* ptr = &tmp; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxColour_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; + return *self != *ptr; + } +static PyObject *_wrap_wxColour___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxColour * _arg0; + PyObject * _arg1; + wxColour temp; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","obj", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxColour___ne__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = _obj1; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxColour___ne__(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static void *SwigwxColourDatabaseTowxObject(void *ptr) { wxColourDatabase *src; wxObject *dest; @@ -3718,7 +3834,7 @@ static PyObject *_wrap_wxColourDatabase_FindName(PyObject *self, PyObject *args, 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 @@ -3737,15 +3853,15 @@ static void wxColourDatabase_Append(wxColourDatabase *self,const wxString & nam if ( !cName2.Replace(wxT("GRAY"), wxT("GREY")) ) cName2.clear(); - wxNode *node = self->First(); + wxNode *node = self->GetFirst(); while ( node ) { const wxChar *key = node->GetKeyString(); if ( cName == key || cName2 == key ) { - wxColour* c = (wxColour *)node->Data(); + wxColour* c = (wxColour *)node->GetData(); c->Set(red, green, blue); return; } - node = node->Next(); + node = node->GetNext(); } // otherwise append the new colour @@ -4337,8 +4453,7 @@ static PyObject *_wrap_wxPen_SetStipple(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_SetStipple. Expected _wxBitmap_p."); return NULL; } @@ -4902,8 +5017,7 @@ static PyObject *_wrap_wxBrush_SetStipple(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxBrush_SetStipple. Expected _wxBitmap_p."); return NULL; } @@ -5171,13 +5285,13 @@ static PyObject *_wrap_wxDC_Blit(PyObject *self, PyObject *args, PyObject *kwarg PyObject * _resultobj; bool _result; wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; wxDC * _arg5; - long _arg6; - long _arg7; + wxCoord _arg6; + wxCoord _arg7; int _arg8 = (int ) wxCOPY; int _arg9 = (int ) FALSE; PyObject * _argo0 = 0; @@ -5185,7 +5299,7 @@ static PyObject *_wrap_wxDC_Blit(PyObject *self, PyObject *args, PyObject *kwarg char *_kwnames[] = { "self","xdest","ydest","width","height","source","xsrc","ysrc","logicalFunc","useMask", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OllllOll|ii:wxDC_Blit",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_argo5,&_arg6,&_arg7,&_arg8,&_arg9)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiiiOii|ii:wxDC_Blit",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_argo5,&_arg6,&_arg7,&_arg8,&_arg9)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5243,13 +5357,13 @@ static PyObject *_wrap_wxDC_Clear(PyObject *self, PyObject *args, PyObject *kwar static PyObject *_wrap_wxDC_CrossHair(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long _arg1; - long _arg2; + wxCoord _arg1; + wxCoord _arg2; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxDC_CrossHair",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxDC_CrossHair",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5300,14 +5414,14 @@ static PyObject *_wrap_wxDC_DestroyClippingRegion(PyObject *self, PyObject *args #define wxDC_DeviceToLogicalX(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalX(_swigarg0)) static PyObject *_wrap_wxDC_DeviceToLogicalX(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; - long _arg1; + wxCoord _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDC_DeviceToLogicalX",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDC_DeviceToLogicalX",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5318,25 +5432,25 @@ static PyObject *_wrap_wxDC_DeviceToLogicalX(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalX(_arg0,_arg1); + _result = (wxCoord )wxDC_DeviceToLogicalX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxDC_DeviceToLogicalXRel(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalXRel(_swigarg0)) static PyObject *_wrap_wxDC_DeviceToLogicalXRel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; - long _arg1; + wxCoord _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDC_DeviceToLogicalXRel",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDC_DeviceToLogicalXRel",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5347,25 +5461,25 @@ static PyObject *_wrap_wxDC_DeviceToLogicalXRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalXRel(_arg0,_arg1); + _result = (wxCoord )wxDC_DeviceToLogicalXRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxDC_DeviceToLogicalY(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalY(_swigarg0)) static PyObject *_wrap_wxDC_DeviceToLogicalY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; - long _arg1; + wxCoord _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDC_DeviceToLogicalY",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDC_DeviceToLogicalY",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5376,25 +5490,25 @@ static PyObject *_wrap_wxDC_DeviceToLogicalY(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalY(_arg0,_arg1); + _result = (wxCoord )wxDC_DeviceToLogicalY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxDC_DeviceToLogicalYRel(_swigobj,_swigarg0) (_swigobj->DeviceToLogicalYRel(_swigarg0)) static PyObject *_wrap_wxDC_DeviceToLogicalYRel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; - long _arg1; + wxCoord _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDC_DeviceToLogicalYRel",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDC_DeviceToLogicalYRel",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5405,11 +5519,11 @@ static PyObject *_wrap_wxDC_DeviceToLogicalYRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_DeviceToLogicalYRel(_arg0,_arg1); + _result = (wxCoord )wxDC_DeviceToLogicalYRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -5417,17 +5531,17 @@ static PyObject *_wrap_wxDC_DeviceToLogicalYRel(PyObject *self, PyObject *args, static PyObject *_wrap_wxDC_DrawArc(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - long _arg5; - long _arg6; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; + wxCoord _arg5; + wxCoord _arg6; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x1","y1","x2","y2","xc","yc", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollllll:wxDC_DrawArc",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiiiii:wxDC_DrawArc",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5451,14 +5565,14 @@ static PyObject *_wrap_wxDC_DrawArc(PyObject *self, PyObject *args, PyObject *kw static PyObject *_wrap_wxDC_DrawCircle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y","radius", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Olll:wxDC_DrawCircle",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxDC_DrawCircle",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5482,15 +5596,15 @@ static PyObject *_wrap_wxDC_DrawCircle(PyObject *self, PyObject *args, PyObject static PyObject *_wrap_wxDC_DrawEllipse(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y","width","height", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxDC_DrawEllipse",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxDC_DrawEllipse",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5514,17 +5628,17 @@ static PyObject *_wrap_wxDC_DrawEllipse(PyObject *self, PyObject *args, PyObject static PyObject *_wrap_wxDC_DrawEllipticArc(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - long _arg5; - long _arg6; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; + wxCoord _arg5; + wxCoord _arg6; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y","width","height","start","end", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollllll:wxDC_DrawEllipticArc",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiiiii:wxDC_DrawEllipticArc",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5549,14 +5663,14 @@ static PyObject *_wrap_wxDC_DrawIcon(PyObject *self, PyObject *args, PyObject *k PyObject * _resultobj; wxDC * _arg0; wxIcon * _arg1; - long _arg2; - long _arg3; + wxCoord _arg2; + wxCoord _arg3; PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","icon","x","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOll:wxDC_DrawIcon",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxDC_DrawIcon",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5566,8 +5680,7 @@ static PyObject *_wrap_wxDC_DrawIcon(PyObject *self, PyObject *args, PyObject *k } } 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 wxDC_DrawIcon. Expected _wxIcon_p."); return NULL; } @@ -5670,8 +5783,7 @@ static PyObject *_wrap_wxDC_DrawImageLabel(PyObject *self, PyObject *args, PyObj return NULL; } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDC_DrawImageLabel. Expected _wxBitmap_p."); return NULL; } @@ -5700,15 +5812,15 @@ static PyObject *_wrap_wxDC_DrawImageLabel(PyObject *self, PyObject *args, PyObj static PyObject *_wrap_wxDC_DrawLine(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x1","y1","x2","y2", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxDC_DrawLine",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxDC_DrawLine",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5734,15 +5846,15 @@ static PyObject *_wrap_wxDC_DrawLines(PyObject *self, PyObject *args, PyObject * wxDC * _arg0; int _arg1; wxPoint * _arg2; - long _arg3 = (long ) 0; - long _arg4 = (long ) 0; + wxCoord _arg3 = (wxCoord ) 0; + wxCoord _arg4 = (wxCoord ) 0; PyObject * _argo0 = 0; int NPOINTS; PyObject * _obj2 = 0; char *_kwnames[] = { "self","points","xoffset","yoffset", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|ll:wxDC_DrawLines",_kwnames,&_argo0,&_obj2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|ii:wxDC_DrawLines",_kwnames,&_argo0,&_obj2,&_arg3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5781,8 +5893,8 @@ static PyObject *_wrap_wxDC_DrawPolygon(PyObject *self, PyObject *args, PyObject wxDC * _arg0; int _arg1; wxPoint * _arg2; - long _arg3 = (long ) 0; - long _arg4 = (long ) 0; + wxCoord _arg3 = (wxCoord ) 0; + wxCoord _arg4 = (wxCoord ) 0; int _arg5 = (int ) wxODDEVEN_RULE; PyObject * _argo0 = 0; int NPOINTS; @@ -5790,7 +5902,7 @@ static PyObject *_wrap_wxDC_DrawPolygon(PyObject *self, PyObject *args, PyObject char *_kwnames[] = { "self","points","xoffset","yoffset","fill_style", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|lli:wxDC_DrawPolygon",_kwnames,&_argo0,&_obj2,&_arg3,&_arg4,&_arg5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iii:wxDC_DrawPolygon",_kwnames,&_argo0,&_obj2,&_arg3,&_arg4,&_arg5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5827,13 +5939,13 @@ static PyObject *_wrap_wxDC_DrawPolygon(PyObject *self, PyObject *args, PyObject static PyObject *_wrap_wxDC_DrawPoint(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long _arg1; - long _arg2; + wxCoord _arg1; + wxCoord _arg2; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxDC_DrawPoint",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxDC_DrawPoint",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5857,15 +5969,15 @@ static PyObject *_wrap_wxDC_DrawPoint(PyObject *self, PyObject *args, PyObject * static PyObject *_wrap_wxDC_DrawRectangle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y","width","height", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxDC_DrawRectangle",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxDC_DrawRectangle",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -5967,16 +6079,16 @@ static PyObject *_wrap_wxDC_DrawRotatedText(PyObject *self, PyObject *args, PyOb static PyObject *_wrap_wxDC_DrawRoundedRectangle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; - long _arg5 = (long ) 20; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; + wxCoord _arg5 = (wxCoord ) 20; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y","width","height","radius", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll|l:wxDC_DrawRoundedRectangle",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii|i:wxDC_DrawRoundedRectangle",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6046,14 +6158,14 @@ static PyObject *_wrap_wxDC_DrawText(PyObject *self, PyObject *args, PyObject *k PyObject * _resultobj; wxDC * _arg0; wxString * _arg1; - long _arg2; - long _arg3; + wxCoord _arg2; + wxCoord _arg3; PyObject * _argo0 = 0; PyObject * _obj1 = 0; char *_kwnames[] = { "self","text","x","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOll:wxDC_DrawText",_kwnames,&_argo0,&_obj1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxDC_DrawText",_kwnames,&_argo0,&_obj1,&_arg2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6171,8 +6283,8 @@ static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args, PyObject * PyObject * _resultobj; bool _result; wxDC * _arg0; - long _arg1; - long _arg2; + wxCoord _arg1; + wxCoord _arg2; wxColour * _arg3; int _arg4 = (int ) wxFLOOD_SURFACE; PyObject * _argo0 = 0; @@ -6181,7 +6293,7 @@ static PyObject *_wrap_wxDC_FloodFill(PyObject *self, PyObject *args, PyObject * char *_kwnames[] = { "self","x","y","colour","style", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OllO|i:wxDC_FloodFill",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiO|i:wxDC_FloodFill",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6268,7 +6380,7 @@ static PyObject *_wrap_wxDC_GetBrush(PyObject *self, PyObject *args, PyObject *k #define wxDC_GetCharHeight(_swigobj) (_swigobj->GetCharHeight()) static PyObject *_wrap_wxDC_GetCharHeight(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -6285,18 +6397,18 @@ static PyObject *_wrap_wxDC_GetCharHeight(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_GetCharHeight(_arg0); + _result = (wxCoord )wxDC_GetCharHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxDC_GetCharWidth(_swigobj) (_swigobj->GetCharWidth()) static PyObject *_wrap_wxDC_GetCharWidth(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -6313,11 +6425,11 @@ static PyObject *_wrap_wxDC_GetCharWidth(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_GetCharWidth(_arg0); + _result = (wxCoord )wxDC_GetCharWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -6325,14 +6437,14 @@ static PyObject *_wrap_wxDC_GetCharWidth(PyObject *self, PyObject *args, PyObjec static PyObject *_wrap_wxDC_GetClippingBox(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long * _arg1; - long temp; - long * _arg2; - long temp0; - long * _arg3; - long temp1; - long * _arg4; - long temp2; + wxCoord * _arg1; + int temp; + wxCoord * _arg2; + int temp0; + wxCoord * _arg3; + int temp1; + wxCoord * _arg4; + int temp2; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -6581,7 +6693,7 @@ static PyObject *_wrap_wxDC_GetPen(PyObject *self, PyObject *args, PyObject *kwa return _resultobj; } -static wxColour * wxDC_GetPixel(wxDC *self,long x,long y) { +static wxColour * wxDC_GetPixel(wxDC *self,wxCoord x,wxCoord y) { wxColour* wc = new wxColour(); self->GetPixel(x, y, wc); return wc; @@ -6590,14 +6702,14 @@ static PyObject *_wrap_wxDC_GetPixel(PyObject *self, PyObject *args, PyObject *k PyObject * _resultobj; wxColour * _result; wxDC * _arg0; - long _arg1; - long _arg2; + wxCoord _arg1; + wxCoord _arg2; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxDC_GetPixel",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxDC_GetPixel",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -6765,10 +6877,10 @@ static PyObject *_wrap_wxDC_GetTextExtent(PyObject *self, PyObject *args, PyObje PyObject * _resultobj; wxDC * _arg0; wxString * _arg1; - long * _arg2; - long temp; - long * _arg3; - long temp0; + wxCoord * _arg2; + int temp; + wxCoord * _arg3; + int temp0; PyObject * _argo0 = 0; PyObject * _obj1 = 0; char *_kwnames[] = { "self","string", NULL }; @@ -6824,14 +6936,14 @@ static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args, Py PyObject * _resultobj; wxDC * _arg0; wxString * _arg1; - long * _arg2; - long temp; - long * _arg3; - long temp0; - long * _arg4; - long temp1; - long * _arg5; - long temp2; + wxCoord * _arg2; + int temp; + wxCoord * _arg3; + int temp0; + wxCoord * _arg4; + int temp1; + wxCoord * _arg5; + int temp2; wxFont * _arg6 = (wxFont *) NULL; PyObject * _argo0 = 0; PyObject * _obj1 = 0; @@ -6907,65 +7019,143 @@ static PyObject *_wrap_wxDC_GetFullTextExtent(PyObject *self, PyObject *args, Py return _resultobj; } -#define wxDC_GetTextForeground(_swigobj) (_swigobj->GetTextForeground()) -static PyObject *_wrap_wxDC_GetTextForeground(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDC_GetMultiLineTextExtent(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->GetMultiLineTextExtent(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +static PyObject *_wrap_wxDC_GetMultiLineTextExtent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxColour * _result; wxDC * _arg0; + wxString * _arg1; + wxCoord * _arg2; + int temp; + wxCoord * _arg3; + int temp0; + wxCoord * _arg4; + int temp1; + wxFont * _arg5 = (wxFont *) NULL; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; + PyObject * _obj1 = 0; + PyObject * _argo5 = 0; + char *_kwnames[] = { "self","text","font", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDC_GetTextForeground",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetTextForeground. Expected _wxDC_p."); - return NULL; - } - } { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxColour (wxDC_GetTextForeground(_arg0)); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; + _arg2 = &temp; } - -#define wxDC_GetUserScale(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetUserScale(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxDC_GetUserScale(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxDC * _arg0; - double * _arg1; - double temp; - double * _arg2; - double temp0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; { - _arg1 = &temp; + _arg3 = &temp0; } { - _arg2 = &temp0; + _arg4 = &temp1; } - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDC_GetUserScale",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxDC_GetMultiLineTextExtent",_kwnames,&_argo0,&_obj1,&_argo5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetUserScale. Expected _wxDC_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetMultiLineTextExtent. Expected _wxDC_p."); return NULL; } } { - PyThreadState* __tstate = wxPyBeginAllowThreads(); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} + if (_argo5) { + if (_argo5 == Py_None) { _arg5 = NULL; } + else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxFont_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxDC_GetMultiLineTextExtent. Expected _wxFont_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxDC_GetMultiLineTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg3)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg4)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxDC_GetTextForeground(_swigobj) (_swigobj->GetTextForeground()) +static PyObject *_wrap_wxDC_GetTextForeground(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxDC * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDC_GetTextForeground",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetTextForeground. Expected _wxDC_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxDC_GetTextForeground(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxDC_GetUserScale(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetUserScale(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxDC_GetUserScale(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDC * _arg0; + double * _arg1; + double temp; + double * _arg2; + double temp0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDC_GetUserScale",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetUserScale. Expected _wxDC_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); wxDC_GetUserScale(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); @@ -6988,14 +7178,14 @@ static PyObject *_wrap_wxDC_GetUserScale(PyObject *self, PyObject *args, PyObjec #define wxDC_LogicalToDeviceX(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceX(_swigarg0)) static PyObject *_wrap_wxDC_LogicalToDeviceX(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; - long _arg1; + wxCoord _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDC_LogicalToDeviceX",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDC_LogicalToDeviceX",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -7006,25 +7196,25 @@ static PyObject *_wrap_wxDC_LogicalToDeviceX(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceX(_arg0,_arg1); + _result = (wxCoord )wxDC_LogicalToDeviceX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxDC_LogicalToDeviceXRel(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceXRel(_swigarg0)) static PyObject *_wrap_wxDC_LogicalToDeviceXRel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; - long _arg1; + wxCoord _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDC_LogicalToDeviceXRel",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDC_LogicalToDeviceXRel",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -7035,25 +7225,25 @@ static PyObject *_wrap_wxDC_LogicalToDeviceXRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceXRel(_arg0,_arg1); + _result = (wxCoord )wxDC_LogicalToDeviceXRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxDC_LogicalToDeviceY(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceY(_swigarg0)) static PyObject *_wrap_wxDC_LogicalToDeviceY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; - long _arg1; + wxCoord _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDC_LogicalToDeviceY",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDC_LogicalToDeviceY",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -7064,25 +7254,25 @@ static PyObject *_wrap_wxDC_LogicalToDeviceY(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceY(_arg0,_arg1); + _result = (wxCoord )wxDC_LogicalToDeviceY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxDC_LogicalToDeviceYRel(_swigobj,_swigarg0) (_swigobj->LogicalToDeviceYRel(_swigarg0)) static PyObject *_wrap_wxDC_LogicalToDeviceYRel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; - long _arg1; + wxCoord _arg1; PyObject * _argo0 = 0; char *_kwnames[] = { "self","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDC_LogicalToDeviceYRel",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDC_LogicalToDeviceYRel",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -7093,18 +7283,18 @@ static PyObject *_wrap_wxDC_LogicalToDeviceYRel(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_LogicalToDeviceYRel(_arg0,_arg1); + _result = (wxCoord )wxDC_LogicalToDeviceYRel(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxDC_MaxX(_swigobj) (_swigobj->MaxX()) static PyObject *_wrap_wxDC_MaxX(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -7121,18 +7311,18 @@ static PyObject *_wrap_wxDC_MaxX(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MaxX(_arg0); + _result = (wxCoord )wxDC_MaxX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxDC_MaxY(_swigobj) (_swigobj->MaxY()) static PyObject *_wrap_wxDC_MaxY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -7149,18 +7339,18 @@ static PyObject *_wrap_wxDC_MaxY(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MaxY(_arg0); + _result = (wxCoord )wxDC_MaxY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxDC_MinX(_swigobj) (_swigobj->MinX()) static PyObject *_wrap_wxDC_MinX(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -7177,18 +7367,18 @@ static PyObject *_wrap_wxDC_MinX(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MinX(_arg0); + _result = (wxCoord )wxDC_MinX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxDC_MinY(_swigobj) (_swigobj->MinY()) static PyObject *_wrap_wxDC_MinY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxDC * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -7205,11 +7395,11 @@ static PyObject *_wrap_wxDC_MinY(PyObject *self, PyObject *args, PyObject *kwarg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxDC_MinY(_arg0); + _result = (wxCoord )wxDC_MinY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -7245,13 +7435,13 @@ static PyObject *_wrap_wxDC_Ok(PyObject *self, PyObject *args, PyObject *kwargs) static PyObject *_wrap_wxDC_SetDeviceOrigin(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long _arg1; - long _arg2; + wxCoord _arg1; + wxCoord _arg2; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxDC_SetDeviceOrigin",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxDC_SetDeviceOrigin",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -7291,8 +7481,7 @@ static PyObject *_wrap_wxDC_SetBackground(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetBackground. Expected _wxBrush_p."); return NULL; } @@ -7341,15 +7530,15 @@ static PyObject *_wrap_wxDC_SetBackgroundMode(PyObject *self, PyObject *args, Py static PyObject *_wrap_wxDC_SetClippingRegion(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDC * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y","width","height", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxDC_SetClippingRegion",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxDC_SetClippingRegion",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -7389,8 +7578,7 @@ static PyObject *_wrap_wxDC_SetClippingRegionAsRegion(PyObject *self, PyObject * } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetClippingRegionAsRegion. Expected _wxRegion_p."); return NULL; } @@ -7462,8 +7650,7 @@ static PyObject *_wrap_wxDC_SetPalette(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPalette_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetPalette. Expected _wxPalette_p."); return NULL; } @@ -7499,8 +7686,7 @@ static PyObject *_wrap_wxDC_SetBrush(PyObject *self, PyObject *args, PyObject *k } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBrush_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetBrush. Expected _wxBrush_p."); return NULL; } @@ -7536,8 +7722,7 @@ static PyObject *_wrap_wxDC_SetFont(PyObject *self, PyObject *args, PyObject *kw } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetFont. Expected _wxFont_p."); return NULL; } @@ -7692,8 +7877,7 @@ static PyObject *_wrap_wxDC_SetPen(PyObject *self, PyObject *args, PyObject *kwa } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPen_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_SetPen. Expected _wxPen_p."); return NULL; } @@ -7883,15 +8067,15 @@ static PyObject *_wrap_wxDC_DrawBitmap(PyObject *self, PyObject *args, PyObject PyObject * _resultobj; wxDC * _arg0; wxBitmap * _arg1; - long _arg2; - long _arg3; + wxCoord _arg2; + wxCoord _arg3; int _arg4 = (int ) FALSE; PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","bitmap","x","y","useMask", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOll|i:wxDC_DrawBitmap",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii|i:wxDC_DrawBitmap",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -7901,8 +8085,7 @@ static PyObject *_wrap_wxDC_DrawBitmap(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDC_DrawBitmap. Expected _wxBitmap_p."); return NULL; } @@ -8345,110 +8528,123 @@ static PyObject *_wrap_wxDC_GetHDC(PyObject *self, PyObject *args, PyObject *kwa return _resultobj; } -static PyObject * wxDC__DrawPointList(wxDC *self,PyObject * pyPoints,PyObject * pyPens) { - wxPyBeginBlockThreads(); - - bool isFastSeq = PyList_Check(pyPoints) || PyTuple_Check(pyPoints); - bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens); - int numObjs = 0; - int numPens = 0; - wxPen* pen; - PyObject* obj; - int x1, y1; - int i = 0; - PyObject* retval; - - if (!PySequence_Check(pyPoints)) { - goto err0; - } - if (!PySequence_Check(pyPens)) { - goto err1; - } - numObjs = PySequence_Length(pyPoints); - numPens = PySequence_Length(pyPens); - - for (i = 0; i < numObjs; i++) { - // Use a new pen? - if (i < numPens) { - if (isFastPens) { - obj = PySequence_Fast_GET_ITEM(pyPens, i); - } - else { - obj = PySequence_GetItem(pyPens, i); - } - if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) { - if (!isFastPens) - Py_DECREF(obj); - goto err1; - } - - self->SetPen(*pen); - if (!isFastPens) - Py_DECREF(obj); - } - - // Get the point coordinants - if (isFastSeq) { - obj = PySequence_Fast_GET_ITEM(pyPoints, i); - } - else { - obj = PySequence_GetItem(pyPoints, i); - } - if (! _2int_seq_helper(obj, &x1, &y1)) { - if (!isFastPens) - Py_DECREF(obj); - goto err0; - } - if (PyErr_Occurred()) { - retval = NULL; - if (!isFastPens) - Py_DECREF(obj); - goto exit; - } +static PyObject * wxDC__DrawPointList(wxDC *self,PyObject * pyCoords,PyObject * pyPens,PyObject * pyBrushes) { + return wxPyDrawXXXList(*self, wxPyDrawXXXPoint, pyCoords, pyPens, pyBrushes); + } +static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxDC * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","pyCoords","pyPens","pyBrushes", NULL }; + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDC__DrawPointList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawPointList. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + _arg3 = _obj3; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxDC__DrawPointList(_arg0,_arg1,_arg2,_arg3); - // Now draw the point - self->DrawPoint(x1, y1); + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = _result; +} + return _resultobj; +} - if (!isFastSeq) - Py_DECREF(obj); - } +static PyObject * wxDC__DrawLineList(wxDC *self,PyObject * pyCoords,PyObject * pyPens,PyObject * pyBrushes) { + return wxPyDrawXXXList(*self, wxPyDrawXXXLine, pyCoords, pyPens, pyBrushes); + } +static PyObject *_wrap_wxDC__DrawLineList(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxDC * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","pyCoords","pyPens","pyBrushes", NULL }; - Py_INCREF(Py_None); - retval = Py_None; - goto exit; + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDC__DrawLineList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawLineList. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + _arg3 = _obj3; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxDC__DrawLineList(_arg0,_arg1,_arg2,_arg3); - err1: - PyErr_SetString(PyExc_TypeError, "Expected a sequence of wxPens"); - retval = NULL; - goto exit; - err0: - PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y) sequences."); - retval = NULL; - goto exit; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = _result; +} + return _resultobj; +} - exit: - wxPyEndBlockThreads(); - return retval; +static PyObject * wxDC__DrawRectangleList(wxDC *self,PyObject * pyCoords,PyObject * pyPens,PyObject * pyBrushes) { + return wxPyDrawXXXList(*self, wxPyDrawXXXRectangle, pyCoords, pyPens, pyBrushes); } -static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxDC__DrawRectangleList(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; PyObject * _result; wxDC * _arg0; PyObject * _arg1; PyObject * _arg2; + PyObject * _arg3; PyObject * _argo0 = 0; PyObject * _obj1 = 0; PyObject * _obj2 = 0; - char *_kwnames[] = { "self","pyPoints","pyPens", NULL }; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","pyCoords","pyPens","pyBrushes", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDC__DrawPointList",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDC__DrawRectangleList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawPointList. Expected _wxDC_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawRectangleList. Expected _wxDC_p."); return NULL; } } @@ -8458,9 +8654,12 @@ static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObj { _arg2 = _obj2; } +{ + _arg3 = _obj3; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxDC__DrawPointList(_arg0,_arg1,_arg2); + _result = (PyObject *)wxDC__DrawRectangleList(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8470,110 +8669,125 @@ static PyObject *_wrap_wxDC__DrawPointList(PyObject *self, PyObject *args, PyObj return _resultobj; } -static PyObject * wxDC__DrawLineList(wxDC *self,PyObject * pyLines,PyObject * pyPens) { - wxPyBeginBlockThreads(); - - bool isFastSeq = PyList_Check(pyLines) || PyTuple_Check(pyLines); - bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens); - int numObjs = 0; - int numPens = 0; - wxPen* pen; - PyObject* obj; - int x1, y1, x2, y2; - int i = 0; - PyObject* retval; - - if (!PySequence_Check(pyLines)) { - goto err0; - } - if (!PySequence_Check(pyPens)) { - goto err1; - } - numObjs = PySequence_Length(pyLines); - numPens = PySequence_Length(pyPens); - - for (i = 0; i < numObjs; i++) { - // Use a new pen? - if (i < numPens) { - if (isFastPens) { - obj = PySequence_Fast_GET_ITEM(pyPens, i); - } - else { - obj = PySequence_GetItem(pyPens, i); - } - if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) { - if (!isFastPens) - Py_DECREF(obj); - goto err1; - } - - self->SetPen(*pen); - if (!isFastPens) - Py_DECREF(obj); - } - - // Get the line coordinants - if (isFastSeq) { - obj = PySequence_Fast_GET_ITEM(pyLines, i); - } - else { - obj = PySequence_GetItem(pyLines, i); - } - if (! _4int_seq_helper(obj, &x1, &y1, &x2, &y2)) { - if (!isFastPens) - Py_DECREF(obj); - goto err0; - } - if (PyErr_Occurred()) { - retval = NULL; - if (!isFastPens) - Py_DECREF(obj); - goto exit; - } +static PyObject * wxDC__DrawEllipseList(wxDC *self,PyObject * pyCoords,PyObject * pyPens,PyObject * pyBrushes) { + return wxPyDrawXXXList(*self, wxPyDrawXXXEllipse, pyCoords, pyPens, pyBrushes); + } +static PyObject *_wrap_wxDC__DrawEllipseList(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxDC * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","pyCoords","pyPens","pyBrushes", NULL }; - // Now draw the line - self->DrawLine(x1, y1, x2, y2); + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDC__DrawEllipseList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawEllipseList. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + _arg3 = _obj3; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxDC__DrawEllipseList(_arg0,_arg1,_arg2,_arg3); - if (!isFastSeq) - Py_DECREF(obj); - } + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = _result; +} + return _resultobj; +} - Py_INCREF(Py_None); - retval = Py_None; - goto exit; +static PyObject * wxDC__DrawPolygonList(wxDC *self,PyObject * pyCoords,PyObject * pyPens,PyObject * pyBrushes) { + return wxPyDrawXXXList(*self, wxPyDrawXXXPolygon, pyCoords, pyPens, pyBrushes); + } +static PyObject *_wrap_wxDC__DrawPolygonList(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxDC * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _arg3; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; + char *_kwnames[] = { "self","pyCoords","pyPens","pyBrushes", NULL }; - err1: - PyErr_SetString(PyExc_TypeError, "Expected a sequence of wxPens"); - retval = NULL; - goto exit; + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDC__DrawPolygonList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawPolygonList. Expected _wxDC_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + _arg3 = _obj3; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxDC__DrawPolygonList(_arg0,_arg1,_arg2,_arg3); - err0: - PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x1,y1, x2,y2) sequences."); - retval = NULL; - goto exit; + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = _result; +} + return _resultobj; +} - exit: - wxPyEndBlockThreads(); - return retval; +static PyObject * wxDC__DrawTextList(wxDC *self,PyObject * textList,PyObject * pyPoints,PyObject * foregroundList,PyObject * backgroundList) { + return wxPyDrawTextList(*self, textList, pyPoints, foregroundList, backgroundList); } -static PyObject *_wrap_wxDC__DrawLineList(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxDC__DrawTextList(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; PyObject * _result; wxDC * _arg0; PyObject * _arg1; PyObject * _arg2; + PyObject * _arg3; + PyObject * _arg4; PyObject * _argo0 = 0; PyObject * _obj1 = 0; PyObject * _obj2 = 0; - char *_kwnames[] = { "self","pyLines","pyPens", NULL }; + PyObject * _obj3 = 0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "self","textList","pyPoints","foregroundList","backgroundList", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDC__DrawLineList",_kwnames,&_argo0,&_obj1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOOO:wxDC__DrawTextList",_kwnames,&_argo0,&_obj1,&_obj2,&_obj3,&_obj4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDC_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawLineList. Expected _wxDC_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC__DrawTextList. Expected _wxDC_p."); return NULL; } } @@ -8583,9 +8797,15 @@ static PyObject *_wrap_wxDC__DrawLineList(PyObject *self, PyObject *args, PyObje { _arg2 = _obj2; } +{ + _arg3 = _obj3; +} +{ + _arg4 = _obj4; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxDC__DrawLineList(_arg0,_arg1,_arg2); + _result = (PyObject *)wxDC__DrawTextList(_arg0,_arg1,_arg2,_arg3,_arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8657,8 +8877,7 @@ static PyObject *_wrap_wxMemoryDC_SelectObject(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMemoryDC_SelectObject. Expected _wxBitmap_p."); return NULL; } @@ -8720,8 +8939,7 @@ static PyObject *_wrap_new_wxBufferedDC(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxBufferedDC. Expected _wxBitmap_p."); return NULL; } @@ -8867,8 +9085,7 @@ static PyObject *_wrap_new_wxBufferedPaintDC(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxBufferedPaintDC. Expected _wxBitmap_p."); return NULL; } @@ -9431,7 +9648,7 @@ static PyObject *_wrap_wxMetaFile_GetFileName(PyObject *self, PyObject *args, Py 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 @@ -9862,15 +10079,13 @@ static PyObject *_wrap_wxImageList_Add(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImageList_Add. Expected _wxBitmap_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxImageList_Add. Expected _wxBitmap_p."); return NULL; } @@ -9909,8 +10124,7 @@ static PyObject *_wrap_wxImageList_AddWithColourMask(PyObject *self, PyObject *a } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImageList_AddWithColourMask. Expected _wxBitmap_p."); return NULL; } @@ -9951,8 +10165,7 @@ static PyObject *_wrap_wxImageList_AddIcon(PyObject *self, PyObject *args, PyObj } } 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 wxImageList_AddIcon. Expected _wxIcon_p."); return NULL; } @@ -9991,15 +10204,13 @@ static PyObject *_wrap_wxImageList_Replace(PyObject *self, PyObject *args, PyObj } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxImageList_Replace. Expected _wxBitmap_p."); return NULL; } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxImageList_Replace. Expected _wxBitmap_p."); return NULL; } @@ -10041,8 +10252,7 @@ static PyObject *_wrap_wxImageList_Draw(PyObject *self, PyObject *args, PyObject } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxImageList_Draw. Expected _wxDC_p."); return NULL; } @@ -10212,15 +10422,15 @@ static void *SwigwxRegionTowxObject(void *ptr) { static PyObject *_wrap_new_wxRegion(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxRegion * _result; - long _arg0 = (long ) 0; - long _arg1 = (long ) 0; - long _arg2 = (long ) 0; - long _arg3 = (long ) 0; + wxCoord _arg0 = (wxCoord ) 0; + wxCoord _arg1 = (wxCoord ) 0; + wxCoord _arg2 = (wxCoord ) 0; + wxCoord _arg3 = (wxCoord ) 0; char *_kwnames[] = { "x","y","width","height", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|llll:new_wxRegion",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|iiii:new_wxRegion",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); @@ -10373,13 +10583,13 @@ static PyObject *_wrap_wxRegion_Contains(PyObject *self, PyObject *args, PyObjec PyObject * _resultobj; wxRegionContain _result; wxRegion * _arg0; - long _arg1; - long _arg2; + wxCoord _arg1; + wxCoord _arg2; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxRegion_Contains",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxRegion_Contains",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10475,15 +10685,15 @@ static PyObject *_wrap_wxRegion_ContainsRectDim(PyObject *self, PyObject *args, PyObject * _resultobj; wxRegionContain _result; wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y","w","h", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_ContainsRectDim",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxRegion_ContainsRectDim",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10537,15 +10747,15 @@ static PyObject *_wrap_wxRegion_Intersect(PyObject *self, PyObject *args, PyObje PyObject * _resultobj; bool _result; wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y","width","height", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Intersect",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxRegion_Intersect",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10621,8 +10831,7 @@ static PyObject *_wrap_wxRegion_IntersectRegion(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_IntersectRegion. Expected _wxRegion_p."); return NULL; } @@ -10670,15 +10879,15 @@ static PyObject *_wrap_wxRegion_Union(PyObject *self, PyObject *args, PyObject * PyObject * _resultobj; bool _result; wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y","width","height", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Union",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxRegion_Union",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10754,8 +10963,7 @@ static PyObject *_wrap_wxRegion_UnionRegion(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_UnionRegion. Expected _wxRegion_p."); return NULL; } @@ -10775,15 +10983,15 @@ static PyObject *_wrap_wxRegion_Subtract(PyObject *self, PyObject *args, PyObjec PyObject * _resultobj; bool _result; wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y","width","height", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Subtract",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxRegion_Subtract",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10859,8 +11067,7 @@ static PyObject *_wrap_wxRegion_SubtractRegion(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_SubtractRegion. Expected _wxRegion_p."); return NULL; } @@ -10880,15 +11087,15 @@ static PyObject *_wrap_wxRegion_Xor(PyObject *self, PyObject *args, PyObject *kw PyObject * _resultobj; bool _result; wxRegion * _arg0; - long _arg1; - long _arg2; - long _arg3; - long _arg4; + wxCoord _arg1; + wxCoord _arg2; + wxCoord _arg3; + wxCoord _arg4; PyObject * _argo0 = 0; char *_kwnames[] = { "self","x","y","width","height", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ollll:wxRegion_Xor",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxRegion_Xor",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -10964,8 +11171,7 @@ static PyObject *_wrap_wxRegion_XorRegion(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxRegion_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxRegion_XorRegion. Expected _wxRegion_p."); return NULL; } @@ -11001,8 +11207,7 @@ static PyObject *_wrap_new_wxRegionIterator(PyObject *self, PyObject *args, PyOb if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxRegionIterator",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxRegion_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxRegionIterator. Expected _wxRegion_p."); return NULL; } @@ -11054,7 +11259,7 @@ static PyObject *_wrap_delete_wxRegionIterator(PyObject *self, PyObject *args, P #define wxRegionIterator_GetX(_swigobj) (_swigobj->GetX()) static PyObject *_wrap_wxRegionIterator_GetX(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxRegionIterator * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -11071,18 +11276,18 @@ static PyObject *_wrap_wxRegionIterator_GetX(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetX(_arg0); + _result = (wxCoord )wxRegionIterator_GetX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxRegionIterator_GetY(_swigobj) (_swigobj->GetY()) static PyObject *_wrap_wxRegionIterator_GetY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxRegionIterator * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -11099,18 +11304,18 @@ static PyObject *_wrap_wxRegionIterator_GetY(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetY(_arg0); + _result = (wxCoord )wxRegionIterator_GetY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxRegionIterator_GetW(_swigobj) (_swigobj->GetW()) static PyObject *_wrap_wxRegionIterator_GetW(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxRegionIterator * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -11127,18 +11332,18 @@ static PyObject *_wrap_wxRegionIterator_GetW(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetW(_arg0); + _result = (wxCoord )wxRegionIterator_GetW(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxRegionIterator_GetWidth(_swigobj) (_swigobj->GetWidth()) static PyObject *_wrap_wxRegionIterator_GetWidth(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxRegionIterator * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -11155,18 +11360,18 @@ static PyObject *_wrap_wxRegionIterator_GetWidth(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetWidth(_arg0); + _result = (wxCoord )wxRegionIterator_GetWidth(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxRegionIterator_GetH(_swigobj) (_swigobj->GetH()) static PyObject *_wrap_wxRegionIterator_GetH(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxRegionIterator * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -11183,18 +11388,18 @@ static PyObject *_wrap_wxRegionIterator_GetH(PyObject *self, PyObject *args, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetH(_arg0); + _result = (wxCoord )wxRegionIterator_GetH(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } #define wxRegionIterator_GetHeight(_swigobj) (_swigobj->GetHeight()) static PyObject *_wrap_wxRegionIterator_GetHeight(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - long _result; + wxCoord _result; wxRegionIterator * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; @@ -11211,11 +11416,11 @@ static PyObject *_wrap_wxRegionIterator_GetHeight(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxRegionIterator_GetHeight(_arg0); + _result = (wxCoord )wxRegionIterator_GetHeight(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -11410,6 +11615,10 @@ static PyMethodDef gdicMethods[] = { { "new_wxBufferedDC", (PyCFunction) _wrap_new_wxBufferedDC, METH_VARARGS | METH_KEYWORDS }, { "wxMemoryDC_SelectObject", (PyCFunction) _wrap_wxMemoryDC_SelectObject, METH_VARARGS | METH_KEYWORDS }, { "new_wxMemoryDC", (PyCFunction) _wrap_new_wxMemoryDC, METH_VARARGS | METH_KEYWORDS }, + { "wxDC__DrawTextList", (PyCFunction) _wrap_wxDC__DrawTextList, METH_VARARGS | METH_KEYWORDS }, + { "wxDC__DrawPolygonList", (PyCFunction) _wrap_wxDC__DrawPolygonList, METH_VARARGS | METH_KEYWORDS }, + { "wxDC__DrawEllipseList", (PyCFunction) _wrap_wxDC__DrawEllipseList, METH_VARARGS | METH_KEYWORDS }, + { "wxDC__DrawRectangleList", (PyCFunction) _wrap_wxDC__DrawRectangleList, METH_VARARGS | METH_KEYWORDS }, { "wxDC__DrawLineList", (PyCFunction) _wrap_wxDC__DrawLineList, METH_VARARGS | METH_KEYWORDS }, { "wxDC__DrawPointList", (PyCFunction) _wrap_wxDC__DrawPointList, METH_VARARGS | METH_KEYWORDS }, { "wxDC_GetHDC", (PyCFunction) _wrap_wxDC_GetHDC, METH_VARARGS | METH_KEYWORDS }, @@ -11455,6 +11664,7 @@ static PyMethodDef gdicMethods[] = { { "wxDC_LogicalToDeviceX", (PyCFunction) _wrap_wxDC_LogicalToDeviceX, METH_VARARGS | METH_KEYWORDS }, { "wxDC_GetUserScale", (PyCFunction) _wrap_wxDC_GetUserScale, METH_VARARGS | METH_KEYWORDS }, { "wxDC_GetTextForeground", (PyCFunction) _wrap_wxDC_GetTextForeground, METH_VARARGS | METH_KEYWORDS }, + { "wxDC_GetMultiLineTextExtent", (PyCFunction) _wrap_wxDC_GetMultiLineTextExtent, METH_VARARGS | METH_KEYWORDS }, { "wxDC_GetFullTextExtent", (PyCFunction) _wrap_wxDC_GetFullTextExtent, METH_VARARGS | METH_KEYWORDS }, { "wxDC_GetTextExtent", (PyCFunction) _wrap_wxDC_GetTextExtent, METH_VARARGS | METH_KEYWORDS }, { "wxDC_GetTextBackground", (PyCFunction) _wrap_wxDC_GetTextBackground, METH_VARARGS | METH_KEYWORDS }, @@ -11544,6 +11754,8 @@ static PyMethodDef gdicMethods[] = { { "wxColourDatabase_Append", (PyCFunction) _wrap_wxColourDatabase_Append, METH_VARARGS | METH_KEYWORDS }, { "wxColourDatabase_FindName", (PyCFunction) _wrap_wxColourDatabase_FindName, METH_VARARGS | METH_KEYWORDS }, { "wxColourDatabase_FindColour", (PyCFunction) _wrap_wxColourDatabase_FindColour, METH_VARARGS | METH_KEYWORDS }, + { "wxColour___ne__", (PyCFunction) _wrap_wxColour___ne__, METH_VARARGS | METH_KEYWORDS }, + { "wxColour___eq__", (PyCFunction) _wrap_wxColour___eq__, METH_VARARGS | METH_KEYWORDS }, { "wxColour_Get", (PyCFunction) _wrap_wxColour_Get, METH_VARARGS | METH_KEYWORDS }, { "wxColour_Set", (PyCFunction) _wrap_wxColour_Set, METH_VARARGS | METH_KEYWORDS }, { "wxColour_Ok", (PyCFunction) _wrap_wxColour_Ok, METH_VARARGS | METH_KEYWORDS }, @@ -11617,6 +11829,7 @@ static PyMethodDef gdicMethods[] = { { "new_wxGDIObject", (PyCFunction) _wrap_new_wxGDIObject, METH_VARARGS | METH_KEYWORDS }, { "wxMemoryDCFromDC", (PyCFunction) _wrap_wxMemoryDCFromDC, METH_VARARGS | METH_KEYWORDS }, { "wxNamedColour", (PyCFunction) _wrap_wxNamedColour, METH_VARARGS | METH_KEYWORDS }, + { "wxCursorFromImage", (PyCFunction) _wrap_wxCursorFromImage, METH_VARARGS | METH_KEYWORDS }, { "wxStockCursor", (PyCFunction) _wrap_wxStockCursor, METH_VARARGS | METH_KEYWORDS }, { "wxIconFromBitmap", (PyCFunction) _wrap_wxIconFromBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxIconFromXPMData", (PyCFunction) _wrap_wxIconFromXPMData, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/gdi.py b/wxPython/src/msw/gdi.py index 39610df421..c8ef3bc3be 100644 --- a/wxPython/src/msw/gdi.py +++ b/wxPython/src/msw/gdi.py @@ -4,13 +4,17 @@ import gdic from misc import * from fonts import * +import wx class wxGDIObjectPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxGDIObject(self) + def __del__(self, delfunc=gdic.delete_wxGDIObject): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetVisible(self, *_args, **_kwargs): val = apply(gdic.wxGDIObject_GetVisible,(self,) + _args, _kwargs) return val @@ -34,9 +38,12 @@ class wxBitmapPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxBitmap(self) + def __del__(self, delfunc=gdic.delete_wxBitmap): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetPalette(self, *_args, **_kwargs): val = apply(gdic.wxBitmap_GetPalette,(self,) + _args, _kwargs) if val: val = wxPalettePtr(val) @@ -106,13 +113,10 @@ class wxBitmapPtr(wxGDIObjectPtr): def __repr__(self): return "" % (self.this,) - def __del__(self,gdic=gdic): - try: - if self.thisown == 1 : - gdic.delete_wxBitmap(self) - except: - pass - + def SetMaskColour(self, colour): + mask = wxMaskColour(self, colour) + self.SetMask(mask) + class wxBitmap(wxBitmapPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gdic.new_wxBitmap,_args,_kwargs) @@ -142,9 +146,12 @@ class wxIconPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxIcon(self) + def __del__(self, delfunc=gdic.delete_wxIcon): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def LoadFile(self, *_args, **_kwargs): val = apply(gdic.wxIcon_LoadFile,(self,) + _args, _kwargs) return val @@ -183,14 +190,6 @@ class wxIconPtr(wxGDIObjectPtr): return val def __repr__(self): return "" % (self.this,) - - def __del__(self,gdic=gdic): - try: - if self.thisown == 1 : - gdic.delete_wxIcon(self) - except: - pass - class wxIcon(wxIconPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gdic.new_wxIcon,_args,_kwargs) @@ -203,9 +202,12 @@ class wxIconBundlePtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxIconBundle(self) + def __del__(self, delfunc=gdic.delete_wxIconBundle): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def AddIcon(self, *_args, **_kwargs): val = apply(gdic.wxIconBundle_AddIcon,(self,) + _args, _kwargs) return val @@ -240,9 +242,12 @@ class wxCursorPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxCursor(self) + def __del__(self, delfunc=gdic.delete_wxCursor): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetHandle(self, *_args, **_kwargs): val = apply(gdic.wxCursor_GetHandle,(self,) + _args, _kwargs) return val @@ -287,9 +292,12 @@ class wxColourPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxColour(self) + def __del__(self, delfunc=gdic.delete_wxColour): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Red(self, *_args, **_kwargs): val = apply(gdic.wxColour_Red,(self,) + _args, _kwargs) return val @@ -308,11 +316,22 @@ class wxColourPtr(wxObjectPtr): def Get(self, *_args, **_kwargs): val = apply(gdic.wxColour_Get,(self,) + _args, _kwargs) return val + def __eq__(self, *_args, **_kwargs): + val = apply(gdic.wxColour___eq__,(self,) + _args, _kwargs) + return val + def __ne__(self, *_args, **_kwargs): + val = apply(gdic.wxColour___ne__,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) asTuple = Get - def __str__(self): return str(self.asTuple()) - def __repr__(self): return str(self.asTuple()) + def __str__(self): return str(self.asTuple()) + def __repr__(self): return 'wxColour:' + str(self.asTuple()) + def __nonzero__(self): return self.Ok() + def __getinitargs__(self): return () + def __getstate__(self): return self.asTuple() + def __setstate__(self, state): self.Set(*state) + class wxColour(wxColourPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gdic.new_wxColour,_args,_kwargs) @@ -348,9 +367,12 @@ class wxPenPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxPen(self) + def __del__(self, delfunc=gdic.delete_wxPen): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetCap(self, *_args, **_kwargs): val = apply(gdic.wxPen_GetCap,(self,) + _args, _kwargs) return val @@ -412,9 +434,12 @@ class wxPyPenPtr(wxPenPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxPyPen(self) + def __del__(self, delfunc=gdic.delete_wxPyPen): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetDashes(self, *_args, **_kwargs): val = apply(gdic.wxPyPen_SetDashes,(self,) + _args, _kwargs) return val @@ -458,9 +483,12 @@ class wxBrushPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxBrush(self) + def __del__(self, delfunc=gdic.delete_wxBrush): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetColour(self, *_args, **_kwargs): val = apply(gdic.wxBrush_GetColour,(self,) + _args, _kwargs) if val: val = wxColourPtr(val) ; val.thisown = 1 @@ -524,9 +552,12 @@ class wxDCPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxDC(self) + def __del__(self, delfunc=gdic.delete_wxDC): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def BeginDrawing(self, *_args, **_kwargs): val = apply(gdic.wxDC_BeginDrawing,(self,) + _args, _kwargs) return val @@ -680,6 +711,9 @@ class wxDCPtr(wxObjectPtr): def GetFullTextExtent(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetFullTextExtent,(self,) + _args, _kwargs) return val + def GetMultiLineTextExtent(self, *_args, **_kwargs): + val = apply(gdic.wxDC_GetMultiLineTextExtent,(self,) + _args, _kwargs) + return val def GetTextForeground(self, *_args, **_kwargs): val = apply(gdic.wxDC_GetTextForeground,(self,) + _args, _kwargs) if val: val = wxColourPtr(val) ; val.thisown = 1 @@ -817,6 +851,18 @@ class wxDCPtr(wxObjectPtr): def _DrawLineList(self, *_args, **_kwargs): val = apply(gdic.wxDC__DrawLineList,(self,) + _args, _kwargs) return val + def _DrawRectangleList(self, *_args, **_kwargs): + val = apply(gdic.wxDC__DrawRectangleList,(self,) + _args, _kwargs) + return val + def _DrawEllipseList(self, *_args, **_kwargs): + val = apply(gdic.wxDC__DrawEllipseList,(self,) + _args, _kwargs) + return val + def _DrawPolygonList(self, *_args, **_kwargs): + val = apply(gdic.wxDC__DrawPolygonList,(self,) + _args, _kwargs) + return val + def _DrawTextList(self, *_args, **_kwargs): + val = apply(gdic.wxDC__DrawTextList,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) @@ -827,7 +873,8 @@ class wxDCPtr(wxObjectPtr): pens = [pens] elif len(pens) != len(points): raise ValueError('points and pens must have same length') - return self._DrawPointList(points, pens) + return self._DrawPointList(points, pens, []) + def DrawLineList(self, lines, pens=None): if pens is None: @@ -836,7 +883,83 @@ class wxDCPtr(wxObjectPtr): pens = [pens] elif len(pens) != len(lines): raise ValueError('lines and pens must have same length') - return self._DrawLineList(lines, pens) + return self._DrawLineList(lines, pens, []) + + + def DrawRectangleList(self, rectangles, pens=None, brushes=None): + if pens is None: + pens = [] + elif isinstance(pens, wxPenPtr): + pens = [pens] + elif len(pens) != len(rectangles): + raise ValueError('rectangles and pens must have same length') + if brushes is None: + brushes = [] + elif isinstance(brushes, wxBrushPtr): + brushes = [brushes] + elif len(brushes) != len(rectangles): + raise ValueError('rectangles and brushes must have same length') + return self._DrawRectangleList(rectangles, pens, brushes) + + + def DrawEllipseList(self, ellipses, pens=None, brushes=None): + if pens is None: + pens = [] + elif isinstance(pens, wxPenPtr): + pens = [pens] + elif len(pens) != len(ellipses): + raise ValueError('ellipses and pens must have same length') + if brushes is None: + brushes = [] + elif isinstance(brushes, wxBrushPtr): + brushes = [brushes] + elif len(brushes) != len(ellipses): + raise ValueError('ellipses and brushes must have same length') + return self._DrawEllipseList(ellipses, pens, brushes) + + + def DrawPolygonList(self, polygons, pens=None, brushes=None): + ## Note: This does not currently support fill style or offset + ## you can always use the non-List version if need be. + ## I really would like to support fill-style, however, + ## but wxODDEVEN_RULE does not appear to be defined at the Python level + ## [It's in wx.py... --Robin] + if pens is None: + pens = [] + elif isinstance(pens, wxPenPtr): + pens = [pens] + elif len(pens) != len(polygons): + raise ValueError('polygons and pens must have same length') + if brushes is None: + brushes = [] + elif isinstance(brushes, wxBrushPtr): + brushes = [brushes] + elif len(brushes) != len(polygons): + raise ValueError('polygons and brushes must have same length') + return self._DrawPolygonList(polygons, pens, brushes) + + + def DrawTextList(self, textList, coords, foregrounds = None, backgrounds = None, fonts = None): + ## NOTE: this does not currently support changing the font + ## Make sure you set Background mode to wxSolid (DC.SetBackgroundMode) + ## If you want backgounds to do anything. + if type(textList) == type(''): + textList = [textList] + elif len(textList) != len(coords): + raise ValueError('textlist and coords must have same length') + if foregrounds is None: + foregrounds = [] + elif isinstance(foregrounds, wxColourPtr): + foregrounds = [foregrounds] + elif len(foregrounds) != len(coords): + raise ValueError('foregrounds and coords must have same length') + if backgrounds is None: + backgrounds = [] + elif isinstance(backgrounds, wxColourPtr): + backgrounds = [backgrounds] + elif len(backgrounds) != len(coords): + raise ValueError('backgrounds and coords must have same length') + return self._DrawTextList(textList, coords, foregrounds, backgrounds) class wxDC(wxDCPtr): def __init__(self,this): @@ -969,9 +1092,12 @@ class wxMetaFilePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxMetaFile(self) + def __del__(self, delfunc=gdic.delete_wxMetaFile): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Ok(self, *_args, **_kwargs): val = apply(gdic.wxMetaFile_Ok,(self,) + _args, _kwargs) return val @@ -1023,9 +1149,12 @@ class wxPalettePtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxPalette(self) + def __del__(self, delfunc=gdic.delete_wxPalette): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetPixel(self, *_args, **_kwargs): val = apply(gdic.wxPalette_GetPixel,(self,) + _args, _kwargs) return val @@ -1049,9 +1178,12 @@ class wxImageListPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxImageList(self) + def __del__(self, delfunc=gdic.delete_wxImageList): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Add(self, *_args, **_kwargs): val = apply(gdic.wxImageList_Add,(self,) + _args, _kwargs) return val @@ -1093,9 +1225,12 @@ class wxRegionPtr(wxGDIObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxRegion(self) + def __del__(self, delfunc=gdic.delete_wxRegion): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Clear(self, *_args, **_kwargs): val = apply(gdic.wxRegion_Clear,(self,) + _args, _kwargs) return val @@ -1176,9 +1311,12 @@ class wxRegionIteratorPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gdic=gdic): - if self.thisown == 1 : - gdic.delete_wxRegionIterator(self) + def __del__(self, delfunc=gdic.delete_wxRegionIterator): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetX(self, *_args, **_kwargs): val = apply(gdic.wxRegionIterator_GetX,(self,) + _args, _kwargs) return val @@ -1269,6 +1407,11 @@ def wxStockCursor(*_args, **_kwargs): if val: val = wxCursorPtr(val); val.thisown = 1 return val +def wxCursorFromImage(*_args, **_kwargs): + val = apply(gdic.wxCursorFromImage,_args,_kwargs) + if val: val = wxCursorPtr(val); val.thisown = 1 + return val + def wxNamedColour(*_args, **_kwargs): val = apply(gdic.wxNamedColour,_args,_kwargs) if val: val = wxColourPtr(val); val.thisown = 1 diff --git a/wxPython/src/msw/grid.cpp b/wxPython/src/msw/grid.cpp index e239f48d53..d93a4d33a7 100644 --- a/wxPython/src/msw/grid.cpp +++ b/wxPython/src/msw/grid.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -106,7 +105,7 @@ PyObject* wxPyMake_##TYPE(TYPE* source) { \ /* Otherwise make a new wrapper for it the old fashioned way and \ give it the OOR treatment */ \ if (! target) { \ - target = wxPyConstructObject(source, #TYPE, FALSE); \ + target = wxPyConstructObject(source, wxT(#TYPE), FALSE); \ if (target) \ source->SetClientObject(new wxPyOORClientData(target)); \ } \ @@ -541,7 +540,7 @@ public: PyObject* go = wxPyMake_wxObject(&grid); PyObject* dco = wxPyMake_wxObject(&dc); PyObject* ao = wxPyMake_wxGridCellAttr(&attr); - PyObject* ro = wxPyConstructObject((void*)&rect, "wxRect", 0); + PyObject* ro = wxPyConstructObject((void*)&rect, wxT("wxRect"), 0); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOOOiii)", go, ao, dco, ro, row, col, isSelected)); @@ -665,7 +664,7 @@ public: } - wxGridCellEditor*Clone() const { + wxGridCellEditor* Clone() const { wxGridCellEditor* rval = NULL; wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "Clone")) { @@ -705,7 +704,7 @@ public: wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "PaintBackground)"))) { PyObject* ao = wxPyMake_wxGridCellAttr(attr); - PyObject* ro = wxPyConstructObject((void*)&rectCell, "wxRect", 0); + PyObject* ro = wxPyConstructObject((void*)&rectCell, wxT("wxRect"), 0); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)", ro, ao)); @@ -729,6 +728,7 @@ public: DEC_PYCALLBACK__(StartingClick); DEC_PYCALLBACK__(Destroy); DEC_PYCALLBACK__STRING(SetParameters); + DEC_PYCALLBACK_STRING__const(GetValue); PYPRIVATE; }; @@ -742,6 +742,7 @@ IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, StartingKey, wxKeyEven IMP_PYCALLBACK__any(wxPyGridCellEditor, wxGridCellEditor, HandleReturn, wxKeyEvent); IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, StartingClick); IMP_PYCALLBACK__(wxPyGridCellEditor, wxGridCellEditor, Destroy); +IMP_PYCALLBACK_STRING__const(wxPyGridCellEditor, wxGridCellEditor, GetValue); class wxPyGridCellAttrProvider : public wxGridCellAttrProvider @@ -905,6 +906,21 @@ bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) { return FALSE; } +PyObject* wxGridCellCoordsArray_helper(const wxGridCellCoordsArray* source) +{ + PyObject* list = PyList_New(0); + size_t idx; + for (idx = 0; idx < source->GetCount(); idx += 1) { + wxGridCellCoords& coord = source->Item(idx); + PyObject* tup = PyTuple_New(2); + PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(coord.GetRow())); + PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(coord.GetCol())); + PyList_Append(list, tup); + Py_DECREF(tup); + } + return list; +} + typedef wxGrid::wxGridSelectionModes WXGRIDSELECTIONMODES; #ifdef __cplusplus extern "C" { @@ -1100,22 +1116,19 @@ static PyObject *_wrap_wxGridCellRenderer_Draw(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellRenderer_Draw. Expected _wxGrid_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGridCellRenderer_Draw. Expected _wxGridCellAttr_p."); return NULL; } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellRenderer_Draw. Expected _wxDC_p."); return NULL; } @@ -1165,22 +1178,19 @@ static PyObject *_wrap_wxGridCellRenderer_GetBestSize(PyObject *self, PyObject * } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGrid_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellRenderer_GetBestSize. Expected _wxGrid_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxGridCellAttr_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxGridCellRenderer_GetBestSize. Expected _wxGridCellAttr_p."); return NULL; } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGridCellRenderer_GetBestSize. Expected _wxDC_p."); return NULL; } @@ -1893,6 +1903,71 @@ static PyObject *_wrap_wxGridCellEditor_SetControl(PyObject *self, PyObject *arg return _resultobj; } +#define wxGridCellEditor_GetCellAttr(_swigobj) (_swigobj->GetCellAttr()) +static PyObject *_wrap_wxGridCellEditor_GetCellAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellAttr * _result; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_GetCellAttr",_kwnames,&_argo0)) + 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_GetCellAttr. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxGridCellAttr *)wxGridCellEditor_GetCellAttr(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxGridCellAttr(_result); } + return _resultobj; +} + +#define wxGridCellEditor_SetCellAttr(_swigobj,_swigarg0) (_swigobj->SetCellAttr(_swigarg0)) +static PyObject *_wrap_wxGridCellEditor_SetCellAttr(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellEditor * _arg0; + wxGridCellAttr * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","attr", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxGridCellEditor_SetCellAttr",_kwnames,&_argo0,&_argo1)) + 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_SetCellAttr. Expected _wxGridCellEditor_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellAttr_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_SetCellAttr. Expected _wxGridCellAttr_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGridCellEditor_SetCellAttr(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxGridCellEditor_SetParameters(_swigobj,_swigarg0) (_swigobj->SetParameters(_swigarg0)) static PyObject *_wrap_wxGridCellEditor_SetParameters(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2311,8 +2386,7 @@ static PyObject *_wrap_wxGridCellEditor_IsAcceptedKey(PyObject *self, PyObject * } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_IsAcceptedKey. Expected _wxKeyEvent_p."); return NULL; } @@ -2347,8 +2421,7 @@ static PyObject *_wrap_wxGridCellEditor_StartingKey(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_StartingKey. Expected _wxKeyEvent_p."); return NULL; } @@ -2412,8 +2485,7 @@ static PyObject *_wrap_wxGridCellEditor_HandleReturn(PyObject *self, PyObject *a } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellEditor_HandleReturn. Expected _wxKeyEvent_p."); return NULL; } @@ -2457,6 +2529,43 @@ static PyObject *_wrap_wxGridCellEditor_Destroy(PyObject *self, PyObject *args, return _resultobj; } +#define wxGridCellEditor_GetValue(_swigobj) (_swigobj->GetValue()) +static PyObject *_wrap_wxGridCellEditor_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGridCellEditor_GetValue",_kwnames,&_argo0)) + 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_GetValue. Expected _wxGridCellEditor_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGridCellEditor_GetValue(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} + return _resultobj; +} + static void *SwigwxPyGridCellEditorTowxGridCellEditor(void *ptr) { wxPyGridCellEditor *src; wxGridCellEditor *dest; @@ -2670,8 +2779,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_IsAcceptedKey(PyObject *self, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellEditor_base_IsAcceptedKey. Expected _wxKeyEvent_p."); return NULL; } @@ -2707,8 +2815,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_StartingKey(PyObject *self, PyObj } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellEditor_base_StartingKey. Expected _wxKeyEvent_p."); return NULL; } @@ -2772,8 +2879,7 @@ static PyObject *_wrap_wxPyGridCellEditor_base_HandleReturn(PyObject *self, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxKeyEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPyGridCellEditor_base_HandleReturn. Expected _wxKeyEvent_p."); return NULL; } @@ -2856,6 +2962,43 @@ static PyObject *_wrap_wxPyGridCellEditor_base_SetParameters(PyObject *self, PyO return _resultobj; } +#define wxPyGridCellEditor_base_GetValue(_swigobj) (_swigobj->base_GetValue()) +static PyObject *_wrap_wxPyGridCellEditor_base_GetValue(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + wxPyGridCellEditor * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyGridCellEditor_base_GetValue",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyGridCellEditor_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyGridCellEditor_base_GetValue. Expected _wxPyGridCellEditor_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxPyGridCellEditor_base_GetValue(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} + return _resultobj; +} + static void *SwigwxGridCellTextEditorTowxGridCellEditor(void *ptr) { wxGridCellTextEditor *src; wxGridCellEditor *dest; @@ -3447,8 +3590,7 @@ static PyObject *_wrap_wxGridCellAttr_SetFont(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellAttr_SetFont. Expected _wxFont_p."); return NULL; } @@ -5012,7 +5154,7 @@ static PyObject *_wrap_wxGridTableBase_GetValue(PyObject *self, PyObject *args, 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 @@ -5092,7 +5234,7 @@ static PyObject *_wrap_wxGridTableBase_GetTypeName(PyObject *self, PyObject *arg 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 @@ -5603,7 +5745,7 @@ static PyObject *_wrap_wxGridTableBase_GetRowLabelValue(PyObject *self, PyObject 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 @@ -5641,7 +5783,7 @@ static PyObject *_wrap_wxGridTableBase_GetColLabelValue(PyObject *self, PyObject 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 @@ -6042,7 +6184,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetTypeName(PyObject *self, PyObje 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 @@ -6368,7 +6510,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetRowLabelValue(PyObject *self, P 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 @@ -6406,7 +6548,7 @@ static PyObject *_wrap_wxPyGridTableBase_base_GetColLabelValue(PyObject *self, P 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 @@ -7275,8 +7417,7 @@ static PyObject *_wrap_wxGridCellCoords___cmp__(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellCoords_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridCellCoords_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGridCellCoords___cmp__. Expected _wxGridCellCoords_p."); return NULL; } @@ -7563,8 +7704,7 @@ static PyObject *_wrap_wxGrid_ProcessTableMessage(PyObject *self, PyObject *args } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridTableMessage_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxGridTableMessage_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_ProcessTableMessage. Expected _wxGridTableMessage_p."); return NULL; } @@ -7894,8 +8034,7 @@ static PyObject *_wrap_wxGrid_DrawCellHighlight(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_DrawCellHighlight. Expected _wxDC_p."); return NULL; } @@ -7918,7 +8057,7 @@ static PyObject *_wrap_wxGrid_DrawCellHighlight(PyObject *self, PyObject *args, return _resultobj; } -#define wxGrid_DrawTextRectangle(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (_swigobj->DrawTextRectangle(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) +#define wxGrid_DrawTextRectangle(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5) (_swigobj->DrawTextRectangle(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5)) static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxGrid * _arg0; @@ -7927,15 +8066,16 @@ static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, wxRect * _arg3; int _arg4 = (int ) wxLEFT; int _arg5 = (int ) wxTOP; + int _arg6 = (int ) wxHORIZONTAL; PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj2 = 0; wxRect temp; PyObject * _obj3 = 0; - char *_kwnames[] = { "self","dc","arg3","arg4","horizontalAlignment","verticalAlignment", NULL }; + char *_kwnames[] = { "self","dc","arg3","arg4","horizontalAlignment","verticalAlignment","textOrientation", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO|ii:wxGrid_DrawTextRectangle",_kwnames,&_argo0,&_argo1,&_obj2,&_obj3,&_arg4,&_arg5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO|iii:wxGrid_DrawTextRectangle",_kwnames,&_argo0,&_argo1,&_obj2,&_obj3,&_arg4,&_arg5,&_arg6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -7945,8 +8085,7 @@ static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_DrawTextRectangle. Expected _wxDC_p."); return NULL; } @@ -7963,7 +8102,7 @@ static PyObject *_wrap_wxGrid_DrawTextRectangle(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxGrid_DrawTextRectangle(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5); + wxGrid_DrawTextRectangle(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8008,8 +8147,7 @@ static PyObject *_wrap_wxGrid_GetTextBoxSize(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_GetTextBoxSize. Expected _wxDC_p."); return NULL; } @@ -8025,11 +8163,10 @@ static PyObject *_wrap_wxGrid_GetTextBoxSize(PyObject *self, PyObject *args, PyO PyObject* item = PySequence_GetItem(_obj2, i); #if wxUSE_UNICODE PyObject* str = PyObject_Unicode(item); - _arg2->Add(PyUnicode_AsUnicode(str)); #else PyObject* str = PyObject_Str(item); - _arg2->Add(PyString_AsString(str)); #endif + _arg2->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); } @@ -9465,6 +9602,34 @@ static PyObject *_wrap_wxGrid_GetColLabelAlignment(PyObject *self, PyObject *arg return _resultobj; } +#define wxGrid_GetColLabelTextOrientation(_swigobj) (_swigobj->GetColLabelTextOrientation()) +static PyObject *_wrap_wxGrid_GetColLabelTextOrientation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetColLabelTextOrientation",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetColLabelTextOrientation. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxGrid_GetColLabelTextOrientation(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxGrid_GetRowLabelValue(_swigobj,_swigarg0) (_swigobj->GetRowLabelValue(_swigarg0)) static PyObject *_wrap_wxGrid_GetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9492,7 +9657,7 @@ static PyObject *_wrap_wxGrid_GetRowLabelValue(PyObject *self, PyObject *args, P 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 @@ -9530,7 +9695,7 @@ static PyObject *_wrap_wxGrid_GetColLabelValue(PyObject *self, PyObject *args, P 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 @@ -9807,8 +9972,7 @@ static PyObject *_wrap_wxGrid_SetLabelFont(PyObject *self, PyObject *args, PyObj } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetLabelFont. Expected _wxFont_p."); return NULL; } @@ -9884,6 +10048,35 @@ static PyObject *_wrap_wxGrid_SetColLabelAlignment(PyObject *self, PyObject *arg return _resultobj; } +#define wxGrid_SetColLabelTextOrientation(_swigobj,_swigarg0) (_swigobj->SetColLabelTextOrientation(_swigarg0)) +static PyObject *_wrap_wxGrid_SetColLabelTextOrientation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","textOrientation", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_SetColLabelTextOrientation",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_SetColLabelTextOrientation. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGrid_SetColLabelTextOrientation(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxGrid_SetRowLabelValue(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRowLabelValue(_swigarg0,_swigarg1)) static PyObject *_wrap_wxGrid_SetRowLabelValue(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -11438,6 +11631,64 @@ static PyObject *_wrap_wxGrid_AutoSize(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxGrid_AutoSizeRowLabelSize(_swigobj,_swigarg0) (_swigobj->AutoSizeRowLabelSize(_swigarg0)) +static PyObject *_wrap_wxGrid_AutoSizeRowLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_AutoSizeRowLabelSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSizeRowLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGrid_AutoSizeRowLabelSize(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_AutoSizeColLabelSize(_swigobj,_swigarg0) (_swigobj->AutoSizeColLabelSize(_swigarg0)) +static PyObject *_wrap_wxGrid_AutoSizeColLabelSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_AutoSizeColLabelSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_AutoSizeColLabelSize. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGrid_AutoSizeColLabelSize(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxGrid_SetColMinimalWidth(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetColMinimalWidth(_swigarg0,_swigarg1)) static PyObject *_wrap_wxGrid_SetColMinimalWidth(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -11666,8 +11917,7 @@ static PyObject *_wrap_wxGrid_SetDefaultCellFont(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGrid_SetDefaultCellFont. Expected _wxFont_p."); return NULL; } @@ -11705,8 +11955,7 @@ static PyObject *_wrap_wxGrid_SetCellFont(PyObject *self, PyObject *args, PyObje } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxGrid_SetCellFont. Expected _wxFont_p."); return NULL; } @@ -12176,7 +12425,7 @@ static PyObject *_wrap_wxGrid_GetCellValue(PyObject *self, PyObject *args, PyObj 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 @@ -12504,6 +12753,267 @@ static PyObject *_wrap_wxGrid_IsInSelection(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxGrid_GetSelectedCells(_swigobj) (_swigobj->GetSelectedCells()) +static PyObject *_wrap_wxGrid_GetSelectedCells(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoordsArray * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetSelectedCells",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetSelectedCells. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxGridCellCoordsArray (wxGrid_GetSelectedCells(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = wxGridCellCoordsArray_helper(_result); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGrid_GetSelectionBlockTopLeft(_swigobj) (_swigobj->GetSelectionBlockTopLeft()) +static PyObject *_wrap_wxGrid_GetSelectionBlockTopLeft(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoordsArray * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetSelectionBlockTopLeft",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetSelectionBlockTopLeft. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxGridCellCoordsArray (wxGrid_GetSelectionBlockTopLeft(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = wxGridCellCoordsArray_helper(_result); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGrid_GetSelectionBlockBottomRight(_swigobj) (_swigobj->GetSelectionBlockBottomRight()) +static PyObject *_wrap_wxGrid_GetSelectionBlockBottomRight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGridCellCoordsArray * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetSelectionBlockBottomRight",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetSelectionBlockBottomRight. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxGridCellCoordsArray (wxGrid_GetSelectionBlockBottomRight(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = wxGridCellCoordsArray_helper(_result); +} +{ + delete _result; +} + return _resultobj; +} + +#define wxGrid_GetSelectedRows(_swigobj) (_swigobj->GetSelectedRows()) +static PyObject *_wrap_wxGrid_GetSelectedRows(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxArrayInt * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetSelectedRows",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetSelectedRows. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxArrayInt (wxGrid_GetSelectedRows(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyList_New(0); + size_t idx; + for (idx = 0; idx < _result->GetCount(); idx += 1) { + PyObject* val = PyInt_FromLong(_result->Item(idx)); + PyList_Append(_resultobj, val); + Py_DECREF(val); + } + delete _result; +} + return _resultobj; +} + +#define wxGrid_GetSelectedCols(_swigobj) (_swigobj->GetSelectedCols()) +static PyObject *_wrap_wxGrid_GetSelectedCols(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxArrayInt * _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetSelectedCols",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetSelectedCols. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxArrayInt (wxGrid_GetSelectedCols(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyList_New(0); + size_t idx; + for (idx = 0; idx < _result->GetCount(); idx += 1) { + PyObject* val = PyInt_FromLong(_result->Item(idx)); + PyList_Append(_resultobj, val); + Py_DECREF(val); + } + delete _result; +} + return _resultobj; +} + +#define wxGrid_DeselectRow(_swigobj,_swigarg0) (_swigobj->DeselectRow(_swigarg0)) +static PyObject *_wrap_wxGrid_DeselectRow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_DeselectRow",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeselectRow. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGrid_DeselectRow(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DeselectCol(_swigobj,_swigarg0) (_swigobj->DeselectCol(_swigarg0)) +static PyObject *_wrap_wxGrid_DeselectCol(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxGrid_DeselectCol",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeselectCol. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGrid_DeselectCol(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxGrid_DeselectCell(_swigobj,_swigarg0,_swigarg1) (_swigobj->DeselectCell(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxGrid_DeselectCell(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxGrid * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","row","col", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxGrid_DeselectCell",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_DeselectCell. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxGrid_DeselectCell(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxGrid_BlockToDeviceRect(_swigobj,_swigarg0,_swigarg1) (_swigobj->BlockToDeviceRect(_swigarg0,_swigarg1)) static PyObject *_wrap_wxGrid_BlockToDeviceRect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -14301,6 +14811,14 @@ static PyMethodDef gridcMethods[] = { { "wxGrid_GetSelectionForeground", (PyCFunction) _wrap_wxGrid_GetSelectionForeground, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetSelectionBackground", (PyCFunction) _wrap_wxGrid_GetSelectionBackground, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_BlockToDeviceRect", (PyCFunction) _wrap_wxGrid_BlockToDeviceRect, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DeselectCell", (PyCFunction) _wrap_wxGrid_DeselectCell, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DeselectCol", (PyCFunction) _wrap_wxGrid_DeselectCol, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_DeselectRow", (PyCFunction) _wrap_wxGrid_DeselectRow, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetSelectedCols", (PyCFunction) _wrap_wxGrid_GetSelectedCols, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetSelectedRows", (PyCFunction) _wrap_wxGrid_GetSelectedRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetSelectionBlockBottomRight", (PyCFunction) _wrap_wxGrid_GetSelectionBlockBottomRight, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetSelectionBlockTopLeft", (PyCFunction) _wrap_wxGrid_GetSelectionBlockTopLeft, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetSelectedCells", (PyCFunction) _wrap_wxGrid_GetSelectedCells, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_IsInSelection", (PyCFunction) _wrap_wxGrid_IsInSelection, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_ClearSelection", (PyCFunction) _wrap_wxGrid_ClearSelection, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_IsSelection", (PyCFunction) _wrap_wxGrid_IsSelection, METH_VARARGS | METH_KEYWORDS }, @@ -14333,6 +14851,8 @@ static PyMethodDef gridcMethods[] = { { "wxGrid_SetDefaultCellBackgroundColour", (PyCFunction) _wrap_wxGrid_SetDefaultCellBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetRowMinimalHeight", (PyCFunction) _wrap_wxGrid_SetRowMinimalHeight, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetColMinimalWidth", (PyCFunction) _wrap_wxGrid_SetColMinimalWidth, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSizeColLabelSize", (PyCFunction) _wrap_wxGrid_AutoSizeColLabelSize, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_AutoSizeRowLabelSize", (PyCFunction) _wrap_wxGrid_AutoSizeRowLabelSize, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_AutoSize", (PyCFunction) _wrap_wxGrid_AutoSize, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_AutoSizeRows", (PyCFunction) _wrap_wxGrid_AutoSizeRows, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_AutoSizeColumns", (PyCFunction) _wrap_wxGrid_AutoSizeColumns, METH_VARARGS | METH_KEYWORDS }, @@ -14381,6 +14901,7 @@ static PyMethodDef gridcMethods[] = { { "wxGrid_SetGridLineColour", (PyCFunction) _wrap_wxGrid_SetGridLineColour, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetColLabelValue", (PyCFunction) _wrap_wxGrid_SetColLabelValue, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetRowLabelValue", (PyCFunction) _wrap_wxGrid_SetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_SetColLabelTextOrientation", (PyCFunction) _wrap_wxGrid_SetColLabelTextOrientation, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetColLabelAlignment", (PyCFunction) _wrap_wxGrid_SetColLabelAlignment, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetRowLabelAlignment", (PyCFunction) _wrap_wxGrid_SetRowLabelAlignment, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetLabelFont", (PyCFunction) _wrap_wxGrid_SetLabelFont, METH_VARARGS | METH_KEYWORDS }, @@ -14394,6 +14915,7 @@ static PyMethodDef gridcMethods[] = { { "wxGrid_GetGridLineColour", (PyCFunction) _wrap_wxGrid_GetGridLineColour, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetColLabelValue", (PyCFunction) _wrap_wxGrid_GetColLabelValue, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetRowLabelValue", (PyCFunction) _wrap_wxGrid_GetRowLabelValue, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetColLabelTextOrientation", (PyCFunction) _wrap_wxGrid_GetColLabelTextOrientation, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetColLabelAlignment", (PyCFunction) _wrap_wxGrid_GetColLabelAlignment, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetRowLabelAlignment", (PyCFunction) _wrap_wxGrid_GetRowLabelAlignment, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetLabelFont", (PyCFunction) _wrap_wxGrid_GetLabelFont, METH_VARARGS | METH_KEYWORDS }, @@ -14590,6 +15112,7 @@ static PyMethodDef gridcMethods[] = { { "new_wxGridCellFloatEditor", (PyCFunction) _wrap_new_wxGridCellFloatEditor, METH_VARARGS | METH_KEYWORDS }, { "new_wxGridCellNumberEditor", (PyCFunction) _wrap_new_wxGridCellNumberEditor, METH_VARARGS | METH_KEYWORDS }, { "new_wxGridCellTextEditor", (PyCFunction) _wrap_new_wxGridCellTextEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxPyGridCellEditor_base_GetValue", (PyCFunction) _wrap_wxPyGridCellEditor_base_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxPyGridCellEditor_base_SetParameters", (PyCFunction) _wrap_wxPyGridCellEditor_base_SetParameters, METH_VARARGS | METH_KEYWORDS }, { "wxPyGridCellEditor_base_Destroy", (PyCFunction) _wrap_wxPyGridCellEditor_base_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxPyGridCellEditor_base_HandleReturn", (PyCFunction) _wrap_wxPyGridCellEditor_base_HandleReturn, METH_VARARGS | METH_KEYWORDS }, @@ -14601,6 +15124,7 @@ static PyMethodDef gridcMethods[] = { { "wxPyGridCellEditor_base_SetSize", (PyCFunction) _wrap_wxPyGridCellEditor_base_SetSize, METH_VARARGS | METH_KEYWORDS }, { "wxPyGridCellEditor__setCallbackInfo", (PyCFunction) _wrap_wxPyGridCellEditor__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyGridCellEditor", (PyCFunction) _wrap_new_wxPyGridCellEditor, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_GetValue", (PyCFunction) _wrap_wxGridCellEditor_GetValue, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellEditor_Destroy", (PyCFunction) _wrap_wxGridCellEditor_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellEditor_HandleReturn", (PyCFunction) _wrap_wxGridCellEditor_HandleReturn, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellEditor_StartingClick", (PyCFunction) _wrap_wxGridCellEditor_StartingClick, METH_VARARGS | METH_KEYWORDS }, @@ -14617,6 +15141,8 @@ static PyMethodDef gridcMethods[] = { { "wxGridCellEditor_DecRef", (PyCFunction) _wrap_wxGridCellEditor_DecRef, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellEditor_IncRef", (PyCFunction) _wrap_wxGridCellEditor_IncRef, METH_VARARGS | METH_KEYWORDS }, { "wxGridCellEditor_SetParameters", (PyCFunction) _wrap_wxGridCellEditor_SetParameters, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_SetCellAttr", (PyCFunction) _wrap_wxGridCellEditor_SetCellAttr, METH_VARARGS | METH_KEYWORDS }, + { "wxGridCellEditor_GetCellAttr", (PyCFunction) _wrap_wxGridCellEditor_GetCellAttr, 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 }, diff --git a/wxPython/src/msw/grid.py b/wxPython/src/msw/grid.py index 7cbd1c0df1..1d15cdc4e6 100644 --- a/wxPython/src/msw/grid.py +++ b/wxPython/src/msw/grid.py @@ -255,6 +255,12 @@ class wxGridCellEditorPtr : def SetControl(self, *_args, **_kwargs): val = apply(gridc.wxGridCellEditor_SetControl,(self,) + _args, _kwargs) return val + def GetCellAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_GetCellAttr,(self,) + _args, _kwargs) + return val + def SetCellAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_SetCellAttr,(self,) + _args, _kwargs) + return val def SetParameters(self, *_args, **_kwargs): val = apply(gridc.wxGridCellEditor_SetParameters,(self,) + _args, _kwargs) return val @@ -303,6 +309,9 @@ class wxGridCellEditorPtr : def Destroy(self, *_args, **_kwargs): val = apply(gridc.wxGridCellEditor_Destroy,(self,) + _args, _kwargs) return val + def GetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_GetValue,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxGridCellEditor(wxGridCellEditorPtr): @@ -346,6 +355,9 @@ class wxPyGridCellEditorPtr(wxGridCellEditorPtr): def base_SetParameters(self, *_args, **_kwargs): val = apply(gridc.wxPyGridCellEditor_base_SetParameters,(self,) + _args, _kwargs) return val + def base_GetValue(self, *_args, **_kwargs): + val = apply(gridc.wxPyGridCellEditor_base_GetValue,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxPyGridCellEditor(wxPyGridCellEditorPtr): @@ -865,9 +877,12 @@ class wxGridTableMessagePtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gridc=gridc): - if self.thisown == 1 : - gridc.delete_wxGridTableMessage(self) + def __del__(self, delfunc=gridc.delete_wxGridTableMessage): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetTableObject(self, *_args, **_kwargs): val = apply(gridc.wxGridTableMessage_SetTableObject,(self,) + _args, _kwargs) return val @@ -906,9 +921,12 @@ class wxGridCellCoordsPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gridc=gridc): - if self.thisown == 1 : - gridc.delete_wxGridCellCoords(self) + def __del__(self, delfunc=gridc.delete_wxGridCellCoords): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetRow(self, *_args, **_kwargs): val = apply(gridc.wxGridCellCoords_GetRow,(self,) + _args, _kwargs) return val @@ -932,8 +950,16 @@ class wxGridCellCoordsPtr : return val def __repr__(self): return "" % (self.this,) - def __str__(self): return str(self.asTuple()) - def __repr__(self): return str(self.asTuple()) + + def __str__(self): return str(self.asTuple()) + def __repr__(self): return 'wxGridCellCoords'+str(self.asTuple()) + def __len__(self): return len(self.asTuple()) + def __getitem__(self, index): return self.asTuple()[index] + def __setitem__(self, index, val): + if index == 0: self.SetRow(val) + elif index == 1: self.SetCol(val) + else: raise IndexError + class wxGridCellCoords(wxGridCellCoordsPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gridc.new_wxGridCellCoords,_args,_kwargs) @@ -1146,6 +1172,9 @@ class wxGridPtr(wxScrolledWindowPtr): def GetColLabelAlignment(self, *_args, **_kwargs): val = apply(gridc.wxGrid_GetColLabelAlignment,(self,) + _args, _kwargs) return val + def GetColLabelTextOrientation(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetColLabelTextOrientation,(self,) + _args, _kwargs) + return val def GetRowLabelValue(self, *_args, **_kwargs): val = apply(gridc.wxGrid_GetRowLabelValue,(self,) + _args, _kwargs) return val @@ -1187,6 +1216,9 @@ class wxGridPtr(wxScrolledWindowPtr): def SetColLabelAlignment(self, *_args, **_kwargs): val = apply(gridc.wxGrid_SetColLabelAlignment,(self,) + _args, _kwargs) return val + def SetColLabelTextOrientation(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColLabelTextOrientation,(self,) + _args, _kwargs) + return val def SetRowLabelValue(self, *_args, **_kwargs): val = apply(gridc.wxGrid_SetRowLabelValue,(self,) + _args, _kwargs) return val @@ -1337,6 +1369,12 @@ class wxGridPtr(wxScrolledWindowPtr): def AutoSize(self, *_args, **_kwargs): val = apply(gridc.wxGrid_AutoSize,(self,) + _args, _kwargs) return val + def AutoSizeRowLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeRowLabelSize,(self,) + _args, _kwargs) + return val + def AutoSizeColLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeColLabelSize,(self,) + _args, _kwargs) + return val def SetColMinimalWidth(self, *_args, **_kwargs): val = apply(gridc.wxGrid_SetColMinimalWidth,(self,) + _args, _kwargs) return val @@ -1433,6 +1471,30 @@ class wxGridPtr(wxScrolledWindowPtr): def IsInSelection(self, *_args, **_kwargs): val = apply(gridc.wxGrid_IsInSelection,(self,) + _args, _kwargs) return val + def GetSelectedCells(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectedCells,(self,) + _args, _kwargs) + return val + def GetSelectionBlockTopLeft(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectionBlockTopLeft,(self,) + _args, _kwargs) + return val + def GetSelectionBlockBottomRight(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectionBlockBottomRight,(self,) + _args, _kwargs) + return val + def GetSelectedRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectedRows,(self,) + _args, _kwargs) + return val + def GetSelectedCols(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectedCols,(self,) + _args, _kwargs) + return val + def DeselectRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DeselectRow,(self,) + _args, _kwargs) + return val + def DeselectCol(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DeselectCol,(self,) + _args, _kwargs) + return val + def DeselectCell(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DeselectCell,(self,) + _args, _kwargs) + return val def BlockToDeviceRect(self, *_args, **_kwargs): val = apply(gridc.wxGrid_BlockToDeviceRect,(self,) + _args, _kwargs) if val: val = wxRectPtr(val) ; val.thisown = 1 diff --git a/wxPython/src/msw/help.cpp b/wxPython/src/msw/help.cpp index dd9dfc3d65..8878e4ca75 100644 --- a/wxPython/src/msw/help.cpp +++ b/wxPython/src/msw/help.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -247,7 +246,7 @@ static PyObject *_wrap_wxHelpEvent_GetLink(PyObject *self, PyObject *args, PyObj 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 @@ -321,7 +320,7 @@ static PyObject *_wrap_wxHelpEvent_GetTarget(PyObject *self, PyObject *args, PyO 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 @@ -704,7 +703,7 @@ static PyObject *_wrap_wxHelpProvider_GetHelp(PyObject *self, PyObject *args, Py 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 diff --git a/wxPython/src/msw/help.py b/wxPython/src/msw/help.py index add867a444..ac1612ba19 100644 --- a/wxPython/src/msw/help.py +++ b/wxPython/src/msw/help.py @@ -65,9 +65,12 @@ class wxContextHelpPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,helpc=helpc): - if self.thisown == 1 : - helpc.delete_wxContextHelp(self) + def __del__(self, delfunc=helpc.delete_wxContextHelp): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def BeginContextHelp(self, *_args, **_kwargs): val = apply(helpc.wxContextHelp_BeginContextHelp,(self,) + _args, _kwargs) return val @@ -171,3 +174,4 @@ wxEVT_DETAILED_HELP = helpc.wxEVT_DETAILED_HELP # Stuff these names into the wx namespace so wxPyConstructObject can find them import wx wx.wxHelpEventPtr = wxHelpEventPtr +wx.wxContextHelpButtonPtr = wxContextHelpButtonPtr diff --git a/wxPython/src/msw/html.cpp b/wxPython/src/msw/html.cpp index 0d8c6925db..681d306acd 100644 --- a/wxPython/src/msw/html.cpp +++ b/wxPython/src/msw/html.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -62,6 +61,7 @@ extern PyObject *SWIG_newvarlink(void); #include #include #include +#include #include "printfw.h" @@ -197,6 +197,51 @@ private: // and adds itself to the wxModules list and to the wxHtmlWinParser. new wxPyHtmlTagsModule(tagHandlerClass); } + // here's the C++ version +class wxPyHtmlFilter : public wxHtmlFilter { + DECLARE_ABSTRACT_CLASS(wxPyHtmlFilter); +public: + wxPyHtmlFilter() : wxHtmlFilter() {} + + // returns TRUE if this filter is able to open&read given file + virtual bool CanRead(const wxFSFile& file) const { + bool rval = FALSE; + bool found; + wxPyBeginBlockThreads(); + if ((found = wxPyCBH_findCallback(m_myInst, "CanRead"))) { + PyObject* obj = wxPyMake_wxObject((wxFSFile*)&file); // cast away const + rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); + Py_DECREF(obj); + } + wxPyEndBlockThreads(); + return rval; + } + + + // Reads given file and returns HTML document. + // Returns empty string if opening failed + virtual wxString ReadFile(const wxFSFile& file) const { + wxString rval; + bool found; + wxPyBeginBlockThreads(); + if ((found = wxPyCBH_findCallback(m_myInst, "ReadFile"))) { + PyObject* obj = wxPyMake_wxObject((wxFSFile*)&file); // cast away const + PyObject* ro; + ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(O)", obj)); + Py_DECREF(obj); + if (ro) { + rval = Py2wxString(ro); + Py_DECREF(ro); + } + } + wxPyEndBlockThreads(); + return rval; + } + + PYPRIVATE; +}; + +IMPLEMENT_ABSTRACT_CLASS(wxPyHtmlFilter, wxHtmlFilter); class wxPyHtmlWindow : public wxHtmlWindow { DECLARE_ABSTRACT_CLASS(wxPyHtmlWindow); @@ -205,7 +250,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_SCROLLBAR_AUTO, - const wxString& name = "htmlWindow") + const wxString& name = wxPyHtmlWindowNameStr) : wxHtmlWindow(parent, id, pos, size, style, name) {}; wxPyHtmlWindow() : wxHtmlWindow() {}; @@ -228,7 +273,6 @@ public: DEC_PYCALLBACK__STRING(OnSetTitle); DEC_PYCALLBACK__CELLINTINT(OnCellMouseHover); DEC_PYCALLBACK__CELLINTINTME(OnCellClicked); -// DEC_PYCALLBACK_BOOL_STRING(OnOpeningURL); PYPRIVATE; }; @@ -236,14 +280,13 @@ IMPLEMENT_ABSTRACT_CLASS( wxPyHtmlWindow, wxHtmlWindow ); IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); IMP_PYCALLBACK__CELLINTINT(wxPyHtmlWindow, wxHtmlWindow, OnCellMouseHover); IMP_PYCALLBACK__CELLINTINTME(wxPyHtmlWindow, wxHtmlWindow, OnCellClicked); -// IMP_PYCALLBACK_BOOL_STRING(wxPyHtmlWindow, wxHtmlWindow, OnOpeningURL); void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { bool found; wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "OnLinkClicked"))) { - PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0); + PyObject* obj = wxPyConstructObject((void*)&link, wxT("wxHtmlLinkInfo"), 0); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); Py_DECREF(obj); } @@ -290,10 +333,6 @@ wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type, - void wxHtmlWindow_AddFilter(wxHtmlFilter *filter) { - wxHtmlWindow::AddFilter(filter); - } - extern "C" SWIGEXPORT(void) inithtmlhelpc(); #ifdef __cplusplus extern "C" { @@ -321,33 +360,6 @@ static PyObject *_wrap_wxHtmlWinParser_AddTagHandler(PyObject *self, PyObject *a return _resultobj; } -static PyObject *_wrap_wxHtmlWindow_AddFilter(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxHtmlFilter * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "filter", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_AddFilter",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlFilter_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_AddFilter. Expected _wxHtmlFilter_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxHtmlWindow_AddFilter(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - static void *SwigwxHtmlLinkInfoTowxObject(void *ptr) { wxHtmlLinkInfo *src; wxObject *dest; @@ -431,7 +443,7 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetHref(PyObject *self, PyObject *args, Py 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 @@ -468,7 +480,7 @@ static PyObject *_wrap_wxHtmlLinkInfo_GetTarget(PyObject *self, PyObject *args, 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 @@ -650,7 +662,7 @@ static PyObject *_wrap_wxHtmlTag_GetName(PyObject *self, PyObject *args, PyObjec 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 @@ -734,7 +746,7 @@ static PyObject *_wrap_wxHtmlTag_GetParam(PyObject *self, PyObject *args, PyObje 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 @@ -775,7 +787,7 @@ static PyObject *_wrap_wxHtmlTag_GetAllParams(PyObject *self, PyObject *args, Py 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 @@ -1107,6 +1119,34 @@ static PyObject *_wrap_wxHtmlParser_DoParsing(PyObject *self, PyObject *args, Py return _resultobj; } +#define wxHtmlParser_StopParsing(_swigobj) (_swigobj->StopParsing()) +static PyObject *_wrap_wxHtmlParser_StopParsing(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxHtmlParser * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlParser_StopParsing",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlParser_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlParser_StopParsing. Expected _wxHtmlParser_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxHtmlParser_StopParsing(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxHtmlParser_AddTagHandler(_swigobj,_swigarg0) (_swigobj->AddTagHandler(_swigarg0)) static PyObject *_wrap_wxHtmlParser_AddTagHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1170,7 +1210,7 @@ static PyObject *_wrap_wxHtmlParser_GetSource(PyObject *self, PyObject *args, Py 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 @@ -2406,8 +2446,7 @@ static PyObject *_wrap_wxHtmlTagHandler_ParseInner(PyObject *self, PyObject *arg } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlTagHandler_ParseInner. Expected _wxHtmlTag_p."); return NULL; } @@ -2595,8 +2634,7 @@ static PyObject *_wrap_wxHtmlWinTagHandler_ParseInner(PyObject *self, PyObject * } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWinTagHandler_ParseInner. Expected _wxHtmlTag_p."); return NULL; } @@ -2913,8 +2951,7 @@ static PyObject *_wrap_wxHtmlCell_SetLink(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlLinkInfo_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlLinkInfo_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlCell_SetLink. Expected _wxHtmlLinkInfo_p."); return NULL; } @@ -3087,8 +3124,7 @@ static PyObject *_wrap_wxHtmlCell_Draw(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlCell_Draw. Expected _wxDC_p."); return NULL; } @@ -3126,8 +3162,7 @@ static PyObject *_wrap_wxHtmlCell_DrawInvisible(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlCell_DrawInvisible. Expected _wxDC_p."); return NULL; } @@ -3292,8 +3327,7 @@ static PyObject *_wrap_new_wxHtmlWordCell(PyObject *self, PyObject *args, PyObje return NULL; } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxHtmlWordCell. Expected _wxDC_p."); return NULL; } @@ -3629,8 +3663,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetAlign(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContainerCell_SetAlign. Expected _wxHtmlTag_p."); return NULL; } @@ -3696,8 +3729,7 @@ static PyObject *_wrap_wxHtmlContainerCell_SetWidthFloatFromTag(PyObject *self, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlTag_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlContainerCell_SetWidthFloatFromTag. Expected _wxHtmlTag_p."); return NULL; } @@ -3779,6 +3811,36 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBackgroundColour(PyObject *self, P return _resultobj; } +#define wxHtmlContainerCell_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) +static PyObject *_wrap_wxHtmlContainerCell_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxColour * _result; + wxHtmlContainerCell * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlContainerCell_GetBackgroundColour",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_GetBackgroundColour. Expected _wxHtmlContainerCell_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxColour (wxHtmlContainerCell_GetBackgroundColour(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxHtmlContainerCell_SetBorder(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetBorder(_swigarg0,_swigarg1)) static PyObject *_wrap_wxHtmlContainerCell_SetBorder(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4012,6 +4074,78 @@ static PyObject *_wrap_new_wxHtmlWidgetCell(PyObject *self, PyObject *args, PyOb return _resultobj; } +static void *SwigwxPyHtmlFilterTowxObject(void *ptr) { + wxPyHtmlFilter *src; + wxObject *dest; + src = (wxPyHtmlFilter *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxHtmlFilter() (new wxPyHtmlFilter()) +static PyObject *_wrap_new_wxHtmlFilter(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlFilter * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxHtmlFilter",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxPyHtmlFilter *)new_wxHtmlFilter(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyHtmlFilter_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxHtmlFilter__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxHtmlFilter__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlFilter * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxHtmlFilter__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlFilter_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlFilter__setCallbackInfo. Expected _wxPyHtmlFilter_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxHtmlFilter__setCallbackInfo(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void *SwigwxPyHtmlWindowTowxScrolledWindow(void *ptr) { wxPyHtmlWindow *src; wxScrolledWindow *dest; @@ -4395,7 +4529,7 @@ static PyObject *_wrap_wxHtmlWindow_GetOpenedPage(PyObject *self, PyObject *args 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 @@ -4432,7 +4566,7 @@ static PyObject *_wrap_wxHtmlWindow_GetOpenedAnchor(PyObject *self, PyObject *ar 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 @@ -4469,7 +4603,7 @@ static PyObject *_wrap_wxHtmlWindow_GetOpenedPageTitle(PyObject *self, PyObject 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 @@ -5100,6 +5234,33 @@ static PyObject *_wrap_wxHtmlWindow_HasAnchor(PyObject *self, PyObject *args, Py return _resultobj; } +static PyObject *_wrap_wxHtmlWindow_AddFilter(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyHtmlFilter * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "filter", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlWindow_AddFilter",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyHtmlFilter_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlWindow_AddFilter. Expected _wxPyHtmlFilter_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPyHtmlWindow::AddFilter(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxHtmlWindow_base_OnLinkClicked(_swigobj,_swigarg0) (_swigobj->base_OnLinkClicked(_swigarg0)) static PyObject *_wrap_wxHtmlWindow_base_OnLinkClicked(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5120,8 +5281,7 @@ static PyObject *_wrap_wxHtmlWindow_base_OnLinkClicked(PyObject *self, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlLinkInfo_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxHtmlLinkInfo_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxHtmlWindow_base_OnLinkClicked. Expected _wxHtmlLinkInfo_p."); return NULL; } @@ -5246,8 +5406,7 @@ static PyObject *_wrap_wxHtmlWindow_base_OnCellClicked(PyObject *self, PyObject } } if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxMouseEvent_p")) { + if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxMouseEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxHtmlWindow_base_OnCellClicked. Expected _wxMouseEvent_p."); return NULL; } @@ -6266,6 +6425,7 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWindow_base_OnCellMouseHover", (PyCFunction) _wrap_wxHtmlWindow_base_OnCellMouseHover, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_base_OnSetTitle", (PyCFunction) _wrap_wxHtmlWindow_base_OnSetTitle, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_base_OnLinkClicked", (PyCFunction) _wrap_wxHtmlWindow_base_OnLinkClicked, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlWindow_AddFilter", (PyCFunction) _wrap_wxHtmlWindow_AddFilter, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_HasAnchor", (PyCFunction) _wrap_wxHtmlWindow_HasAnchor, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_ScrollToAnchor", (PyCFunction) _wrap_wxHtmlWindow_ScrollToAnchor, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWindow_GetParser", (PyCFunction) _wrap_wxHtmlWindow_GetParser, METH_VARARGS | METH_KEYWORDS }, @@ -6293,11 +6453,14 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlWindow_Create", (PyCFunction) _wrap_wxHtmlWindow_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreHtmlWindow", (PyCFunction) _wrap_new_wxPreHtmlWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWindow", (PyCFunction) _wrap_new_wxHtmlWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlFilter__setCallbackInfo", (PyCFunction) _wrap_wxHtmlFilter__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, + { "new_wxHtmlFilter", (PyCFunction) _wrap_new_wxHtmlFilter, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlWidgetCell", (PyCFunction) _wrap_new_wxHtmlWidgetCell, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlFontCell", (PyCFunction) _wrap_new_wxHtmlFontCell, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlColourCell", (PyCFunction) _wrap_new_wxHtmlColourCell, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContainerCell_GetFirstCell", (PyCFunction) _wrap_wxHtmlContainerCell_GetFirstCell, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContainerCell_SetBorder", (PyCFunction) _wrap_wxHtmlContainerCell_SetBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlContainerCell_GetBackgroundColour", (PyCFunction) _wrap_wxHtmlContainerCell_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContainerCell_SetBackgroundColour", (PyCFunction) _wrap_wxHtmlContainerCell_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContainerCell_SetMinHeight", (PyCFunction) _wrap_wxHtmlContainerCell_SetMinHeight, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlContainerCell_SetWidthFloatFromTag", (PyCFunction) _wrap_wxHtmlContainerCell_SetWidthFloatFromTag, METH_VARARGS | METH_KEYWORDS }, @@ -6376,6 +6539,7 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlParser_PushTagHandler", (PyCFunction) _wrap_wxHtmlParser_PushTagHandler, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlParser_GetSource", (PyCFunction) _wrap_wxHtmlParser_GetSource, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlParser_AddTagHandler", (PyCFunction) _wrap_wxHtmlParser_AddTagHandler, METH_VARARGS | METH_KEYWORDS }, + { "wxHtmlParser_StopParsing", (PyCFunction) _wrap_wxHtmlParser_StopParsing, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlParser_DoParsing", (PyCFunction) _wrap_wxHtmlParser_DoParsing, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlParser_DoneParser", (PyCFunction) _wrap_wxHtmlParser_DoneParser, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlParser_InitParser", (PyCFunction) _wrap_wxHtmlParser_InitParser, METH_VARARGS | METH_KEYWORDS }, @@ -6397,7 +6561,6 @@ static PyMethodDef htmlcMethods[] = { { "wxHtmlLinkInfo_GetTarget", (PyCFunction) _wrap_wxHtmlLinkInfo_GetTarget, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlLinkInfo_GetHref", (PyCFunction) _wrap_wxHtmlLinkInfo_GetHref, METH_VARARGS | METH_KEYWORDS }, { "new_wxHtmlLinkInfo", (PyCFunction) _wrap_new_wxHtmlLinkInfo, METH_VARARGS | METH_KEYWORDS }, - { "wxHtmlWindow_AddFilter", (PyCFunction) _wrap_wxHtmlWindow_AddFilter, METH_VARARGS | METH_KEYWORDS }, { "wxHtmlWinParser_AddTagHandler", (PyCFunction) _wrap_wxHtmlWinParser_AddTagHandler, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; @@ -6469,6 +6632,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxHtmlPrintout",SwigwxHtmlPrintoutTowxObject}, { "_wxObject","_wxHtmlDCRenderer",SwigwxHtmlDCRendererTowxObject}, { "_wxObject","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxObject}, + { "_wxObject","_wxPyHtmlFilter",SwigwxPyHtmlFilterTowxObject}, { "_wxObject","_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxObject}, { "_wxObject","_wxHtmlFontCell",SwigwxHtmlFontCellTowxObject}, { "_wxObject","_wxHtmlColourCell",SwigwxHtmlColourCellTowxObject}, @@ -6587,6 +6751,7 @@ SWIGEXPORT(void) inithtmlc() { wxPyPtrTypeMap_Add("wxHtmlTagHandler", "wxPyHtmlTagHandler"); wxPyPtrTypeMap_Add("wxHtmlWinTagHandler", "wxPyHtmlWinTagHandler"); wxPyPtrTypeMap_Add("wxHtmlWindow", "wxPyHtmlWindow"); + wxPyPtrTypeMap_Add("wxHtmlFilter", "wxPyHtmlFilter"); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/html.py b/wxPython/src/msw/html.py index 09c3573b15..8766b132a2 100644 --- a/wxPython/src/msw/html.py +++ b/wxPython/src/msw/html.py @@ -135,6 +135,9 @@ class wxHtmlParserPtr(wxObjectPtr): def DoParsing(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_DoParsing,(self,) + _args, _kwargs) return val + def StopParsing(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlParser_StopParsing,(self,) + _args, _kwargs) + return val def AddTagHandler(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlParser_AddTagHandler,(self,) + _args, _kwargs) return val @@ -450,6 +453,10 @@ class wxHtmlContainerCellPtr(wxHtmlCellPtr): def SetBackgroundColour(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlContainerCell_SetBackgroundColour,(self,) + _args, _kwargs) return val + def GetBackgroundColour(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlContainerCell_GetBackgroundColour,(self,) + _args, _kwargs) + if val: val = wxColourPtr(val) ; val.thisown = 1 + return val def SetBorder(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlContainerCell_SetBorder,(self,) + _args, _kwargs) return val @@ -509,6 +516,24 @@ class wxHtmlWidgetCell(wxHtmlWidgetCellPtr): +class wxHtmlFilterPtr(wxObjectPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(htmlc.wxHtmlFilter__setCallbackInfo,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxHtmlFilter(wxHtmlFilterPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(htmlc.new_wxHtmlFilter,_args,_kwargs) + self.thisown = 1 + self._setCallbackInfo(self, wxHtmlFilter) + + + + class wxHtmlWindowPtr(wxScrolledWindowPtr): def __init__(self,this): self.this = this @@ -624,9 +649,12 @@ class wxHtmlDCRendererPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,htmlc=htmlc): - if self.thisown == 1 : - htmlc.delete_wxHtmlDCRenderer(self) + def __del__(self, delfunc=htmlc.delete_wxHtmlDCRenderer): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetDC(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlDCRenderer_SetDC,(self,) + _args, _kwargs) return val @@ -685,9 +713,12 @@ class wxHtmlEasyPrintingPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,htmlc=htmlc): - if self.thisown == 1 : - htmlc.delete_wxHtmlEasyPrinting(self) + def __del__(self, delfunc=htmlc.delete_wxHtmlEasyPrinting): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def PreviewFile(self, *_args, **_kwargs): val = apply(htmlc.wxHtmlEasyPrinting_PreviewFile,(self,) + _args, _kwargs) return val @@ -789,4 +820,5 @@ wx.wxHtmlContainerCellPtr = wxHtmlContainerCellPtr wx.wxHtmlWidgetCellPtr = wxHtmlWidgetCellPtr wx.wxHtmlWindowPtr = wxHtmlWindowPtr wx.wxHtmlLinkInfoPtr = wxHtmlLinkInfoPtr +wx.wxHtmlFilterPtr = wxHtmlFilterPtr diff --git a/wxPython/src/msw/htmlhelp.cpp b/wxPython/src/msw/htmlhelp.cpp index 8f2b5a589a..fac54d89f1 100644 --- a/wxPython/src/msw/htmlhelp.cpp +++ b/wxPython/src/msw/htmlhelp.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -191,7 +190,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetBookFile(PyObject *self, PyObject *ar 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 @@ -228,7 +227,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetTitle(PyObject *self, PyObject *args, 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 @@ -265,7 +264,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetStart(PyObject *self, PyObject *args, 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 @@ -302,7 +301,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetBasePath(PyObject *self, PyObject *ar 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 @@ -549,7 +548,7 @@ static PyObject *_wrap_wxHtmlBookRecord_GetFullPath(PyObject *self, PyObject *ar 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 @@ -646,7 +645,7 @@ static PyObject *_wrap_wxHtmlContentsItem_GetName(PyObject *self, PyObject *args 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 @@ -683,7 +682,7 @@ static PyObject *_wrap_wxHtmlContentsItem_GetPage(PyObject *self, PyObject *args 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 @@ -868,7 +867,7 @@ static PyObject *_wrap_wxHtmlSearchStatus_GetName(PyObject *self, PyObject *args 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 @@ -1076,7 +1075,7 @@ static PyObject *_wrap_wxHtmlHelpData_FindPageByName(PyObject *self, PyObject *a 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 @@ -1118,7 +1117,7 @@ static PyObject *_wrap_wxHtmlHelpData_FindPageById(PyObject *self, PyObject *arg 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 diff --git a/wxPython/src/msw/htmlhelp.py b/wxPython/src/msw/htmlhelp.py index fd3a642bac..33fdd1e5df 100644 --- a/wxPython/src/msw/htmlhelp.py +++ b/wxPython/src/msw/htmlhelp.py @@ -154,9 +154,12 @@ class wxHtmlHelpDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,htmlhelpc=htmlhelpc): - if self.thisown == 1 : - htmlhelpc.delete_wxHtmlHelpData(self) + def __del__(self, delfunc=htmlhelpc.delete_wxHtmlHelpData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetTempDir(self, *_args, **_kwargs): val = apply(htmlhelpc.wxHtmlHelpData_SetTempDir,(self,) + _args, _kwargs) return val @@ -246,9 +249,12 @@ class wxHtmlHelpControllerPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,htmlhelpc=htmlhelpc): - if self.thisown == 1 : - htmlhelpc.delete_wxHtmlHelpController(self) + def __del__(self, delfunc=htmlhelpc.delete_wxHtmlHelpController): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetTitleFormat(self, *_args, **_kwargs): val = apply(htmlhelpc.wxHtmlHelpController_SetTitleFormat,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/image.cpp b/wxPython/src/msw/image.cpp index 9e9d25c2bc..ecb63fc831 100644 --- a/wxPython/src/msw/image.cpp +++ b/wxPython/src/msw/image.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -226,8 +225,7 @@ static PyObject *_wrap_wxImageFromBitmap(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxImageFromBitmap",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImageFromBitmap. Expected _wxBitmap_p."); return NULL; } @@ -436,8 +434,7 @@ static PyObject *_wrap_wxBitmapFromImage(PyObject *self, PyObject *args, PyObjec if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxBitmapFromImage",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBitmapFromImage. Expected _wxImage_p."); return NULL; } @@ -492,7 +489,7 @@ static PyObject *_wrap_wxImageHandler_GetName(PyObject *self, PyObject *args, Py 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 @@ -529,7 +526,7 @@ static PyObject *_wrap_wxImageHandler_GetExtension(PyObject *self, PyObject *arg 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 @@ -594,7 +591,7 @@ static PyObject *_wrap_wxImageHandler_GetMimeType(PyObject *self, PyObject *args 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 @@ -1669,8 +1666,7 @@ static PyObject *_wrap_wxImage_SetMaskFromImage(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImage_SetMaskFromImage. Expected _wxImage_p."); return NULL; } @@ -2251,8 +2247,7 @@ static PyObject *_wrap_wxImage_Paste(PyObject *self, PyObject *args, PyObject *k } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxImage_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxImage_Paste. Expected _wxImage_p."); return NULL; } @@ -2336,6 +2331,52 @@ static PyObject *_wrap_wxImage_GetData(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void wxImage_SetDataBuffer(wxImage *self,PyObject * data) { + unsigned char* buffer; + int size; + + if (!PyArg_Parse(data, "w#", &buffer, &size)) + return; + + if (size != self->GetWidth() * self->GetHeight() * 3) { + PyErr_SetString(PyExc_TypeError, "Incorrect buffer size"); + return; + } + + self->SetData(buffer); + } +static PyObject *_wrap_wxImage_SetDataBuffer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxImage * _arg0; + PyObject * _arg1; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","data", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxImage_SetDataBuffer",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxImage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxImage_SetDataBuffer. Expected _wxImage_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxImage_SetDataBuffer(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static void wxImage_SetData(wxImage *self,PyObject * data) { unsigned char* dataPtr; @@ -2863,7 +2904,7 @@ static PyObject *_wrap_wxImage_GetOption(PyObject *self, PyObject *args, PyObjec 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 @@ -3162,6 +3203,7 @@ static PyMethodDef imagecMethods[] = { { "wxImage_GetMaskRed", (PyCFunction) _wrap_wxImage_GetMaskRed, METH_VARARGS | METH_KEYWORDS }, { "wxImage_SetMaskColour", (PyCFunction) _wrap_wxImage_SetMaskColour, METH_VARARGS | METH_KEYWORDS }, { "wxImage_SetData", (PyCFunction) _wrap_wxImage_SetData, METH_VARARGS | METH_KEYWORDS }, + { "wxImage_SetDataBuffer", (PyCFunction) _wrap_wxImage_SetDataBuffer, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetData", (PyCFunction) _wrap_wxImage_GetData, METH_VARARGS | METH_KEYWORDS }, { "wxImage_GetDataBuffer", (PyCFunction) _wrap_wxImage_GetDataBuffer, METH_VARARGS | METH_KEYWORDS }, { "wxImage_Paste", (PyCFunction) _wrap_wxImage_Paste, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/image.py b/wxPython/src/msw/image.py index 51a559ae51..d19383f178 100644 --- a/wxPython/src/msw/image.py +++ b/wxPython/src/msw/image.py @@ -192,9 +192,12 @@ class wxImagePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,imagec=imagec): - if self.thisown == 1 : - imagec.delete_wxImage(self) + def __del__(self, delfunc=imagec.delete_wxImage): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Create(self, *_args, **_kwargs): val = apply(imagec.wxImage_Create,(self,) + _args, _kwargs) return val @@ -271,6 +274,9 @@ class wxImagePtr(wxObjectPtr): def GetData(self, *_args, **_kwargs): val = apply(imagec.wxImage_GetData,(self,) + _args, _kwargs) return val + def SetDataBuffer(self, *_args, **_kwargs): + val = apply(imagec.wxImage_SetDataBuffer,(self,) + _args, _kwargs) + return val def SetData(self, *_args, **_kwargs): val = apply(imagec.wxImage_SetData,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/mdi.cpp b/wxPython/src/msw/mdi.cpp index ebf0951e78..6e8451aa1b 100644 --- a/wxPython/src/msw/mdi.cpp +++ b/wxPython/src/msw/mdi.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index e601f3767a..4fcae32416 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -59,6 +58,7 @@ extern PyObject *SWIG_newvarlink(void); #include #include #include +#include static PyObject* t_output_helper(PyObject* target, PyObject* o) { @@ -102,7 +102,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { if (dest != wxRect(0,0,0,0)) { wxPyBeginBlockThreads(); wxRect* newRect = new wxRect(dest); - obj = wxPyConstructObject((void*)newRect, "wxRect"); + obj = wxPyConstructObject((void*)newRect, wxT("wxRect")); PyObject* one = PyInt_FromLong(1); PyObject_SetAttrString(obj, "thisown", one); Py_DECREF(one); @@ -113,13 +113,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return Py_None; } - wxString wxGetResource(const wxString& section, const wxString& entry, - const wxString& file = wxPyEmptyString) { - wxChar * retval; - wxGetResource(section, entry, &retval, file); - return retval; - } - #if 0 // we want to use the definition from the header, not the // one SWIG will generate. extern wxAcceleratorTable wxNullAcceleratorTable; @@ -201,43 +194,6 @@ static PyObject *_wrap_wxRegisterId(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } -static PyObject *_wrap_NewId(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":NewId",_kwnames)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (long )wxNewId(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("l",_result); - return _resultobj; -} - -static PyObject *_wrap_RegisterId(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - long _arg0; - char *_kwnames[] = { "id", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:RegisterId",_kwnames,&_arg0)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRegisterId(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - static PyObject *_wrap_wxGetCurrentId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; long _result; @@ -403,7 +359,7 @@ static PyObject *_wrap_wxNow(PyObject *self, PyObject *args, PyObject *kwargs) { 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 @@ -516,7 +472,7 @@ static PyObject *_wrap_wxGetOsDescription(PyObject *self, PyObject *args, PyObje 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 @@ -641,67 +597,6 @@ static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, P return _resultobj; } -static PyObject *_wrap_wxGetResource(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxString * _arg0; - wxString * _arg1; - wxString * _arg2 = (wxString *) &wxPyEmptyString; - PyObject * _obj0 = 0; - PyObject * _obj1 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "section","entry","file", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|O:wxGetResource",_kwnames,&_obj0,&_obj1,&_obj2)) - return NULL; -{ - _arg0 = wxString_in_helper(_obj0); - if (_arg0 == NULL) - return NULL; -} -{ - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; -} - if (_obj2) -{ - _arg2 = wxString_in_helper(_obj2); - if (_arg2 == NULL) - return NULL; -} -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxGetResource(*_arg0,*_arg1,*_arg2)); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -}{ -#if wxUSE_UNICODE - _resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} -{ - if (_obj0) - delete _arg0; -} -{ - if (_obj1) - delete _arg1; -} -{ - if (_obj2) - delete _arg2; -} -{ - delete _result; -} - return _resultobj; -} - static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxString * _result; @@ -725,7 +620,7 @@ static PyObject *_wrap_wxStripMenuCodes(PyObject *self, PyObject *args, PyObject 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 @@ -756,7 +651,7 @@ static PyObject *_wrap_wxGetEmailAddress(PyObject *self, PyObject *args, PyObjec 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 @@ -783,7 +678,7 @@ static PyObject *_wrap_wxGetHostName(PyObject *self, PyObject *args, PyObject *k 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 @@ -810,7 +705,7 @@ static PyObject *_wrap_wxGetFullHostName(PyObject *self, PyObject *args, PyObjec 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 @@ -837,7 +732,7 @@ static PyObject *_wrap_wxGetUserId(PyObject *self, PyObject *args, PyObject *kwa 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 @@ -864,7 +759,7 @@ static PyObject *_wrap_wxGetUserName(PyObject *self, PyObject *args, PyObject *k 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 @@ -891,7 +786,7 @@ static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kw 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 @@ -926,7 +821,7 @@ static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *k 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 @@ -1038,7 +933,7 @@ static PyObject *_wrap_wxObject_GetClassName(PyObject *self, PyObject *args, PyO 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 @@ -1473,24 +1368,26 @@ static PyObject *_wrap_wxSize_asTuple(PyObject *self, PyObject *args, PyObject * return _resultobj; } -static int wxSize___cmp__(wxSize *self,const wxSize * sz) { - if (! sz) return 1; - if (*self == *sz) return 0; - return -1; +static bool wxSize___eq__(wxSize *self,PyObject * obj) { + wxSize tmp; + wxSize* ptr = &tmp; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxSize_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; + return *self == *ptr; } -static PyObject *_wrap_wxSize___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxSize___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + bool _result; wxSize * _arg0; - wxSize * _arg1; + PyObject * _arg1; wxSize temp; PyObject * _obj0 = 0; - wxSize temp0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","sz", NULL }; + char *_kwnames[] = { "self","obj", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSize___cmp__",_kwnames,&_obj0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSize___eq__",_kwnames,&_obj0,&_obj1)) return NULL; { _arg0 = &temp; @@ -1498,13 +1395,50 @@ static PyObject *_wrap_wxSize___cmp__(PyObject *self, PyObject *args, PyObject * return NULL; } { - _arg1 = &temp0; - if (! wxSize_helper(_obj1, &_arg1)) + _arg1 = _obj1; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSize___eq__(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static bool wxSize___ne__(wxSize *self,PyObject * obj) { + wxSize tmp; + wxSize* ptr = &tmp; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxSize_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; + return *self != *ptr; + } +static PyObject *_wrap_wxSize___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSize * _arg0; + PyObject * _arg1; + wxSize temp; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","obj", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSize___ne__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxSize_helper(_obj0, &_arg0)) return NULL; } +{ + _arg1 = _obj1; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSize___cmp__(_arg0,_arg1); + _result = (bool )wxSize___ne__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1745,9 +1679,8 @@ static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObj return _resultobj; } -static wxRealPoint wxRealPoint___add__(wxRealPoint *self,const wxRealPoint * p) { - if (! p) return *self; - return *self + *p; +static wxRealPoint wxRealPoint___add__(wxRealPoint *self,const wxRealPoint & p) { + return *self + p; } static PyObject *_wrap_wxRealPoint___add__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1776,7 +1709,7 @@ static PyObject *_wrap_wxRealPoint___add__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRealPoint (wxRealPoint___add__(_arg0,_arg1)); + _result = new wxRealPoint (wxRealPoint___add__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1785,9 +1718,8 @@ static PyObject *_wrap_wxRealPoint___add__(PyObject *self, PyObject *args, PyObj return _resultobj; } -static wxRealPoint wxRealPoint___sub__(wxRealPoint *self,const wxRealPoint * p) { - if (! p) return *self; - return *self - *p; +static wxRealPoint wxRealPoint___sub__(wxRealPoint *self,const wxRealPoint & p) { + return *self - p; } static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1816,7 +1748,7 @@ static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRealPoint (wxRealPoint___sub__(_arg0,_arg1)); + _result = new wxRealPoint (wxRealPoint___sub__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1825,24 +1757,26 @@ static PyObject *_wrap_wxRealPoint___sub__(PyObject *self, PyObject *args, PyObj return _resultobj; } -static int wxRealPoint___cmp__(wxRealPoint *self,const wxRealPoint * p) { - if (! p) return 1; - if (*self == *p) return 0; - return -1; +static bool wxRealPoint___eq__(wxRealPoint *self,PyObject * obj) { + wxRealPoint tmp; + wxRealPoint* ptr = &tmp; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxRealPoint_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; + return *self == *ptr; } -static PyObject *_wrap_wxRealPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxRealPoint___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + bool _result; wxRealPoint * _arg0; - wxRealPoint * _arg1; + PyObject * _arg1; wxRealPoint temp; PyObject * _obj0 = 0; - wxRealPoint temp0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","p", NULL }; + char *_kwnames[] = { "self","obj", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___cmp__",_kwnames,&_obj0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___eq__",_kwnames,&_obj0,&_obj1)) return NULL; { _arg0 = &temp; @@ -1850,13 +1784,50 @@ static PyObject *_wrap_wxRealPoint___cmp__(PyObject *self, PyObject *args, PyObj return NULL; } { - _arg1 = &temp0; - if (! wxRealPoint_helper(_obj1, &_arg1)) + _arg1 = _obj1; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRealPoint___eq__(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static bool wxRealPoint___ne__(wxRealPoint *self,PyObject * obj) { + wxRealPoint tmp; + wxRealPoint* ptr = &tmp; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxRealPoint_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; + return *self != *ptr; + } +static PyObject *_wrap_wxRealPoint___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRealPoint * _arg0; + PyObject * _arg1; + wxRealPoint temp; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","obj", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRealPoint___ne__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRealPoint_helper(_obj0, &_arg0)) return NULL; } +{ + _arg1 = _obj1; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRealPoint___cmp__(_arg0,_arg1); + _result = (bool )wxRealPoint___ne__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2097,9 +2068,8 @@ static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject return _resultobj; } -static wxPoint wxPoint___add__(wxPoint *self,const wxPoint * p) { - if (! p) return *self; - return *self + *p; +static wxPoint wxPoint___add__(wxPoint *self,const wxPoint & p) { + return *self + p; } static PyObject *_wrap_wxPoint___add__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2128,7 +2098,7 @@ static PyObject *_wrap_wxPoint___add__(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPoint___add__(_arg0,_arg1)); + _result = new wxPoint (wxPoint___add__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2137,9 +2107,8 @@ static PyObject *_wrap_wxPoint___add__(PyObject *self, PyObject *args, PyObject return _resultobj; } -static wxPoint wxPoint___sub__(wxPoint *self,const wxPoint * p) { - if (! p) return *self; - return *self - *p; +static wxPoint wxPoint___sub__(wxPoint *self,const wxPoint & p) { + return *self - p; } static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2168,7 +2137,7 @@ static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxPoint___sub__(_arg0,_arg1)); + _result = new wxPoint (wxPoint___sub__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2177,24 +2146,26 @@ static PyObject *_wrap_wxPoint___sub__(PyObject *self, PyObject *args, PyObject return _resultobj; } -static int wxPoint___cmp__(wxPoint *self,const wxPoint * p) { - if (! p) return 1; - if (*self == *p) return 0; - return -1; +static bool wxPoint___eq__(wxPoint *self,PyObject * obj) { + wxPoint tmp; + wxPoint* ptr = &tmp; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxPoint_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; + return *self == *ptr; } -static PyObject *_wrap_wxPoint___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxPoint___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + bool _result; wxPoint * _arg0; - wxPoint * _arg1; + PyObject * _arg1; wxPoint temp; PyObject * _obj0 = 0; - wxPoint temp0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","p", NULL }; + char *_kwnames[] = { "self","obj", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___cmp__",_kwnames,&_obj0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___eq__",_kwnames,&_obj0,&_obj1)) return NULL; { _arg0 = &temp; @@ -2202,13 +2173,50 @@ static PyObject *_wrap_wxPoint___cmp__(PyObject *self, PyObject *args, PyObject return NULL; } { - _arg1 = &temp0; - if (! wxPoint_helper(_obj1, &_arg1)) + _arg1 = _obj1; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxPoint___eq__(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static bool wxPoint___ne__(wxPoint *self,PyObject * obj) { + wxPoint tmp; + wxPoint* ptr = &tmp; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxPoint_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; + return *self != *ptr; + } +static PyObject *_wrap_wxPoint___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPoint * _arg0; + PyObject * _arg1; + wxPoint temp; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","obj", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint___ne__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) return NULL; } +{ + _arg1 = _obj1; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxPoint___cmp__(_arg0,_arg1); + _result = (bool )wxPoint___ne__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2224,7 +2232,7 @@ static PyObject *_wrap_new_wxRect(PyObject *self, PyObject *args, PyObject *kwar int _arg1 = (int ) 0; int _arg2 = (int ) 0; int _arg3 = (int ) 0; - char *_kwnames[] = { "x","y","w","h", NULL }; + char *_kwnames[] = { "x","y","width","height", NULL }; char _ptemp[128]; self = self; @@ -2841,8 +2849,8 @@ static PyObject *_wrap_wxRect_SetBottom(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxRect_Inflate(_swigobj,_swigarg0,_swigarg1) (_swigobj->Inflate(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRect_Inflate(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxRect_Deflate(_swigobj,_swigarg0,_swigarg1) (_swigobj->Deflate(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxRect_Deflate(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxRect * _arg0; int _arg1; @@ -2852,7 +2860,7 @@ static PyObject *_wrap_wxRect_Inflate(PyObject *self, PyObject *args, PyObject * char *_kwnames[] = { "self","dx","dy", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxRect_Inflate",_kwnames,&_obj0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxRect_Deflate",_kwnames,&_obj0,&_arg1,&_arg2)) return NULL; { _arg0 = &temp; @@ -2861,7 +2869,7 @@ static PyObject *_wrap_wxRect_Inflate(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRect_Inflate(_arg0,_arg1,_arg2); + wxRect_Deflate(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2870,19 +2878,18 @@ static PyObject *_wrap_wxRect_Inflate(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define wxRect_Inside(_swigobj,_swigarg0,_swigarg1) (_swigobj->Inside(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRect_Inside(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxRect_Inflate(_swigobj,_swigarg0,_swigarg1) (_swigobj->Inflate(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxRect_Inflate(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxRect * _arg0; int _arg1; int _arg2; wxRect temp; PyObject * _obj0 = 0; - char *_kwnames[] = { "self","cx","cy", NULL }; + char *_kwnames[] = { "self","dx","dy", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxRect_Inside",_kwnames,&_obj0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxRect_Inflate",_kwnames,&_obj0,&_arg1,&_arg2)) return NULL; { _arg0 = &temp; @@ -2891,26 +2898,28 @@ static PyObject *_wrap_wxRect_Inside(PyObject *self, PyObject *args, PyObject *k } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxRect_Inside(_arg0,_arg1,_arg2); + wxRect_Inflate(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxRect_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) -static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxRect_InsideXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->Inside(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxRect_InsideXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + bool _result; wxRect * _arg0; int _arg1; + int _arg2; wxRect temp; PyObject * _obj0 = 0; - char *_kwnames[] = { "self","x", NULL }; + char *_kwnames[] = { "self","cx","cy", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxRect_x_set",_kwnames,&_obj0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxRect_InsideXY",_kwnames,&_obj0,&_arg1,&_arg2)) return NULL; { _arg0 = &temp; @@ -2919,7 +2928,7 @@ static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_x_set(_arg0,_arg1); + _result = (bool )wxRect_InsideXY(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2927,26 +2936,34 @@ static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } -#define wxRect_x_get(_swigobj) ((int ) _swigobj->x) -static PyObject *_wrap_wxRect_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxRect_Inside(_swigobj,_swigarg0) (_swigobj->Inside(_swigarg0)) +static PyObject *_wrap_wxRect_Inside(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + bool _result; wxRect * _arg0; + wxPoint * _arg1; wxRect temp; PyObject * _obj0 = 0; - char *_kwnames[] = { "self", NULL }; + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRect_x_get",_kwnames,&_obj0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect_Inside",_kwnames,&_obj0,&_obj1)) return NULL; { _arg0 = &temp; if (! wxRect_helper(_obj0, &_arg0)) return NULL; } +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_x_get(_arg0); + _result = (bool )wxRect_Inside(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2954,27 +2971,34 @@ static PyObject *_wrap_wxRect_x_get(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } -#define wxRect_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) -static PyObject *_wrap_wxRect_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxRect_Intersects(_swigobj,_swigarg0) (_swigobj->Intersects(_swigarg0)) +static PyObject *_wrap_wxRect_Intersects(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + bool _result; wxRect * _arg0; - int _arg1; + wxRect * _arg1; wxRect temp; PyObject * _obj0 = 0; - char *_kwnames[] = { "self","y", NULL }; + wxRect temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rect", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxRect_y_set",_kwnames,&_obj0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect_Intersects",_kwnames,&_obj0,&_obj1)) return NULL; { _arg0 = &temp; if (! wxRect_helper(_obj0, &_arg0)) return NULL; } +{ + _arg1 = &temp0; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_y_set(_arg0,_arg1); + _result = (bool )wxRect_Intersects(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2982,17 +3006,18 @@ static PyObject *_wrap_wxRect_y_set(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } -#define wxRect_y_get(_swigobj) ((int ) _swigobj->y) -static PyObject *_wrap_wxRect_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxRect_OffsetXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->Offset(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxRect_OffsetXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; wxRect * _arg0; + int _arg1; + int _arg2; wxRect temp; PyObject * _obj0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","dx","dy", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRect_y_get",_kwnames,&_obj0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxRect_OffsetXY",_kwnames,&_obj0,&_arg1,&_arg2)) return NULL; { _arg0 = &temp; @@ -3001,24 +3026,170 @@ static PyObject *_wrap_wxRect_y_get(PyObject *self, PyObject *args, PyObject *kw } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect_y_get(_arg0); + wxRect_OffsetXY(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxRect_width_set(_swigobj,_swigval) (_swigobj->width = _swigval,_swigval) -static PyObject *_wrap_wxRect_width_set(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxRect_Offset(_swigobj,_swigarg0) (_swigobj->Offset(_swigarg0)) +static PyObject *_wrap_wxRect_Offset(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; wxRect * _arg0; - int _arg1; + wxPoint * _arg1; wxRect temp; PyObject * _obj0 = 0; - char *_kwnames[] = { "self","width", NULL }; - + wxPoint temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect_Offset",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_Offset(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxRect_x_set(_swigobj,_swigval) (_swigobj->x = _swigval,_swigval) +static PyObject *_wrap_wxRect_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxRect * _arg0; + int _arg1; + wxRect temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxRect_x_set",_kwnames,&_obj0,&_arg1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_x_set(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRect_x_get(_swigobj) ((int ) _swigobj->x) +static PyObject *_wrap_wxRect_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxRect * _arg0; + wxRect temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRect_x_get",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_x_get(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRect_y_set(_swigobj,_swigval) (_swigobj->y = _swigval,_swigval) +static PyObject *_wrap_wxRect_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxRect * _arg0; + int _arg1; + wxRect temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxRect_y_set",_kwnames,&_obj0,&_arg1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_y_set(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRect_y_get(_swigobj) ((int ) _swigobj->y) +static PyObject *_wrap_wxRect_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxRect * _arg0; + wxRect temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxRect_y_get",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxRect_y_get(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxRect_width_set(_swigobj,_swigval) (_swigobj->width = _swigval,_swigval) +static PyObject *_wrap_wxRect_width_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxRect * _arg0; + int _arg1; + wxRect temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","width", NULL }; + self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxRect_width_set",_kwnames,&_obj0,&_arg1)) return NULL; @@ -3119,6 +3290,42 @@ static PyObject *_wrap_wxRect_height_get(PyObject *self, PyObject *args, PyObjec return _resultobj; } +static void wxRect_Set(wxRect *self,int x,int y,int width,int height) { + self->x = x; + self->y = y; + self->width = width; + self->height = height; + } +static PyObject *_wrap_wxRect_Set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxRect * _arg0; + int _arg1 = (int ) 0; + int _arg2 = (int ) 0; + int _arg3 = (int ) 0; + int _arg4 = (int ) 0; + wxRect temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","x","y","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|iiii:wxRect_Set",_kwnames,&_obj0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxRect_Set(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyObject * wxRect_asTuple(wxRect *self) { wxPyBeginBlockThreads(); PyObject* tup = PyTuple_New(4); @@ -3157,9 +3364,8 @@ static PyObject *_wrap_wxRect_asTuple(PyObject *self, PyObject *args, PyObject * return _resultobj; } -static wxRect wxRect___add__(wxRect *self,const wxRect * rect) { - if (! rect) return *self; - return *self + *rect; +static wxRect wxRect___add__(wxRect *self,const wxRect & rect) { + return *self + rect; } static PyObject *_wrap_wxRect___add__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -3188,7 +3394,7 @@ static PyObject *_wrap_wxRect___add__(PyObject *self, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxRect___add__(_arg0,_arg1)); + _result = new wxRect (wxRect___add__(_arg0,*_arg1)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3197,24 +3403,26 @@ static PyObject *_wrap_wxRect___add__(PyObject *self, PyObject *args, PyObject * return _resultobj; } -static int wxRect___cmp__(wxRect *self,const wxRect * rect) { - if (! rect) return 1; - if (*self == *rect) return 0; - return -1; +static bool wxRect___eq__(wxRect *self,PyObject * obj) { + wxRect tmp; + wxRect* ptr = &tmp; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxRect_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; + return *self == *ptr; } -static PyObject *_wrap_wxRect___cmp__(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxRect___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; + bool _result; wxRect * _arg0; - wxRect * _arg1; + PyObject * _arg1; wxRect temp; PyObject * _obj0 = 0; - wxRect temp0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","rect", NULL }; + char *_kwnames[] = { "self","obj", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect___cmp__",_kwnames,&_obj0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect___eq__",_kwnames,&_obj0,&_obj1)) return NULL; { _arg0 = &temp; @@ -3222,13 +3430,50 @@ static PyObject *_wrap_wxRect___cmp__(PyObject *self, PyObject *args, PyObject * return NULL; } { - _arg1 = &temp0; - if (! wxRect_helper(_obj1, &_arg1)) + _arg1 = _obj1; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxRect___eq__(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static bool wxRect___ne__(wxRect *self,PyObject * obj) { + wxRect tmp; + wxRect* ptr = &tmp; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxRect_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; + return *self != *ptr; + } +static PyObject *_wrap_wxRect___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxRect * _arg0; + PyObject * _arg1; + wxRect temp; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","obj", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxRect___ne__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxRect_helper(_obj0, &_arg0)) return NULL; } +{ + _arg1 = _obj1; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxRect___cmp__(_arg0,_arg1); + _result = (bool )wxRect___ne__(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3236,6 +3481,903 @@ static PyObject *_wrap_wxRect___cmp__(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define wxPoint2DDouble_m_x_set(_swigobj,_swigval) (_swigobj->m_x = _swigval,_swigval) +static PyObject *_wrap_wxPoint2DDouble_m_x_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxPoint2DDouble * _arg0; + double _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","m_x", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Od:wxPoint2DDouble_m_x_set",_kwnames,&_obj0,&_arg1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxPoint2DDouble_m_x_set(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxPoint2DDouble_m_x_get(_swigobj) ((double ) _swigobj->m_x) +static PyObject *_wrap_wxPoint2DDouble_m_x_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPoint2DDouble_m_x_get",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxPoint2DDouble_m_x_get(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxPoint2DDouble_m_y_set(_swigobj,_swigval) (_swigobj->m_y = _swigval,_swigval) +static PyObject *_wrap_wxPoint2DDouble_m_y_set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxPoint2DDouble * _arg0; + double _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","m_y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Od:wxPoint2DDouble_m_y_set",_kwnames,&_obj0,&_arg1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxPoint2DDouble_m_y_set(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxPoint2DDouble_m_y_get(_swigobj) ((double ) _swigobj->m_y) +static PyObject *_wrap_wxPoint2DDouble_m_y_get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPoint2DDouble_m_y_get",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxPoint2DDouble_m_y_get(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define new_wxPoint2DDouble(_swigarg0,_swigarg1) (new wxPoint2DDouble(_swigarg0,_swigarg1)) +static PyObject *_wrap_new_wxPoint2DDouble(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _result; + double _arg0 = (double ) 0; + double _arg1 = (double ) 0; + char *_kwnames[] = { "x","y", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|dd:new_wxPoint2DDouble",_kwnames,&_arg0,&_arg1)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxPoint2DDouble *)new_wxPoint2DDouble(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint2DDouble_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxPoint2DDoubleCopy(_swigarg0) (new wxPoint2DDouble(_swigarg0)) +static PyObject *_wrap_new_wxPoint2DDoubleCopy(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "pt", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPoint2DDoubleCopy",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxPoint2DDouble *)new_wxPoint2DDoubleCopy(*_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint2DDouble_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define new_wxPoint2DDoubleFromPoint(_swigarg0) (new wxPoint2DDouble(_swigarg0)) +static PyObject *_wrap_new_wxPoint2DDoubleFromPoint(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _result; + wxPoint * _arg0; + wxPoint temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "pt", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPoint2DDoubleFromPoint",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxPoint2DDouble *)new_wxPoint2DDoubleFromPoint(*_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint2DDouble_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxPoint2DDouble_GetFloor(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetFloor(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPoint2DDouble_GetFloor(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + wxPoint2DDouble temp1; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPoint2DDouble_GetFloor",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp1; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPoint2DDouble_GetFloor(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxPoint2DDouble_GetRounded(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetRounded(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPoint2DDouble_GetRounded(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _arg0; + int * _arg1; + int temp; + int * _arg2; + int temp0; + wxPoint2DDouble temp1; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; +{ + _arg1 = &temp; +} +{ + _arg2 = &temp0; +} + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPoint2DDouble_GetRounded",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp1; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPoint2DDouble_GetRounded(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyInt_FromLong((long) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; +} + +#define wxPoint2DDouble_GetVectorLength(_swigobj) (_swigobj->GetVectorLength()) +static PyObject *_wrap_wxPoint2DDouble_GetVectorLength(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPoint2DDouble_GetVectorLength",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxPoint2DDouble_GetVectorLength(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxPoint2DDouble_GetVectorAngle(_swigobj) (_swigobj->GetVectorAngle()) +static PyObject *_wrap_wxPoint2DDouble_GetVectorAngle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPoint2DDouble_GetVectorAngle",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxPoint2DDouble_GetVectorAngle(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxPoint2DDouble_SetVectorLength(_swigobj,_swigarg0) (_swigobj->SetVectorLength(_swigarg0)) +static PyObject *_wrap_wxPoint2DDouble_SetVectorLength(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _arg0; + double _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","length", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Od:wxPoint2DDouble_SetVectorLength",_kwnames,&_obj0,&_arg1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPoint2DDouble_SetVectorLength(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPoint2DDouble_SetVectorAngle(_swigobj,_swigarg0) (_swigobj->SetVectorAngle(_swigarg0)) +static PyObject *_wrap_wxPoint2DDouble_SetVectorAngle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _arg0; + double _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","degrees", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Od:wxPoint2DDouble_SetVectorAngle",_kwnames,&_obj0,&_arg1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPoint2DDouble_SetVectorAngle(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPoint2DDouble_GetDistance(_swigobj,_swigarg0) (_swigobj->GetDistance(_swigarg0)) +static PyObject *_wrap_wxPoint2DDouble_GetDistance(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble * _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + wxPoint2DDouble temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint2DDouble_GetDistance",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint2DDouble_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxPoint2DDouble_GetDistance(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxPoint2DDouble_GetDistanceSquare(_swigobj,_swigarg0) (_swigobj->GetDistanceSquare(_swigarg0)) +static PyObject *_wrap_wxPoint2DDouble_GetDistanceSquare(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble * _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + wxPoint2DDouble temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint2DDouble_GetDistanceSquare",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint2DDouble_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxPoint2DDouble_GetDistanceSquare(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxPoint2DDouble_GetDotProduct(_swigobj,_swigarg0) (_swigobj->GetDotProduct(_swigarg0)) +static PyObject *_wrap_wxPoint2DDouble_GetDotProduct(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble * _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + wxPoint2DDouble temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","vec", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint2DDouble_GetDotProduct",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint2DDouble_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxPoint2DDouble_GetDotProduct(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +#define wxPoint2DDouble_GetCrossProduct(_swigobj,_swigarg0) (_swigobj->GetCrossProduct(_swigarg0)) +static PyObject *_wrap_wxPoint2DDouble_GetCrossProduct(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + double _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble * _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + wxPoint2DDouble temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","vec", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint2DDouble_GetCrossProduct",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint2DDouble_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (double )wxPoint2DDouble_GetCrossProduct(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("d",_result); + return _resultobj; +} + +static void wxPoint2DDouble_Set(wxPoint2DDouble *self,double x,double y) { + self->m_x = x; + self->m_y = y; + } +static PyObject *_wrap_wxPoint2DDouble_Set(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _arg0; + double _arg1 = (double ) 0; + double _arg2 = (double ) 0; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|dd:wxPoint2DDouble_Set",_kwnames,&_obj0,&_arg1,&_arg2)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPoint2DDouble_Set(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static wxPoint2DDouble wxPoint2DDouble___neg__(wxPoint2DDouble *self) { return -(*self); } +static PyObject *_wrap_wxPoint2DDouble___neg__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPoint2DDouble___neg__",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxPoint2DDouble (wxPoint2DDouble___neg__(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint2DDouble_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static wxPoint2DDouble & wxPoint2DDouble___iadd__(wxPoint2DDouble *self,const wxPoint2DDouble & pt) { return (*self) += pt; } +static PyObject *_wrap_wxPoint2DDouble___iadd__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble * _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + wxPoint2DDouble temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint2DDouble___iadd__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint2DDouble_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPoint2DDouble & _result_ref = wxPoint2DDouble___iadd__(_arg0,*_arg1); + _result = (wxPoint2DDouble *) &_result_ref; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint2DDouble_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static wxPoint2DDouble & wxPoint2DDouble___isub__(wxPoint2DDouble *self,const wxPoint2DDouble & pt) { return (*self) -= pt; } +static PyObject *_wrap_wxPoint2DDouble___isub__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble * _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + wxPoint2DDouble temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint2DDouble___isub__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint2DDouble_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPoint2DDouble & _result_ref = wxPoint2DDouble___isub__(_arg0,*_arg1); + _result = (wxPoint2DDouble *) &_result_ref; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint2DDouble_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static wxPoint2DDouble & wxPoint2DDouble___imul__(wxPoint2DDouble *self,const wxPoint2DDouble & pt) { return (*self) *= pt; } +static PyObject *_wrap_wxPoint2DDouble___imul__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble * _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + wxPoint2DDouble temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint2DDouble___imul__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint2DDouble_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPoint2DDouble & _result_ref = wxPoint2DDouble___imul__(_arg0,*_arg1); + _result = (wxPoint2DDouble *) &_result_ref; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint2DDouble_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static wxPoint2DDouble & wxPoint2DDouble___idiv__(wxPoint2DDouble *self,const wxPoint2DDouble & pt) { return (*self) /= pt; } +static PyObject *_wrap_wxPoint2DDouble___idiv__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint2DDouble * _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble * _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + wxPoint2DDouble temp0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","pt", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint2DDouble___idiv__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = &temp0; + if (! wxPoint2DDouble_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPoint2DDouble & _result_ref = wxPoint2DDouble___idiv__(_arg0,*_arg1); + _result = (wxPoint2DDouble *) &_result_ref; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint2DDouble_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +static bool wxPoint2DDouble___eq__(wxPoint2DDouble *self,PyObject * obj) { + wxPoint2DDouble tmp; + wxPoint2DDouble* ptr = &tmp; + if (obj == Py_None) return FALSE; + wxPyBLOCK_THREADS(bool success = wxPoint2DDouble_helper(obj, &ptr); PyErr_Clear()); + if (! success) return FALSE; + return *self == *ptr; + } +static PyObject *_wrap_wxPoint2DDouble___eq__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPoint2DDouble * _arg0; + PyObject * _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","obj", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint2DDouble___eq__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = _obj1; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxPoint2DDouble___eq__(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static bool wxPoint2DDouble___ne__(wxPoint2DDouble *self,PyObject * obj) { + wxPoint2DDouble tmp; + wxPoint2DDouble* ptr = &tmp; + if (obj == Py_None) return TRUE; + wxPyBLOCK_THREADS(bool success = wxPoint2DDouble_helper(obj, &ptr); PyErr_Clear()); + if (! success) return TRUE; + return *self != *ptr; + } +static PyObject *_wrap_wxPoint2DDouble___ne__(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPoint2DDouble * _arg0; + PyObject * _arg1; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","obj", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPoint2DDouble___ne__",_kwnames,&_obj0,&_obj1)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + _arg1 = _obj1; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxPoint2DDouble___ne__(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject * wxPoint2DDouble_asTuple(wxPoint2DDouble *self) { + wxPyBeginBlockThreads(); + PyObject* tup = PyTuple_New(2); + PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->m_x)); + PyTuple_SET_ITEM(tup, 1, PyFloat_FromDouble(self->m_y)); + wxPyEndBlockThreads(); + return tup; + } +static PyObject *_wrap_wxPoint2DDouble_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxPoint2DDouble * _arg0; + wxPoint2DDouble temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPoint2DDouble_asTuple",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = &temp; + if (! wxPoint2DDouble_helper(_obj0, &_arg0)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxPoint2DDouble_asTuple(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = _result; +} + return _resultobj; +} + static void *SwigwxIndividualLayoutConstraintTowxObject(void *ptr) { wxIndividualLayoutConstraint *src; wxObject *dest; @@ -4272,9 +5414,41 @@ static PyMethodDef misccMethods[] = { { "wxIndividualLayoutConstraint_AsIs", (PyCFunction) _wrap_wxIndividualLayoutConstraint_AsIs, METH_VARARGS | METH_KEYWORDS }, { "wxIndividualLayoutConstraint_Absolute", (PyCFunction) _wrap_wxIndividualLayoutConstraint_Absolute, METH_VARARGS | METH_KEYWORDS }, { "wxIndividualLayoutConstraint_Above", (PyCFunction) _wrap_wxIndividualLayoutConstraint_Above, METH_VARARGS | METH_KEYWORDS }, - { "wxRect___cmp__", (PyCFunction) _wrap_wxRect___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_asTuple", (PyCFunction) _wrap_wxPoint2DDouble_asTuple, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble___ne__", (PyCFunction) _wrap_wxPoint2DDouble___ne__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble___eq__", (PyCFunction) _wrap_wxPoint2DDouble___eq__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble___idiv__", (PyCFunction) _wrap_wxPoint2DDouble___idiv__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble___imul__", (PyCFunction) _wrap_wxPoint2DDouble___imul__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble___isub__", (PyCFunction) _wrap_wxPoint2DDouble___isub__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble___iadd__", (PyCFunction) _wrap_wxPoint2DDouble___iadd__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble___neg__", (PyCFunction) _wrap_wxPoint2DDouble___neg__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_Set", (PyCFunction) _wrap_wxPoint2DDouble_Set, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_GetCrossProduct", (PyCFunction) _wrap_wxPoint2DDouble_GetCrossProduct, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_GetDotProduct", (PyCFunction) _wrap_wxPoint2DDouble_GetDotProduct, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_GetDistanceSquare", (PyCFunction) _wrap_wxPoint2DDouble_GetDistanceSquare, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_GetDistance", (PyCFunction) _wrap_wxPoint2DDouble_GetDistance, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_SetVectorAngle", (PyCFunction) _wrap_wxPoint2DDouble_SetVectorAngle, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_SetVectorLength", (PyCFunction) _wrap_wxPoint2DDouble_SetVectorLength, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_GetVectorAngle", (PyCFunction) _wrap_wxPoint2DDouble_GetVectorAngle, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_GetVectorLength", (PyCFunction) _wrap_wxPoint2DDouble_GetVectorLength, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_GetRounded", (PyCFunction) _wrap_wxPoint2DDouble_GetRounded, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_GetFloor", (PyCFunction) _wrap_wxPoint2DDouble_GetFloor, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPoint2DDoubleFromPoint", (PyCFunction) _wrap_new_wxPoint2DDoubleFromPoint, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPoint2DDoubleCopy", (PyCFunction) _wrap_new_wxPoint2DDoubleCopy, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPoint2DDouble", (PyCFunction) _wrap_new_wxPoint2DDouble, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_y_get", (PyCFunction) _wrap_wxPoint2DDouble_m_y_get, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_y_set", (PyCFunction) _wrap_wxPoint2DDouble_m_y_set, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_x_get", (PyCFunction) _wrap_wxPoint2DDouble_m_x_get, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_x_set", (PyCFunction) _wrap_wxPoint2DDouble_m_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_m_y_get", (PyCFunction) _wrap_wxPoint2DDouble_m_y_get, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_m_y_set", (PyCFunction) _wrap_wxPoint2DDouble_m_y_set, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_m_x_get", (PyCFunction) _wrap_wxPoint2DDouble_m_x_get, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint2DDouble_m_x_set", (PyCFunction) _wrap_wxPoint2DDouble_m_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxRect___ne__", (PyCFunction) _wrap_wxRect___ne__, METH_VARARGS | METH_KEYWORDS }, + { "wxRect___eq__", (PyCFunction) _wrap_wxRect___eq__, METH_VARARGS | METH_KEYWORDS }, { "wxRect___add__", (PyCFunction) _wrap_wxRect___add__, METH_VARARGS | METH_KEYWORDS }, { "wxRect_asTuple", (PyCFunction) _wrap_wxRect_asTuple, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_Set", (PyCFunction) _wrap_wxRect_Set, METH_VARARGS | METH_KEYWORDS }, { "wxRect_height_get", (PyCFunction) _wrap_wxRect_height_get, METH_VARARGS | METH_KEYWORDS }, { "wxRect_height_set", (PyCFunction) _wrap_wxRect_height_set, METH_VARARGS | METH_KEYWORDS }, { "wxRect_width_get", (PyCFunction) _wrap_wxRect_width_get, METH_VARARGS | METH_KEYWORDS }, @@ -4283,8 +5457,13 @@ static PyMethodDef misccMethods[] = { { "wxRect_y_set", (PyCFunction) _wrap_wxRect_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxRect_x_get", (PyCFunction) _wrap_wxRect_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxRect_x_set", (PyCFunction) _wrap_wxRect_x_set, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_Offset", (PyCFunction) _wrap_wxRect_Offset, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_OffsetXY", (PyCFunction) _wrap_wxRect_OffsetXY, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_Intersects", (PyCFunction) _wrap_wxRect_Intersects, METH_VARARGS | METH_KEYWORDS }, { "wxRect_Inside", (PyCFunction) _wrap_wxRect_Inside, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_InsideXY", (PyCFunction) _wrap_wxRect_InsideXY, METH_VARARGS | METH_KEYWORDS }, { "wxRect_Inflate", (PyCFunction) _wrap_wxRect_Inflate, METH_VARARGS | METH_KEYWORDS }, + { "wxRect_Deflate", (PyCFunction) _wrap_wxRect_Deflate, METH_VARARGS | METH_KEYWORDS }, { "wxRect_SetBottom", (PyCFunction) _wrap_wxRect_SetBottom, METH_VARARGS | METH_KEYWORDS }, { "wxRect_SetTop", (PyCFunction) _wrap_wxRect_SetTop, METH_VARARGS | METH_KEYWORDS }, { "wxRect_SetRight", (PyCFunction) _wrap_wxRect_SetRight, METH_VARARGS | METH_KEYWORDS }, @@ -4307,7 +5486,8 @@ static PyMethodDef misccMethods[] = { { "wxRect_GetX", (PyCFunction) _wrap_wxRect_GetX, METH_VARARGS | METH_KEYWORDS }, { "delete_wxRect", (PyCFunction) _wrap_delete_wxRect, METH_VARARGS | METH_KEYWORDS }, { "new_wxRect", (PyCFunction) _wrap_new_wxRect, METH_VARARGS | METH_KEYWORDS }, - { "wxPoint___cmp__", (PyCFunction) _wrap_wxPoint___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___ne__", (PyCFunction) _wrap_wxPoint___ne__, METH_VARARGS | METH_KEYWORDS }, + { "wxPoint___eq__", (PyCFunction) _wrap_wxPoint___eq__, METH_VARARGS | METH_KEYWORDS }, { "wxPoint___sub__", (PyCFunction) _wrap_wxPoint___sub__, METH_VARARGS | METH_KEYWORDS }, { "wxPoint___add__", (PyCFunction) _wrap_wxPoint___add__, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_asTuple", (PyCFunction) _wrap_wxPoint_asTuple, METH_VARARGS | METH_KEYWORDS }, @@ -4318,7 +5498,8 @@ static PyMethodDef misccMethods[] = { { "wxPoint_y_set", (PyCFunction) _wrap_wxPoint_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_x_get", (PyCFunction) _wrap_wxPoint_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxPoint_x_set", (PyCFunction) _wrap_wxPoint_x_set, METH_VARARGS | METH_KEYWORDS }, - { "wxRealPoint___cmp__", (PyCFunction) _wrap_wxRealPoint___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___ne__", (PyCFunction) _wrap_wxRealPoint___ne__, METH_VARARGS | METH_KEYWORDS }, + { "wxRealPoint___eq__", (PyCFunction) _wrap_wxRealPoint___eq__, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint___sub__", (PyCFunction) _wrap_wxRealPoint___sub__, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint___add__", (PyCFunction) _wrap_wxRealPoint___add__, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_asTuple", (PyCFunction) _wrap_wxRealPoint_asTuple, METH_VARARGS | METH_KEYWORDS }, @@ -4329,7 +5510,8 @@ static PyMethodDef misccMethods[] = { { "wxRealPoint_y_set", (PyCFunction) _wrap_wxRealPoint_y_set, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_x_get", (PyCFunction) _wrap_wxRealPoint_x_get, METH_VARARGS | METH_KEYWORDS }, { "wxRealPoint_x_set", (PyCFunction) _wrap_wxRealPoint_x_set, METH_VARARGS | METH_KEYWORDS }, - { "wxSize___cmp__", (PyCFunction) _wrap_wxSize___cmp__, METH_VARARGS | METH_KEYWORDS }, + { "wxSize___ne__", (PyCFunction) _wrap_wxSize___ne__, METH_VARARGS | METH_KEYWORDS }, + { "wxSize___eq__", (PyCFunction) _wrap_wxSize___eq__, METH_VARARGS | METH_KEYWORDS }, { "wxSize_asTuple", (PyCFunction) _wrap_wxSize_asTuple, METH_VARARGS | METH_KEYWORDS }, { "wxSize_SetHeight", (PyCFunction) _wrap_wxSize_SetHeight, METH_VARARGS | METH_KEYWORDS }, { "wxSize_SetWidth", (PyCFunction) _wrap_wxSize_SetWidth, METH_VARARGS | METH_KEYWORDS }, @@ -4360,7 +5542,6 @@ static PyMethodDef misccMethods[] = { { "wxGetHostName", (PyCFunction) _wrap_wxGetHostName, METH_VARARGS | METH_KEYWORDS }, { "wxGetEmailAddress", (PyCFunction) _wrap_wxGetEmailAddress, METH_VARARGS | METH_KEYWORDS }, { "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS }, - { "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS }, { "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS }, { "wxYieldIfNeeded", (PyCFunction) _wrap_wxYieldIfNeeded, METH_VARARGS | METH_KEYWORDS }, { "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS }, @@ -4379,8 +5560,6 @@ static PyMethodDef misccMethods[] = { { "wxEndBusyCursor", (PyCFunction) _wrap_wxEndBusyCursor, METH_VARARGS | METH_KEYWORDS }, { "wxBell", (PyCFunction) _wrap_wxBell, METH_VARARGS | METH_KEYWORDS }, { "wxGetCurrentId", (PyCFunction) _wrap_wxGetCurrentId, METH_VARARGS | METH_KEYWORDS }, - { "RegisterId", (PyCFunction) _wrap_RegisterId, METH_VARARGS | METH_KEYWORDS }, - { "NewId", (PyCFunction) _wrap_NewId, METH_VARARGS | METH_KEYWORDS }, { "wxRegisterId", (PyCFunction) _wrap_wxRegisterId, METH_VARARGS | METH_KEYWORDS }, { "wxNewId", (PyCFunction) _wrap_wxNewId, METH_VARARGS | METH_KEYWORDS }, { "wxIntersectRect", (PyCFunction) _wrap_wxIntersectRect, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/misc.py b/wxPython/src/msw/misc.py index 6b6aa5421e..892e56dcf7 100644 --- a/wxPython/src/msw/misc.py +++ b/wxPython/src/msw/misc.py @@ -23,9 +23,12 @@ class wxSizePtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,miscc=miscc): - if self.thisown == 1 : - miscc.delete_wxSize(self) + def __del__(self, delfunc=miscc.delete_wxSize): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Set(self, *_args, **_kwargs): val = apply(miscc.wxSize_Set,(self,) + _args, _kwargs) return val @@ -50,8 +53,11 @@ class wxSizePtr : def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxSize_asTuple,(self,) + _args, _kwargs) return val - def __cmp__(self, *_args, **_kwargs): - val = apply(miscc.wxSize___cmp__,(self,) + _args, _kwargs) + def __eq__(self, *_args, **_kwargs): + val = apply(miscc.wxSize___eq__,(self,) + _args, _kwargs) + return val + def __ne__(self, *_args, **_kwargs): + val = apply(miscc.wxSize___ne__,(self,) + _args, _kwargs) return val def __setattr__(self,name,value): if name == "x" : @@ -81,13 +87,17 @@ class wxSizePtr : return "" % (self.this,) def __str__(self): return str(self.asTuple()) - def __repr__(self): return str(self.asTuple()) + def __repr__(self): return 'wxSize'+str(self.asTuple()) def __len__(self): return len(self.asTuple()) def __getitem__(self, index): return self.asTuple()[index] def __setitem__(self, index, val): if index == 0: self.width = val elif index == 1: self.height = val else: raise IndexError + def __nonzero__(self): return self.asTuple() != (0,0) + def __getinitargs__(self): return () + def __getstate__(self): return self.asTuple() + def __setstate__(self, state): self.Set(*state) class wxSize(wxSizePtr): def __init__(self,*_args,**_kwargs): @@ -101,9 +111,12 @@ class wxRealPointPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,miscc=miscc): - if self.thisown == 1 : - miscc.delete_wxRealPoint(self) + def __del__(self, delfunc=miscc.delete_wxRealPoint): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Set(self, *_args, **_kwargs): val = apply(miscc.wxRealPoint_Set,(self,) + _args, _kwargs) return val @@ -118,8 +131,11 @@ class wxRealPointPtr : val = apply(miscc.wxRealPoint___sub__,(self,) + _args, _kwargs) if val: val = wxRealPointPtr(val) ; val.thisown = 1 return val - def __cmp__(self, *_args, **_kwargs): - val = apply(miscc.wxRealPoint___cmp__,(self,) + _args, _kwargs) + def __eq__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___eq__,(self,) + _args, _kwargs) + return val + def __ne__(self, *_args, **_kwargs): + val = apply(miscc.wxRealPoint___ne__,(self,) + _args, _kwargs) return val def __setattr__(self,name,value): if name == "x" : @@ -139,13 +155,17 @@ class wxRealPointPtr : return "" % (self.this,) def __str__(self): return str(self.asTuple()) - def __repr__(self): return str(self.asTuple()) + def __repr__(self): return 'wxRealPoint'+str(self.asTuple()) def __len__(self): return len(self.asTuple()) def __getitem__(self, index): return self.asTuple()[index] def __setitem__(self, index, val): if index == 0: self.width = val elif index == 1: self.height = val else: raise IndexError + def __nonzero__(self): return self.asTuple() != (0.0, 0.0) + def __getinitargs__(self): return () + def __getstate__(self): return self.asTuple() + def __setstate__(self, state): self.Set(*state) class wxRealPoint(wxRealPointPtr): def __init__(self,*_args,**_kwargs): @@ -159,9 +179,12 @@ class wxPointPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,miscc=miscc): - if self.thisown == 1 : - miscc.delete_wxPoint(self) + def __del__(self, delfunc=miscc.delete_wxPoint): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Set(self, *_args, **_kwargs): val = apply(miscc.wxPoint_Set,(self,) + _args, _kwargs) return val @@ -176,8 +199,11 @@ class wxPointPtr : val = apply(miscc.wxPoint___sub__,(self,) + _args, _kwargs) if val: val = wxPointPtr(val) ; val.thisown = 1 return val - def __cmp__(self, *_args, **_kwargs): - val = apply(miscc.wxPoint___cmp__,(self,) + _args, _kwargs) + def __eq__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___eq__,(self,) + _args, _kwargs) + return val + def __ne__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint___ne__,(self,) + _args, _kwargs) return val def __setattr__(self,name,value): if name == "x" : @@ -197,13 +223,17 @@ class wxPointPtr : return "" % (self.this,) def __str__(self): return str(self.asTuple()) - def __repr__(self): return str(self.asTuple()) + def __repr__(self): return 'wxPoint'+str(self.asTuple()) def __len__(self): return len(self.asTuple()) def __getitem__(self, index): return self.asTuple()[index] def __setitem__(self, index, val): if index == 0: self.x = val elif index == 1: self.y = val else: raise IndexError + def __nonzero__(self): return self.asTuple() != (0,0) + def __getinitargs__(self): return () + def __getstate__(self): return self.asTuple() + def __setstate__(self, state): self.Set(*state) class wxPoint(wxPointPtr): def __init__(self,*_args,**_kwargs): @@ -217,9 +247,12 @@ class wxRectPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,miscc=miscc): - if self.thisown == 1 : - miscc.delete_wxRect(self) + def __del__(self, delfunc=miscc.delete_wxRect): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetX(self, *_args, **_kwargs): val = apply(miscc.wxRect_GetX,(self,) + _args, _kwargs) return val @@ -282,12 +315,30 @@ class wxRectPtr : def SetBottom(self, *_args, **_kwargs): val = apply(miscc.wxRect_SetBottom,(self,) + _args, _kwargs) return val + def Deflate(self, *_args, **_kwargs): + val = apply(miscc.wxRect_Deflate,(self,) + _args, _kwargs) + return val def Inflate(self, *_args, **_kwargs): val = apply(miscc.wxRect_Inflate,(self,) + _args, _kwargs) return val + def InsideXY(self, *_args, **_kwargs): + val = apply(miscc.wxRect_InsideXY,(self,) + _args, _kwargs) + return val def Inside(self, *_args, **_kwargs): val = apply(miscc.wxRect_Inside,(self,) + _args, _kwargs) return val + def Intersects(self, *_args, **_kwargs): + val = apply(miscc.wxRect_Intersects,(self,) + _args, _kwargs) + return val + def OffsetXY(self, *_args, **_kwargs): + val = apply(miscc.wxRect_OffsetXY,(self,) + _args, _kwargs) + return val + def Offset(self, *_args, **_kwargs): + val = apply(miscc.wxRect_Offset,(self,) + _args, _kwargs) + return val + def Set(self, *_args, **_kwargs): + val = apply(miscc.wxRect_Set,(self,) + _args, _kwargs) + return val def asTuple(self, *_args, **_kwargs): val = apply(miscc.wxRect_asTuple,(self,) + _args, _kwargs) return val @@ -295,8 +346,11 @@ class wxRectPtr : val = apply(miscc.wxRect___add__,(self,) + _args, _kwargs) if val: val = wxRectPtr(val) ; val.thisown = 1 return val - def __cmp__(self, *_args, **_kwargs): - val = apply(miscc.wxRect___cmp__,(self,) + _args, _kwargs) + def __eq__(self, *_args, **_kwargs): + val = apply(miscc.wxRect___eq__,(self,) + _args, _kwargs) + return val + def __ne__(self, *_args, **_kwargs): + val = apply(miscc.wxRect___ne__,(self,) + _args, _kwargs) return val def __setattr__(self,name,value): if name == "x" : @@ -326,7 +380,7 @@ class wxRectPtr : return "" % (self.this,) def __str__(self): return str(self.asTuple()) - def __repr__(self): return str(self.asTuple()) + def __repr__(self): return 'wxRect'+str(self.asTuple()) def __len__(self): return len(self.asTuple()) def __getitem__(self, index): return self.asTuple()[index] def __setitem__(self, index, val): @@ -335,6 +389,10 @@ class wxRectPtr : elif index == 2: self.width = val elif index == 3: self.height = val else: raise IndexError + def __nonzero__(self): return self.asTuple() != (0,0,0,0) + def __getinitargs__(self): return () + def __getstate__(self): return self.asTuple() + def __setstate__(self, state): self.Set(*state) # override the __getattr__ made by SWIG def __getattr__(self, name): @@ -381,6 +439,137 @@ class wxRect(wxRectPtr): +class wxPoint2DDoublePtr : + def __init__(self,this): + self.this = this + self.thisown = 0 + def GetFloor(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_GetFloor,(self,) + _args, _kwargs) + return val + def GetRounded(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_GetRounded,(self,) + _args, _kwargs) + return val + def GetVectorLength(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_GetVectorLength,(self,) + _args, _kwargs) + return val + def GetVectorAngle(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_GetVectorAngle,(self,) + _args, _kwargs) + return val + def SetVectorLength(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_SetVectorLength,(self,) + _args, _kwargs) + return val + def SetVectorAngle(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_SetVectorAngle,(self,) + _args, _kwargs) + return val + def GetDistance(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_GetDistance,(self,) + _args, _kwargs) + return val + def GetDistanceSquare(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_GetDistanceSquare,(self,) + _args, _kwargs) + return val + def GetDotProduct(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_GetDotProduct,(self,) + _args, _kwargs) + return val + def GetCrossProduct(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_GetCrossProduct,(self,) + _args, _kwargs) + return val + def Set(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_Set,(self,) + _args, _kwargs) + return val + def __neg__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble___neg__,(self,) + _args, _kwargs) + if val: val = wxPoint2DDoublePtr(val) ; val.thisown = 1 + return val + def __iadd__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble___iadd__,(self,) + _args, _kwargs) + if val: val = wxPoint2DDoublePtr(val) + return val + def __isub__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble___isub__,(self,) + _args, _kwargs) + if val: val = wxPoint2DDoublePtr(val) + return val + def __imul__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble___imul__,(self,) + _args, _kwargs) + if val: val = wxPoint2DDoublePtr(val) + return val + def __idiv__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble___idiv__,(self,) + _args, _kwargs) + if val: val = wxPoint2DDoublePtr(val) + return val + def __eq__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble___eq__,(self,) + _args, _kwargs) + return val + def __ne__(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble___ne__,(self,) + _args, _kwargs) + return val + def asTuple(self, *_args, **_kwargs): + val = apply(miscc.wxPoint2DDouble_asTuple,(self,) + _args, _kwargs) + return val + def __setattr__(self,name,value): + if name == "m_x" : + miscc.wxPoint2DDouble_m_x_set(self,value) + return + if name == "m_y" : + miscc.wxPoint2DDouble_m_y_set(self,value) + return + if name == "x" : + miscc.wxPoint2DDouble_x_set(self,value) + return + if name == "y" : + miscc.wxPoint2DDouble_y_set(self,value) + return + self.__dict__[name] = value + def __getattr__(self,name): + if name == "m_x" : + return miscc.wxPoint2DDouble_m_x_get(self) + if name == "m_y" : + return miscc.wxPoint2DDouble_m_y_get(self) + if name == "x" : + return miscc.wxPoint2DDouble_x_get(self) + if name == "y" : + return miscc.wxPoint2DDouble_y_get(self) + raise AttributeError,name + def __repr__(self): + return "" % (self.this,) + + def SetPolarCoordinates(self, angle, length): + self.SetVectorLength(length) + self.SetVectorAngle(angle) + def Normalize(self): + self.SetVectorLength(1.0) + + + def __str__(self): return str(self.asTuple()) + def __repr__(self): return 'wxPoint2DDouble'+str(self.asTuple()) + def __len__(self): return len(self.asTuple()) + def __getitem__(self, index): return self.asTuple()[index] + def __setitem__(self, index, val): + if index == 0: self.m_x = val + elif index == 1: self.m_yt = val + else: raise IndexError + def __nonzero__(self): return self.asTuple() != (0.0, 0.0) + def __getinitargs__(self): return () + def __getstate__(self): return self.asTuple() + def __setstate__(self, state): self.Set(*state) + +class wxPoint2DDouble(wxPoint2DDoublePtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(miscc.new_wxPoint2DDouble,_args,_kwargs) + self.thisown = 1 + + + +def wxPoint2DDoubleCopy(*_args,**_kwargs): + val = wxPoint2DDoublePtr(apply(miscc.new_wxPoint2DDoubleCopy,_args,_kwargs)) + val.thisown = 1 + return val + +def wxPoint2DDoubleFromPoint(*_args,**_kwargs): + val = wxPoint2DDoublePtr(apply(miscc.new_wxPoint2DDoubleFromPoint,_args,_kwargs)) + val.thisown = 1 + return val + + class wxIndividualLayoutConstraintPtr(wxObjectPtr): def __init__(self,this): self.this = this @@ -486,9 +675,12 @@ class wxAcceleratorEntryPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,miscc=miscc): - if self.thisown == 1 : - miscc.delete_wxAcceleratorEntry(self) + def __del__(self, delfunc=miscc.delete_wxAcceleratorEntry): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Set(self, *_args, **_kwargs): val = apply(miscc.wxAcceleratorEntry_Set,(self,) + _args, _kwargs) return val @@ -515,9 +707,12 @@ class wxAcceleratorTablePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,miscc=miscc): - if self.thisown == 1 : - miscc.delete_wxAcceleratorTable(self) + def __del__(self, delfunc=miscc.delete_wxAcceleratorTable): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def __repr__(self): return "" % (self.this,) class wxAcceleratorTable(wxAcceleratorTablePtr): @@ -532,9 +727,12 @@ class wxBusyInfoPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,miscc=miscc): - if self.thisown == 1 : - miscc.delete_wxBusyInfo(self) + def __del__(self, delfunc=miscc.delete_wxBusyInfo): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def __repr__(self): return "" % (self.this,) class wxBusyInfo(wxBusyInfoPtr): @@ -555,10 +753,6 @@ wxNewId = miscc.wxNewId wxRegisterId = miscc.wxRegisterId -NewId = miscc.NewId - -RegisterId = miscc.RegisterId - wxGetCurrentId = miscc.wxGetCurrentId wxBell = miscc.wxBell @@ -595,8 +789,6 @@ wxYieldIfNeeded = miscc.wxYieldIfNeeded wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows -wxGetResource = miscc.wxGetResource - wxStripMenuCodes = miscc.wxStripMenuCodes wxGetEmailAddress = miscc.wxGetEmailAddress diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp index 9881e4b4e4..08afb4e79c 100644 --- a/wxPython/src/msw/misc2.cpp +++ b/wxPython/src/msw/misc2.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -293,7 +292,7 @@ public: wxBitmap rval = wxNullBitmap; wxPyBeginBlockThreads(); if ((wxPyCBH_findCallback(m_myInst, "CreateBitmap"))) { - PyObject* so = wxPyConstructObject((void*)&size, "wxSize", 0); + PyObject* so = wxPyConstructObject((void*)&size, wxT("wxSize"), 0); PyObject* ro; wxBitmap* ptr; PyObject* s1, *s2; @@ -388,7 +387,7 @@ static PyObject *_wrap_wxFileSelector(PyObject *self, PyObject *args, PyObject * 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 @@ -466,7 +465,7 @@ static PyObject *_wrap_wxLoadFileSelector(PyObject *self, PyObject *args, PyObje 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 @@ -536,7 +535,7 @@ static PyObject *_wrap_wxSaveFileSelector(PyObject *self, PyObject *args, PyObje 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 @@ -610,7 +609,7 @@ static PyObject *_wrap_wxDirSelector(PyObject *self, PyObject *args, PyObject *k 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 @@ -682,7 +681,7 @@ static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObjec 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 @@ -753,7 +752,7 @@ static PyObject *_wrap_wxGetPasswordFromUser(PyObject *self, PyObject *args, PyO 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 @@ -840,7 +839,7 @@ static PyObject *_wrap_wxGetSingleChoice(PyObject *self, PyObject *args, PyObjec 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 @@ -1322,8 +1321,7 @@ static PyObject *_wrap_wxSetCursor(PyObject *self, PyObject *args, PyObject *kwa if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSetCursor",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSetCursor. Expected _wxCursor_p."); return NULL; } @@ -1508,208 +1506,6 @@ static PyObject *_wrap_wxGetTopLevelParent(PyObject *self, PyObject *args, PyObj return _resultobj; } -static PyObject *_wrap_wxResourceAddIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - int _arg1; - char *_kwnames[] = { "name","value", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"si:wxResourceAddIdentifier",_kwnames,&_arg0,&_arg1)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceAddIdentifier(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceClear(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxResourceClear",_kwnames)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxResourceClear(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateBitmap(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxBitmap * _result; - char * _arg0; - char *_kwnames[] = { "resource", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateBitmap",_kwnames,&_arg0)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxBitmap (wxResourceCreateBitmap(_arg0)); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxBitmap_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateIcon(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxIcon * _result; - char * _arg0; - char *_kwnames[] = { "resource", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateIcon",_kwnames,&_arg0)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxIcon (wxResourceCreateIcon(_arg0)); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxIcon_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - -static PyObject *_wrap_wxResourceCreateMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxMenuBar * _result; - char * _arg0; - char *_kwnames[] = { "resource", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceCreateMenuBar",_kwnames,&_arg0)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxMenuBar *)wxResourceCreateMenuBar(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } - return _resultobj; -} - -static PyObject *_wrap_wxResourceGetIdentifier(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - char * _arg0; - char *_kwnames[] = { "name", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s:wxResourceGetIdentifier",_kwnames,&_arg0)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxResourceGetIdentifier(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseData(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = (wxResourceTable *) NULL; - PyObject * _argo1 = 0; - char *_kwnames[] = { "resource","table", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseData",_kwnames,&_arg0,&_argo1)) - return NULL; - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseData. Expected _wxResourceTable_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceParseData(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseFile(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = (wxResourceTable *) NULL; - PyObject * _argo1 = 0; - char *_kwnames[] = { "filename","table", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseFile",_kwnames,&_arg0,&_argo1)) - return NULL; - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseFile. Expected _wxResourceTable_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceParseFile(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -static PyObject *_wrap_wxResourceParseString(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char * _arg0; - wxResourceTable * _arg1 = (wxResourceTable *) NULL; - PyObject * _argo1 = 0; - char *_kwnames[] = { "resource","table", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"s|O:wxResourceParseString",_kwnames,&_arg0,&_argo1)) - return NULL; - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxResourceParseString. Expected _wxResourceTable_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxResourceParseString(_arg0,_arg1); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - static PyObject *_wrap_wxCaret_GetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; @@ -1751,11 +1547,13 @@ static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwa PyObject * _resultobj; bool _result; wxWindow * _arg0 = (wxWindow *) NULL; + bool _arg1 = (bool ) FALSE; PyObject * _argo0 = 0; - char *_kwnames[] = { "win", NULL }; + int tempbool1 = (int) FALSE; + char *_kwnames[] = { "win","onlyIfNeeded", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxSafeYield",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|Oi:wxSafeYield",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1764,9 +1562,10 @@ static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwa return NULL; } } + _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSafeYield(_arg0); + _result = (bool )wxSafeYield(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1793,8 +1592,7 @@ static PyObject *_wrap_wxPostEvent(PyObject *self, PyObject *args, PyObject *kwa } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPostEvent. Expected _wxEvent_p."); return NULL; } @@ -2011,7 +1809,7 @@ static PyObject *_wrap_wxSysErrorMsg(PyObject *self, PyObject *args, PyObject *k 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 @@ -2167,6 +1965,35 @@ static PyObject *_wrap_wxLogInfo(PyObject *self, PyObject *args, PyObject *kwarg return _resultobj; } +static PyObject *_wrap_wxLogDebug(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "msg", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxLogDebug",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxLogDebug(*_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + static PyObject *_wrap_wxLogVerbose(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxString * _arg0; @@ -2748,7 +2575,7 @@ static PyObject *_wrap_wxToolTip_GetTip(PyObject *self, PyObject *args, PyObject 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 @@ -3561,7 +3388,7 @@ static PyObject *_wrap_wxTipProvider_GetTip(PyObject *self, PyObject *args, PyOb 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 @@ -3633,7 +3460,7 @@ static PyObject *_wrap_wxTipProvider_PreprocessTip(PyObject *self, PyObject *arg 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 @@ -3744,15 +3571,13 @@ static PyObject *_wrap_new_wxDragImage(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxDragImage",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDragImage. Expected _wxBitmap_p."); return NULL; } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDragImage. Expected _wxCursor_p."); return NULL; } @@ -3788,15 +3613,13 @@ static PyObject *_wrap_new_wxDragIcon(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:new_wxDragIcon",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxIcon_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDragIcon. Expected _wxIcon_p."); return NULL; } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDragIcon. Expected _wxCursor_p."); return NULL; } @@ -3837,8 +3660,7 @@ static PyObject *_wrap_new_wxDragString(PyObject *self, PyObject *args, PyObject return NULL; } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDragString. Expected _wxCursor_p."); return NULL; } @@ -3878,15 +3700,13 @@ static PyObject *_wrap_new_wxDragTreeItem(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxDragTreeItem",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeCtrl_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDragTreeItem. Expected _wxTreeCtrl_p."); return NULL; } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTreeItemId_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDragTreeItem. Expected _wxTreeItemId_p."); return NULL; } @@ -3921,8 +3741,7 @@ static PyObject *_wrap_new_wxDragListItem(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:new_wxDragListItem",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxListCtrl_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDragListItem. Expected _wxListCtrl_p."); return NULL; } @@ -4065,8 +3884,8 @@ static PyObject *_wrap_wxDragImage_BeginDrag(PyObject *self, PyObject *args, PyO return _resultobj; } -#define wxDragImage_BeginDrag2(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->BeginDrag(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxDragImage_BeginDrag2(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDragImage_BeginDragBounded(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->BeginDrag(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxDragImage_BeginDragBounded(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxGenericDragImage * _arg0; @@ -4078,15 +3897,15 @@ static PyObject *_wrap_wxDragImage_BeginDrag2(PyObject *self, PyObject *args, Py PyObject * _obj1 = 0; PyObject * _argo2 = 0; PyObject * _argo3 = 0; - char *_kwnames[] = { "self","hotspot","window","fullScreenRect", NULL }; + char *_kwnames[] = { "self","hotspot","window","boundingWindow", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDragImage_BeginDrag2",_kwnames,&_argo0,&_obj1,&_argo2,&_argo3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:wxDragImage_BeginDragBounded",_kwnames,&_argo0,&_obj1,&_argo2,&_argo3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGenericDragImage_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_BeginDrag2. Expected _wxGenericDragImage_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDragImage_BeginDragBounded. Expected _wxGenericDragImage_p."); return NULL; } } @@ -4098,20 +3917,20 @@ static PyObject *_wrap_wxDragImage_BeginDrag2(PyObject *self, PyObject *args, Py if (_argo2) { if (_argo2 == Py_None) { _arg2 = NULL; } else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDragImage_BeginDrag2. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDragImage_BeginDragBounded. Expected _wxWindow_p."); return NULL; } } if (_argo3) { if (_argo3 == Py_None) { _arg3 = NULL; } else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDragImage_BeginDrag2. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDragImage_BeginDragBounded. Expected _wxWindow_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDragImage_BeginDrag2(_arg0,*_arg1,_arg2,_arg3); + _result = (bool )wxDragImage_BeginDragBounded(_arg0,*_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -5212,7 +5031,7 @@ static PyObject *_wrap_wxLog_GetTimestamp(PyObject *self, PyObject *args, PyObje 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 @@ -5295,6 +5114,43 @@ static PyObject *_wrap_wxLog_IsAllowedTraceMask(PyObject *self, PyObject *args, return _resultobj; } +static PyObject *_wrap_wxLog_SetLogLevel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + unsigned long _arg0; + char *_kwnames[] = { "logLevel", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxLog_SetLogLevel",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxLog::SetLogLevel(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxLog_GetLogLevel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + unsigned long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxLog_GetLogLevel",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (unsigned long )wxLog::GetLogLevel(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + static wxString wxLog_TimeStamp(wxLog *self) { wxString msg; wxLog::TimeStamp(&msg); @@ -5325,7 +5181,7 @@ static PyObject *_wrap_wxLog_TimeStamp(PyObject *self, PyObject *args, PyObject 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 @@ -6541,7 +6397,7 @@ static PyObject *_wrap_wxProcess_GetInputStream(PyObject *self, PyObject *args, if (_result) { _ptr = new wxPyInputStream(_result); } - _resultobj = wxPyConstructObject(_ptr, "wxInputStream", TRUE); + _resultobj = wxPyConstructObject(_ptr, wxT("wxInputStream"), TRUE); } return _resultobj; } @@ -6576,7 +6432,7 @@ static PyObject *_wrap_wxProcess_GetErrorStream(PyObject *self, PyObject *args, if (_result) { _ptr = new wxPyInputStream(_result); } - _resultobj = wxPyConstructObject(_ptr, "wxInputStream", TRUE); + _resultobj = wxPyConstructObject(_ptr, wxT("wxInputStream"), TRUE); } return _resultobj; } @@ -7212,7 +7068,7 @@ static PyObject *_wrap_wxJoystick_GetProductName(PyObject *self, PyObject *args, 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 @@ -8131,19 +7987,43 @@ static PyObject *_wrap_wxWave_Play(PyObject *self, PyObject *args, PyObject *kwa static PyObject *_wrap_new_wxFileTypeInfo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFileTypeInfo * _result; - char * _arg0; - char * _arg1; - char * _arg2; - char * _arg3; + wxString * _arg0; + wxString * _arg1; + wxString * _arg2; + wxString * _arg3; + PyObject * _obj0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + PyObject * _obj3 = 0; char *_kwnames[] = { "mimeType","openCmd","printCmd","desc", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"ssss:new_wxFileTypeInfo",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOOO:new_wxFileTypeInfo",_kwnames,&_obj0,&_obj1,&_obj2,&_obj3)) return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) + return NULL; +} +{ + _arg2 = wxString_in_helper(_obj2); + if (_arg2 == NULL) + return NULL; +} +{ + _arg3 = wxString_in_helper(_obj3); + if (_arg3 == NULL) + return NULL; +} { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxFileTypeInfo *)new_wxFileTypeInfo(_arg0,_arg1,_arg2,_arg3); + _result = (wxFileTypeInfo *)new_wxFileTypeInfo(*_arg0,*_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -8154,6 +8034,22 @@ static PyObject *_wrap_new_wxFileTypeInfo(PyObject *self, PyObject *args, PyObje Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj0) + delete _arg0; +} +{ + if (_obj1) + delete _arg1; +} +{ + if (_obj2) + delete _arg2; +} +{ + if (_obj3) + delete _arg3; +} return _resultobj; } @@ -8180,11 +8076,10 @@ static PyObject *_wrap_new_wxFileTypeInfoSequence(PyObject *self, PyObject *args PyObject* item = PySequence_GetItem(_obj0, i); #if wxUSE_UNICODE PyObject* str = PyObject_Unicode(item); - _arg0->Add(PyUnicode_AsUnicode(str)); #else PyObject* str = PyObject_Str(item); - _arg0->Add(PyString_AsString(str)); #endif + _arg0->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); } @@ -8369,7 +8264,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetMimeType(PyObject *self, PyObject *args 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 @@ -8404,7 +8299,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetOpenCommand(PyObject *self, PyObject *a 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 @@ -8439,7 +8334,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetPrintCommand(PyObject *self, PyObject * 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 @@ -8474,7 +8369,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetShortDesc(PyObject *self, PyObject *arg 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 @@ -8509,7 +8404,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetDescription(PyObject *self, PyObject *a 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 @@ -8605,7 +8500,7 @@ static PyObject *_wrap_wxFileTypeInfo_GetIconFile(PyObject *self, PyObject *args 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 @@ -8654,8 +8549,7 @@ static PyObject *_wrap_new_wxFileType(PyObject *self, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxFileType",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFileTypeInfo_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFileType. Expected _wxFileTypeInfo_p."); return NULL; } @@ -8680,7 +8574,7 @@ static PyObject * wxFileType_GetMimeType(wxFileType *self) { wxString str; if (self->GetMimeType(&str)) { #if wxUSE_UNICODE - return PyUnicode_FromUnicode(str.c_str(), str.Len()); + return PyUnicode_FromWideChar(str.c_str(), str.Len()); #else return PyString_FromStringAndSize(str.c_str(), str.Len()); #endif @@ -8838,9 +8732,9 @@ static PyObject * wxFileType_GetIconInfo(wxFileType *self) { wxPyBeginBlockThreads(); PyObject* tuple = PyTuple_New(3); PyTuple_SetItem(tuple, 0, wxPyConstructObject(new wxIcon(icon), - "wxIcon", TRUE)); + wxT("wxIcon"), TRUE)); #if wxUSE_UNICODE - PyTuple_SetItem(tuple, 1, PyUnicode_FromUnicode(iconFile.c_str(), iconFile.Len())); + PyTuple_SetItem(tuple, 1, PyUnicode_FromWideChar(iconFile.c_str(), iconFile.Len())); #else PyTuple_SetItem(tuple, 1, PyString_FromStringAndSize(iconFile.c_str(), iconFile.Len())); #endif @@ -8884,7 +8778,7 @@ static PyObject * wxFileType_GetDescription(wxFileType *self) { wxString str; if (self->GetDescription(&str)) { #if wxUSE_UNICODE - return PyUnicode_FromUnicode(str.c_str(), str.Len()); + return PyUnicode_FromWideChar(str.c_str(), str.Len()); #else return PyString_FromStringAndSize(str.c_str(), str.Len()); #endif @@ -8924,7 +8818,7 @@ static PyObject * wxFileType_GetOpenCommand(wxFileType *self,const wxString & fi wxString str; if (self->GetOpenCommand(&str, wxFileType::MessageParameters(filename, mimetype))) { #if wxUSE_UNICODE - return PyUnicode_FromUnicode(str.c_str(), str.Len()); + return PyUnicode_FromWideChar(str.c_str(), str.Len()); #else return PyString_FromStringAndSize(str.c_str(), str.Len()); #endif @@ -8987,7 +8881,7 @@ static PyObject * wxFileType_GetPrintCommand(wxFileType *self,const wxString & f wxString str; if (self->GetPrintCommand(&str, wxFileType::MessageParameters(filename, mimetype))) { #if wxUSE_UNICODE - return PyUnicode_FromUnicode(str.c_str(), str.Len()); + return PyUnicode_FromWideChar(str.c_str(), str.Len()); #else return PyString_FromStringAndSize(str.c_str(), str.Len()); #endif @@ -9253,8 +9147,7 @@ static PyObject *_wrap_wxFileType_ExpandCommand(PyObject *self, PyObject *args, return NULL; } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileType::MessageParameters_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileType::MessageParameters_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFileType_ExpandCommand. Expected _wxFileType::MessageParameters_p."); return NULL; } @@ -9267,7 +9160,7 @@ static PyObject *_wrap_wxFileType_ExpandCommand(PyObject *self, PyObject *args, 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 @@ -9672,8 +9565,7 @@ static PyObject *_wrap_wxMimeTypesManager_AddFallback(PyObject *self, PyObject * } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileTypeInfo_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileTypeInfo_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMimeTypesManager_AddFallback. Expected _wxFileTypeInfo_p."); return NULL; } @@ -9711,8 +9603,7 @@ static PyObject *_wrap_wxMimeTypesManager_Associate(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileTypeInfo_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFileTypeInfo_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMimeTypesManager_Associate. Expected _wxFileTypeInfo_p."); return NULL; } @@ -10046,24 +9937,6 @@ static PyObject *_wrap_wxArtProvider_GetIcon(PyObject *self, PyObject *args, PyO return _resultobj; } -static PyObject *_wrap_wxArtProvider_CleanUpProviders(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxArtProvider_CleanUpProviders",_kwnames)) - return NULL; -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPyArtProvider::CleanUpProviders(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - static void *SwigwxFileHistoryTowxObject(void *ptr) { wxFileHistory *src; wxObject *dest; @@ -10317,8 +10190,7 @@ static PyObject *_wrap_wxFileHistory_Load(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFileHistory_Load. Expected _wxConfigBase_p."); return NULL; } @@ -10354,8 +10226,7 @@ static PyObject *_wrap_wxFileHistory_Save(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxConfigBase_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFileHistory_Save. Expected _wxConfigBase_p."); return NULL; } @@ -10463,7 +10334,7 @@ static PyObject *_wrap_wxFileHistory_GetHistoryFile(PyObject *self, PyObject *ar 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 @@ -10986,8 +10857,7 @@ static PyObject *_wrap_wxEffects_DrawSunkenEdge(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxEffects_DrawSunkenEdge. Expected _wxDC_p."); return NULL; } @@ -11039,15 +10909,13 @@ static PyObject *_wrap_wxEffects_TileBitmap(PyObject *self, PyObject *args, PyOb return NULL; } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxEffects_TileBitmap. Expected _wxDC_p."); return NULL; } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxEffects_TileBitmap. Expected _wxBitmap_p."); return NULL; } @@ -11278,7 +11146,6 @@ static PyMethodDef misc2cMethods[] = { { "wxFileHistory_AddFileToHistory", (PyCFunction) _wrap_wxFileHistory_AddFileToHistory, METH_VARARGS | METH_KEYWORDS }, { "delete_wxFileHistory", (PyCFunction) _wrap_delete_wxFileHistory, METH_VARARGS | METH_KEYWORDS }, { "new_wxFileHistory", (PyCFunction) _wrap_new_wxFileHistory, METH_VARARGS | METH_KEYWORDS }, - { "wxArtProvider_CleanUpProviders", (PyCFunction) _wrap_wxArtProvider_CleanUpProviders, METH_VARARGS | METH_KEYWORDS }, { "wxArtProvider_GetIcon", (PyCFunction) _wrap_wxArtProvider_GetIcon, METH_VARARGS | METH_KEYWORDS }, { "wxArtProvider_GetBitmap", (PyCFunction) _wrap_wxArtProvider_GetBitmap, METH_VARARGS | METH_KEYWORDS }, { "wxArtProvider_RemoveProvider", (PyCFunction) _wrap_wxArtProvider_RemoveProvider, METH_VARARGS | METH_KEYWORDS }, @@ -11421,6 +11288,8 @@ static PyMethodDef misc2cMethods[] = { { "new_wxLogTextCtrl", (PyCFunction) _wrap_new_wxLogTextCtrl, METH_VARARGS | METH_KEYWORDS }, { "new_wxLogStderr", (PyCFunction) _wrap_new_wxLogStderr, METH_VARARGS | METH_KEYWORDS }, { "wxLog_TimeStamp", (PyCFunction) _wrap_wxLog_TimeStamp, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_GetLogLevel", (PyCFunction) _wrap_wxLog_GetLogLevel, METH_VARARGS | METH_KEYWORDS }, + { "wxLog_SetLogLevel", (PyCFunction) _wrap_wxLog_SetLogLevel, METH_VARARGS | METH_KEYWORDS }, { "wxLog_IsAllowedTraceMask", (PyCFunction) _wrap_wxLog_IsAllowedTraceMask, METH_VARARGS | METH_KEYWORDS }, { "wxLog_GetTraceMask", (PyCFunction) _wrap_wxLog_GetTraceMask, METH_VARARGS | METH_KEYWORDS }, { "wxLog_GetVerbose", (PyCFunction) _wrap_wxLog_GetVerbose, METH_VARARGS | METH_KEYWORDS }, @@ -11464,7 +11333,7 @@ static PyMethodDef misc2cMethods[] = { { "wxDragImage_Show", (PyCFunction) _wrap_wxDragImage_Show, METH_VARARGS | METH_KEYWORDS }, { "wxDragImage_Move", (PyCFunction) _wrap_wxDragImage_Move, METH_VARARGS | METH_KEYWORDS }, { "wxDragImage_EndDrag", (PyCFunction) _wrap_wxDragImage_EndDrag, METH_VARARGS | METH_KEYWORDS }, - { "wxDragImage_BeginDrag2", (PyCFunction) _wrap_wxDragImage_BeginDrag2, METH_VARARGS | METH_KEYWORDS }, + { "wxDragImage_BeginDragBounded", (PyCFunction) _wrap_wxDragImage_BeginDragBounded, METH_VARARGS | METH_KEYWORDS }, { "wxDragImage_BeginDrag", (PyCFunction) _wrap_wxDragImage_BeginDrag, METH_VARARGS | METH_KEYWORDS }, { "wxDragImage_SetBackingBitmap", (PyCFunction) _wrap_wxDragImage_SetBackingBitmap, METH_VARARGS | METH_KEYWORDS }, { "delete_wxDragImage", (PyCFunction) _wrap_delete_wxDragImage, METH_VARARGS | METH_KEYWORDS }, @@ -11522,6 +11391,7 @@ static PyMethodDef misc2cMethods[] = { { "wxLogStatusFrame", (PyCFunction) _wrap_wxLogStatusFrame, METH_VARARGS | METH_KEYWORDS }, { "wxLogStatus", (PyCFunction) _wrap_wxLogStatus, METH_VARARGS | METH_KEYWORDS }, { "wxLogVerbose", (PyCFunction) _wrap_wxLogVerbose, METH_VARARGS | METH_KEYWORDS }, + { "wxLogDebug", (PyCFunction) _wrap_wxLogDebug, METH_VARARGS | METH_KEYWORDS }, { "wxLogInfo", (PyCFunction) _wrap_wxLogInfo, METH_VARARGS | METH_KEYWORDS }, { "wxLogMessage", (PyCFunction) _wrap_wxLogMessage, METH_VARARGS | METH_KEYWORDS }, { "wxLogWarning", (PyCFunction) _wrap_wxLogWarning, METH_VARARGS | METH_KEYWORDS }, @@ -11540,15 +11410,6 @@ static PyMethodDef misc2cMethods[] = { { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, { "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS }, { "wxCaret_GetBlinkTime", (PyCFunction) _wrap_wxCaret_GetBlinkTime, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceParseString", (PyCFunction) _wrap_wxResourceParseString, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceParseFile", (PyCFunction) _wrap_wxResourceParseFile, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceParseData", (PyCFunction) _wrap_wxResourceParseData, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceGetIdentifier", (PyCFunction) _wrap_wxResourceGetIdentifier, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceCreateMenuBar", (PyCFunction) _wrap_wxResourceCreateMenuBar, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceCreateIcon", (PyCFunction) _wrap_wxResourceCreateIcon, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceCreateBitmap", (PyCFunction) _wrap_wxResourceCreateBitmap, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceClear", (PyCFunction) _wrap_wxResourceClear, METH_VARARGS | METH_KEYWORDS }, - { "wxResourceAddIdentifier", (PyCFunction) _wrap_wxResourceAddIdentifier, METH_VARARGS | METH_KEYWORDS }, { "wxGetTopLevelParent", (PyCFunction) _wrap_wxGetTopLevelParent, METH_VARARGS | METH_KEYWORDS }, { "wxFlushEvents", (PyCFunction) _wrap_wxFlushEvents, METH_VARARGS | METH_KEYWORDS }, { "wxCheckForInterrupt", (PyCFunction) _wrap_wxCheckForInterrupt, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/misc2.py b/wxPython/src/msw/misc2.py index 9f88d273e8..bffe2fddd4 100644 --- a/wxPython/src/msw/misc2.py +++ b/wxPython/src/msw/misc2.py @@ -98,9 +98,12 @@ class wxCaretPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxCaret(self) + def __del__(self, delfunc=misc2c.delete_wxCaret): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def IsOk(self, *_args, **_kwargs): val = apply(misc2c.wxCaret_IsOk,(self,) + _args, _kwargs) return val @@ -156,9 +159,12 @@ class wxBusyCursorPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxBusyCursor(self) + def __del__(self, delfunc=misc2c.delete_wxBusyCursor): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def __repr__(self): return "" % (self.this,) class wxBusyCursor(wxBusyCursorPtr): @@ -173,9 +179,12 @@ class wxWindowDisablerPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxWindowDisabler(self) + def __del__(self, delfunc=misc2c.delete_wxWindowDisabler): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def __repr__(self): return "" % (self.this,) class wxWindowDisabler(wxWindowDisablerPtr): @@ -190,9 +199,12 @@ class wxMutexGuiLockerPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxMutexGuiLocker(self) + def __del__(self, delfunc=misc2c.delete_wxMutexGuiLocker): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def __repr__(self): return "" % (self.this,) class wxMutexGuiLocker(wxMutexGuiLockerPtr): @@ -207,9 +219,12 @@ class wxTipProviderPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxTipProvider(self) + def __del__(self, delfunc=misc2c.delete_wxTipProvider): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetTip(self, *_args, **_kwargs): val = apply(misc2c.wxTipProvider_GetTip,(self,) + _args, _kwargs) return val @@ -250,17 +265,20 @@ class wxDragImagePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxDragImage(self) + def __del__(self, delfunc=misc2c.delete_wxDragImage): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetBackingBitmap(self, *_args, **_kwargs): val = apply(misc2c.wxDragImage_SetBackingBitmap,(self,) + _args, _kwargs) return val def BeginDrag(self, *_args, **_kwargs): val = apply(misc2c.wxDragImage_BeginDrag,(self,) + _args, _kwargs) return val - def BeginDrag2(self, *_args, **_kwargs): - val = apply(misc2c.wxDragImage_BeginDrag2,(self,) + _args, _kwargs) + def BeginDragBounded(self, *_args, **_kwargs): + val = apply(misc2c.wxDragImage_BeginDragBounded,(self,) + _args, _kwargs) return val def EndDrag(self, *_args, **_kwargs): val = apply(misc2c.wxDragImage_EndDrag,(self,) + _args, _kwargs) @@ -283,6 +301,7 @@ class wxDragImagePtr(wxObjectPtr): return val def __repr__(self): return "" % (self.this,) + BeginDrag2 = BeginDragBounded class wxDragImage(wxDragImagePtr): def __init__(self,*_args,**_kwargs): self.this = apply(misc2c.new_wxDragImage,_args,_kwargs) @@ -315,9 +334,12 @@ class wxPyTimerPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxPyTimer(self) + def __del__(self, delfunc=misc2c.delete_wxPyTimer): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetInterval(self, *_args, **_kwargs): val = apply(misc2c.wxPyTimer_GetInterval,(self,) + _args, _kwargs) return val @@ -350,9 +372,12 @@ class wxStopWatchPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxStopWatch(self) + def __del__(self, delfunc=misc2c.delete_wxStopWatch): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Start(self, *_args, **_kwargs): val = apply(misc2c.wxStopWatch_Start,(self,) + _args, _kwargs) return val @@ -504,9 +529,12 @@ class wxLogNullPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxLogNull(self) + def __del__(self, delfunc=misc2c.delete_wxLogNull): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def __repr__(self): return "" % (self.this,) class wxLogNull(wxLogNullPtr): @@ -631,9 +659,12 @@ class wxJoystickPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxJoystick(self) + def __del__(self, delfunc=misc2c.delete_wxJoystick): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetPosition(self, *_args, **_kwargs): val = apply(misc2c.wxJoystick_GetPosition,(self,) + _args, _kwargs) if val: val = wxPointPtr(val) ; val.thisown = 1 @@ -775,9 +806,12 @@ class wxWavePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxWave(self) + def __del__(self, delfunc=misc2c.delete_wxWave): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def IsOk(self, *_args, **_kwargs): val = apply(misc2c.wxWave_IsOk,(self,) + _args, _kwargs) return val @@ -895,9 +929,12 @@ class wxFileTypePtr : def Unassociate(self, *_args, **_kwargs): val = apply(misc2c.wxFileType_Unassociate,(self,) + _args, _kwargs) return val - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxFileType(self) + def __del__(self, delfunc=misc2c.delete_wxFileType): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def __repr__(self): return "" % (self.this,) class wxFileType(wxFileTypePtr): @@ -945,9 +982,12 @@ class wxMimeTypesManagerPtr : def Unassociate(self, *_args, **_kwargs): val = apply(misc2c.wxMimeTypesManager_Unassociate,(self,) + _args, _kwargs) return val - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxMimeTypesManager(self) + def __del__(self, delfunc=misc2c.delete_wxMimeTypesManager): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def __repr__(self): return "" % (self.this,) class wxMimeTypesManager(wxMimeTypesManagerPtr): @@ -980,9 +1020,12 @@ class wxFileHistoryPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxFileHistory(self) + def __del__(self, delfunc=misc2c.delete_wxFileHistory): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def AddFileToHistory(self, *_args, **_kwargs): val = apply(misc2c.wxFileHistory_AddFileToHistory,(self,) + _args, _kwargs) return val @@ -1091,9 +1134,12 @@ class wxSingleInstanceCheckerPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,misc2c=misc2c): - if self.thisown == 1 : - misc2c.delete_wxSingleInstanceChecker(self) + def __del__(self, delfunc=misc2c.delete_wxSingleInstanceChecker): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Create(self, *_args, **_kwargs): val = apply(misc2c.wxSingleInstanceChecker_Create,(self,) + _args, _kwargs) return val @@ -1190,32 +1236,6 @@ def wxGetTopLevelParent(*_args, **_kwargs): val = apply(misc2c.wxGetTopLevelParent,_args,_kwargs) return val -wxResourceAddIdentifier = misc2c.wxResourceAddIdentifier - -wxResourceClear = misc2c.wxResourceClear - -def wxResourceCreateBitmap(*_args, **_kwargs): - val = apply(misc2c.wxResourceCreateBitmap,_args,_kwargs) - if val: val = wxBitmapPtr(val); val.thisown = 1 - return val - -def wxResourceCreateIcon(*_args, **_kwargs): - val = apply(misc2c.wxResourceCreateIcon,_args,_kwargs) - if val: val = wxIconPtr(val); val.thisown = 1 - return val - -def wxResourceCreateMenuBar(*_args, **_kwargs): - val = apply(misc2c.wxResourceCreateMenuBar,_args,_kwargs) - return val - -wxResourceGetIdentifier = misc2c.wxResourceGetIdentifier - -wxResourceParseData = misc2c.wxResourceParseData - -wxResourceParseFile = misc2c.wxResourceParseFile - -wxResourceParseString = misc2c.wxResourceParseString - wxCaret_GetBlinkTime = misc2c.wxCaret_GetBlinkTime wxCaret_SetBlinkTime = misc2c.wxCaret_SetBlinkTime @@ -1255,6 +1275,8 @@ wxLogMessage = misc2c.wxLogMessage wxLogInfo = misc2c.wxLogInfo +wxLogDebug = misc2c.wxLogDebug + wxLogVerbose = misc2c.wxLogVerbose wxLogStatus = misc2c.wxLogStatus @@ -1344,6 +1366,10 @@ wxLog_GetTraceMask = misc2c.wxLog_GetTraceMask wxLog_IsAllowedTraceMask = misc2c.wxLog_IsAllowedTraceMask +wxLog_SetLogLevel = misc2c.wxLog_SetLogLevel + +wxLog_GetLogLevel = misc2c.wxLog_GetLogLevel + wxProcess_Kill = misc2c.wxProcess_Kill wxProcess_Exists = misc2c.wxProcess_Exists @@ -1373,8 +1399,6 @@ def wxArtProvider_GetIcon(*_args, **_kwargs): if val: val = wxIconPtr(val); val.thisown = 1 return val -wxArtProvider_CleanUpProviders = misc2c.wxArtProvider_CleanUpProviders - #-------------- VARIABLE WRAPPERS ------------------ diff --git a/wxPython/src/msw/printfw.cpp b/wxPython/src/msw/printfw.cpp index 24711bbcfa..44a5114bbd 100644 --- a/wxPython/src/msw/printfw.cpp +++ b/wxPython/src/msw/printfw.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -356,7 +355,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterName(PyObject *self, PyObject *args 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 @@ -821,7 +820,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterCommand(PyObject *self, PyObject *a 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 @@ -856,7 +855,7 @@ static PyObject *_wrap_wxPrintData_GetPrinterOptions(PyObject *self, PyObject *a 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 @@ -891,7 +890,7 @@ static PyObject *_wrap_wxPrintData_GetPreviewCommand(PyObject *self, PyObject *a 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 @@ -926,7 +925,7 @@ static PyObject *_wrap_wxPrintData_GetFilename(PyObject *self, PyObject *args, P 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 @@ -961,7 +960,7 @@ static PyObject *_wrap_wxPrintData_GetFontMetricPath(PyObject *self, PyObject *a 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 @@ -1548,8 +1547,7 @@ static PyObject *_wrap_new_wxPrinterDC(PyObject *self, PyObject *args, PyObject if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPrinterDC",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPrinterDC. Expected _wxPrintData_p."); return NULL; } @@ -1662,8 +1660,7 @@ static PyObject *_wrap_new_wxPostScriptDC(PyObject *self, PyObject *args, PyObje if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxPostScriptDC",_kwnames,&_argo0)) return NULL; if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) { + if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPrintData_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxPostScriptDC. Expected _wxPrintData_p."); return NULL; } @@ -1740,8 +1737,7 @@ static PyObject *_wrap_wxPostScriptDC_SetPrintData(PyObject *self, PyObject *arg } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPostScriptDC_SetPrintData. Expected _wxPrintData_p."); return NULL; } @@ -2741,8 +2737,7 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPrintData(PyObject *self, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPageSetupDialogData_SetPrintData. Expected _wxPrintData_p."); return NULL; } @@ -3548,8 +3543,7 @@ static PyObject *_wrap_wxPrintDialogData_SetPrintData(PyObject *self, PyObject * } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPrintData_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPrintDialogData_SetPrintData. Expected _wxPrintData_p."); return NULL; } diff --git a/wxPython/src/msw/printfw.py b/wxPython/src/msw/printfw.py index 1800f47407..ba11c95428 100644 --- a/wxPython/src/msw/printfw.py +++ b/wxPython/src/msw/printfw.py @@ -25,9 +25,12 @@ class wxPrintDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,printfwc=printfwc): - if self.thisown == 1 : - printfwc.delete_wxPrintData(self) + def __del__(self, delfunc=printfwc.delete_wxPrintData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetNoCopies(self, *_args, **_kwargs): val = apply(printfwc.wxPrintData_GetNoCopies,(self,) + _args, _kwargs) return val @@ -206,9 +209,12 @@ class wxPageSetupDialogDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,printfwc=printfwc): - if self.thisown == 1 : - printfwc.delete_wxPageSetupDialogData(self) + def __del__(self, delfunc=printfwc.delete_wxPageSetupDialogData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def EnableHelp(self, *_args, **_kwargs): val = apply(printfwc.wxPageSetupDialogData_EnableHelp,(self,) + _args, _kwargs) return val @@ -338,9 +344,12 @@ class wxPrintDialogDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,printfwc=printfwc): - if self.thisown == 1 : - printfwc.delete_wxPrintDialogData(self) + def __del__(self, delfunc=printfwc.delete_wxPrintDialogData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def EnableHelp(self, *_args, **_kwargs): val = apply(printfwc.wxPrintDialogData_EnableHelp,(self,) + _args, _kwargs) return val @@ -510,9 +519,12 @@ class wxPrinterPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,printfwc=printfwc): - if self.thisown == 1 : - printfwc.delete_wxPrinter(self) + def __del__(self, delfunc=printfwc.delete_wxPrinter): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def CreateAbortWindow(self, *_args, **_kwargs): val = apply(printfwc.wxPrinter_CreateAbortWindow,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/sizers.cpp b/wxPython/src/msw/sizers.cpp index 79841577fe..d570c91c8f 100644 --- a/wxPython/src/msw/sizers.cpp +++ b/wxPython/src/msw/sizers.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -140,33 +139,31 @@ static PyObject *_wrap_wxSizerItem_DeleteWindows(PyObject *self, PyObject *args, return _resultobj; } -#define wxSizerItem_GetPosition(_swigobj) (_swigobj->GetPosition()) -static PyObject *_wrap_wxSizerItem_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizerItem_DetachSizer(_swigobj) (_swigobj->DetachSizer()) +static PyObject *_wrap_wxSizerItem_DetachSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxPoint * _result; wxSizerItem * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetPosition",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_DetachSizer",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetPosition. Expected _wxSizerItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_DetachSizer. Expected _wxSizerItem_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxPoint (wxSizerItem_GetPosition(_arg0)); + wxSizerItem_DetachSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } @@ -274,6 +271,66 @@ static PyObject *_wrap_wxSizerItem_SetDimension(PyObject *self, PyObject *args, return _resultobj; } +#define wxSizerItem_GetMinSize(_swigobj) (_swigobj->GetMinSize()) +static PyObject *_wrap_wxSizerItem_GetMinSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxSizerItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetMinSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetMinSize. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxSizerItem_GetMinSize(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxSizerItem_SetInitSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetInitSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSizerItem_SetInitSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + int _arg1; + int _arg2; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxSizerItem_SetInitSize",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetInitSize. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizerItem_SetInitSize(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxSizerItem_SetRatioWH(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetRatio(_swigarg0,_swigarg1)) static PyObject *_wrap_wxSizerItem_SetRatioWH(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -481,63 +538,27 @@ static PyObject *_wrap_wxSizerItem_IsSpacer(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxSizerItem_GetWindow(_swigobj) (_swigobj->GetWindow()) -static PyObject *_wrap_wxSizerItem_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxWindow * _result; - wxSizerItem * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetWindow",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetWindow. Expected _wxSizerItem_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxWindow *)wxSizerItem_GetWindow(_arg0); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } - return _resultobj; -} - -#define wxSizerItem_SetWindow(_swigobj,_swigarg0) (_swigobj->SetWindow(_swigarg0)) -static PyObject *_wrap_wxSizerItem_SetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizerItem_SetProportion(_swigobj,_swigarg0) (_swigobj->SetProportion(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetProportion(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxSizerItem * _arg0; - wxWindow * _arg1; + int _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","window", NULL }; + char *_kwnames[] = { "self","proportion", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizerItem_SetWindow",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizerItem_SetProportion",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetWindow. Expected _wxSizerItem_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 wxSizerItem_SetWindow. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetProportion. Expected _wxSizerItem_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetWindow(_arg0,_arg1); + wxSizerItem_SetProportion(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -546,63 +567,55 @@ static PyObject *_wrap_wxSizerItem_SetWindow(PyObject *self, PyObject *args, PyO return _resultobj; } -#define wxSizerItem_GetSizer(_swigobj) (_swigobj->GetSizer()) -static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizerItem_GetProportion(_swigobj) (_swigobj->GetProportion()) +static PyObject *_wrap_wxSizerItem_GetProportion(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxSizer * _result; + int _result; wxSizerItem * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetSizer",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetProportion",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetSizer. Expected _wxSizerItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetProportion. Expected _wxSizerItem_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSizer *)wxSizerItem_GetSizer(_arg0); + _result = (int )wxSizerItem_GetProportion(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxSizer(_result); } +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxSizerItem_SetSizer(_swigobj,_swigarg0) (_swigobj->SetSizer(_swigarg0)) -static PyObject *_wrap_wxSizerItem_SetSizer(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizerItem_SetFlag(_swigobj,_swigarg0) (_swigobj->SetFlag(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetFlag(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxSizerItem * _arg0; - wxSizer * _arg1; + int _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","sizer", NULL }; + char *_kwnames[] = { "self","flag", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizerItem_SetSizer",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizerItem_SetFlag",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetSizer. Expected _wxSizerItem_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizerItem_SetSizer. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetFlag. Expected _wxSizerItem_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetSizer(_arg0,_arg1); + wxSizerItem_SetFlag(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -611,8 +624,8 @@ static PyObject *_wrap_wxSizerItem_SetSizer(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxSizerItem_GetOption(_swigobj) (_swigobj->GetOption()) -static PyObject *_wrap_wxSizerItem_GetOption(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizerItem_GetFlag(_swigobj) (_swigobj->GetFlag()) +static PyObject *_wrap_wxSizerItem_GetFlag(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; int _result; wxSizerItem * _arg0; @@ -620,18 +633,18 @@ static PyObject *_wrap_wxSizerItem_GetOption(PyObject *self, PyObject *args, PyO char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetOption",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetFlag",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetOption. Expected _wxSizerItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetFlag. Expected _wxSizerItem_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSizerItem_GetOption(_arg0); + _result = (int )wxSizerItem_GetFlag(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -639,31 +652,32 @@ static PyObject *_wrap_wxSizerItem_GetOption(PyObject *self, PyObject *args, PyO return _resultobj; } -#define wxSizerItem_GetFlag(_swigobj) (_swigobj->GetFlag()) -static PyObject *_wrap_wxSizerItem_GetFlag(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizerItem_SetBorder(_swigobj,_swigarg0) (_swigobj->SetBorder(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetBorder(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - int _result; wxSizerItem * _arg0; + int _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","border", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetFlag",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizerItem_SetBorder",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetFlag. Expected _wxSizerItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetBorder. Expected _wxSizerItem_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSizerItem_GetFlag(_arg0); + wxSizerItem_SetBorder(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } @@ -695,57 +709,63 @@ static PyObject *_wrap_wxSizerItem_GetBorder(PyObject *self, PyObject *args, PyO return _resultobj; } -#define wxSizerItem_SetInitSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetInitSize(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxSizerItem_SetInitSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizerItem_GetWindow(_swigobj) (_swigobj->GetWindow()) +static PyObject *_wrap_wxSizerItem_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxWindow * _result; wxSizerItem * _arg0; - int _arg1; - int _arg2; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxSizerItem_SetInitSize",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetWindow",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetInitSize. Expected _wxSizerItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetWindow. Expected _wxSizerItem_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetInitSize(_arg0,_arg1,_arg2); + _result = (wxWindow *)wxSizerItem_GetWindow(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } -#define wxSizerItem_SetOption(_swigobj,_swigarg0) (_swigobj->SetOption(_swigarg0)) -static PyObject *_wrap_wxSizerItem_SetOption(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizerItem_SetWindow(_swigobj,_swigarg0) (_swigobj->SetWindow(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxSizerItem * _arg0; - int _arg1; + wxWindow * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","option", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizerItem_SetOption",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizerItem_SetWindow",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetOption. Expected _wxSizerItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetWindow. Expected _wxSizerItem_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 wxSizerItem_SetWindow. Expected _wxWindow_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetOption(_arg0,_arg1); + wxSizerItem_SetWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -754,56 +774,63 @@ static PyObject *_wrap_wxSizerItem_SetOption(PyObject *self, PyObject *args, PyO return _resultobj; } -#define wxSizerItem_SetFlag(_swigobj,_swigarg0) (_swigobj->SetFlag(_swigarg0)) -static PyObject *_wrap_wxSizerItem_SetFlag(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizerItem_GetSizer(_swigobj) (_swigobj->GetSizer()) +static PyObject *_wrap_wxSizerItem_GetSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + wxSizer * _result; wxSizerItem * _arg0; - int _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","flag", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizerItem_SetFlag",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetSizer",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetFlag. Expected _wxSizerItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetSizer. Expected _wxSizerItem_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetFlag(_arg0,_arg1); + _result = (wxSizer *)wxSizerItem_GetSizer(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ _resultobj = wxPyMake_wxSizer(_result); } return _resultobj; } -#define wxSizerItem_SetBorder(_swigobj,_swigarg0) (_swigobj->SetBorder(_swigarg0)) -static PyObject *_wrap_wxSizerItem_SetBorder(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizerItem_SetSizer(_swigobj,_swigarg0) (_swigobj->SetSizer(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxSizerItem * _arg0; - int _arg1; + wxSizer * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","border", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","sizer", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizerItem_SetBorder",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizerItem_SetSizer",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetBorder. Expected _wxSizerItem_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetSizer. Expected _wxSizerItem_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizerItem_SetSizer. Expected _wxSizer_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizerItem_SetBorder(_arg0,_arg1); + wxSizerItem_SetSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -812,25 +839,186 @@ static PyObject *_wrap_wxSizerItem_SetBorder(PyObject *self, PyObject *args, PyO return _resultobj; } -static PyObject * wxSizerItem_GetUserData(wxSizerItem *self) { - wxPyUserData* data = (wxPyUserData*)self->GetUserData(); - if (data) { - Py_INCREF(data->m_obj); - return data->m_obj; - } else { - Py_INCREF(Py_None); - return Py_None; - } - } -static PyObject *_wrap_wxSizerItem_GetUserData(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizerItem_GetSpacer(_swigobj) (_swigobj->GetSpacer()) +static PyObject *_wrap_wxSizerItem_GetSpacer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - PyObject * _result; + wxSize * _result; wxSizerItem * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetUserData",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetSpacer",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetSpacer. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + const wxSize & _result_ref = wxSizerItem_GetSpacer(_arg0); + _result = (wxSize *) &_result_ref; + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxSizerItem_SetSpacer(_swigobj,_swigarg0) (_swigobj->SetSpacer(_swigarg0)) +static PyObject *_wrap_wxSizerItem_SetSpacer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + wxSize * _arg1; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizerItem_SetSpacer",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_SetSpacer. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizerItem_SetSpacer(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizerItem_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) +static PyObject *_wrap_wxSizerItem_Show(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizerItem * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","show", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizerItem_Show",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_Show. Expected _wxSizerItem_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizerItem_Show(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizerItem_IsShown(_swigobj) (_swigobj->IsShown()) +static PyObject *_wrap_wxSizerItem_IsShown(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxSizerItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_IsShown",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_IsShown. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxSizerItem_IsShown(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxSizerItem_GetPosition(_swigobj) (_swigobj->GetPosition()) +static PyObject *_wrap_wxSizerItem_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxSizerItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetPosition",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizerItem_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizerItem_GetPosition. Expected _wxSizerItem_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxPoint (wxSizerItem_GetPosition(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +static PyObject * wxSizerItem_GetUserData(wxSizerItem *self) { + wxPyUserData* data = (wxPyUserData*)self->GetUserData(); + if (data) { + Py_INCREF(data->m_obj); + return data->m_obj; + } else { + Py_INCREF(Py_None); + return Py_None; + } + } +static PyObject *_wrap_wxSizerItem_GetUserData(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxSizerItem * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizerItem_GetUserData",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -922,10 +1110,10 @@ static PyObject *_wrap_wxSizer_Destroy(PyObject *self, PyObject *args, PyObject return _resultobj; } -static void wxSizer_AddWindow(wxSizer *self,wxWindow * window,int option,int flag,int border,PyObject * userData) { +static void wxSizer_AddWindow(wxSizer *self,wxWindow * window,int proportion,int flag,int border,PyObject * userData) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); - self->Add(window, option, flag, border, data); + self->Add(window, proportion, flag, border, data); } static PyObject *_wrap_wxSizer_AddWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -938,7 +1126,7 @@ static PyObject *_wrap_wxSizer_AddWindow(PyObject *self, PyObject *args, PyObjec PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj5 = 0; - char *_kwnames[] = { "self","window","option","flag","border","userData", NULL }; + char *_kwnames[] = { "self","window","proportion","flag","border","userData", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iiiO:wxSizer_AddWindow",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4,&_obj5)) @@ -972,10 +1160,10 @@ static PyObject *_wrap_wxSizer_AddWindow(PyObject *self, PyObject *args, PyObjec return _resultobj; } -static void wxSizer_AddSizer(wxSizer *self,wxSizer * sizer,int option,int flag,int border,PyObject * userData) { +static void wxSizer_AddSizer(wxSizer *self,wxSizer * sizer,int proportion,int flag,int border,PyObject * userData) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); - self->Add(sizer, option, flag, border, data); + self->Add(sizer, proportion, flag, border, data); } static PyObject *_wrap_wxSizer_AddSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -988,7 +1176,7 @@ static PyObject *_wrap_wxSizer_AddSizer(PyObject *self, PyObject *args, PyObject PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj5 = 0; - char *_kwnames[] = { "self","sizer","option","flag","border","userData", NULL }; + char *_kwnames[] = { "self","sizer","proportion","flag","border","userData", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iiiO:wxSizer_AddSizer",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4,&_obj5)) @@ -1022,10 +1210,10 @@ static PyObject *_wrap_wxSizer_AddSizer(PyObject *self, PyObject *args, PyObject return _resultobj; } -static void wxSizer_AddSpacer(wxSizer *self,int width,int height,int option,int flag,int border,PyObject * userData) { +static void wxSizer_AddSpacer(wxSizer *self,int width,int height,int proportion,int flag,int border,PyObject * userData) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); - self->Add(width, height, option, flag, border, data); + self->Add(width, height, proportion, flag, border, data); } static PyObject *_wrap_wxSizer_AddSpacer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1038,7 +1226,7 @@ static PyObject *_wrap_wxSizer_AddSpacer(PyObject *self, PyObject *args, PyObjec PyObject * _arg6 = (PyObject *) NULL; PyObject * _argo0 = 0; PyObject * _obj6 = 0; - char *_kwnames[] = { "self","width","height","option","flag","border","userData", NULL }; + char *_kwnames[] = { "self","width","height","proportion","flag","border","userData", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|iiiO:wxSizer_AddSpacer",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_obj6)) @@ -1065,10 +1253,10 @@ static PyObject *_wrap_wxSizer_AddSpacer(PyObject *self, PyObject *args, PyObjec return _resultobj; } -static void wxSizer_InsertWindow(wxSizer *self,int before,wxWindow * window,int option,int flag,int border,PyObject * userData) { +static void wxSizer_InsertWindow(wxSizer *self,int before,wxWindow * window,int proportion,int flag,int border,PyObject * userData) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); - self->Insert(before, window, option, flag, border, data); + self->Insert(before, window, proportion, flag, border, data); } static PyObject *_wrap_wxSizer_InsertWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1082,7 +1270,7 @@ static PyObject *_wrap_wxSizer_InsertWindow(PyObject *self, PyObject *args, PyOb PyObject * _argo0 = 0; PyObject * _argo2 = 0; PyObject * _obj6 = 0; - char *_kwnames[] = { "self","before","window","option","flag","border","userData", NULL }; + char *_kwnames[] = { "self","before","window","proportion","flag","border","userData", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|iiiO:wxSizer_InsertWindow",_kwnames,&_argo0,&_arg1,&_argo2,&_arg3,&_arg4,&_arg5,&_obj6)) @@ -1116,10 +1304,10 @@ static PyObject *_wrap_wxSizer_InsertWindow(PyObject *self, PyObject *args, PyOb return _resultobj; } -static void wxSizer_InsertSizer(wxSizer *self,int before,wxSizer * sizer,int option,int flag,int border,PyObject * userData) { +static void wxSizer_InsertSizer(wxSizer *self,int before,wxSizer * sizer,int proportion,int flag,int border,PyObject * userData) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); - self->Insert(before, sizer, option, flag, border, data); + self->Insert(before, sizer, proportion, flag, border, data); } static PyObject *_wrap_wxSizer_InsertSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1133,7 +1321,7 @@ static PyObject *_wrap_wxSizer_InsertSizer(PyObject *self, PyObject *args, PyObj PyObject * _argo0 = 0; PyObject * _argo2 = 0; PyObject * _obj6 = 0; - char *_kwnames[] = { "self","before","sizer","option","flag","border","userData", NULL }; + char *_kwnames[] = { "self","before","sizer","proportion","flag","border","userData", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|iiiO:wxSizer_InsertSizer",_kwnames,&_argo0,&_arg1,&_argo2,&_arg3,&_arg4,&_arg5,&_obj6)) @@ -1167,10 +1355,10 @@ static PyObject *_wrap_wxSizer_InsertSizer(PyObject *self, PyObject *args, PyObj return _resultobj; } -static void wxSizer_InsertSpacer(wxSizer *self,int before,int width,int height,int option,int flag,int border,PyObject * userData) { +static void wxSizer_InsertSpacer(wxSizer *self,int before,int width,int height,int proportion,int flag,int border,PyObject * userData) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); - self->Insert(before, width, height, option, flag, border, data); + self->Insert(before, width, height, proportion, flag, border, data); } static PyObject *_wrap_wxSizer_InsertSpacer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1184,7 +1372,7 @@ static PyObject *_wrap_wxSizer_InsertSpacer(PyObject *self, PyObject *args, PyOb PyObject * _arg7 = (PyObject *) NULL; PyObject * _argo0 = 0; PyObject * _obj7 = 0; - char *_kwnames[] = { "self","before","width","height","option","flag","border","userData", NULL }; + char *_kwnames[] = { "self","before","width","height","proportion","flag","border","userData", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii|iiiO:wxSizer_InsertSpacer",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6,&_obj7)) @@ -1211,10 +1399,10 @@ static PyObject *_wrap_wxSizer_InsertSpacer(PyObject *self, PyObject *args, PyOb return _resultobj; } -static void wxSizer_PrependWindow(wxSizer *self,wxWindow * window,int option,int flag,int border,PyObject * userData) { +static void wxSizer_PrependWindow(wxSizer *self,wxWindow * window,int proportion,int flag,int border,PyObject * userData) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); - self->Prepend(window, option, flag, border, data); + self->Prepend(window, proportion, flag, border, data); } static PyObject *_wrap_wxSizer_PrependWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1227,7 +1415,7 @@ static PyObject *_wrap_wxSizer_PrependWindow(PyObject *self, PyObject *args, PyO PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj5 = 0; - char *_kwnames[] = { "self","window","option","flag","border","userData", NULL }; + char *_kwnames[] = { "self","window","proportion","flag","border","userData", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iiiO:wxSizer_PrependWindow",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4,&_obj5)) @@ -1261,10 +1449,10 @@ static PyObject *_wrap_wxSizer_PrependWindow(PyObject *self, PyObject *args, PyO return _resultobj; } -static void wxSizer_PrependSizer(wxSizer *self,wxSizer * sizer,int option,int flag,int border,PyObject * userData) { +static void wxSizer_PrependSizer(wxSizer *self,wxSizer * sizer,int proportion,int flag,int border,PyObject * userData) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); - self->Prepend(sizer, option, flag, border, data); + self->Prepend(sizer, proportion, flag, border, data); } static PyObject *_wrap_wxSizer_PrependSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1277,7 +1465,7 @@ static PyObject *_wrap_wxSizer_PrependSizer(PyObject *self, PyObject *args, PyOb PyObject * _argo0 = 0; PyObject * _argo1 = 0; PyObject * _obj5 = 0; - char *_kwnames[] = { "self","sizer","option","flag","border","userData", NULL }; + char *_kwnames[] = { "self","sizer","proportion","flag","border","userData", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iiiO:wxSizer_PrependSizer",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3,&_arg4,&_obj5)) @@ -1311,10 +1499,10 @@ static PyObject *_wrap_wxSizer_PrependSizer(PyObject *self, PyObject *args, PyOb return _resultobj; } -static void wxSizer_PrependSpacer(wxSizer *self,int width,int height,int option,int flag,int border,PyObject * userData) { +static void wxSizer_PrependSpacer(wxSizer *self,int width,int height,int proportion,int flag,int border,PyObject * userData) { wxPyUserData* data = NULL; if (userData) data = new wxPyUserData(userData); - self->Prepend(width, height, option, flag, border, data); + self->Prepend(width, height, proportion, flag, border, data); } static PyObject *_wrap_wxSizer_PrependSpacer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1327,7 +1515,7 @@ static PyObject *_wrap_wxSizer_PrependSpacer(PyObject *self, PyObject *args, PyO PyObject * _arg6 = (PyObject *) NULL; PyObject * _argo0 = 0; PyObject * _obj6 = 0; - char *_kwnames[] = { "self","width","height","option","flag","border","userData", NULL }; + char *_kwnames[] = { "self","width","height","proportion","flag","border","userData", NULL }; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii|iiiO:wxSizer_PrependSpacer",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_obj6)) @@ -1457,144 +1645,132 @@ static PyObject *_wrap_wxSizer_RemovePos(PyObject *self, PyObject *args, PyObjec return _resultobj; } -#define wxSizer_SetDimension(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetDimension(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxSizer_SetDimension(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_DetachWindow(_swigobj,_swigarg0) (_swigobj->Detach(_swigarg0)) +static PyObject *_wrap_wxSizer_DetachWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxSizer * _arg0; - int _arg1; - int _arg2; - int _arg3; - int _arg4; + wxWindow * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","x","y","width","height", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxSizer_SetDimension",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_DetachWindow",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetDimension. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_DetachWindow. Expected _wxSizer_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 wxSizer_DetachWindow. Expected _wxWindow_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetDimension(_arg0,_arg1,_arg2,_arg3,_arg4); + _result = (bool )wxSizer_DetachWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxSizer_SetMinSize(_swigobj,_swigarg0) (_swigobj->SetMinSize(_swigarg0)) -static PyObject *_wrap_wxSizer_SetMinSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_DetachSizer(_swigobj,_swigarg0) (_swigobj->Detach(_swigarg0)) +static PyObject *_wrap_wxSizer_DetachSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxSizer * _arg0; - wxSize * _arg1; + wxSizer * _arg1; PyObject * _argo0 = 0; - wxSize temp; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","size", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","sizer", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_SetMinSize",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_DetachSizer",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetMinSize. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_DetachSizer. Expected _wxSizer_p."); return NULL; } } -{ - _arg1 = &temp; - if (! wxSize_helper(_obj1, &_arg1)) + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_DetachSizer. Expected _wxSizer_p."); return NULL; -} + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetMinSize(_arg0,*_arg1); + _result = (bool )wxSizer_DetachSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxSizer_SetItemMinSizeWindow(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxSizer_SetItemMinSizeWindow(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_DetachPos(_swigobj,_swigarg0) (_swigobj->Detach(_swigarg0)) +static PyObject *_wrap_wxSizer_DetachPos(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxSizer * _arg0; - wxWindow * _arg1; - int _arg2; - int _arg3; + int _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","window","width","height", NULL }; + char *_kwnames[] = { "self","pos", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxSizer_SetItemMinSizeWindow",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizer_DetachPos",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizeWindow. Expected _wxSizer_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 wxSizer_SetItemMinSizeWindow. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_DetachPos. Expected _wxSizer_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetItemMinSizeWindow(_arg0,_arg1,_arg2,_arg3); + _result = (bool )wxSizer_DetachPos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxSizer_SetItemMinSizeSizer(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxSizer_SetItemMinSizeSizer(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_Clear(_swigobj,_swigarg0) (_swigobj->Clear(_swigarg0)) +static PyObject *_wrap_wxSizer_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxSizer * _arg0; - wxSizer * _arg1; - int _arg2; - int _arg3; + bool _arg1 = (bool ) false; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","sizer","width","height", NULL }; + int tempbool1 = (int) false; + char *_kwnames[] = { "self","delete_windows", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxSizer_SetItemMinSizeSizer",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxSizer_Clear",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizeSizer. Expected _wxSizer_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_SetItemMinSizeSizer. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_Clear. Expected _wxSizer_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetItemMinSizeSizer(_arg0,_arg1,_arg2,_arg3); + wxSizer_Clear(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1603,29 +1779,26 @@ static PyObject *_wrap_wxSizer_SetItemMinSizeSizer(PyObject *self, PyObject *arg return _resultobj; } -#define wxSizer_SetItemMinSizePos(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxSizer_SetItemMinSizePos(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_DeleteWindows(_swigobj) (_swigobj->DeleteWindows()) +static PyObject *_wrap_wxSizer_DeleteWindows(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxSizer * _arg0; - int _arg1; - int _arg2; - int _arg3; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","pos","width","height", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxSizer_SetItemMinSizePos",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizer_DeleteWindows",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizePos. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_DeleteWindows. Expected _wxSizer_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetItemMinSizePos(_arg0,_arg1,_arg2,_arg3); + wxSizer_DeleteWindows(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1634,14 +1807,286 @@ static PyObject *_wrap_wxSizer_SetItemMinSizePos(PyObject *self, PyObject *args, return _resultobj; } -#define wxSizer_GetSize(_swigobj) (_swigobj->GetSize()) -static PyObject *_wrap_wxSizer_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_SetMinSize(_swigobj,_swigarg0) (_swigobj->SetMinSize(_swigarg0)) +static PyObject *_wrap_wxSizer_SetMinSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxSize * _result; wxSizer * _arg0; + wxSize * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; + wxSize temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_SetMinSize",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetMinSize. Expected _wxSizer_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxSize_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_SetMinSize(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizeWindow(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSizer_SetItemMinSizeWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxWindow * _arg1; + wxSize * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxSize temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","window","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxSizer_SetItemMinSizeWindow",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizeWindow. Expected _wxSizer_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 wxSizer_SetItemMinSizeWindow. Expected _wxWindow_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxSize_helper(_obj2, &_arg2)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_SetItemMinSizeWindow(_arg0,_arg1,*_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizeSizer(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSizer_SetItemMinSizeSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxSizer * _arg1; + wxSize * _arg2; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + wxSize temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","sizer","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxSizer_SetItemMinSizeSizer",_kwnames,&_argo0,&_argo1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizeSizer. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_SetItemMinSizeSizer. Expected _wxSizer_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxSize_helper(_obj2, &_arg2)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_SetItemMinSizeSizer(_arg0,_arg1,*_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizePos(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSizer_SetItemMinSizePos(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + int _arg1; + wxSize * _arg2; + PyObject * _argo0 = 0; + wxSize temp; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","pos","size", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxSizer_SetItemMinSizePos",_kwnames,&_argo0,&_arg1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizePos. Expected _wxSizer_p."); + return NULL; + } + } +{ + _arg2 = &temp; + if (! wxSize_helper(_obj2, &_arg2)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_SetItemMinSizePos(_arg0,_arg1,*_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizeWindowWH(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSizer_SetItemMinSizeWindowWH(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxWindow * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxSizer_SetItemMinSizeWindowWH",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizeWindowWH. Expected _wxSizer_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 wxSizer_SetItemMinSizeWindowWH. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_SetItemMinSizeWindowWH(_arg0,_arg1,_arg2,_arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizeSizerWH(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSizer_SetItemMinSizeSizerWH(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxSizer * _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","sizer","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOii:wxSizer_SetItemMinSizeSizerWH",_kwnames,&_argo0,&_argo1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizeSizerWH. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_SetItemMinSizeSizerWH. Expected _wxSizer_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_SetItemMinSizeSizerWH(_arg0,_arg1,_arg2,_arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetItemMinSizePosWH(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetItemMinSize(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxSizer_SetItemMinSizePosWH(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + int _arg1; + int _arg2; + int _arg3; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiii:wxSizer_SetItemMinSizePosWH",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetItemMinSizePosWH. Expected _wxSizer_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_SetItemMinSizePosWH(_arg0,_arg1,_arg2,_arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_GetSize(_swigobj) (_swigobj->GetSize()) +static PyObject *_wrap_wxSizer_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizer_GetSize",_kwnames,&_argo0)) @@ -1697,53 +2142,380 @@ static PyObject *_wrap_wxSizer_GetPosition(PyObject *self, PyObject *args, PyObj #define wxSizer_GetMinSize(_swigobj) (_swigobj->GetMinSize()) static PyObject *_wrap_wxSizer_GetMinSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxSize * _result; + wxSize * _result; + wxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizer_GetMinSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_GetMinSize. Expected _wxSizer_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxSizer_GetMinSize(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxSizer_Layout(_swigobj) (_swigobj->Layout()) +static PyObject *_wrap_wxSizer_Layout(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizer_Layout",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_Layout. Expected _wxSizer_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_Layout(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_Fit(_swigobj,_swigarg0) (_swigobj->Fit(_swigarg0)) +static PyObject *_wrap_wxSizer_Fit(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxSizer * _arg0; + wxWindow * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_Fit",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_Fit. Expected _wxSizer_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 wxSizer_Fit. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxSizer_Fit(_arg0,_arg1)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxSizer_FitInside(_swigobj,_swigarg0) (_swigobj->FitInside(_swigarg0)) +static PyObject *_wrap_wxSizer_FitInside(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxWindow * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_FitInside",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_FitInside. Expected _wxSizer_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 wxSizer_FitInside. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_FitInside(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetSizeHints(_swigobj,_swigarg0) (_swigobj->SetSizeHints(_swigarg0)) +static PyObject *_wrap_wxSizer_SetSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxWindow * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_SetSizeHints",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetSizeHints. Expected _wxSizer_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 wxSizer_SetSizeHints. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_SetSizeHints(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_SetVirtualSizeHints(_swigobj,_swigarg0) (_swigobj->SetVirtualSizeHints(_swigarg0)) +static PyObject *_wrap_wxSizer_SetVirtualSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxWindow * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","window", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_SetVirtualSizeHints",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetVirtualSizeHints. Expected _wxSizer_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 wxSizer_SetVirtualSizeHints. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_SetVirtualSizeHints(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject * wxSizer_GetChildren(wxSizer *self) { + wxSizerItemList& list = self->GetChildren(); + return wxPy_ConvertList(&list, "wxSizerItem"); + } +static PyObject *_wrap_wxSizer_GetChildren(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + PyObject * _result; + wxSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizer_GetChildren",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_GetChildren. Expected _wxSizer_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (PyObject *)wxSizer_GetChildren(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = _result; +} + return _resultobj; +} + +#define wxSizer_SetDimension(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->SetDimension(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxSizer_SetDimension(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + int _arg1; + int _arg2; + int _arg3; + int _arg4; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","x","y","width","height", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oiiii:wxSizer_SetDimension",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetDimension. Expected _wxSizer_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_SetDimension(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_ShowWindow(_swigobj,_swigarg0,_swigarg1) (_swigobj->Show(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSizer_ShowWindow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSizer * _arg0; + wxWindow * _arg1; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","window","show", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxSizer_ShowWindow",_kwnames,&_argo0,&_argo1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_ShowWindow. Expected _wxSizer_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 wxSizer_ShowWindow. Expected _wxWindow_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxSizer_ShowWindow(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxSizer_ShowSizer(_swigobj,_swigarg0,_swigarg1) (_swigobj->Show(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSizer_ShowSizer(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; wxSizer * _arg0; + wxSizer * _arg1; + bool _arg2 = (bool ) TRUE; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; + PyObject * _argo1 = 0; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","sizer","show", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizer_GetMinSize",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxSizer_ShowSizer",_kwnames,&_argo0,&_argo1,&tempbool2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_GetMinSize. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_ShowSizer. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_ShowSizer. Expected _wxSizer_p."); return NULL; } } + _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizer_GetMinSize(_arg0)); + wxSizer_ShowSizer(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxSizer_Layout(_swigobj) (_swigobj->Layout()) -static PyObject *_wrap_wxSizer_Layout(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_ShowPos(_swigobj,_swigarg0,_swigarg1) (_swigobj->Show(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxSizer_ShowPos(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxSizer * _arg0; + size_t _arg1; + bool _arg2 = (bool ) TRUE; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + int tempbool2 = (int) TRUE; + char *_kwnames[] = { "self","index","show", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizer_Layout",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxSizer_ShowPos",_kwnames,&_argo0,&_arg1,&tempbool2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_Layout. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_ShowPos. Expected _wxSizer_p."); return NULL; } } + _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Layout(_arg0); + wxSizer_ShowPos(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1752,74 +2524,72 @@ static PyObject *_wrap_wxSizer_Layout(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define wxSizer_Fit(_swigobj,_swigarg0) (_swigobj->Fit(_swigarg0)) -static PyObject *_wrap_wxSizer_Fit(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_HideWindow(_swigobj,_swigarg0) (_swigobj->Hide(_swigarg0)) +static PyObject *_wrap_wxSizer_HideWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxSize * _result; wxSizer * _arg0; wxWindow * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; char *_kwnames[] = { "self","window", NULL }; - char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_Fit",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_HideWindow",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_Fit. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_HideWindow. Expected _wxSizer_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 wxSizer_Fit. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_HideWindow. Expected _wxWindow_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxSizer_Fit(_arg0,_arg1)); + wxSizer_HideWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxSizer_FitInside(_swigobj,_swigarg0) (_swigobj->FitInside(_swigarg0)) -static PyObject *_wrap_wxSizer_FitInside(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_HideSizer(_swigobj,_swigarg0) (_swigobj->Hide(_swigarg0)) +static PyObject *_wrap_wxSizer_HideSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxSizer * _arg0; - wxWindow * _arg1; + wxSizer * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "self","window", NULL }; + char *_kwnames[] = { "self","sizer", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_FitInside",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_HideSizer",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_FitInside. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_HideSizer. Expected _wxSizer_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 wxSizer_FitInside. Expected _wxWindow_p."); + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_HideSizer. Expected _wxSizer_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_FitInside(_arg0,_arg1); + wxSizer_HideSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1828,35 +2598,27 @@ static PyObject *_wrap_wxSizer_FitInside(PyObject *self, PyObject *args, PyObjec return _resultobj; } -#define wxSizer_SetSizeHints(_swigobj,_swigarg0) (_swigobj->SetSizeHints(_swigarg0)) -static PyObject *_wrap_wxSizer_SetSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_HidePos(_swigobj,_swigarg0) (_swigobj->Hide(_swigarg0)) +static PyObject *_wrap_wxSizer_HidePos(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxSizer * _arg0; - wxWindow * _arg1; + size_t _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","window", NULL }; + char *_kwnames[] = { "self","index", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_SetSizeHints",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizer_HidePos",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetSizeHints. Expected _wxSizer_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 wxSizer_SetSizeHints. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_HidePos. Expected _wxSizer_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetSizeHints(_arg0,_arg1); + wxSizer_HidePos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1865,9 +2627,10 @@ static PyObject *_wrap_wxSizer_SetSizeHints(PyObject *self, PyObject *args, PyOb return _resultobj; } -#define wxSizer_SetVirtualSizeHints(_swigobj,_swigarg0) (_swigobj->SetVirtualSizeHints(_swigarg0)) -static PyObject *_wrap_wxSizer_SetVirtualSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_IsShownWindow(_swigobj,_swigarg0) (_swigobj->IsShown(_swigarg0)) +static PyObject *_wrap_wxSizer_IsShownWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxSizer * _arg0; wxWindow * _arg1; PyObject * _argo0 = 0; @@ -1875,122 +2638,126 @@ static PyObject *_wrap_wxSizer_SetVirtualSizeHints(PyObject *self, PyObject *arg char *_kwnames[] = { "self","window", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_SetVirtualSizeHints",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_IsShownWindow",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_SetVirtualSizeHints. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_IsShownWindow. Expected _wxSizer_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 wxSizer_SetVirtualSizeHints. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_IsShownWindow. Expected _wxWindow_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_SetVirtualSizeHints(_arg0,_arg1); + _result = (bool )wxSizer_IsShownWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxSizer_Clear(_swigobj,_swigarg0) (_swigobj->Clear(_swigarg0)) -static PyObject *_wrap_wxSizer_Clear(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_IsShownSizer(_swigobj,_swigarg0) (_swigobj->IsShown(_swigarg0)) +static PyObject *_wrap_wxSizer_IsShownSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxSizer * _arg0; - bool _arg1 = (bool ) FALSE; + wxSizer * _arg1; PyObject * _argo0 = 0; - int tempbool1 = (int) FALSE; - char *_kwnames[] = { "self","delete_windows", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","sizer", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxSizer_Clear",_kwnames,&_argo0,&tempbool1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxSizer_IsShownSizer",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_Clear. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_IsShownSizer. Expected _wxSizer_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxSizer_IsShownSizer. Expected _wxSizer_p."); return NULL; } } - _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_Clear(_arg0,_arg1); + _result = (bool )wxSizer_IsShownSizer(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxSizer_DeleteWindows(_swigobj) (_swigobj->DeleteWindows()) -static PyObject *_wrap_wxSizer_DeleteWindows(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_IsShownPos(_swigobj,_swigarg0) (_swigobj->IsShown(_swigarg0)) +static PyObject *_wrap_wxSizer_IsShownPos(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxSizer * _arg0; + size_t _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","index", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizer_DeleteWindows",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizer_IsShownPos",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_DeleteWindows. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_IsShownPos. Expected _wxSizer_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSizer_DeleteWindows(_arg0); + _result = (bool )wxSizer_IsShownPos(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -static PyObject * wxSizer_GetChildren(wxSizer *self) { - wxList& list = self->GetChildren(); - return wxPy_ConvertList(&list, "wxSizerItem"); - } -static PyObject *_wrap_wxSizer_GetChildren(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxSizer_ShowItems(_swigobj,_swigarg0) (_swigobj->ShowItems(_swigarg0)) +static PyObject *_wrap_wxSizer_ShowItems(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - PyObject * _result; wxSizer * _arg0; + bool _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + int tempbool1; + char *_kwnames[] = { "self","show", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxSizer_GetChildren",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxSizer_ShowItems",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxSizer_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_GetChildren. Expected _wxSizer_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSizer_ShowItems. Expected _wxSizer_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (PyObject *)wxSizer_GetChildren(_arg0); + wxSizer_ShowItems(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -}{ - _resultobj = _result; -} +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } @@ -2145,6 +2912,35 @@ static PyObject *_wrap_wxBoxSizer_GetOrientation(PyObject *self, PyObject *args, return _resultobj; } +#define wxBoxSizer_SetOrientation(_swigobj,_swigarg0) (_swigobj->SetOrientation(_swigarg0)) +static PyObject *_wrap_wxBoxSizer_SetOrientation(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxBoxSizer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","orient", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxBoxSizer_SetOrientation",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxBoxSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxBoxSizer_SetOrientation. Expected _wxBoxSizer_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBoxSizer_SetOrientation(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxBoxSizer_RecalcSizes(_swigobj) (_swigobj->RecalcSizes()) static PyObject *_wrap_wxBoxSizer_RecalcSizes(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2930,16 +3726,17 @@ static PyObject *_wrap_wxFlexGridSizer_CalcMin(PyObject *self, PyObject *args, P return _resultobj; } -#define wxFlexGridSizer_AddGrowableRow(_swigobj,_swigarg0) (_swigobj->AddGrowableRow(_swigarg0)) +#define wxFlexGridSizer_AddGrowableRow(_swigobj,_swigarg0,_swigarg1) (_swigobj->AddGrowableRow(_swigarg0,_swigarg1)) static PyObject *_wrap_wxFlexGridSizer_AddGrowableRow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFlexGridSizer * _arg0; size_t _arg1; + int _arg2 = (int ) 0; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","idx", NULL }; + char *_kwnames[] = { "self","idx","proportion", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_AddGrowableRow",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxFlexGridSizer_AddGrowableRow",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2950,7 +3747,7 @@ static PyObject *_wrap_wxFlexGridSizer_AddGrowableRow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_AddGrowableRow(_arg0,_arg1); + wxFlexGridSizer_AddGrowableRow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2988,16 +3785,17 @@ static PyObject *_wrap_wxFlexGridSizer_RemoveGrowableRow(PyObject *self, PyObjec return _resultobj; } -#define wxFlexGridSizer_AddGrowableCol(_swigobj,_swigarg0) (_swigobj->AddGrowableCol(_swigarg0)) +#define wxFlexGridSizer_AddGrowableCol(_swigobj,_swigarg0,_swigarg1) (_swigobj->AddGrowableCol(_swigarg0,_swigarg1)) static PyObject *_wrap_wxFlexGridSizer_AddGrowableCol(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFlexGridSizer * _arg0; size_t _arg1; + int _arg2 = (int ) 0; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","idx", NULL }; + char *_kwnames[] = { "self","idx","proportion", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_AddGrowableCol",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxFlexGridSizer_AddGrowableCol",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3008,7 +3806,7 @@ static PyObject *_wrap_wxFlexGridSizer_AddGrowableCol(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxFlexGridSizer_AddGrowableCol(_arg0,_arg1); + wxFlexGridSizer_AddGrowableCol(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3046,7 +3844,125 @@ static PyObject *_wrap_wxFlexGridSizer_RemoveGrowableCol(PyObject *self, PyObjec return _resultobj; } +#define wxFlexGridSizer_SetFlexibleDirection(_swigobj,_swigarg0) (_swigobj->SetFlexibleDirection(_swigarg0)) +static PyObject *_wrap_wxFlexGridSizer_SetFlexibleDirection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","direction", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_SetFlexibleDirection",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_SetFlexibleDirection. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxFlexGridSizer_SetFlexibleDirection(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFlexGridSizer_GetFlexibleDirection(_swigobj) (_swigobj->GetFlexibleDirection()) +static PyObject *_wrap_wxFlexGridSizer_GetFlexibleDirection(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxFlexGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFlexGridSizer_GetFlexibleDirection",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_GetFlexibleDirection. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxFlexGridSizer_GetFlexibleDirection(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFlexGridSizer_SetNonFlexibleGrowMode(_swigobj,_swigarg0) (_swigobj->SetNonFlexibleGrowMode(_swigarg0)) +static PyObject *_wrap_wxFlexGridSizer_SetNonFlexibleGrowMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexGridSizer * _arg0; + wxFlexSizerGrowMode _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","mode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFlexGridSizer_SetNonFlexibleGrowMode",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_SetNonFlexibleGrowMode. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxFlexGridSizer_SetNonFlexibleGrowMode(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFlexGridSizer_GetNonFlexibleGrowMode(_swigobj) (_swigobj->GetNonFlexibleGrowMode()) +static PyObject *_wrap_wxFlexGridSizer_GetNonFlexibleGrowMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFlexSizerGrowMode _result; + wxFlexGridSizer * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFlexGridSizer_GetNonFlexibleGrowMode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFlexGridSizer_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFlexGridSizer_GetNonFlexibleGrowMode. Expected _wxFlexGridSizer_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFlexSizerGrowMode )wxFlexGridSizer_GetNonFlexibleGrowMode(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyMethodDef sizerscMethods[] = { + { "wxFlexGridSizer_GetNonFlexibleGrowMode", (PyCFunction) _wrap_wxFlexGridSizer_GetNonFlexibleGrowMode, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_SetNonFlexibleGrowMode", (PyCFunction) _wrap_wxFlexGridSizer_SetNonFlexibleGrowMode, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_GetFlexibleDirection", (PyCFunction) _wrap_wxFlexGridSizer_GetFlexibleDirection, METH_VARARGS | METH_KEYWORDS }, + { "wxFlexGridSizer_SetFlexibleDirection", (PyCFunction) _wrap_wxFlexGridSizer_SetFlexibleDirection, METH_VARARGS | METH_KEYWORDS }, { "wxFlexGridSizer_RemoveGrowableCol", (PyCFunction) _wrap_wxFlexGridSizer_RemoveGrowableCol, METH_VARARGS | METH_KEYWORDS }, { "wxFlexGridSizer_AddGrowableCol", (PyCFunction) _wrap_wxFlexGridSizer_AddGrowableCol, METH_VARARGS | METH_KEYWORDS }, { "wxFlexGridSizer_RemoveGrowableRow", (PyCFunction) _wrap_wxFlexGridSizer_RemoveGrowableRow, METH_VARARGS | METH_KEYWORDS }, @@ -3075,13 +3991,23 @@ static PyMethodDef sizerscMethods[] = { { "new_wxStaticBoxSizer", (PyCFunction) _wrap_new_wxStaticBoxSizer, METH_VARARGS | METH_KEYWORDS }, { "wxBoxSizer_CalcMin", (PyCFunction) _wrap_wxBoxSizer_CalcMin, METH_VARARGS | METH_KEYWORDS }, { "wxBoxSizer_RecalcSizes", (PyCFunction) _wrap_wxBoxSizer_RecalcSizes, METH_VARARGS | METH_KEYWORDS }, + { "wxBoxSizer_SetOrientation", (PyCFunction) _wrap_wxBoxSizer_SetOrientation, METH_VARARGS | METH_KEYWORDS }, { "wxBoxSizer_GetOrientation", (PyCFunction) _wrap_wxBoxSizer_GetOrientation, METH_VARARGS | METH_KEYWORDS }, { "new_wxBoxSizer", (PyCFunction) _wrap_new_wxBoxSizer, METH_VARARGS | METH_KEYWORDS }, { "wxPySizer__setCallbackInfo", (PyCFunction) _wrap_wxPySizer__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "new_wxPySizer", (PyCFunction) _wrap_new_wxPySizer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_ShowItems", (PyCFunction) _wrap_wxSizer_ShowItems, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_IsShownPos", (PyCFunction) _wrap_wxSizer_IsShownPos, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_IsShownSizer", (PyCFunction) _wrap_wxSizer_IsShownSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_IsShownWindow", (PyCFunction) _wrap_wxSizer_IsShownWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_HidePos", (PyCFunction) _wrap_wxSizer_HidePos, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_HideSizer", (PyCFunction) _wrap_wxSizer_HideSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_HideWindow", (PyCFunction) _wrap_wxSizer_HideWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_ShowPos", (PyCFunction) _wrap_wxSizer_ShowPos, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_ShowSizer", (PyCFunction) _wrap_wxSizer_ShowSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_ShowWindow", (PyCFunction) _wrap_wxSizer_ShowWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetDimension", (PyCFunction) _wrap_wxSizer_SetDimension, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_GetChildren", (PyCFunction) _wrap_wxSizer_GetChildren, METH_VARARGS | METH_KEYWORDS }, - { "wxSizer_DeleteWindows", (PyCFunction) _wrap_wxSizer_DeleteWindows, METH_VARARGS | METH_KEYWORDS }, - { "wxSizer_Clear", (PyCFunction) _wrap_wxSizer_Clear, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_SetVirtualSizeHints", (PyCFunction) _wrap_wxSizer_SetVirtualSizeHints, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_SetSizeHints", (PyCFunction) _wrap_wxSizer_SetSizeHints, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_FitInside", (PyCFunction) _wrap_wxSizer_FitInside, METH_VARARGS | METH_KEYWORDS }, @@ -3090,11 +4016,18 @@ static PyMethodDef sizerscMethods[] = { { "wxSizer_GetMinSize", (PyCFunction) _wrap_wxSizer_GetMinSize, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_GetPosition", (PyCFunction) _wrap_wxSizer_GetPosition, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_GetSize", (PyCFunction) _wrap_wxSizer_GetSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetItemMinSizePosWH", (PyCFunction) _wrap_wxSizer_SetItemMinSizePosWH, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetItemMinSizeSizerWH", (PyCFunction) _wrap_wxSizer_SetItemMinSizeSizerWH, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_SetItemMinSizeWindowWH", (PyCFunction) _wrap_wxSizer_SetItemMinSizeWindowWH, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_SetItemMinSizePos", (PyCFunction) _wrap_wxSizer_SetItemMinSizePos, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_SetItemMinSizeSizer", (PyCFunction) _wrap_wxSizer_SetItemMinSizeSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_SetItemMinSizeWindow", (PyCFunction) _wrap_wxSizer_SetItemMinSizeWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_SetMinSize", (PyCFunction) _wrap_wxSizer_SetMinSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSizer_SetDimension", (PyCFunction) _wrap_wxSizer_SetDimension, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_DeleteWindows", (PyCFunction) _wrap_wxSizer_DeleteWindows, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_Clear", (PyCFunction) _wrap_wxSizer_Clear, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_DetachPos", (PyCFunction) _wrap_wxSizer_DetachPos, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_DetachSizer", (PyCFunction) _wrap_wxSizer_DetachSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizer_DetachWindow", (PyCFunction) _wrap_wxSizer_DetachWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_RemovePos", (PyCFunction) _wrap_wxSizer_RemovePos, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_RemoveSizer", (PyCFunction) _wrap_wxSizer_RemoveSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizer_RemoveWindow", (PyCFunction) _wrap_wxSizer_RemoveWindow, METH_VARARGS | METH_KEYWORDS }, @@ -3110,17 +4043,21 @@ static PyMethodDef sizerscMethods[] = { { "wxSizer_Destroy", (PyCFunction) _wrap_wxSizer_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxSizer__setOORInfo", (PyCFunction) _wrap_wxSizer__setOORInfo, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetUserData", (PyCFunction) _wrap_wxSizerItem_GetUserData, METH_VARARGS | METH_KEYWORDS }, - { "wxSizerItem_SetBorder", (PyCFunction) _wrap_wxSizerItem_SetBorder, METH_VARARGS | METH_KEYWORDS }, - { "wxSizerItem_SetFlag", (PyCFunction) _wrap_wxSizerItem_SetFlag, METH_VARARGS | METH_KEYWORDS }, - { "wxSizerItem_SetOption", (PyCFunction) _wrap_wxSizerItem_SetOption, METH_VARARGS | METH_KEYWORDS }, - { "wxSizerItem_SetInitSize", (PyCFunction) _wrap_wxSizerItem_SetInitSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSizerItem_GetBorder", (PyCFunction) _wrap_wxSizerItem_GetBorder, METH_VARARGS | METH_KEYWORDS }, - { "wxSizerItem_GetFlag", (PyCFunction) _wrap_wxSizerItem_GetFlag, METH_VARARGS | METH_KEYWORDS }, - { "wxSizerItem_GetOption", (PyCFunction) _wrap_wxSizerItem_GetOption, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_GetPosition", (PyCFunction) _wrap_wxSizerItem_GetPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_IsShown", (PyCFunction) _wrap_wxSizerItem_IsShown, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_Show", (PyCFunction) _wrap_wxSizerItem_Show, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetSpacer", (PyCFunction) _wrap_wxSizerItem_SetSpacer, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_GetSpacer", (PyCFunction) _wrap_wxSizerItem_GetSpacer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_SetSizer", (PyCFunction) _wrap_wxSizerItem_SetSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetSizer", (PyCFunction) _wrap_wxSizerItem_GetSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_SetWindow", (PyCFunction) _wrap_wxSizerItem_SetWindow, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetWindow", (PyCFunction) _wrap_wxSizerItem_GetWindow, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_GetBorder", (PyCFunction) _wrap_wxSizerItem_GetBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetBorder", (PyCFunction) _wrap_wxSizerItem_SetBorder, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_GetFlag", (PyCFunction) _wrap_wxSizerItem_GetFlag, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetFlag", (PyCFunction) _wrap_wxSizerItem_SetFlag, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_GetProportion", (PyCFunction) _wrap_wxSizerItem_GetProportion, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetProportion", (PyCFunction) _wrap_wxSizerItem_SetProportion, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_IsSpacer", (PyCFunction) _wrap_wxSizerItem_IsSpacer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_IsSizer", (PyCFunction) _wrap_wxSizerItem_IsSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_IsWindow", (PyCFunction) _wrap_wxSizerItem_IsWindow, METH_VARARGS | METH_KEYWORDS }, @@ -3128,10 +4065,12 @@ static PyMethodDef sizerscMethods[] = { { "wxSizerItem_SetRatio", (PyCFunction) _wrap_wxSizerItem_SetRatio, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_SetRatioSize", (PyCFunction) _wrap_wxSizerItem_SetRatioSize, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_SetRatioWH", (PyCFunction) _wrap_wxSizerItem_SetRatioWH, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_SetInitSize", (PyCFunction) _wrap_wxSizerItem_SetInitSize, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_GetMinSize", (PyCFunction) _wrap_wxSizerItem_GetMinSize, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_SetDimension", (PyCFunction) _wrap_wxSizerItem_SetDimension, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_CalcMin", (PyCFunction) _wrap_wxSizerItem_CalcMin, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_GetSize", (PyCFunction) _wrap_wxSizerItem_GetSize, METH_VARARGS | METH_KEYWORDS }, - { "wxSizerItem_GetPosition", (PyCFunction) _wrap_wxSizerItem_GetPosition, METH_VARARGS | METH_KEYWORDS }, + { "wxSizerItem_DetachSizer", (PyCFunction) _wrap_wxSizerItem_DetachSizer, METH_VARARGS | METH_KEYWORDS }, { "wxSizerItem_DeleteWindows", (PyCFunction) _wrap_wxSizerItem_DeleteWindows, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; @@ -3263,6 +4202,9 @@ SWIGEXPORT(void) initsizersc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("sizersc", sizerscMethods); d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxFLEX_GROWMODE_NONE", PyInt_FromLong((long) wxFLEX_GROWMODE_NONE)); + PyDict_SetItemString(d,"wxFLEX_GROWMODE_SPECIFIED", PyInt_FromLong((long) wxFLEX_GROWMODE_SPECIFIED)); + PyDict_SetItemString(d,"wxFLEX_GROWMODE_ALL", PyInt_FromLong((long) wxFLEX_GROWMODE_ALL)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/sizers.py b/wxPython/src/msw/sizers.py index 88d328f1d6..64306d0a6d 100644 --- a/wxPython/src/msw/sizers.py +++ b/wxPython/src/msw/sizers.py @@ -15,7 +15,6 @@ from controls import * from events import * import wx -import string class wxSizerItemPtr(wxObjectPtr): def __init__(self,this): self.this = this @@ -23,9 +22,8 @@ class wxSizerItemPtr(wxObjectPtr): def DeleteWindows(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_DeleteWindows,(self,) + _args, _kwargs) return val - def GetPosition(self, *_args, **_kwargs): - val = apply(sizersc.wxSizerItem_GetPosition,(self,) + _args, _kwargs) - if val: val = wxPointPtr(val) ; val.thisown = 1 + def DetachSizer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_DetachSizer,(self,) + _args, _kwargs) return val def GetSize(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetSize,(self,) + _args, _kwargs) @@ -38,6 +36,13 @@ class wxSizerItemPtr(wxObjectPtr): def SetDimension(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_SetDimension,(self,) + _args, _kwargs) return val + def GetMinSize(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_GetMinSize,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val + def SetInitSize(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetInitSize,(self,) + _args, _kwargs) + return val def SetRatioWH(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_SetRatioWH,(self,) + _args, _kwargs) return val @@ -59,6 +64,24 @@ class wxSizerItemPtr(wxObjectPtr): def IsSpacer(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_IsSpacer,(self,) + _args, _kwargs) return val + def SetProportion(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetProportion,(self,) + _args, _kwargs) + return val + def GetProportion(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_GetProportion,(self,) + _args, _kwargs) + return val + def SetFlag(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetFlag,(self,) + _args, _kwargs) + return val + def GetFlag(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_GetFlag,(self,) + _args, _kwargs) + return val + def SetBorder(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetBorder,(self,) + _args, _kwargs) + return val + def GetBorder(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_GetBorder,(self,) + _args, _kwargs) + return val def GetWindow(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetWindow,(self,) + _args, _kwargs) return val @@ -71,32 +94,30 @@ class wxSizerItemPtr(wxObjectPtr): def SetSizer(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_SetSizer,(self,) + _args, _kwargs) return val - def GetOption(self, *_args, **_kwargs): - val = apply(sizersc.wxSizerItem_GetOption,(self,) + _args, _kwargs) - return val - def GetFlag(self, *_args, **_kwargs): - val = apply(sizersc.wxSizerItem_GetFlag,(self,) + _args, _kwargs) - return val - def GetBorder(self, *_args, **_kwargs): - val = apply(sizersc.wxSizerItem_GetBorder,(self,) + _args, _kwargs) + def GetSpacer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_GetSpacer,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) return val - def SetInitSize(self, *_args, **_kwargs): - val = apply(sizersc.wxSizerItem_SetInitSize,(self,) + _args, _kwargs) + def SetSpacer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_SetSpacer,(self,) + _args, _kwargs) return val - def SetOption(self, *_args, **_kwargs): - val = apply(sizersc.wxSizerItem_SetOption,(self,) + _args, _kwargs) + def Show(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_Show,(self,) + _args, _kwargs) return val - def SetFlag(self, *_args, **_kwargs): - val = apply(sizersc.wxSizerItem_SetFlag,(self,) + _args, _kwargs) + def IsShown(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_IsShown,(self,) + _args, _kwargs) return val - def SetBorder(self, *_args, **_kwargs): - val = apply(sizersc.wxSizerItem_SetBorder,(self,) + _args, _kwargs) + def GetPosition(self, *_args, **_kwargs): + val = apply(sizersc.wxSizerItem_GetPosition,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 return val def GetUserData(self, *_args, **_kwargs): val = apply(sizersc.wxSizerItem_GetUserData,(self,) + _args, _kwargs) return val def __repr__(self): return "" % (self.this,) + SetOption = SetProportion + GetOption = GetProportion class wxSizerItem(wxSizerItemPtr): def __init__(self,this): self.this = this @@ -150,8 +171,20 @@ class wxSizerPtr(wxObjectPtr): def RemovePos(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_RemovePos,(self,) + _args, _kwargs) return val - def SetDimension(self, *_args, **_kwargs): - val = apply(sizersc.wxSizer_SetDimension,(self,) + _args, _kwargs) + def DetachWindow(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_DetachWindow,(self,) + _args, _kwargs) + return val + def DetachSizer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_DetachSizer,(self,) + _args, _kwargs) + return val + def DetachPos(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_DetachPos,(self,) + _args, _kwargs) + return val + def Clear(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_Clear,(self,) + _args, _kwargs) + return val + def DeleteWindows(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_DeleteWindows,(self,) + _args, _kwargs) return val def SetMinSize(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_SetMinSize,(self,) + _args, _kwargs) @@ -165,6 +198,15 @@ class wxSizerPtr(wxObjectPtr): def SetItemMinSizePos(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_SetItemMinSizePos,(self,) + _args, _kwargs) return val + def SetItemMinSizeWindowWH(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetItemMinSizeWindowWH,(self,) + _args, _kwargs) + return val + def SetItemMinSizeSizerWH(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetItemMinSizeSizerWH,(self,) + _args, _kwargs) + return val + def SetItemMinSizePosWH(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetItemMinSizePosWH,(self,) + _args, _kwargs) + return val def GetSize(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_GetSize,(self,) + _args, _kwargs) if val: val = wxSizePtr(val) ; val.thisown = 1 @@ -193,49 +235,94 @@ class wxSizerPtr(wxObjectPtr): def SetVirtualSizeHints(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_SetVirtualSizeHints,(self,) + _args, _kwargs) return val - def Clear(self, *_args, **_kwargs): - val = apply(sizersc.wxSizer_Clear,(self,) + _args, _kwargs) - return val - def DeleteWindows(self, *_args, **_kwargs): - val = apply(sizersc.wxSizer_DeleteWindows,(self,) + _args, _kwargs) - return val def GetChildren(self, *_args, **_kwargs): val = apply(sizersc.wxSizer_GetChildren,(self,) + _args, _kwargs) return val + def SetDimension(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_SetDimension,(self,) + _args, _kwargs) + return val + def ShowWindow(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_ShowWindow,(self,) + _args, _kwargs) + return val + def ShowSizer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_ShowSizer,(self,) + _args, _kwargs) + return val + def ShowPos(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_ShowPos,(self,) + _args, _kwargs) + return val + def HideWindow(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_HideWindow,(self,) + _args, _kwargs) + return val + def HideSizer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_HideSizer,(self,) + _args, _kwargs) + return val + def HidePos(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_HidePos,(self,) + _args, _kwargs) + return val + def IsShownWindow(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_IsShownWindow,(self,) + _args, _kwargs) + return val + def IsShownSizer(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_IsShownSizer,(self,) + _args, _kwargs) + return val + def IsShownPos(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_IsShownPos,(self,) + _args, _kwargs) + return val + def ShowItems(self, *_args, **_kwargs): + val = apply(sizersc.wxSizer_ShowItems,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) def Add(self, *args, **kw): if type(args[0]) == type(1): apply(self.AddSpacer, args, kw) - elif string.find(args[0].this, 'Sizer') != -1: + elif isinstance(args[0], wxSizerPtr): apply(self.AddSizer, args, kw) - else: + elif isinstance(args[0], wxWindowPtr): apply(self.AddWindow, args, kw) + else: + raise TypeError, 'Expected int, wxSizer or wxWindow parameter' def Insert(self, *args, **kw): if type(args[1]) == type(1): apply(self.InsertSpacer, args, kw) - elif string.find(args[1].this, 'Sizer') != -1: + elif isinstance(args[1], wxSizerPtr): apply(self.InsertSizer, args, kw) - else: + elif isinstance(args[1], wxWindowPtr): apply(self.InsertWindow, args, kw) + else: + raise TypeError, 'Expected int, wxSizer or wxWindow parameter' def Prepend(self, *args, **kw): if type(args[0]) == type(1): apply(self.PrependSpacer, args, kw) - elif string.find(args[0].this, 'Sizer') != -1: + elif isinstance(args[0], wxSizerPtr): apply(self.PrependSizer, args, kw) - else: + elif isinstance(args[0], wxWindowPtr): apply(self.PrependWindow, args, kw) + else: + raise TypeError, 'Expected int, wxSizer or wxWindow parameter' def Remove(self, *args, **kw): if type(args[0]) == type(1): - apply(self.RemovePos, args, kw) - elif string.find(args[0].this, 'Sizer') != -1: - apply(self.RemoveSizer, args, kw) + return apply(self.RemovePos, args, kw) + elif isinstance(args[0], wxSizerPtr): + return apply(self.RemoveSizer, args, kw) + elif isinstance(args[0], wxWindowPtr): + return apply(self.RemoveWindow, args, kw) + else: + raise TypeError, 'Expected int, wxSizer or wxWindow parameter' + + def Detach(self, *args, **kw): + if type(args[0]) == type(1): + return apply(self.DetachPos, args, kw) + elif isinstance(args[0], wxSizerPtr): + return apply(self.DetachSizer, args, kw) + elif isinstance(args[0], wxWindowPtr): + return apply(self.DetachWindow, args, kw) else: - apply(self.RemoveWindow, args, kw) + raise TypeError, 'Expected int, wxSizer or wxWindow parameter' def AddMany(self, widgets): for childinfo in widgets: @@ -247,10 +334,22 @@ class wxSizerPtr(wxObjectPtr): def SetItemMinSize(self, *args): if type(args[0]) == type(1): apply(self.SetItemMinSizePos, args) - elif string.find(args[0].this, 'Sizer') != -1: + elif isinstance(args[0], wxSizerPtr): apply(self.SetItemMinSizeSizer, args) - else: + elif isinstance(args[0], wxWindowPtr): apply(self.SetItemMinSizeWindow, args) + else: + raise TypeError, 'Expected int, wxSizer or wxWindow parameter' + + def SetItemMinSizeWH(self, *args): + if type(args[0]) == type(1): + apply(self.SetItemMinSizePosWH, args) + elif isinstance(args[0], wxSizerPtr): + apply(self.SetItemMinSizeSizerWH, args) + elif isinstance(args[0], wxWindowPtr): + apply(self.SetItemMinSizeWindowWH, args) + else: + raise TypeError, 'Expected int, wxSizer or wxWindow parameter' def GetSizeTuple(self): @@ -260,6 +359,37 @@ class wxSizerPtr(wxObjectPtr): def GetMinSizeTuple(self): return self.GetMinSize().asTuple() + + def Show(self, *args): + if type(args[0]) == type(1): + apply(self.ShowPos, args) + elif isinstance(args[0], wxSizerPtr): + apply(self.ShowSizer, args) + elif isinstance(args[0], wxWindowPtr): + apply(self.ShowWindow, args) + else: + raise TypeError, 'Expected int, wxSizer or wxWindow parameter' + + def Hide(self, *args): + if type(args[0]) == type(1): + apply(self.HidePos, args) + elif isinstance(args[0], wxSizerPtr): + apply(self.HideSizer, args) + elif isinstance(args[0], wxWindowPtr): + apply(self.HideWindow, args) + else: + raise TypeError, 'Expected int, wxSizer or wxWindow parameter' + + def IsShown(self, *args): + if type(args[0]) == type(1): + return apply(self.IsShownPos, args) + elif isinstance(args[0], wxSizerPtr): + return apply(self.IsShownSizer, args) + elif isinstance(args[0], wxWindowPtr): + return apply(self.IsShownWindow, args) + else: + raise TypeError, 'Expected int, wxSizer or wxWindow parameter' + class wxSizer(wxSizerPtr): def __init__(self,this): self.this = this @@ -293,6 +423,9 @@ class wxBoxSizerPtr(wxSizerPtr): def GetOrientation(self, *_args, **_kwargs): val = apply(sizersc.wxBoxSizer_GetOrientation,(self,) + _args, _kwargs) return val + def SetOrientation(self, *_args, **_kwargs): + val = apply(sizersc.wxBoxSizer_SetOrientation,(self,) + _args, _kwargs) + return val def RecalcSizes(self, *_args, **_kwargs): val = apply(sizersc.wxBoxSizer_RecalcSizes,(self,) + _args, _kwargs) return val @@ -430,6 +563,18 @@ class wxFlexGridSizerPtr(wxGridSizerPtr): def RemoveGrowableCol(self, *_args, **_kwargs): val = apply(sizersc.wxFlexGridSizer_RemoveGrowableCol,(self,) + _args, _kwargs) return val + def SetFlexibleDirection(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_SetFlexibleDirection,(self,) + _args, _kwargs) + return val + def GetFlexibleDirection(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_GetFlexibleDirection,(self,) + _args, _kwargs) + return val + def SetNonFlexibleGrowMode(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_SetNonFlexibleGrowMode,(self,) + _args, _kwargs) + return val + def GetNonFlexibleGrowMode(self, *_args, **_kwargs): + val = apply(sizersc.wxFlexGridSizer_GetNonFlexibleGrowMode,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxFlexGridSizer(wxFlexGridSizerPtr): @@ -449,3 +594,6 @@ class wxFlexGridSizer(wxFlexGridSizerPtr): #-------------- VARIABLE WRAPPERS ------------------ +wxFLEX_GROWMODE_NONE = sizersc.wxFLEX_GROWMODE_NONE +wxFLEX_GROWMODE_SPECIFIED = sizersc.wxFLEX_GROWMODE_SPECIFIED +wxFLEX_GROWMODE_ALL = sizersc.wxFLEX_GROWMODE_ALL diff --git a/wxPython/src/msw/stattool.cpp b/wxPython/src/msw/stattool.cpp index 1f0fb29eaf..6f93f742d3 100644 --- a/wxPython/src/msw/stattool.cpp +++ b/wxPython/src/msw/stattool.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -338,7 +337,7 @@ static PyObject *_wrap_wxStatusBar_GetStatusText(PyObject *self, PyObject *args, 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 @@ -1093,7 +1092,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetLabel(PyObject *self, PyObject *args 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 @@ -1130,7 +1129,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetShortHelp(PyObject *self, PyObject * 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 @@ -1167,7 +1166,7 @@ static PyObject *_wrap_wxToolBarToolBase_GetLongHelp(PyObject *self, PyObject *a 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 @@ -1366,8 +1365,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetNormalBitmap(PyObject *self, PyObjec } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBarToolBase_SetNormalBitmap. Expected _wxBitmap_p."); return NULL; } @@ -1403,8 +1401,7 @@ static PyObject *_wrap_wxToolBarToolBase_SetDisabledBitmap(PyObject *self, PyObj } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBarToolBase_SetDisabledBitmap. Expected _wxBitmap_p."); return NULL; } @@ -1674,15 +1671,13 @@ static PyObject *_wrap_wxToolBarBase_DoAddTool(PyObject *self, PyObject *args, P return NULL; } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxToolBarBase_DoAddTool. Expected _wxBitmap_p."); return NULL; } } if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxToolBarBase_DoAddTool. Expected _wxBitmap_p."); return NULL; } @@ -1725,14 +1720,14 @@ static PyObject *_wrap_wxToolBarBase_DoAddTool(PyObject *self, PyObject *args, P return _resultobj; } -static wxToolBarToolBase * wxToolBarBase_InsertTool(wxToolBarBase *self,size_t pos,int id,const wxString & label,const wxBitmap & bitmap,const wxBitmap & bmpDisabled,wxItemKind kind,const wxString & shortHelp,const wxString & longHelp,PyObject * clientData) { +static wxToolBarToolBase * wxToolBarBase_DoInsertTool(wxToolBarBase *self,size_t pos,int id,const wxString & label,const wxBitmap & bitmap,const wxBitmap & bmpDisabled,wxItemKind kind,const wxString & shortHelp,const wxString & longHelp,PyObject * clientData) { wxPyUserData* udata = NULL; if (clientData && clientData != Py_None) udata = new wxPyUserData(clientData); return self->InsertTool(pos, id, label, bitmap, bmpDisabled, kind, shortHelp, longHelp, udata); } -static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_wxToolBarBase_DoInsertTool(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxToolBarToolBase * _result; wxToolBarBase * _arg0; @@ -1755,12 +1750,12 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, char *_kwnames[] = { "self","pos","id","label","bitmap","bmpDisabled","kind","shortHelp","longHelp","clientData", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiOO|OiOOO:wxToolBarBase_InsertTool",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_argo4,&_argo5,&_arg6,&_obj7,&_obj8,&_obj9)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiiOO|OiOOO:wxToolBarBase_DoInsertTool",_kwnames,&_argo0,&_arg1,&_arg2,&_obj3,&_argo4,&_argo5,&_arg6,&_obj7,&_obj8,&_obj9)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarBase_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarBase_InsertTool. Expected _wxToolBarBase_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarBase_DoInsertTool. Expected _wxToolBarBase_p."); return NULL; } } @@ -1770,16 +1765,14 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, return NULL; } if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxToolBarBase_InsertTool. Expected _wxBitmap_p."); + if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxToolBarBase_DoInsertTool. Expected _wxBitmap_p."); return NULL; } } if (_argo5) { - if (_argo5 == Py_None) { _arg5 = NULL; } - else if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxBitmap_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxToolBarBase_InsertTool. Expected _wxBitmap_p."); + if (SWIG_GetPtrObj(_argo5,(void **) &_arg5,"_wxBitmap_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 6 of wxToolBarBase_DoInsertTool. Expected _wxBitmap_p."); return NULL; } } @@ -1801,7 +1794,7 @@ static PyObject *_wrap_wxToolBarBase_InsertTool(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxToolBarToolBase *)wxToolBarBase_InsertTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,*_arg8,_arg9); + _result = (wxToolBarToolBase *)wxToolBarBase_DoInsertTool(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,*_arg7,*_arg8,_arg9); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2422,7 +2415,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolShortHelp(PyObject *self, PyObject * 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 @@ -2500,7 +2493,7 @@ static PyObject *_wrap_wxToolBarBase_GetToolLongHelp(PyObject *self, PyObject *a 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 @@ -3531,7 +3524,7 @@ static PyMethodDef stattoolcMethods[] = { { "wxToolBarBase_FindControl", (PyCFunction) _wrap_wxToolBarBase_FindControl, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_InsertControl", (PyCFunction) _wrap_wxToolBarBase_InsertControl, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_AddControl", (PyCFunction) _wrap_wxToolBarBase_AddControl, METH_VARARGS | METH_KEYWORDS }, - { "wxToolBarBase_InsertTool", (PyCFunction) _wrap_wxToolBarBase_InsertTool, METH_VARARGS | METH_KEYWORDS }, + { "wxToolBarBase_DoInsertTool", (PyCFunction) _wrap_wxToolBarBase_DoInsertTool, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarBase_DoAddTool", (PyCFunction) _wrap_wxToolBarBase_DoAddTool, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_SetClientData", (PyCFunction) _wrap_wxToolBarToolBase_SetClientData, METH_VARARGS | METH_KEYWORDS }, { "wxToolBarToolBase_GetClientData", (PyCFunction) _wrap_wxToolBarToolBase_GetClientData, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/stattool.py b/wxPython/src/msw/stattool.py index cea709ed3e..0c74eee1b4 100644 --- a/wxPython/src/msw/stattool.py +++ b/wxPython/src/msw/stattool.py @@ -193,8 +193,8 @@ class wxToolBarBasePtr(wxControlPtr): def DoAddTool(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_DoAddTool,(self,) + _args, _kwargs) return val - def InsertTool(self, *_args, **_kwargs): - val = apply(stattoolc.wxToolBarBase_InsertTool,(self,) + _args, _kwargs) + def DoInsertTool(self, *_args, **_kwargs): + val = apply(stattoolc.wxToolBarBase_DoInsertTool,(self,) + _args, _kwargs) return val def AddControl(self, *_args, **_kwargs): val = apply(stattoolc.wxToolBarBase_AddControl,(self,) + _args, _kwargs) @@ -370,7 +370,7 @@ class wxToolBarBasePtr(wxControlPtr): # 2.3.3. They are renamed to have 'Label' in the name so as to be # able to keep backwards compatibility with using the above # methods. Eventually these should migrate to be the methods used - # primarily and loose the 'Label' in the name... + # primarily and lose the 'Label' in the name... def AddLabelTool(self, id, label, bitmap, bmpDisabled = wxNullBitmap, diff --git a/wxPython/src/msw/streams.cpp b/wxPython/src/msw/streams.cpp index c5a839d41d..c09828a95b 100644 --- a/wxPython/src/msw/streams.cpp +++ b/wxPython/src/msw/streams.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -362,6 +361,233 @@ static PyObject *_wrap_wxInputStream_tell(PyObject *self, PyObject *args, PyObje return _resultobj; } +#define wxInputStream_Peek(_swigobj) (_swigobj->Peek()) +static PyObject *_wrap_wxInputStream_Peek(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_Peek",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Peek. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (char )wxInputStream_Peek(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("c",_result); + return _resultobj; +} + +#define wxInputStream_GetC(_swigobj) (_swigobj->GetC()) +static PyObject *_wrap_wxInputStream_GetC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + char _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_GetC",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_GetC. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (char )wxInputStream_GetC(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("c",_result); + return _resultobj; +} + +#define wxInputStream_LastRead(_swigobj) (_swigobj->LastRead()) +static PyObject *_wrap_wxInputStream_LastRead(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + size_t _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_LastRead",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_LastRead. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (size_t )wxInputStream_LastRead(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxInputStream_CanRead(_swigobj) (_swigobj->CanRead()) +static PyObject *_wrap_wxInputStream_CanRead(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_CanRead",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_CanRead. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxInputStream_CanRead(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxInputStream_Eof(_swigobj) (_swigobj->Eof()) +static PyObject *_wrap_wxInputStream_Eof(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_Eof",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Eof. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxInputStream_Eof(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxInputStream_Ungetch(_swigobj,_swigarg0) (_swigobj->Ungetch(_swigarg0)) +static PyObject *_wrap_wxInputStream_Ungetch(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxPyInputStream * _arg0; + char _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","c", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oc:wxInputStream_Ungetch",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_Ungetch. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxInputStream_Ungetch(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxInputStream_SeekI(_swigobj,_swigarg0,_swigarg1) (_swigobj->SeekI(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxInputStream_SeekI(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxPyInputStream * _arg0; + long _arg1; + wxSeekMode _arg2 = (wxSeekMode ) (wxFromStart); + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos","mode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|i:wxInputStream_SeekI",_kwnames,&_argo0,&_arg1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_SeekI. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxInputStream_SeekI(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +#define wxInputStream_TellI(_swigobj) (_swigobj->TellI()) +static PyObject *_wrap_wxInputStream_TellI(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + wxPyInputStream * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxInputStream_TellI",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyInputStream_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxInputStream_TellI. Expected _wxPyInputStream_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxInputStream_TellI(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + static void wxOutputStream_write(wxOutputStream *self,PyObject * obj) { // We use only strings for the streams, not unicode PyObject* str = PyObject_Str(obj); @@ -407,6 +633,14 @@ static PyObject *_wrap_wxOutputStream_write(PyObject *self, PyObject *args, PyOb static PyMethodDef streamscMethods[] = { { "wxOutputStream_write", (PyCFunction) _wrap_wxOutputStream_write, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_TellI", (PyCFunction) _wrap_wxInputStream_TellI, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_SeekI", (PyCFunction) _wrap_wxInputStream_SeekI, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_Ungetch", (PyCFunction) _wrap_wxInputStream_Ungetch, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_Eof", (PyCFunction) _wrap_wxInputStream_Eof, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_CanRead", (PyCFunction) _wrap_wxInputStream_CanRead, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_LastRead", (PyCFunction) _wrap_wxInputStream_LastRead, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_GetC", (PyCFunction) _wrap_wxInputStream_GetC, METH_VARARGS | METH_KEYWORDS }, + { "wxInputStream_Peek", (PyCFunction) _wrap_wxInputStream_Peek, METH_VARARGS | METH_KEYWORDS }, { "wxInputStream_tell", (PyCFunction) _wrap_wxInputStream_tell, METH_VARARGS | METH_KEYWORDS }, { "wxInputStream_seek", (PyCFunction) _wrap_wxInputStream_seek, METH_VARARGS | METH_KEYWORDS }, { "wxInputStream_readlines", (PyCFunction) _wrap_wxInputStream_readlines, METH_VARARGS | METH_KEYWORDS }, @@ -528,6 +762,9 @@ SWIGEXPORT(void) initstreamsc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("streamsc", streamscMethods); d = PyModule_GetDict(m); + PyDict_SetItemString(d,"wxFromStart", PyInt_FromLong((long) wxFromStart)); + PyDict_SetItemString(d,"wxFromCurrent", PyInt_FromLong((long) wxFromCurrent)); + PyDict_SetItemString(d,"wxFromEnd", PyInt_FromLong((long) wxFromEnd)); wxPyPtrTypeMap_Add("wxInputStream", "wxPyInputStream"); { diff --git a/wxPython/src/msw/streams.py b/wxPython/src/msw/streams.py index 6394f60946..d2a8b18800 100644 --- a/wxPython/src/msw/streams.py +++ b/wxPython/src/msw/streams.py @@ -1,7 +1,6 @@ # This file was created automatically by SWIG. import streamsc import wx -import string class wxInputStreamPtr : def __init__(self,this): self.this = this @@ -30,6 +29,30 @@ class wxInputStreamPtr : def tell(self, *_args, **_kwargs): val = apply(streamsc.wxInputStream_tell,(self,) + _args, _kwargs) return val + def Peek(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_Peek,(self,) + _args, _kwargs) + return val + def GetC(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_GetC,(self,) + _args, _kwargs) + return val + def LastRead(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_LastRead,(self,) + _args, _kwargs) + return val + def CanRead(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_CanRead,(self,) + _args, _kwargs) + return val + def Eof(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_Eof,(self,) + _args, _kwargs) + return val + def Ungetch(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_Ungetch,(self,) + _args, _kwargs) + return val + def SeekI(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_SeekI,(self,) + _args, _kwargs) + return val + def TellI(self, *_args, **_kwargs): + val = apply(streamsc.wxInputStream_TellI,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxInputStream(wxInputStreamPtr): @@ -64,3 +87,6 @@ class wxOutputStream(wxOutputStreamPtr): #-------------- VARIABLE WRAPPERS ------------------ +wxFromStart = streamsc.wxFromStart +wxFromCurrent = streamsc.wxFromCurrent +wxFromEnd = streamsc.wxFromEnd diff --git a/wxPython/src/msw/utils.cpp b/wxPython/src/msw/utils.cpp index a5b946a624..00560f27c9 100644 --- a/wxPython/src/msw/utils.cpp +++ b/wxPython/src/msw/utils.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -97,7 +96,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { if (ret) { PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); #if wxUSE_UNICODE - PyTuple_SET_ITEM(ret, 1, PyUnicode_FromUnicode(str.c_str(), str.Len())); + PyTuple_SET_ITEM(ret, 1, PyUnicode_FromWideChar(str.c_str(), str.Len())); #else PyTuple_SET_ITEM(ret, 1, PyString_FromStringAndSize(str.c_str(), str.Len())); #endif @@ -531,7 +530,7 @@ static PyObject *_wrap_wxConfigBase_GetAppName(PyObject *self, PyObject *args, P 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 @@ -778,7 +777,7 @@ static PyObject *_wrap_wxConfigBase_GetPath(PyObject *self, PyObject *args, PyOb 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 @@ -815,7 +814,7 @@ static PyObject *_wrap_wxConfigBase_GetVendorName(PyObject *self, PyObject *args 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 @@ -1001,7 +1000,7 @@ static PyObject *_wrap_wxConfigBase_Read(PyObject *self, PyObject *args, PyObjec 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 @@ -1734,7 +1733,7 @@ static PyObject *_wrap_wxConfigBase_ExpandEnvVars(PyObject *self, PyObject *args 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 @@ -2182,7 +2181,7 @@ static PyObject *_wrap_wxDateTime_GetMonthName(PyObject *self, PyObject *args, P 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 @@ -2211,7 +2210,7 @@ static PyObject *_wrap_wxDateTime_GetWeekDayName(PyObject *self, PyObject *args, 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 @@ -2346,6 +2345,26 @@ static PyObject *_wrap_wxDateTime_Now(PyObject *self, PyObject *args, PyObject * return _resultobj; } +static PyObject *_wrap_wxDateTime_UNow(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxDateTime_UNow",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxDateTime (wxDateTime::UNow()); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + static PyObject *_wrap_wxDateTime_Today(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDateTime * _result; @@ -3025,18 +3044,19 @@ static PyObject *_wrap_wxDateTime_SetMillisecond(PyObject *self, PyObject *args, return _resultobj; } -#define wxDateTime_SetToWeekDayInSameWeek(_swigobj,_swigarg0) (_swigobj->SetToWeekDayInSameWeek(_swigarg0)) +#define wxDateTime_SetToWeekDayInSameWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToWeekDayInSameWeek(_swigarg0,_swigarg1)) static PyObject *_wrap_wxDateTime_SetToWeekDayInSameWeek(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDateTime * _result; wxDateTime * _arg0; wxDateTime::WeekDay _arg1; + wxDateTime::WeekFlags _arg2 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","weekday", NULL }; + char *_kwnames[] = { "self","weekday","flags", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_SetToWeekDayInSameWeek",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxDateTime_SetToWeekDayInSameWeek",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3047,7 +3067,7 @@ static PyObject *_wrap_wxDateTime_SetToWeekDayInSameWeek(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1); + wxDateTime & _result_ref = wxDateTime_SetToWeekDayInSameWeek(_arg0,_arg1,_arg2); _result = (wxDateTime *) &_result_ref; wxPyEndAllowThreads(__tstate); @@ -3062,18 +3082,19 @@ static PyObject *_wrap_wxDateTime_SetToWeekDayInSameWeek(PyObject *self, PyObjec return _resultobj; } -#define wxDateTime_GetWeekDayInSameWeek(_swigobj,_swigarg0) (_swigobj->GetWeekDayInSameWeek(_swigarg0)) +#define wxDateTime_GetWeekDayInSameWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeekDayInSameWeek(_swigarg0,_swigarg1)) static PyObject *_wrap_wxDateTime_GetWeekDayInSameWeek(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDateTime * _result; wxDateTime * _arg0; wxDateTime::WeekDay _arg1; + wxDateTime::WeekFlags _arg2 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","weekday", NULL }; + char *_kwnames[] = { "self","weekday","flags", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDateTime_GetWeekDayInSameWeek",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxDateTime_GetWeekDayInSameWeek",_kwnames,&_argo0,&_arg1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3084,7 +3105,7 @@ static PyObject *_wrap_wxDateTime_GetWeekDayInSameWeek(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1)); + _result = new wxDateTime (wxDateTime_GetWeekDayInSameWeek(_arg0,_arg1,_arg2)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3325,18 +3346,19 @@ static PyObject *_wrap_wxDateTime_GetLastWeekDay(PyObject *self, PyObject *args, return _resultobj; } -#define wxDateTime_SetToTheWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToTheWeek(_swigarg0,_swigarg1)) +#define wxDateTime_SetToTheWeek(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetToTheWeek(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxDateTime_SetToTheWeek(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxDateTime * _arg0; wxDateTime::wxDateTime_t _arg1; wxDateTime::WeekDay _arg2 = (wxDateTime::WeekDay ) wxDateTime::Mon; + wxDateTime::WeekFlags _arg3 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","numWeek","weekday", NULL }; + char *_kwnames[] = { "self","numWeek","weekday","flags", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|i:wxDateTime_SetToTheWeek",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|ii:wxDateTime_SetToTheWeek",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3347,7 +3369,7 @@ static PyObject *_wrap_wxDateTime_SetToTheWeek(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2); + _result = (bool )wxDateTime_SetToTheWeek(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -3355,19 +3377,20 @@ static PyObject *_wrap_wxDateTime_SetToTheWeek(PyObject *self, PyObject *args, P return _resultobj; } -#define wxDateTime_GetWeek(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetWeek(_swigarg0,_swigarg1)) +#define wxDateTime_GetWeek(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->GetWeek(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxDateTime_GetWeek(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxDateTime * _result; wxDateTime * _arg0; wxDateTime::wxDateTime_t _arg1; wxDateTime::WeekDay _arg2 = (wxDateTime::WeekDay ) wxDateTime::Mon; + wxDateTime::WeekFlags _arg3 = (wxDateTime::WeekFlags ) wxDateTime::Monday_First; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","numWeek","weekday", NULL }; + char *_kwnames[] = { "self","numWeek","weekday","flags", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|i:wxDateTime_GetWeek",_kwnames,&_argo0,&_arg1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oh|ii:wxDateTime_GetWeek",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -3378,7 +3401,7 @@ static PyObject *_wrap_wxDateTime_GetWeek(PyObject *self, PyObject *args, PyObje } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2)); + _result = new wxDateTime (wxDateTime_GetWeek(_arg0,_arg1,_arg2,_arg3)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -4369,8 +4392,7 @@ static PyObject *_wrap_wxDateTime_IsEqualTo(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEqualTo. Expected _wxDateTime_p."); return NULL; } @@ -4406,8 +4428,7 @@ static PyObject *_wrap_wxDateTime_IsEarlierThan(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEarlierThan. Expected _wxDateTime_p."); return NULL; } @@ -4443,8 +4464,7 @@ static PyObject *_wrap_wxDateTime_IsLaterThan(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsLaterThan. Expected _wxDateTime_p."); return NULL; } @@ -4482,15 +4502,13 @@ static PyObject *_wrap_wxDateTime_IsStrictlyBetween(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsStrictlyBetween. Expected _wxDateTime_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsStrictlyBetween. Expected _wxDateTime_p."); return NULL; } @@ -4528,15 +4546,13 @@ static PyObject *_wrap_wxDateTime_IsBetween(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsBetween. Expected _wxDateTime_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsBetween. Expected _wxDateTime_p."); return NULL; } @@ -4572,8 +4588,7 @@ static PyObject *_wrap_wxDateTime_IsSameDate(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsSameDate. Expected _wxDateTime_p."); return NULL; } @@ -4609,8 +4624,7 @@ static PyObject *_wrap_wxDateTime_IsSameTime(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsSameTime. Expected _wxDateTime_p."); return NULL; } @@ -4648,15 +4662,13 @@ static PyObject *_wrap_wxDateTime_IsEqualUpTo(PyObject *self, PyObject *args, Py } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_IsEqualUpTo. Expected _wxDateTime_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxDateTime_IsEqualUpTo. Expected _wxTimeSpan_p."); return NULL; } @@ -4693,8 +4705,7 @@ static PyObject *_wrap_wxDateTime_AddTS(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_AddTS. Expected _wxTimeSpan_p."); return NULL; } @@ -4738,8 +4749,7 @@ static PyObject *_wrap_wxDateTime_AddDS(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_AddDS. Expected _wxDateSpan_p."); return NULL; } @@ -4783,8 +4793,7 @@ static PyObject *_wrap_wxDateTime_SubtractTS(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_SubtractTS. Expected _wxTimeSpan_p."); return NULL; } @@ -4828,8 +4837,7 @@ static PyObject *_wrap_wxDateTime_SubtractDS(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_SubtractDS. Expected _wxDateSpan_p."); return NULL; } @@ -4873,8 +4881,7 @@ static PyObject *_wrap_wxDateTime_Subtract(PyObject *self, PyObject *args, PyObj } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime_Subtract. Expected _wxDateTime_p."); return NULL; } @@ -4912,8 +4919,7 @@ static PyObject *_wrap_wxDateTime___add__TS(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___add__TS. Expected _wxTimeSpan_p."); return NULL; } @@ -4951,8 +4957,7 @@ static PyObject *_wrap_wxDateTime___add__DS(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___add__DS. Expected _wxDateSpan_p."); return NULL; } @@ -4990,8 +4995,7 @@ static PyObject *_wrap_wxDateTime___sub__DT(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__DT. Expected _wxDateTime_p."); return NULL; } @@ -5029,8 +5033,7 @@ static PyObject *_wrap_wxDateTime___sub__TS(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__TS. Expected _wxTimeSpan_p."); return NULL; } @@ -5068,8 +5071,7 @@ static PyObject *_wrap_wxDateTime___sub__DS(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateTime___sub__DS. Expected _wxDateSpan_p."); return NULL; } @@ -5214,8 +5216,7 @@ static PyObject *_wrap_wxDateTime_ParseFormat(PyObject *self, PyObject *args, Py return NULL; } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxDateTime_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxDateTime_ParseFormat. Expected _wxDateTime_p."); return NULL; } @@ -5413,7 +5414,7 @@ static PyObject *_wrap_wxDateTime_Format(PyObject *self, PyObject *args, PyObjec 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 @@ -5457,7 +5458,7 @@ static PyObject *_wrap_wxDateTime_FormatDate(PyObject *self, PyObject *args, PyO 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 @@ -5494,7 +5495,7 @@ static PyObject *_wrap_wxDateTime_FormatTime(PyObject *self, PyObject *args, PyO 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 @@ -5531,7 +5532,7 @@ static PyObject *_wrap_wxDateTime_FormatISODate(PyObject *self, PyObject *args, 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 @@ -5568,7 +5569,7 @@ static PyObject *_wrap_wxDateTime_FormatISOTime(PyObject *self, PyObject *args, 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 @@ -5864,8 +5865,7 @@ static PyObject *_wrap_wxTimeSpan_Add(PyObject *self, PyObject *args, PyObject * } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_Add. Expected _wxTimeSpan_p."); return NULL; } @@ -5909,8 +5909,7 @@ static PyObject *_wrap_wxTimeSpan_Subtract(PyObject *self, PyObject *args, PyObj } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_Subtract. Expected _wxTimeSpan_p."); return NULL; } @@ -6057,8 +6056,7 @@ static PyObject *_wrap_wxTimeSpan___add__(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan___add__. Expected _wxTimeSpan_p."); return NULL; } @@ -6096,8 +6094,7 @@ static PyObject *_wrap_wxTimeSpan___sub__(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan___sub__. Expected _wxTimeSpan_p."); return NULL; } @@ -6352,8 +6349,7 @@ static PyObject *_wrap_wxTimeSpan_IsEqualTo(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsEqualTo. Expected _wxTimeSpan_p."); return NULL; } @@ -6389,8 +6385,7 @@ static PyObject *_wrap_wxTimeSpan_IsLongerThan(PyObject *self, PyObject *args, P } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsLongerThan. Expected _wxTimeSpan_p."); return NULL; } @@ -6426,8 +6421,7 @@ static PyObject *_wrap_wxTimeSpan_IsShorterThan(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxTimeSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTimeSpan_IsShorterThan. Expected _wxTimeSpan_p."); return NULL; } @@ -6666,7 +6660,7 @@ static PyObject *_wrap_wxTimeSpan_Format(PyObject *self, PyObject *args, PyObjec 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 @@ -7213,8 +7207,7 @@ static PyObject *_wrap_wxDateSpan_Add(PyObject *self, PyObject *args, PyObject * } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan_Add. Expected _wxDateSpan_p."); return NULL; } @@ -7258,8 +7251,7 @@ static PyObject *_wrap_wxDateSpan_Subtract(PyObject *self, PyObject *args, PyObj } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan_Subtract. Expected _wxDateSpan_p."); return NULL; } @@ -7376,8 +7368,7 @@ static PyObject *_wrap_wxDateSpan___add__(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan___add__. Expected _wxDateSpan_p."); return NULL; } @@ -7415,8 +7406,7 @@ static PyObject *_wrap_wxDateSpan___sub__(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDateSpan_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDateSpan___sub__. Expected _wxDateSpan_p."); return NULL; } @@ -7677,6 +7667,7 @@ static PyMethodDef utilscMethods[] = { { "new_wxDateTimeFromTimeT", (PyCFunction) _wrap_new_wxDateTimeFromTimeT, METH_VARARGS | METH_KEYWORDS }, { "new_wxDateTime", (PyCFunction) _wrap_new_wxDateTime, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_Today", (PyCFunction) _wrap_wxDateTime_Today, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_UNow", (PyCFunction) _wrap_wxDateTime_UNow, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_Now", (PyCFunction) _wrap_wxDateTime_Now, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_GetEndDST", (PyCFunction) _wrap_wxDateTime_GetEndDST, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_GetBeginDST", (PyCFunction) _wrap_wxDateTime_GetBeginDST, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/utils.py b/wxPython/src/msw/utils.py index da54031f64..5dc18f722d 100644 --- a/wxPython/src/msw/utils.py +++ b/wxPython/src/msw/utils.py @@ -1,6 +1,6 @@ # This file was created automatically by SWIG. import utilsc -import string +import wx class wxConfigBasePtr : Type_Unknown = utilsc.wxConfigBase_Type_Unknown Type_String = utilsc.wxConfigBase_Type_String @@ -10,9 +10,12 @@ class wxConfigBasePtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,utilsc=utilsc): - if self.thisown == 1 : - utilsc.delete_wxConfigBase(self) + def __del__(self, delfunc=utilsc.delete_wxConfigBase): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def DeleteAll(self, *_args, **_kwargs): val = apply(utilsc.wxConfigBase_DeleteAll,(self,) + _args, _kwargs) return val @@ -137,9 +140,12 @@ class wxConfigPtr(wxConfigBasePtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,utilsc=utilsc): - if self.thisown == 1 : - utilsc.delete_wxConfig(self) + def __del__(self, delfunc=utilsc.delete_wxConfig): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def __repr__(self): return "" % (self.this,) class wxConfig(wxConfigPtr): @@ -154,9 +160,12 @@ class wxFileConfigPtr(wxConfigBasePtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,utilsc=utilsc): - if self.thisown == 1 : - utilsc.delete_wxFileConfig(self) + def __del__(self, delfunc=utilsc.delete_wxFileConfig): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def __repr__(self): return "" % (self.this,) class wxFileConfig(wxFileConfigPtr): @@ -262,9 +271,12 @@ class wxDateTimePtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,utilsc=utilsc): - if self.thisown == 1 : - utilsc.delete_wxDateTime(self) + def __del__(self, delfunc=utilsc.delete_wxDateTime): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetToCurrent(self, *_args, **_kwargs): val = apply(utilsc.wxDateTime_SetToCurrent,(self,) + _args, _kwargs) if val: val = wxDateTimePtr(val) @@ -551,17 +563,17 @@ class wxDateTimePtr : return "" % (self.this,) def __add__(self, other): - if string.find(other.this, 'wxTimeSpan') != -1: + if isinstance(other, wxTimeSpanPtr): return self.__add__TS(other) - if string.find(other.this, 'wxDateSpan') != -1: + if isinstance(other, wxDateSpanPtr): return self.__add__DS(other) raise TypeError, 'Invalid r.h.s. type for __add__' def __sub__(self, other): - if string.find(other.this, 'wxDateTime') != -1: + if isinstance(other, wxDateTimePtr): return self.__sub__DT(other) - if string.find(other.this, 'wxTimeSpan') != -1: + if isinstance(other, wxTimeSpanPtr): return self.__sub__TS(other) - if string.find(other.this, 'wxDateSpan') != -1: + if isinstance(other, wxDateSpanPtr): return self.__sub__DS(other) raise TypeError, 'Invalid r.h.s. type for __sub__' @@ -603,9 +615,12 @@ class wxTimeSpanPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,utilsc=utilsc): - if self.thisown == 1 : - utilsc.delete_wxTimeSpan(self) + def __del__(self, delfunc=utilsc.delete_wxTimeSpan): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Add(self, *_args, **_kwargs): val = apply(utilsc.wxTimeSpan_Add,(self,) + _args, _kwargs) if val: val = wxTimeSpanPtr(val) @@ -702,9 +717,12 @@ class wxDateSpanPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,utilsc=utilsc): - if self.thisown == 1 : - utilsc.delete_wxDateSpan(self) + def __del__(self, delfunc=utilsc.delete_wxDateSpan): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetYears(self, *_args, **_kwargs): val = apply(utilsc.wxDateSpan_SetYears,(self,) + _args, _kwargs) if val: val = wxDateSpanPtr(val) @@ -854,6 +872,11 @@ def wxDateTime_Now(*_args, **_kwargs): if val: val = wxDateTimePtr(val); val.thisown = 1 return val +def wxDateTime_UNow(*_args, **_kwargs): + val = apply(utilsc.wxDateTime_UNow,_args,_kwargs) + if val: val = wxDateTimePtr(val); val.thisown = 1 + return val + def wxDateTime_Today(*_args, **_kwargs): val = apply(utilsc.wxDateTime_Today,_args,_kwargs) if val: val = wxDateTimePtr(val); val.thisown = 1 diff --git a/wxPython/src/msw/windows.cpp b/wxPython/src/msw/windows.cpp index 59aa429f09..7349a56836 100644 --- a/wxPython/src/msw/windows.cpp +++ b/wxPython/src/msw/windows.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -338,8 +337,7 @@ static PyObject *_wrap_wxEvtHandler_ProcessEvent(PyObject *self, PyObject *args, } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxEvtHandler_ProcessEvent. Expected _wxEvent_p."); return NULL; } @@ -374,8 +372,7 @@ static PyObject *_wrap_wxEvtHandler_AddPendingEvent(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxEvtHandler_AddPendingEvent. Expected _wxEvent_p."); return NULL; } @@ -1606,6 +1603,34 @@ static PyObject *_wrap_wxWindow_Enable(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxWindow_Disable(_swigobj) (_swigobj->Disable()) +static PyObject *_wrap_wxWindow_Disable(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_Disable",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_Disable. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxWindow_Disable(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_FindWindowById(_swigobj,_swigarg0) (_swigobj->FindWindow(_swigarg0)) static PyObject *_wrap_wxWindow_FindWindowById(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1702,6 +1727,34 @@ static PyObject *_wrap_wxWindow_Fit(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +#define wxWindow_FitInside(_swigobj) (_swigobj->FitInside()) +static PyObject *_wrap_wxWindow_FitInside(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_FitInside",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_FitInside. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxWindow_FitInside(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour()) static PyObject *_wrap_wxWindow_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -2222,7 +2275,7 @@ static PyObject *_wrap_wxWindow_GetLabel(PyObject *self, PyObject *args, PyObjec 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 @@ -2298,7 +2351,7 @@ static PyObject *_wrap_wxWindow_GetName(PyObject *self, PyObject *args, PyObject 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 @@ -2783,7 +2836,7 @@ static PyObject *_wrap_wxWindow_GetTitle(PyObject *self, PyObject *args, PyObjec 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 @@ -3275,63 +3328,6 @@ static PyObject *_wrap_wxWindow_Layout(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxWindow_LoadFromResource(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->LoadFromResource(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxWindow_LoadFromResource(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxWindow * _arg0; - wxWindow * _arg1; - wxString * _arg2; - wxResourceTable * _arg3 = (wxResourceTable *) NULL; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _obj2 = 0; - PyObject * _argo3 = 0; - char *_kwnames[] = { "self","parent","resourceName","resourceTable", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO|O:wxWindow_LoadFromResource",_kwnames,&_argo0,&_argo1,&_obj2,&_argo3)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_LoadFromResource. Expected _wxWindow_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 wxWindow_LoadFromResource. Expected _wxWindow_p."); - return NULL; - } - } -{ - _arg2 = wxString_in_helper(_obj2); - if (_arg2 == NULL) - return NULL; -} - if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxResourceTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxWindow_LoadFromResource. Expected _wxResourceTable_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxWindow_LoadFromResource(_arg0,_arg1,*_arg2,_arg3); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - #define wxWindow_Lower(_swigobj) (_swigobj->Lower()) static PyObject *_wrap_wxWindow_Lower(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4265,8 +4261,7 @@ static PyObject *_wrap_wxWindow_SetFont(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetFont. Expected _wxFont_p."); return NULL; } @@ -4811,6 +4806,36 @@ static PyObject *_wrap_wxWindow_GetVirtualSizeTuple(PyObject *self, PyObject *ar return _resultobj; } +#define wxWindow_GetBestVirtualSize(_swigobj) (_swigobj->GetBestVirtualSize()) +static PyObject *_wrap_wxWindow_GetBestVirtualSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetBestVirtualSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetBestVirtualSize. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxWindow_GetBestVirtualSize(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxWindow_SetClientSizeWH(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetClientSize(_swigarg0,_swigarg1)) static PyObject *_wrap_wxWindow_SetClientSizeWH(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4898,8 +4923,7 @@ static PyObject *_wrap_wxWindow_SetCursor(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxCursor_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetCursor. Expected _wxCursor_p."); return NULL; } @@ -5675,8 +5699,7 @@ static PyObject *_wrap_wxWindow_SetValidator(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxValidator_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxValidator_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetValidator. Expected _wxValidator_p."); return NULL; } @@ -5824,6 +5847,36 @@ static PyObject *_wrap_wxWindow_GetMaxSize(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxWindow_GetAdjustedBestSize(_swigobj) (_swigobj->GetAdjustedBestSize()) +static PyObject *_wrap_wxWindow_GetAdjustedBestSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxSize * _result; + wxWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxWindow_GetAdjustedBestSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_GetAdjustedBestSize. Expected _wxWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxSize (wxWindow_GetAdjustedBestSize(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + #define wxWindow_SetCaret(_swigobj,_swigarg0) (_swigobj->SetCaret(_swigarg0)) static PyObject *_wrap_wxWindow_SetCaret(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -6006,7 +6059,7 @@ static PyObject *_wrap_wxWindow_GetHelpText(PyObject *self, PyObject *args, PyOb 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 @@ -6359,8 +6412,7 @@ static PyObject *_wrap_wxWindow_SetAcceleratorTable(PyObject *self, PyObject *ar } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxAcceleratorTable_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxAcceleratorTable_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_SetAcceleratorTable. Expected _wxAcceleratorTable_p."); return NULL; } @@ -6431,8 +6483,7 @@ static PyObject *_wrap_wxWindow_OnPaint(PyObject *self, PyObject *args, PyObject } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPaintEvent_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPaintEvent_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWindow_OnPaint. Expected _wxPaintEvent_p."); return NULL; } @@ -7277,8 +7328,7 @@ static PyObject *_wrap_wxScrolledWindow_PrepareDC(PyObject *self, PyObject *args } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDC_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxScrolledWindow_PrepareDC. Expected _wxDC_p."); return NULL; } @@ -8976,7 +9026,7 @@ static PyObject *_wrap_wxMenu_GetTitle(PyObject *self, PyObject *args, PyObject 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 @@ -9053,7 +9103,7 @@ static PyObject *_wrap_wxMenu_GetLabel(PyObject *self, PyObject *args, PyObject 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 @@ -9131,7 +9181,7 @@ static PyObject *_wrap_wxMenu_GetHelpString(PyObject *self, PyObject *args, PyOb 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 @@ -10072,6 +10122,35 @@ static PyObject *_wrap_wxMenuBar_EnableTop(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxMenuBar_IsEnabledTop(_swigobj,_swigarg0) (_swigobj->IsEnabledTop(_swigarg0)) +static PyObject *_wrap_wxMenuBar_IsEnabledTop(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxMenuBar * _arg0; + size_t _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pos", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxMenuBar_IsEnabledTop",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxMenuBar_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxMenuBar_IsEnabledTop. Expected _wxMenuBar_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxMenuBar_IsEnabledTop(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxMenuBar_SetLabelTop(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabelTop(_swigarg0,_swigarg1)) static PyObject *_wrap_wxMenuBar_SetLabelTop(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -10139,7 +10218,7 @@ static PyObject *_wrap_wxMenuBar_GetLabelTop(PyObject *self, PyObject *args, PyO 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 @@ -10457,7 +10536,7 @@ static PyObject *_wrap_wxMenuBar_GetLabel(PyObject *self, PyObject *args, PyObje 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 @@ -10535,7 +10614,7 @@ static PyObject *_wrap_wxMenuBar_GetHelpString(PyObject *self, PyObject *args, P 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 @@ -10802,7 +10881,7 @@ static PyObject *_wrap_wxMenuItem_GetLabel(PyObject *self, PyObject *args, PyObj 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 @@ -10840,7 +10919,7 @@ static PyObject *_wrap_wxMenuItem_GetText(PyObject *self, PyObject *args, PyObje 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 @@ -11240,7 +11319,7 @@ static PyObject *_wrap_wxMenuItem_GetHelp(PyObject *self, PyObject *args, PyObje 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 @@ -11343,7 +11422,7 @@ static PyObject *_wrap_wxMenuItem_GetLabelFromText(PyObject *self, PyObject *arg 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 @@ -11378,8 +11457,7 @@ static PyObject *_wrap_wxMenuItem_SetFont(PyObject *self, PyObject *args, PyObje } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxFont_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMenuItem_SetFont. Expected _wxFont_p."); return NULL; } @@ -11579,15 +11657,13 @@ static PyObject *_wrap_wxMenuItem_SetBitmaps(PyObject *self, PyObject *args, PyO } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMenuItem_SetBitmaps. Expected _wxBitmap_p."); return NULL; } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxMenuItem_SetBitmaps. Expected _wxBitmap_p."); return NULL; } @@ -11754,8 +11830,7 @@ static PyObject *_wrap_wxMenuItem_SetBitmap(PyObject *self, PyObject *args, PyOb } } if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxMenuItem_SetBitmap. Expected _wxBitmap_p."); return NULL; } @@ -11859,6 +11934,7 @@ static PyMethodDef windowscMethods[] = { { "wxMenuBar_FindMenu", (PyCFunction) _wrap_wxMenuBar_FindMenu, METH_VARARGS | METH_KEYWORDS }, { "wxMenuBar_GetLabelTop", (PyCFunction) _wrap_wxMenuBar_GetLabelTop, METH_VARARGS | METH_KEYWORDS }, { "wxMenuBar_SetLabelTop", (PyCFunction) _wrap_wxMenuBar_SetLabelTop, METH_VARARGS | METH_KEYWORDS }, + { "wxMenuBar_IsEnabledTop", (PyCFunction) _wrap_wxMenuBar_IsEnabledTop, METH_VARARGS | METH_KEYWORDS }, { "wxMenuBar_EnableTop", (PyCFunction) _wrap_wxMenuBar_EnableTop, METH_VARARGS | METH_KEYWORDS }, { "wxMenuBar_Remove", (PyCFunction) _wrap_wxMenuBar_Remove, METH_VARARGS | METH_KEYWORDS }, { "wxMenuBar_Replace", (PyCFunction) _wrap_wxMenuBar_Replace, METH_VARARGS | METH_KEYWORDS }, @@ -11974,6 +12050,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_Freeze", (PyCFunction) _wrap_wxWindow_Freeze, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetCaret", (PyCFunction) _wrap_wxWindow_GetCaret, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetCaret", (PyCFunction) _wrap_wxWindow_SetCaret, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_GetAdjustedBestSize", (PyCFunction) _wrap_wxWindow_GetAdjustedBestSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetMaxSize", (PyCFunction) _wrap_wxWindow_GetMaxSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetBestSize", (PyCFunction) _wrap_wxWindow_GetBestSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetDropTarget", (PyCFunction) _wrap_wxWindow_GetDropTarget, METH_VARARGS | METH_KEYWORDS }, @@ -12006,6 +12083,7 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_SetCursor", (PyCFunction) _wrap_wxWindow_SetCursor, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetClientSize", (PyCFunction) _wrap_wxWindow_SetClientSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetClientSizeWH", (PyCFunction) _wrap_wxWindow_SetClientSizeWH, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_GetBestVirtualSize", (PyCFunction) _wrap_wxWindow_GetBestVirtualSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetVirtualSizeTuple", (PyCFunction) _wrap_wxWindow_GetVirtualSizeTuple, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetVirtualSize", (PyCFunction) _wrap_wxWindow_GetVirtualSize, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_SetVirtualSizeWH", (PyCFunction) _wrap_wxWindow_SetVirtualSizeWH, METH_VARARGS | METH_KEYWORDS }, @@ -12048,7 +12126,6 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_MoveXY", (PyCFunction) _wrap_wxWindow_MoveXY, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_MakeModal", (PyCFunction) _wrap_wxWindow_MakeModal, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Lower", (PyCFunction) _wrap_wxWindow_Lower, METH_VARARGS | METH_KEYWORDS }, - { "wxWindow_LoadFromResource", (PyCFunction) _wrap_wxWindow_LoadFromResource, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Layout", (PyCFunction) _wrap_wxWindow_Layout, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_IsTopLevel", (PyCFunction) _wrap_wxWindow_IsTopLevel, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_IsShown", (PyCFunction) _wrap_wxWindow_IsShown, METH_VARARGS | METH_KEYWORDS }, @@ -12096,9 +12173,11 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_GetChildren", (PyCFunction) _wrap_wxWindow_GetChildren, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetBorder", (PyCFunction) _wrap_wxWindow_GetBorder, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_GetBackgroundColour", (PyCFunction) _wrap_wxWindow_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_FitInside", (PyCFunction) _wrap_wxWindow_FitInside, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Fit", (PyCFunction) _wrap_wxWindow_Fit, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_FindWindowByName", (PyCFunction) _wrap_wxWindow_FindWindowByName, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_FindWindowById", (PyCFunction) _wrap_wxWindow_FindWindowById, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_Disable", (PyCFunction) _wrap_wxWindow_Disable, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Enable", (PyCFunction) _wrap_wxWindow_Enable, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_DragAcceptFiles", (PyCFunction) _wrap_wxWindow_DragAcceptFiles, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_IsBeingDeleted", (PyCFunction) _wrap_wxWindow_IsBeingDeleted, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/windows.py b/wxPython/src/msw/windows.py index a79d3e40bd..39f7f50988 100644 --- a/wxPython/src/msw/windows.py +++ b/wxPython/src/msw/windows.py @@ -165,6 +165,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def Enable(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_Enable,(self,) + _args, _kwargs) return val + def Disable(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_Disable,(self,) + _args, _kwargs) + return val def FindWindowById(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_FindWindowById,(self,) + _args, _kwargs) return val @@ -174,6 +177,9 @@ class wxWindowPtr(wxEvtHandlerPtr): def Fit(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_Fit,(self,) + _args, _kwargs) return val + def FitInside(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_FitInside,(self,) + _args, _kwargs) + return val def GetBackgroundColour(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetBackgroundColour,(self,) + _args, _kwargs) if val: val = wxColourPtr(val) ; val.thisown = 1 @@ -326,9 +332,6 @@ class wxWindowPtr(wxEvtHandlerPtr): def Layout(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_Layout,(self,) + _args, _kwargs) return val - def LoadFromResource(self, *_args, **_kwargs): - val = apply(windowsc.wxWindow_LoadFromResource,(self,) + _args, _kwargs) - return val def Lower(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_Lower,(self,) + _args, _kwargs) return val @@ -457,6 +460,10 @@ class wxWindowPtr(wxEvtHandlerPtr): def GetVirtualSizeTuple(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_GetVirtualSizeTuple,(self,) + _args, _kwargs) return val + def GetBestVirtualSize(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_GetBestVirtualSize,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val def SetClientSizeWH(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetClientSizeWH,(self,) + _args, _kwargs) return val @@ -564,6 +571,10 @@ class wxWindowPtr(wxEvtHandlerPtr): val = apply(windowsc.wxWindow_GetMaxSize,(self,) + _args, _kwargs) if val: val = wxSizePtr(val) ; val.thisown = 1 return val + def GetAdjustedBestSize(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_GetAdjustedBestSize,(self,) + _args, _kwargs) + if val: val = wxSizePtr(val) ; val.thisown = 1 + return val def SetCaret(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_SetCaret,(self,) + _args, _kwargs) return val @@ -983,6 +994,9 @@ class wxMenuBarPtr(wxWindowPtr): def EnableTop(self, *_args, **_kwargs): val = apply(windowsc.wxMenuBar_EnableTop,(self,) + _args, _kwargs) return val + def IsEnabledTop(self, *_args, **_kwargs): + val = apply(windowsc.wxMenuBar_IsEnabledTop,(self,) + _args, _kwargs) + return val def SetLabelTop(self, *_args, **_kwargs): val = apply(windowsc.wxMenuBar_SetLabelTop,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/windows2.cpp b/wxPython/src/msw/windows2.cpp index cdfe069380..f0e9eed052 100644 --- a/wxPython/src/msw/windows2.cpp +++ b/wxPython/src/msw/windows2.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -346,7 +345,7 @@ static PyObject *_wrap_new_wxNotebookEvent(PyObject *self, PyObject *args, PyObj 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; @@ -711,7 +710,7 @@ static PyObject *_wrap_wxNotebook_SetSelection(PyObject *self, PyObject *args, P 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)) @@ -740,7 +739,7 @@ static PyObject *_wrap_wxNotebook_AdvanceSelection(PyObject *self, PyObject *arg 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)) @@ -801,7 +800,7 @@ static PyObject *_wrap_wxNotebook_SetPageText(PyObject *self, PyObject *args, Py 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)) @@ -839,7 +838,7 @@ static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args, Py 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)) @@ -859,7 +858,7 @@ static PyObject *_wrap_wxNotebook_GetPageText(PyObject *self, PyObject *args, Py 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 @@ -979,7 +978,7 @@ static PyObject *_wrap_wxNotebook_GetPageImage(PyObject *self, PyObject *args, P 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)) @@ -1009,7 +1008,7 @@ static PyObject *_wrap_wxNotebook_SetPageImage(PyObject *self, PyObject *args, P 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)) @@ -1138,7 +1137,7 @@ static PyObject *_wrap_wxNotebook_DeletePage(PyObject *self, PyObject *args, PyO 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)) @@ -1167,7 +1166,7 @@ static PyObject *_wrap_wxNotebook_RemovePage(PyObject *self, PyObject *args, PyO 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)) @@ -1229,7 +1228,7 @@ static PyObject *_wrap_wxNotebook_AddPage(PyObject *self, PyObject *args, PyObje 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)) @@ -1281,7 +1280,7 @@ static PyObject *_wrap_wxNotebook_InsertPage(PyObject *self, PyObject *args, PyO 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)) @@ -1327,7 +1326,7 @@ static PyObject *_wrap_wxNotebook_GetPage(PyObject *self, PyObject *args, PyObje 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)) @@ -2541,8 +2540,7 @@ static PyObject *_wrap_wxTaskBarIcon_SetIcon(PyObject *self, PyObject *args, PyO } } 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; } @@ -3494,8 +3492,7 @@ static PyObject *_wrap_new_wxPyControl(PyObject *self, PyObject *args, PyObject 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; } diff --git a/wxPython/src/msw/windows2.py b/wxPython/src/msw/windows2.py index 1956c91f0e..b263d3c4c7 100644 --- a/wxPython/src/msw/windows2.py +++ b/wxPython/src/msw/windows2.py @@ -249,9 +249,12 @@ class wxTaskBarIconPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,windows2c=windows2c): - if self.thisown == 1 : - windows2c.delete_wxTaskBarIcon(self) + def __del__(self, delfunc=windows2c.delete_wxTaskBarIcon): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetIcon(self, *_args, **_kwargs): val = apply(windows2c.wxTaskBarIcon_SetIcon,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/windows3.cpp b/wxPython/src/msw/windows3.cpp index 2a7c6fe148..41a235941a 100644 --- a/wxPython/src/msw/windows3.cpp +++ b/wxPython/src/msw/windows3.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); diff --git a/wxPython/src/msw/windows3.py b/wxPython/src/msw/windows3.py index 994e73cca0..c7a571f564 100644 --- a/wxPython/src/msw/windows3.py +++ b/wxPython/src/msw/windows3.py @@ -246,9 +246,12 @@ class wxLayoutAlgorithmPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,windows3c=windows3c): - if self.thisown == 1 : - windows3c.delete_wxLayoutAlgorithm(self) + def __del__(self, delfunc=windows3c.delete_wxLayoutAlgorithm): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def LayoutMDIFrame(self, *_args, **_kwargs): val = apply(windows3c.wxLayoutAlgorithm_LayoutMDIFrame,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/wizard.cpp b/wxPython/src/msw/wizard.cpp index c7e05cbbe4..4dcad1e649 100644 --- a/wxPython/src/msw/wizard.cpp +++ b/wxPython/src/msw/wizard.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -359,8 +358,7 @@ static PyObject *_wrap_wxWizardPage_Create(PyObject *self, PyObject *args, PyObj } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxWizardPage_Create. Expected _wxBitmap_p."); return NULL; } @@ -636,8 +634,7 @@ static PyObject *_wrap_wxPyWizardPage_Create(PyObject *self, PyObject *args, PyO } } if (_argo2) { - if (_argo2 == Py_None) { _arg2 = NULL; } - else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPyWizardPage_Create. Expected _wxBitmap_p."); return NULL; } @@ -1382,8 +1379,7 @@ static PyObject *_wrap_new_wxWizardPageSimple(PyObject *self, PyObject *args, Py } } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxWizardPageSimple. Expected _wxBitmap_p."); return NULL; } @@ -1479,8 +1475,7 @@ static PyObject *_wrap_wxWizardPageSimple_Create(PyObject *self, PyObject *args, } } if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxWizardPageSimple_Create. Expected _wxBitmap_p."); return NULL; } @@ -1679,8 +1674,7 @@ static PyObject *_wrap_new_wxWizard(PyObject *self, PyObject *args, PyObject *kw return NULL; } if (_argo3) { - if (_argo3 == Py_None) { _arg3 = NULL; } - else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxWizard. Expected _wxBitmap_p."); return NULL; } @@ -1779,8 +1773,7 @@ static PyObject *_wrap_wxWizard_Create(PyObject *self, PyObject *args, PyObject return NULL; } if (_argo4) { - if (_argo4 == Py_None) { _arg4 = NULL; } - else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) { + if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxBitmap_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxWizard_Create. Expected _wxBitmap_p."); return NULL; } @@ -2069,7 +2062,83 @@ static PyObject *_wrap_wxWizard_ShowPage(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxWizard_HasNextPage(_swigobj,_swigarg0) (_swigobj->HasNextPage(_swigarg0)) +static PyObject *_wrap_wxWizard_HasNextPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWizard * _arg0; + wxWizardPage * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","page", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWizard_HasNextPage",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWizard_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWizard_HasNextPage. Expected _wxWizard_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWizardPage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWizard_HasNextPage. Expected _wxWizardPage_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxWizard_HasNextPage(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxWizard_HasPrevPage(_swigobj,_swigarg0) (_swigobj->HasPrevPage(_swigarg0)) +static PyObject *_wrap_wxWizard_HasPrevPage(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWizard * _arg0; + wxWizardPage * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","page", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWizard_HasPrevPage",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWizard_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWizard_HasPrevPage. Expected _wxWizard_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWizardPage_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWizard_HasPrevPage. Expected _wxWizardPage_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxWizard_HasPrevPage(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyMethodDef wizardcMethods[] = { + { "wxWizard_HasPrevPage", (PyCFunction) _wrap_wxWizard_HasPrevPage, METH_VARARGS | METH_KEYWORDS }, + { "wxWizard_HasNextPage", (PyCFunction) _wrap_wxWizard_HasNextPage, METH_VARARGS | METH_KEYWORDS }, { "wxWizard_ShowPage", (PyCFunction) _wrap_wxWizard_ShowPage, METH_VARARGS | METH_KEYWORDS }, { "wxWizard_IsRunning", (PyCFunction) _wrap_wxWizard_IsRunning, METH_VARARGS | METH_KEYWORDS }, { "wxWizard_FitToPage", (PyCFunction) _wrap_wxWizard_FitToPage, METH_VARARGS | METH_KEYWORDS }, @@ -2258,6 +2327,7 @@ SWIGEXPORT(void) initwizardc() { PyDict_SetItemString(d,"wxEVT_WIZARD_PAGE_CHANGING", PyInt_FromLong((long) wxEVT_WIZARD_PAGE_CHANGING)); PyDict_SetItemString(d,"wxEVT_WIZARD_CANCEL", PyInt_FromLong((long) wxEVT_WIZARD_CANCEL)); PyDict_SetItemString(d,"wxEVT_WIZARD_HELP", PyInt_FromLong((long) wxEVT_WIZARD_HELP)); + PyDict_SetItemString(d,"wxEVT_WIZARD_FINISHED", PyInt_FromLong((long) wxEVT_WIZARD_FINISHED)); wxClassInfo::CleanUpClasses(); wxClassInfo::InitializeClasses(); diff --git a/wxPython/src/msw/wizard.py b/wxPython/src/msw/wizard.py index 391048f193..845cdb939f 100644 --- a/wxPython/src/msw/wizard.py +++ b/wxPython/src/msw/wizard.py @@ -32,6 +32,9 @@ def EVT_WIZARD_CANCEL(win, id, func): def EVT_WIZARD_HELP(win, id, func): win.Connect(id, -1, wxEVT_WIZARD_HELP, func) +def EVT_WIZARD_FINISHED(win, id, func): + win.Connect(id, -1, wxEVT_WIZARD_FINISHED, func) + class wxWizardEventPtr(wxNotifyEventPtr): def __init__(self,this): @@ -226,6 +229,12 @@ class wxWizardPtr(wxDialogPtr): def ShowPage(self, *_args, **_kwargs): val = apply(wizardc.wxWizard_ShowPage,(self,) + _args, _kwargs) return val + def HasNextPage(self, *_args, **_kwargs): + val = apply(wizardc.wxWizard_HasNextPage,(self,) + _args, _kwargs) + return val + def HasPrevPage(self, *_args, **_kwargs): + val = apply(wizardc.wxWizard_HasPrevPage,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxWizard(wxWizardPtr): @@ -258,6 +267,7 @@ wxEVT_WIZARD_PAGE_CHANGED = wizardc.wxEVT_WIZARD_PAGE_CHANGED wxEVT_WIZARD_PAGE_CHANGING = wizardc.wxEVT_WIZARD_PAGE_CHANGING wxEVT_WIZARD_CANCEL = wizardc.wxEVT_WIZARD_CANCEL wxEVT_WIZARD_HELP = wizardc.wxEVT_WIZARD_HELP +wxEVT_WIZARD_FINISHED = wizardc.wxEVT_WIZARD_FINISHED #-------------- USER INCLUDE ----------------------- @@ -265,3 +275,7 @@ wxEVT_WIZARD_HELP = wizardc.wxEVT_WIZARD_HELP # Stuff these names into the wx namespace so wxPyConstructObject can find them import wx wx.wxWizardEventPtr = wxWizardEventPtr +wx.wxWizardPagePtr = wxWizardPagePtr +wx.wxPyWizardPagePtr = wxPyWizardPagePtr +wx.wxWizardPageSimplePtr = wxWizardPageSimplePtr +wx.wxWizardPtr = wxWizardPtr diff --git a/wxPython/src/msw/wx.cpp b/wxPython/src/msw/wx.cpp index 99bb78a663..5fe7254649 100644 --- a/wxPython/src/msw/wx.cpp +++ b/wxPython/src/msw/wx.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # 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 *); @@ -666,6 +665,7 @@ static wxPyCoreAPI API = { wxRealPoint_helper, wxRect_helper, wxColour_helper, + wxPoint2DDouble_helper, wxPyCBH_setCallbackInfo, wxPyCBH_findCallback, @@ -909,7 +909,6 @@ static PyObject *_wrap_wxGetApp(PyObject *self, PyObject *args, PyObject *kwargs PyObject * _resultobj; wxPyApp * _result; char *_kwnames[] = { NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetApp",_kwnames)) @@ -920,13 +919,7 @@ static PyObject *_wrap_wxGetApp(PyObject *self, PyObject *args, PyObject *kwargs wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyApp_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1022,6 +1015,44 @@ static PyObject *_wrap_delete_wxPyApp(PyObject *self, PyObject *args, PyObject * return _resultobj; } +#define wxPyApp__setCallbackInfo(_swigobj,_swigarg0,_swigarg1) (_swigobj->_setCallbackInfo(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyApp__setCallbackInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyApp * _arg0; + PyObject * _arg1; + PyObject * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","self","_class", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyApp__setCallbackInfo",_kwnames,&_argo0,&_obj1,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyApp_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp__setCallbackInfo. Expected _wxPyApp_p."); + return NULL; + } + } +{ + _arg1 = _obj1; +} +{ + _arg2 = _obj2; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPyApp__setCallbackInfo(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxPyApp_GetAppName(_swigobj) (_swigobj->GetAppName()) static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1048,7 +1079,7 @@ static PyObject *_wrap_wxPyApp_GetAppName(PyObject *self, PyObject *args, PyObje 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 @@ -1113,7 +1144,7 @@ static PyObject *_wrap_wxPyApp_GetClassName(PyObject *self, PyObject *args, PyOb 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 @@ -1234,7 +1265,7 @@ static PyObject *_wrap_wxPyApp_GetVendorName(PyObject *self, PyObject *args, PyO 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 @@ -1446,9 +1477,9 @@ static PyObject *_wrap_wxPyApp_Yield(PyObject *self, PyObject *args, PyObject *k PyObject * _resultobj; bool _result; wxPyApp * _arg0; - bool _arg1 = (bool ) (0); + bool _arg1 = (bool ) FALSE; PyObject * _argo0 = 0; - int tempbool1 = (int) (0); + int tempbool1 = (int) FALSE; char *_kwnames[] = { "self","onlyIfNeeded", NULL }; self = self; @@ -1748,7 +1779,323 @@ static PyObject *_wrap_wxPyApp_SetUseBestVisual(PyObject *self, PyObject *args, return _resultobj; } +#define wxPyApp_GetAssertMode(_swigobj) (_swigobj->GetAssertMode()) +static PyObject *_wrap_wxPyApp_GetAssertMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxPyApp * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyApp_GetAssertMode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyApp_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_GetAssertMode. Expected _wxPyApp_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (int )wxPyApp_GetAssertMode(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxPyApp_SetAssertMode(_swigobj,_swigarg0) (_swigobj->SetAssertMode(_swigarg0)) +static PyObject *_wrap_wxPyApp_SetAssertMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyApp * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","mode", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPyApp_SetAssertMode",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyApp_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyApp_SetAssertMode. Expected _wxPyApp_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPyApp_SetAssertMode(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_GetMacDefaultEncodingIsPC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxPyApp_GetMacDefaultEncodingIsPC",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxPyApp::GetMacDefaultEncodingIsPC(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_GetMacSupportPCMenuShortcuts(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxPyApp_GetMacSupportPCMenuShortcuts",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (bool )wxPyApp::GetMacSupportPCMenuShortcuts(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_GetMacAboutMenuItemId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxPyApp_GetMacAboutMenuItemId",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxPyApp::GetMacAboutMenuItemId(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_GetMacPreferencesMenuItemId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxPyApp_GetMacPreferencesMenuItemId",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxPyApp::GetMacPreferencesMenuItemId(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_GetMacExitMenuItemId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxPyApp_GetMacExitMenuItemId",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (long )wxPyApp::GetMacExitMenuItemId(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("l",_result); + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_GetMacHelpMenuTitleName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char *_kwnames[] = { NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxPyApp_GetMacHelpMenuTitleName",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxPyApp::GetMacHelpMenuTitleName()); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ +#if wxUSE_UNICODE + _resultobj = PyUnicode_FromWideChar(_result->c_str(), _result->Len()); +#else + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +#endif +} +{ + delete _result; +} + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_SetMacDefaultEncodingIsPC(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _arg0; + int tempbool0; + char *_kwnames[] = { "val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxPyApp_SetMacDefaultEncodingIsPC",_kwnames,&tempbool0)) + return NULL; + _arg0 = (bool ) tempbool0; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPyApp::SetMacDefaultEncodingIsPC(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_SetMacSupportPCMenuShortcuts(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _arg0; + int tempbool0; + char *_kwnames[] = { "val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxPyApp_SetMacSupportPCMenuShortcuts",_kwnames,&tempbool0)) + return NULL; + _arg0 = (bool ) tempbool0; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPyApp::SetMacSupportPCMenuShortcuts(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_SetMacAboutMenuItemId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _arg0; + char *_kwnames[] = { "val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxPyApp_SetMacAboutMenuItemId",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPyApp::SetMacAboutMenuItemId(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_SetMacPreferencesMenuItemId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _arg0; + char *_kwnames[] = { "val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxPyApp_SetMacPreferencesMenuItemId",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPyApp::SetMacPreferencesMenuItemId(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_SetMacExitMenuItemId(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + long _arg0; + char *_kwnames[] = { "val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"l:wxPyApp_SetMacExitMenuItemId",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPyApp::SetMacExitMenuItemId(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static PyObject *_wrap_wxPyApp_SetMacHelpMenuTitleName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _arg0; + PyObject * _obj0 = 0; + char *_kwnames[] = { "val", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyApp_SetMacHelpMenuTitleName",_kwnames,&_obj0)) + return NULL; +{ + _arg0 = wxString_in_helper(_obj0); + if (_arg0 == NULL) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxPyApp::SetMacHelpMenuTitleName(*_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj0) + delete _arg0; +} + return _resultobj; +} + static PyMethodDef wxcMethods[] = { + { "wxPyApp_SetMacHelpMenuTitleName", (PyCFunction) _wrap_wxPyApp_SetMacHelpMenuTitleName, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_SetMacExitMenuItemId", (PyCFunction) _wrap_wxPyApp_SetMacExitMenuItemId, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_SetMacPreferencesMenuItemId", (PyCFunction) _wrap_wxPyApp_SetMacPreferencesMenuItemId, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_SetMacAboutMenuItemId", (PyCFunction) _wrap_wxPyApp_SetMacAboutMenuItemId, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_SetMacSupportPCMenuShortcuts", (PyCFunction) _wrap_wxPyApp_SetMacSupportPCMenuShortcuts, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_SetMacDefaultEncodingIsPC", (PyCFunction) _wrap_wxPyApp_SetMacDefaultEncodingIsPC, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_GetMacHelpMenuTitleName", (PyCFunction) _wrap_wxPyApp_GetMacHelpMenuTitleName, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_GetMacExitMenuItemId", (PyCFunction) _wrap_wxPyApp_GetMacExitMenuItemId, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_GetMacPreferencesMenuItemId", (PyCFunction) _wrap_wxPyApp_GetMacPreferencesMenuItemId, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_GetMacAboutMenuItemId", (PyCFunction) _wrap_wxPyApp_GetMacAboutMenuItemId, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_GetMacSupportPCMenuShortcuts", (PyCFunction) _wrap_wxPyApp_GetMacSupportPCMenuShortcuts, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_GetMacDefaultEncodingIsPC", (PyCFunction) _wrap_wxPyApp_GetMacDefaultEncodingIsPC, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_SetAssertMode", (PyCFunction) _wrap_wxPyApp_SetAssertMode, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp_GetAssertMode", (PyCFunction) _wrap_wxPyApp_GetAssertMode, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_SetUseBestVisual", (PyCFunction) _wrap_wxPyApp_SetUseBestVisual, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_SetVendorName", (PyCFunction) _wrap_wxPyApp_SetVendorName, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_SetTopWindow", (PyCFunction) _wrap_wxPyApp_SetTopWindow, METH_VARARGS | METH_KEYWORDS }, @@ -1772,6 +2119,7 @@ static PyMethodDef wxcMethods[] = { { "wxPyApp_GetClassName", (PyCFunction) _wrap_wxPyApp_GetClassName, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_GetAuto3D", (PyCFunction) _wrap_wxPyApp_GetAuto3D, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_GetAppName", (PyCFunction) _wrap_wxPyApp_GetAppName, METH_VARARGS | METH_KEYWORDS }, + { "wxPyApp__setCallbackInfo", (PyCFunction) _wrap_wxPyApp__setCallbackInfo, METH_VARARGS | METH_KEYWORDS }, { "delete_wxPyApp", (PyCFunction) _wrap_delete_wxPyApp, METH_VARARGS | METH_KEYWORDS }, { "new_wxPyApp", (PyCFunction) _wrap_new_wxPyApp, METH_VARARGS | METH_KEYWORDS }, { "wxApp_CleanUp", (PyCFunction) _wrap_wxApp_CleanUp, METH_VARARGS | METH_KEYWORDS }, @@ -2023,6 +2371,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxRA_SPECIFY_ROWS", PyInt_FromLong((long) wxRA_SPECIFY_ROWS)); PyDict_SetItemString(d,"wxRA_SPECIFY_COLS", PyInt_FromLong((long) wxRA_SPECIFY_COLS)); PyDict_SetItemString(d,"wxRB_GROUP", PyInt_FromLong((long) wxRB_GROUP)); + PyDict_SetItemString(d,"wxRB_SINGLE", PyInt_FromLong((long) wxRB_SINGLE)); PyDict_SetItemString(d,"wxGA_PROGRESSBAR", PyInt_FromLong((long) wxGA_PROGRESSBAR)); PyDict_SetItemString(d,"wxGA_HORIZONTAL", PyInt_FromLong((long) wxGA_HORIZONTAL)); PyDict_SetItemString(d,"wxGA_VERTICAL", PyInt_FromLong((long) wxGA_VERTICAL)); @@ -2544,10 +2893,6 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxHT_WINDOW_HORZ_SCROLLBAR", PyInt_FromLong((long) wxHT_WINDOW_HORZ_SCROLLBAR)); PyDict_SetItemString(d,"wxHT_WINDOW_CORNER", PyInt_FromLong((long) wxHT_WINDOW_CORNER)); PyDict_SetItemString(d,"wxHT_MAX", PyInt_FromLong((long) wxHT_MAX)); - PyDict_SetItemString(d,"FALSE", PyInt_FromLong((long) 0)); - PyDict_SetItemString(d,"false", PyInt_FromLong((long) 0)); - PyDict_SetItemString(d,"TRUE", PyInt_FromLong((long) 1)); - PyDict_SetItemString(d,"true", PyInt_FromLong((long) 1)); PyDict_SetItemString(d,"wxEVT_NULL", PyInt_FromLong((long) wxEVT_NULL)); PyDict_SetItemString(d,"wxEVT_FIRST", PyInt_FromLong((long) wxEVT_FIRST)); PyDict_SetItemString(d,"wxEVT_COMMAND_BUTTON_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_BUTTON_CLICKED)); @@ -2672,6 +3017,10 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"cvar", SWIG_globals); SWIG_addvarlink(SWIG_globals,"wxDefaultPosition",_wrap_wxDefaultPosition_get, _wrap_wxDefaultPosition_set); SWIG_addvarlink(SWIG_globals,"wxDefaultSize",_wrap_wxDefaultSize_get, _wrap_wxDefaultSize_set); + PyDict_SetItemString(d,"wxPYAPP_ASSERT_SUPPRESS", PyInt_FromLong((long) wxPYAPP_ASSERT_SUPPRESS)); + PyDict_SetItemString(d,"wxPYAPP_ASSERT_EXCEPTION", PyInt_FromLong((long) wxPYAPP_ASSERT_EXCEPTION)); + PyDict_SetItemString(d,"wxPYAPP_ASSERT_DIALOG", PyInt_FromLong((long) wxPYAPP_ASSERT_DIALOG)); + PyDict_SetItemString(d,"wxPYAPP_ASSERT_LOG", PyInt_FromLong((long) wxPYAPP_ASSERT_LOG)); // Make our API structure a CObject so other modules can import it // from this module. @@ -2680,7 +3029,7 @@ SWIGEXPORT(void) initwxc() { Py_XDECREF(v); - __wxPreStart(); // initialize the GUI toolkit, if needed. + __wxPreStart(d); // initialize the GUI toolkit, if needed. // Since these modules are all linked together, initialize them now @@ -2715,7 +3064,7 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxVERSION_NUMBER", PyInt_FromLong((long)wxVERSION_NUMBER )); #if wxUSE_UNICODE wxString tempStr(wxVERSION_STRING); - PyDict_SetItemString(d,"wxVERSION_STRING", PyUnicode_FromUnicode(tempStr.c_str(), tempStr.Len())); + PyDict_SetItemString(d,"wxVERSION_STRING", PyUnicode_FromWideChar(tempStr.c_str(), tempStr.Len())); #else PyDict_SetItemString(d,"wxVERSION_STRING", PyString_FromString(wxVERSION_STRING)); #endif diff --git a/wxPython/src/msw/wx.py b/wxPython/src/msw/wx.py index 7fd9408c79..5fe2167b98 100644 --- a/wxPython/src/msw/wx.py +++ b/wxPython/src/msw/wx.py @@ -46,9 +46,15 @@ class wxPyAppPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,wxc=wxc): - if self.thisown == 1 : - wxc.delete_wxPyApp(self) + def __del__(self, delfunc=wxc.delete_wxPyApp): + if self.thisown == 1: + try: + delfunc(self) + except: + pass + def _setCallbackInfo(self, *_args, **_kwargs): + val = apply(wxc.wxPyApp__setCallbackInfo,(self,) + _args, _kwargs) + return val def GetAppName(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_GetAppName,(self,) + _args, _kwargs) return val @@ -118,12 +124,20 @@ class wxPyAppPtr(wxEvtHandlerPtr): def SetUseBestVisual(self, *_args, **_kwargs): val = apply(wxc.wxPyApp_SetUseBestVisual,(self,) + _args, _kwargs) return val + def GetAssertMode(self, *_args, **_kwargs): + val = apply(wxc.wxPyApp_GetAssertMode,(self,) + _args, _kwargs) + return val + def SetAssertMode(self, *_args, **_kwargs): + val = apply(wxc.wxPyApp_SetAssertMode,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxPyApp(wxPyAppPtr): def __init__(self,*_args,**_kwargs): self.this = apply(wxc.new_wxPyApp,_args,_kwargs) self.thisown = 1 + self._setCallbackInfo(self, wxPyApp) + self._setOORInfo(self) @@ -152,11 +166,34 @@ _wxSetDictionary = wxc._wxSetDictionary def wxGetApp(*_args, **_kwargs): val = apply(wxc.wxGetApp,_args,_kwargs) - if val: val = wxPyAppPtr(val) return val wxApp_CleanUp = wxc.wxApp_CleanUp +wxPyApp_GetMacDefaultEncodingIsPC = wxc.wxPyApp_GetMacDefaultEncodingIsPC + +wxPyApp_GetMacSupportPCMenuShortcuts = wxc.wxPyApp_GetMacSupportPCMenuShortcuts + +wxPyApp_GetMacAboutMenuItemId = wxc.wxPyApp_GetMacAboutMenuItemId + +wxPyApp_GetMacPreferencesMenuItemId = wxc.wxPyApp_GetMacPreferencesMenuItemId + +wxPyApp_GetMacExitMenuItemId = wxc.wxPyApp_GetMacExitMenuItemId + +wxPyApp_GetMacHelpMenuTitleName = wxc.wxPyApp_GetMacHelpMenuTitleName + +wxPyApp_SetMacDefaultEncodingIsPC = wxc.wxPyApp_SetMacDefaultEncodingIsPC + +wxPyApp_SetMacSupportPCMenuShortcuts = wxc.wxPyApp_SetMacSupportPCMenuShortcuts + +wxPyApp_SetMacAboutMenuItemId = wxc.wxPyApp_SetMacAboutMenuItemId + +wxPyApp_SetMacPreferencesMenuItemId = wxc.wxPyApp_SetMacPreferencesMenuItemId + +wxPyApp_SetMacExitMenuItemId = wxc.wxPyApp_SetMacExitMenuItemId + +wxPyApp_SetMacHelpMenuTitleName = wxc.wxPyApp_SetMacHelpMenuTitleName + #-------------- VARIABLE WRAPPERS ------------------ @@ -277,6 +314,7 @@ wxRA_VERTICAL = wxc.wxRA_VERTICAL wxRA_SPECIFY_ROWS = wxc.wxRA_SPECIFY_ROWS wxRA_SPECIFY_COLS = wxc.wxRA_SPECIFY_COLS wxRB_GROUP = wxc.wxRB_GROUP +wxRB_SINGLE = wxc.wxRB_SINGLE wxGA_PROGRESSBAR = wxc.wxGA_PROGRESSBAR wxGA_HORIZONTAL = wxc.wxGA_HORIZONTAL wxGA_VERTICAL = wxc.wxGA_VERTICAL @@ -798,10 +836,6 @@ wxHT_WINDOW_VERT_SCROLLBAR = wxc.wxHT_WINDOW_VERT_SCROLLBAR wxHT_WINDOW_HORZ_SCROLLBAR = wxc.wxHT_WINDOW_HORZ_SCROLLBAR wxHT_WINDOW_CORNER = wxc.wxHT_WINDOW_CORNER wxHT_MAX = wxc.wxHT_MAX -FALSE = wxc.FALSE -false = wxc.false -TRUE = wxc.TRUE -true = wxc.true wxEVT_NULL = wxc.wxEVT_NULL wxEVT_FIRST = wxc.wxEVT_FIRST wxEVT_COMMAND_BUTTON_CLICKED = wxc.wxEVT_COMMAND_BUTTON_CLICKED @@ -926,13 +960,17 @@ __version__ = wxc.__version__ cvar = wxc.cvar wxDefaultPosition = wxPointPtr(wxc.cvar.wxDefaultPosition) wxDefaultSize = wxSizePtr(wxc.cvar.wxDefaultSize) +wxPYAPP_ASSERT_SUPPRESS = wxc.wxPYAPP_ASSERT_SUPPRESS +wxPYAPP_ASSERT_EXCEPTION = wxc.wxPYAPP_ASSERT_EXCEPTION +wxPYAPP_ASSERT_DIALOG = wxc.wxPYAPP_ASSERT_DIALOG +wxPYAPP_ASSERT_LOG = wxc.wxPYAPP_ASSERT_LOG #-------------- USER INCLUDE ----------------------- #---------------------------------------------------------------------------- # Name: _extra.py -# Purpose: This file is appended to the shadow class file generated +# Purpose: This file is appended to the shadow class file generated # by SWIG. We add some unSWIGable things here. # # Author: Robin Dunn @@ -1063,6 +1101,12 @@ def EVT_WINDOW_CREATE(win, func): def EVT_WINDOW_DESTROY(win, func): win.Connect(-1, -1, wxEVT_DESTROY, func) +def EVT_WINDOW_CREATE_ID(win, id, func): + win.Connect(id, -1, wxEVT_CREATE, func) + +def EVT_WINDOW_DESTROY_ID(win, id, func): + win.Connect(id, -1, wxEVT_DESTROY, func) + def EVT_SET_CURSOR(win, func): win.Connect(-1, -1, wxEVT_SET_CURSOR, func) @@ -1195,7 +1239,7 @@ def EVT_COMMAND_SCROLL(win, id, func): win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func) win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func) win.Connect(id, -1, wxEVT_SCROLL_THUMBRELEASE,func) - win.Connect(-1, -1, wxEVT_SCROLL_ENDSCROLL, func) + win.Connect(id, -1, wxEVT_SCROLL_ENDSCROLL, func) def EVT_COMMAND_SCROLL_TOP(win, id, func): win.Connect(id, -1, wxEVT_SCROLL_TOP, func) @@ -1519,17 +1563,50 @@ wxColor = wxColour wxNamedColor = wxNamedColour wxPen = wxPyPen wxScrollbar = wxScrollBar +wxPoint2D = wxPoint2DDouble + +wxPyAssertionError = wxc.wxPyAssertionError # backwards compatibility -wxNoRefBitmap = wxBitmap -wxPyDefaultPosition = wxDefaultPosition -wxPyDefaultSize = wxDefaultSize -NULL = None +wxNoRefBitmap = wxBitmap +wxPyDefaultPosition = wxDefaultPosition +wxPyDefaultSize = wxDefaultSize +NULL = None wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric + +# workarounds for bad wxRTTI names +__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge' + + + +def NewId(): + import warnings + warnings.warn("Use wxNewId instead", DeprecationWarning, 2) + return wxNewId() + +def RegisterId(ID): + import warnings + warnings.warn("Use wxRegisterId instead", DeprecationWarning, 2) + return wxRegisterId(ID) + + + +# Use Python's bool constants if available, make aliases if not +try: + True +except NameError: + True = 1==1 + False = 1==0 + +# Backwards compaatible +TRUE = true = True +FALSE = false = False + + #---------------------------------------------------------------------- # wxGTK sets the locale when initialized. Doing this at the Python # level should set it up to match what GTK is doing at the C level. @@ -1540,7 +1617,11 @@ if wxPlatform == "__WXGTK__": except: pass - +if wxPlatform == "__WXMSW__": + import os + localedir = os.path.join(os.path.split(__file__)[0], "locale") + wxLocale_AddCatalogLookupPathPrefix(localedir) + del os #---------------------------------------------------------------------- # wxWindows version numbers. wxPython version is in __version__. @@ -1592,6 +1673,18 @@ def wxPyTypeCast(obj, typeStr): theObj.thisown = obj.thisown return theObj +#---------------------------------------------------------------------------- +# An isinstance for Pythons < 2.2 that can check a sequence of class objects +# like the one in 2.2 can. + +def wxPy_isinstance(obj, klasses): + import types + if sys.version[:3] < "2.2" and type(klasses) in [types.TupleType, types.ListType]: + for klass in klasses: + if isinstance(obj, klass): return True + return False + else: + return isinstance(obj, klasses) #---------------------------------------------------------------------------- _wxCallAfterId = None @@ -1617,6 +1710,9 @@ def wxCallAfter(callable, *args, **kw): evt.kw = kw wxPostEvent(app, evt) +# an alias +wxRunLater = wxCallAfter + #---------------------------------------------------------------------- class wxPyDeadObjectError(AttributeError): @@ -1676,7 +1772,7 @@ class wxPyOnDemandOutputWindow: self.text = wxTextCtrl(self.frame, -1, "", style = wxTE_MULTILINE|wxTE_READONLY) self.frame.SetSize(wxSize(450, 300)) - self.frame.Show(true) + self.frame.Show(True) EVT_CLOSE(self.frame, self.OnCloseWindow) self.text.AppendText(str) @@ -1697,12 +1793,17 @@ class wxApp(wxPyApp): error = 'wxApp.error' outputWindowClass = wxPyOnDemandOutputWindow - def __init__(self, redirect=_defRedirect, filename=None): + def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False): wxPyApp.__init__(self) self.stdioWin = None self.saveStdio = (sys.stdout, sys.stderr) + + # This has to be done before OnInit + self.SetUseBestVisual(useBestVisual) + if redirect: self.RedirectStdio(filename) + # this initializes wxWindows and then calls our OnInit _wxStart(self.OnInit) @@ -1729,7 +1830,7 @@ class wxApp(wxPyApp): if filename: sys.stdout = sys.stderr = open(filename, 'a') else: - self.stdioWin = self.outputWindowClass() # wxPyOnDemandOutputWindow + self.stdioWin = self.outputWindowClass() sys.stdout = sys.stderr = self.stdioWin @@ -1737,6 +1838,21 @@ class wxApp(wxPyApp): sys.stdout, sys.stderr = self.saveStdio +# change from wxPyApp_ to wxApp_ +wxApp_GetMacDefaultEncodingIsPC = wxc.wxPyApp_GetMacDefaultEncodingIsPC +wxApp_GetMacSupportPCMenuShortcuts = wxc.wxPyApp_GetMacSupportPCMenuShortcuts +wxApp_GetMacAboutMenuItemId = wxc.wxPyApp_GetMacAboutMenuItemId +wxApp_GetMacPreferencesMenuItemId = wxc.wxPyApp_GetMacPreferencesMenuItemId +wxApp_GetMacExitMenuItemId = wxc.wxPyApp_GetMacExitMenuItemId +wxApp_GetMacHelpMenuTitleName = wxc.wxPyApp_GetMacHelpMenuTitleName +wxApp_SetMacDefaultEncodingIsPC = wxc.wxPyApp_SetMacDefaultEncodingIsPC +wxApp_SetMacSupportPCMenuShortcuts = wxc.wxPyApp_SetMacSupportPCMenuShortcuts +wxApp_SetMacAboutMenuItemId = wxc.wxPyApp_SetMacAboutMenuItemId +wxApp_SetMacPreferencesMenuItemId = wxc.wxPyApp_SetMacPreferencesMenuItemId +wxApp_SetMacExitMenuItemId = wxc.wxPyApp_SetMacExitMenuItemId +wxApp_SetMacHelpMenuTitleName = wxc.wxPyApp_SetMacHelpMenuTitleName + + #---------------------------------------------------------------------------- class wxPySimpleApp(wxApp): @@ -1744,7 +1860,7 @@ class wxPySimpleApp(wxApp): wxApp.__init__(self, flag) def OnInit(self): wxInitAllImageHandlers() - return true + return True class wxPyWidgetTester(wxApp): @@ -1755,11 +1871,11 @@ class wxPyWidgetTester(wxApp): def OnInit(self): self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size) self.SetTopWindow(self.frame) - return true + return True def SetWidget(self, widgetClass, *args): w = apply(widgetClass, (self.frame,) + args) - self.frame.Show(true) + self.frame.Show(True) #---------------------------------------------------------------------------- # DO NOT hold any other references to this object. This is how we -- 2.45.2