From b67a93277892e8226d8e59162a14564f661843f6 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 25 Mar 2003 07:04:05 +0000 Subject: [PATCH] SWIGged updates for wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/dllwidget/dllwidget.py | 2 +- wxPython/contrib/dllwidget/dllwidget_.cpp | 7 +- wxPython/contrib/glcanvas/gtk/glcanvas.cpp | 49 +- wxPython/contrib/glcanvas/gtk/glcanvas.py | 9 +- wxPython/contrib/stc/gtk/stc_.cpp | 140 +- wxPython/contrib/stc/gtk/stc_.py | 131 +- wxPython/src/gtk/calendar.cpp | 32 +- wxPython/src/gtk/calendar.py | 1 + wxPython/src/gtk/clip_dnd.cpp | 153 +- wxPython/src/gtk/clip_dnd.py | 42 +- wxPython/src/gtk/cmndlgs.cpp | 40 +- wxPython/src/gtk/cmndlgs.py | 27 +- wxPython/src/gtk/controls.cpp | 262 ++- wxPython/src/gtk/controls.py | 23 +- wxPython/src/gtk/controls2.cpp | 445 ++++-- wxPython/src/gtk/controls2.py | 55 +- wxPython/src/gtk/events.cpp | 49 +- wxPython/src/gtk/events.py | 31 +- wxPython/src/gtk/filesys.cpp | 59 +- wxPython/src/gtk/filesys.py | 5 +- wxPython/src/gtk/fonts.cpp | 660 ++++++-- wxPython/src/gtk/fonts.py | 124 +- wxPython/src/gtk/frames.cpp | 52 +- wxPython/src/gtk/frames.py | 4 +- wxPython/src/gtk/gdi.cpp | 1209 ++++++++------ wxPython/src/gtk/gdi.py | 262 ++- wxPython/src/gtk/grid.cpp | 656 +++++++- wxPython/src/gtk/grid.py | 78 +- wxPython/src/gtk/help.cpp | 11 +- wxPython/src/gtk/help.py | 10 +- wxPython/src/gtk/html.cpp | 301 +++- wxPython/src/gtk/html.py | 44 +- wxPython/src/gtk/htmlhelp.cpp | 25 +- wxPython/src/gtk/htmlhelp.py | 18 +- wxPython/src/gtk/image.cpp | 72 +- wxPython/src/gtk/image.py | 12 +- wxPython/src/gtk/mdi.cpp | 5 +- wxPython/src/gtk/misc.cpp | 1665 +++++++++++++++++--- wxPython/src/gtk/misc.py | 270 +++- wxPython/src/gtk/misc2.cpp | 505 +++--- wxPython/src/gtk/misc2.py | 174 +- wxPython/src/gtk/printfw.cpp | 29 +- wxPython/src/gtk/printfw.py | 36 +- wxPython/src/gtk/sizers.cpp | 1636 +++++++++++++++---- wxPython/src/gtk/sizers.py | 228 ++- wxPython/src/gtk/stattool.cpp | 51 +- wxPython/src/gtk/stattool.py | 6 +- wxPython/src/gtk/streams.cpp | 243 ++- wxPython/src/gtk/streams.py | 28 +- wxPython/src/gtk/utils.cpp | 189 ++- wxPython/src/gtk/utils.py | 71 +- wxPython/src/gtk/windows.cpp | 265 ++-- wxPython/src/gtk/windows.py | 20 +- wxPython/src/gtk/windows2.cpp | 34 +- wxPython/src/gtk/windows3.cpp | 5 +- wxPython/src/gtk/windows3.py | 9 +- wxPython/src/gtk/wizard.cpp | 100 +- wxPython/src/gtk/wizard.py | 14 + wxPython/src/gtk/wx.cpp | 393 ++++- wxPython/src/gtk/wx.py | 158 +- 60 files changed, 8162 insertions(+), 3072 deletions(-) diff --git a/wxPython/contrib/dllwidget/dllwidget.py b/wxPython/contrib/dllwidget/dllwidget.py index 63b7609f9c..df51cc6a54 100644 --- a/wxPython/contrib/dllwidget/dllwidget.py +++ b/wxPython/contrib/dllwidget/dllwidget.py @@ -1,5 +1,5 @@ # The SWIG module is named dllwidget_ to avoid name clashes, so -# this stub just imports everything in it so the firendly module +# this stub just imports everything in it so the friendly module # name can be used elsewhere. from dllwidget_ import * diff --git a/wxPython/contrib/dllwidget/dllwidget_.cpp b/wxPython/contrib/dllwidget/dllwidget_.cpp index 9137b4dab8..9eec61d582 100644 --- a/wxPython/contrib/dllwidget/dllwidget_.cpp +++ b/wxPython/contrib/dllwidget/dllwidget_.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 *); @@ -314,7 +313,7 @@ static PyObject *_wrap_wxDllWidget_GetDllExt(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 diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas.cpp index 9131be07ce..aba8e8edbe 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.cpp +++ b/wxPython/contrib/glcanvas/gtk/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; } @@ -312,8 +320,7 @@ static PyObject *_wrap_wxGLContext_SetupPalette(PyObject *self, PyObject *args, } } 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 wxGLContext_SetupPalette. Expected _wxPalette_p."); return NULL; } @@ -512,8 +519,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; } @@ -616,8 +622,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; } @@ -677,12 +682,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; } @@ -691,14 +697,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; } diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas.py b/wxPython/contrib/glcanvas/gtk/glcanvas.py index 43722496a2..3f0bd13708 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas.py +++ b/wxPython/contrib/glcanvas/gtk/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/gtk/stc_.cpp b/wxPython/contrib/stc/gtk/stc_.cpp index 037cc4df62..f522a3d620 100644 --- a/wxPython/contrib/stc/gtk/stc_.cpp +++ b/wxPython/contrib/stc/gtk/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/gtk/stc_.py b/wxPython/contrib/stc/gtk/stc_.py index 283ac7527d..a3a4fef4a9 100644 --- a/wxPython/contrib/stc/gtk/stc_.py +++ b/wxPython/contrib/stc/gtk/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/src/gtk/calendar.cpp b/wxPython/src/gtk/calendar.cpp index 2251d3f2f4..85f1971fc2 100644 --- a/wxPython/src/gtk/calendar.cpp +++ b/wxPython/src/gtk/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/gtk/calendar.py b/wxPython/src/gtk/calendar.py index f20a55db56..355ee1bfa5 100644 --- a/wxPython/src/gtk/calendar.py +++ b/wxPython/src/gtk/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/gtk/clip_dnd.cpp b/wxPython/src/gtk/clip_dnd.cpp index e02f3636bd..dfbd2b20e4 100644 --- a/wxPython/src/gtk/clip_dnd.cpp +++ b/wxPython/src/gtk/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); } @@ -204,15 +203,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() { } @@ -535,7 +536,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 @@ -711,36 +712,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; @@ -748,45 +757,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; @@ -818,8 +817,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; } @@ -862,8 +860,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; } @@ -899,8 +896,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; } @@ -977,8 +973,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; } @@ -1023,8 +1018,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; } @@ -1263,7 +1257,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 @@ -1442,8 +1436,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; } @@ -1514,8 +1507,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; } @@ -1568,8 +1560,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; } @@ -1732,8 +1723,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; } @@ -1957,7 +1947,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 @@ -2220,8 +2210,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; } @@ -2257,8 +2246,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; } @@ -2358,19 +2346,23 @@ static PyObject *_wrap_wxClipboard_UsePrimarySelection(PyObject *self, PyObject return _resultobj; } -#define new_wxDropSource(_swigarg0,_swigarg1) (new wxPyDropSource(_swigarg0,_swigarg1)) +#define new_wxDropSource(_swigarg0,_swigarg1,_swigarg2,_swigarg3) (new wxPyDropSource(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) static PyObject *_wrap_new_wxDropSource(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPyDropSource * _result; wxWindow * _arg0 = (wxWindow *) NULL; wxIcon * _arg1 = (wxIcon *) &wxNullIcon; + wxIcon * _arg2 = (wxIcon *) &wxNullIcon; + wxIcon * _arg3 = (wxIcon *) &wxNullIcon; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "win","go", NULL }; + PyObject * _argo2 = 0; + PyObject * _argo3 = 0; + char *_kwnames[] = { "win","copy","move","none", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OO:new_wxDropSource",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OOOO:new_wxDropSource",_kwnames,&_argo0,&_argo1,&_argo2,&_argo3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2380,15 +2372,26 @@ 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,"_wxIcon_p")) { + if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxDropSource. Expected _wxIcon_p."); return NULL; } } + if (_argo2) { + if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of new_wxDropSource. Expected _wxIcon_p."); + return NULL; + } + } + if (_argo3) { + if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of new_wxDropSource. Expected _wxIcon_p."); + return NULL; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyDropSource *)new_wxDropSource(_arg0,*_arg1); + _result = (wxPyDropSource *)new_wxDropSource(_arg0,*_arg1,*_arg2,*_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2489,8 +2492,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; } @@ -2562,8 +2564,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; } @@ -3502,8 +3503,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/gtk/clip_dnd.py b/wxPython/src/gtk/clip_dnd.py index b909a3028f..d77b5da68d 100644 --- a/wxPython/src/gtk/clip_dnd.py +++ b/wxPython/src/gtk/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 @@ -330,9 +336,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 @@ -380,9 +389,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/gtk/cmndlgs.cpp b/wxPython/src/gtk/cmndlgs.cpp index 847d2aad57..a0670156ea 100644 --- a/wxPython/src/gtk/cmndlgs.cpp +++ b/wxPython/src/gtk/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/gtk/cmndlgs.py b/wxPython/src/gtk/cmndlgs.py index f1c5c95ea7..9555d3bc82 100644 --- a/wxPython/src/gtk/cmndlgs.py +++ b/wxPython/src/gtk/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/gtk/controls.cpp b/wxPython/src/gtk/controls.cpp index 66f0208270..336a7ddb98 100644 --- a/wxPython/src/gtk/controls.cpp +++ b/wxPython/src/gtk/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; } @@ -1369,8 +1362,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; } @@ -1388,8 +1380,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; } @@ -1488,8 +1479,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; } @@ -1507,8 +1497,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; } @@ -1673,8 +1662,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; } @@ -1710,8 +1698,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; } @@ -1747,8 +1734,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; } @@ -1784,8 +1770,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; } @@ -1970,8 +1955,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; } @@ -2091,8 +2075,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; } @@ -2149,6 +2132,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; @@ -2274,8 +2285,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; } @@ -2405,8 +2415,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; } @@ -2729,8 +2738,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; } @@ -2872,8 +2880,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; } @@ -3051,7 +3058,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 @@ -3459,7 +3466,7 @@ static PyObject *_wrap_wxComboBox_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 @@ -3563,7 +3570,7 @@ static PyObject *_wrap_wxComboBox_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 @@ -3779,8 +3786,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; } @@ -3890,8 +3896,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; } @@ -4796,7 +4801,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 @@ -4940,8 +4945,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; } @@ -5071,8 +5075,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; } @@ -5643,8 +5646,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; } @@ -5774,8 +5776,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; } @@ -6044,8 +6045,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; } @@ -6186,8 +6186,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; } @@ -6421,15 +6420,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; } @@ -6536,8 +6533,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; } @@ -6658,8 +6654,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; } @@ -6714,7 +6709,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 @@ -6792,7 +6787,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 @@ -6859,7 +6854,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 @@ -7028,7 +7023,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 @@ -7373,8 +7368,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; } @@ -7412,8 +7406,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; } @@ -7449,8 +7442,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; } @@ -8218,7 +8210,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 @@ -8305,8 +8297,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; } @@ -8415,8 +8406,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; } @@ -9046,8 +9036,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; } @@ -9156,8 +9145,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; } @@ -9244,8 +9232,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; } @@ -9281,8 +9268,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; } @@ -9392,8 +9378,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; } @@ -9535,8 +9520,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; } @@ -9705,45 +9689,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()); -#else - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -#endif -} -{ - delete _result; -} - return _resultobj; -} - -#define wxRadioBox_GetItemLabel(_swigobj,_swigarg0) (_swigobj->GetLabel(_swigarg0)) -static PyObject *_wrap_wxRadioBox_GetItemLabel(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxRadioBox * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","item", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxRadioBox_GetItemLabel",_kwnames,&_argo0,&_arg1)) - 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_GetItemLabel. Expected _wxRadioBox_p."); - return NULL; - } - } -{ - PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxRadioBox_GetItemLabel(_arg0,_arg1)); - - wxPyEndAllowThreads(__tstate); - 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 @@ -9754,23 +9700,23 @@ static PyObject *_wrap_wxRadioBox_GetItemLabel(PyObject *self, PyObject *args, P return _resultobj; } -#define wxRadioBox_SetItemLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabel(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxRadioBox_SetItemLabel(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxRadioBox_SetString(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetString(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxRadioBox_SetString(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxRadioBox * _arg0; int _arg1; wxString * _arg2; PyObject * _argo0 = 0; PyObject * _obj2 = 0; - char *_kwnames[] = { "self","item","label", NULL }; + char *_kwnames[] = { "self","n","label", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxRadioBox_SetItemLabel",_kwnames,&_argo0,&_arg1,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO:wxRadioBox_SetString",_kwnames,&_argo0,&_arg1,&_obj2)) 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_SetItemLabel. Expected _wxRadioBox_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetString. Expected _wxRadioBox_p."); return NULL; } } @@ -9781,7 +9727,7 @@ static PyObject *_wrap_wxRadioBox_SetItemLabel(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxRadioBox_SetItemLabel(_arg0,_arg1,*_arg2); + wxRadioBox_SetString(_arg0,_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -9848,7 +9794,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 @@ -10101,8 +10047,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; } @@ -10222,8 +10167,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; } @@ -10390,8 +10334,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; } @@ -10503,8 +10446,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; } @@ -11530,8 +11472,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; } @@ -11651,8 +11592,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; } @@ -11828,8 +11768,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_SetItemLabel", (PyCFunction) _wrap_wxRadioBox_SetItemLabel, METH_VARARGS | METH_KEYWORDS }, - { "wxRadioBox_GetItemLabel", (PyCFunction) _wrap_wxRadioBox_GetItemLabel, METH_VARARGS | METH_KEYWORDS }, + { "wxRadioBox_SetString", (PyCFunction) _wrap_wxRadioBox_SetString, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_GetString", (PyCFunction) _wrap_wxRadioBox_GetString, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_FindString", (PyCFunction) _wrap_wxRadioBox_FindString, METH_VARARGS | METH_KEYWORDS }, { "wxRadioBox_EnableItem", (PyCFunction) _wrap_wxRadioBox_EnableItem, METH_VARARGS | METH_KEYWORDS }, @@ -12008,6 +11947,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/gtk/controls.py b/wxPython/src/gtk/controls.py index a982e9dc16..d1b3ccc1bc 100644 --- a/wxPython/src/gtk/controls.py +++ b/wxPython/src/gtk/controls.py @@ -200,6 +200,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 @@ -595,9 +598,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 @@ -947,11 +953,8 @@ class wxRadioBoxPtr(wxControlPtr): def GetString(self, *_args, **_kwargs): val = apply(controlsc.wxRadioBox_GetString,(self,) + _args, _kwargs) return val - def GetItemLabel(self, *_args, **_kwargs): - val = apply(controlsc.wxRadioBox_GetItemLabel,(self,) + _args, _kwargs) - return val - def SetItemLabel(self, *_args, **_kwargs): - val = apply(controlsc.wxRadioBox_SetItemLabel,(self,) + _args, _kwargs) + def SetString(self, *_args, **_kwargs): + val = apply(controlsc.wxRadioBox_SetString,(self,) + _args, _kwargs) return val def GetSelection(self, *_args, **_kwargs): val = apply(controlsc.wxRadioBox_GetSelection,(self,) + _args, _kwargs) @@ -976,6 +979,10 @@ class wxRadioBoxPtr(wxControlPtr): return val def __repr__(self): return "" % (self.this,) + + GetItemLabel = GetString + SetItemLabel = SetString + Number = GetCount class wxRadioBox(wxRadioBoxPtr): def __init__(self,*_args,**_kwargs): diff --git a/wxPython/src/gtk/controls2.cpp b/wxPython/src/gtk/controls2.cpp index 29bb48cdc2..a4f1913505 100644 --- a/wxPython/src/gtk/controls2.cpp +++ b/wxPython/src/gtk/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; } @@ -3229,8 +3222,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; } @@ -3406,7 +3398,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 @@ -3721,6 +3713,38 @@ static PyObject *_wrap_wxListCtrl_GetItemSpacing(PyObject *self, PyObject *args, return _resultobj; } +#define wxListCtrl_SetItemSpacing(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemSpacing(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxListCtrl_SetItemSpacing(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyListCtrl * _arg0; + int _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","spacing","isSmall", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxListCtrl_SetItemSpacing",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemSpacing. Expected _wxPyListCtrl_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListCtrl_SetItemSpacing(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxListCtrl_GetSelectedItemCount(_swigobj) (_swigobj->GetSelectedItemCount()) static PyObject *_wrap_wxListCtrl_GetSelectedItemCount(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4298,6 +4322,35 @@ static PyObject *_wrap_wxListCtrl_ClearAll(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxListCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) +static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyListCtrl * _arg0; + long _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","item", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxListCtrl_EditLabel",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_EditLabel. Expected _wxPyListCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListCtrl_EditLabel(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxListCtrl_EnsureVisible(_swigobj,_swigarg0) (_swigobj->EnsureVisible(_swigarg0)) static PyObject *_wrap_wxListCtrl_EnsureVisible(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4505,8 +4558,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; } @@ -4654,8 +4706,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; } @@ -5062,8 +5113,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; } @@ -5172,8 +5222,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; } @@ -5463,8 +5512,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; } @@ -5577,8 +5625,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; } @@ -6049,8 +6096,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; } @@ -6307,7 +6353,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 @@ -6419,8 +6465,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; } @@ -6529,8 +6574,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; } @@ -6960,8 +7004,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; } @@ -6974,7 +7017,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 @@ -7007,8 +7050,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; } @@ -7044,8 +7086,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; } @@ -7082,8 +7123,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; } @@ -7130,8 +7170,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; } @@ -7168,8 +7207,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; } @@ -7207,8 +7245,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; } @@ -7255,8 +7292,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; } @@ -7302,8 +7338,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; } @@ -7355,8 +7390,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; } @@ -7403,8 +7437,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; } @@ -7423,6 +7456,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; @@ -7444,8 +7591,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; } @@ -7481,8 +7627,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; } @@ -7518,8 +7663,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; } @@ -7555,8 +7699,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; } @@ -7631,7 +7774,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; @@ -7653,8 +7796,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; } @@ -7678,7 +7820,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(); @@ -7736,8 +7878,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; } @@ -7778,8 +7919,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; } @@ -7830,8 +7970,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; } @@ -7878,8 +8017,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; } @@ -7917,8 +8055,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; } @@ -7986,8 +8123,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; } @@ -8025,8 +8161,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; } @@ -8064,8 +8199,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; } @@ -8161,8 +8295,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; } @@ -8224,15 +8357,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; } @@ -8293,8 +8424,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; } @@ -8354,8 +8484,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; } @@ -8407,8 +8536,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; } @@ -8444,8 +8572,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; } @@ -8509,8 +8636,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; } @@ -8546,8 +8672,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; } @@ -8583,8 +8708,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; } @@ -8620,8 +8744,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; } @@ -8713,8 +8836,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; } @@ -8750,8 +8872,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; } @@ -8787,8 +8908,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; } @@ -8804,6 +8924,34 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObj return _resultobj; } +#define wxTreeCtrl_GetEditControl(_swigobj) (_swigobj->GetEditControl()) +static PyObject *_wrap_wxTreeCtrl_GetEditControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTextCtrl * _result; + wxPyTreeCtrl * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + 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_GetEditControl. Expected _wxPyTreeCtrl_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxTextCtrl *)wxTreeCtrl_GetEditControl(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + #define wxTreeCtrl_EditLabel(_swigobj,_swigarg0) (_swigobj->EditLabel(_swigarg0)) static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -8824,8 +8972,7 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(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_EditLabel. Expected _wxTreeItemId_p."); return NULL; } @@ -8861,8 +9008,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; } @@ -8899,8 +9045,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; } @@ -8937,8 +9082,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; } @@ -9024,8 +9168,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; } @@ -9069,8 +9212,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; } @@ -9113,15 +9255,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; } @@ -9142,7 +9282,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; } @@ -9172,8 +9312,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; } @@ -9321,7 +9460,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 @@ -9359,7 +9498,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 @@ -9400,7 +9539,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 @@ -9438,7 +9577,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 @@ -9932,7 +10071,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 @@ -10008,7 +10147,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 @@ -10045,7 +10184,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 @@ -10180,7 +10319,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 @@ -10650,6 +10789,7 @@ static PyMethodDef controls2cMethods[] = { { "wxTreeCtrl_SetItemBold", (PyCFunction) _wrap_wxTreeCtrl_SetItemBold, METH_VARARGS | METH_KEYWORDS }, { "wxTreeCtrl_SortChildren", (PyCFunction) _wrap_wxTreeCtrl_SortChildren, 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 }, @@ -10684,6 +10824,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 }, @@ -10767,6 +10910,7 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_FindItemData", (PyCFunction) _wrap_wxListCtrl_FindItemData, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_FindItem", (PyCFunction) _wrap_wxListCtrl_FindItem, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_EnsureVisible", (PyCFunction) _wrap_wxListCtrl_EnsureVisible, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_EditLabel", (PyCFunction) _wrap_wxListCtrl_EditLabel, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_ClearAll", (PyCFunction) _wrap_wxListCtrl_ClearAll, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_DeleteAllColumns", (PyCFunction) _wrap_wxListCtrl_DeleteAllColumns, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_DeleteColumn", (PyCFunction) _wrap_wxListCtrl_DeleteColumn, METH_VARARGS | METH_KEYWORDS }, @@ -10786,6 +10930,7 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_SetTextColour", (PyCFunction) _wrap_wxListCtrl_SetTextColour, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetTextColour", (PyCFunction) _wrap_wxListCtrl_GetTextColour, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetSelectedItemCount", (PyCFunction) _wrap_wxListCtrl_GetSelectedItemCount, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_SetItemSpacing", (PyCFunction) _wrap_wxListCtrl_SetItemSpacing, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetItemSpacing", (PyCFunction) _wrap_wxListCtrl_GetItemSpacing, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetColumnCount", (PyCFunction) _wrap_wxListCtrl_GetColumnCount, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetItemCount", (PyCFunction) _wrap_wxListCtrl_GetItemCount, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/controls2.py b/wxPython/src/gtk/controls2.py index f46d4b0da1..fcbe7ee362 100644 --- a/wxPython/src/gtk/controls2.py +++ b/wxPython/src/gtk/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 @@ -511,6 +514,9 @@ class wxListCtrlPtr(wxControlPtr): def GetItemSpacing(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetItemSpacing,(self,) + _args, _kwargs) return val + def SetItemSpacing(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_SetItemSpacing,(self,) + _args, _kwargs) + return val def GetSelectedItemCount(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetSelectedItemCount,(self,) + _args, _kwargs) return val @@ -570,6 +576,9 @@ class wxListCtrlPtr(wxControlPtr): def ClearAll(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_ClearAll,(self,) + _args, _kwargs) return val + def EditLabel(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_EditLabel,(self,) + _args, _kwargs) + return val def EnsureVisible(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_EnsureVisible,(self,) + _args, _kwargs) return val @@ -661,6 +670,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 @@ -678,10 +695,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): @@ -796,9 +817,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 @@ -962,6 +986,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 @@ -1078,6 +1114,9 @@ class wxTreeCtrlPtr(wxControlPtr): def ScrollTo(self, *_args, **_kwargs): val = apply(controls2c.wxTreeCtrl_ScrollTo,(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 diff --git a/wxPython/src/gtk/events.cpp b/wxPython/src/gtk/events.cpp index cf58c0d255..f7c973ba7d 100644 --- a/wxPython/src/gtk/events.cpp +++ b/wxPython/src/gtk/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/gtk/events.py b/wxPython/src/gtk/events.py index 402df0334c..3f52c08034 100644 --- a/wxPython/src/gtk/events.py +++ b/wxPython/src/gtk/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/gtk/filesys.cpp b/wxPython/src/gtk/filesys.cpp index 2ff2002e06..2471de188f 100644 --- a/wxPython/src/gtk/filesys.cpp +++ b/wxPython/src/gtk/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/gtk/filesys.py b/wxPython/src/gtk/filesys.py index d1d52ee1fe..8950e6059b 100644 --- a/wxPython/src/gtk/filesys.py +++ b/wxPython/src/gtk/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/gtk/fonts.cpp b/wxPython/src/gtk/fonts.cpp index 4a10db9ff8..22c656c837 100644 --- a/wxPython/src/gtk/fonts.cpp +++ b/wxPython/src/gtk/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 @@ -173,47 +198,146 @@ static PyObject *_wrap_wxGetTranslation(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxNativeFontInfo_FromXFontName(_swigobj,_swigarg0) (_swigobj->FromXFontName(_swigarg0)) -static PyObject *_wrap_wxNativeFontInfo_FromXFontName(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxNativeFontInfo() (new wxNativeFontInfo()) +static PyObject *_wrap_new_wxNativeFontInfo(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNativeFontInfo * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxNativeFontInfo",_kwnames)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxNativeFontInfo *)new_wxNativeFontInfo(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxNativeFontInfo_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxNativeFontInfo_Init(_swigobj) (_swigobj->Init()) +static PyObject *_wrap_wxNativeFontInfo_Init(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; wxNativeFontInfo * _arg0; - wxString * _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","xFontName", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNativeFontInfo_FromXFontName",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_Init",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_FromXFontName. Expected _wxNativeFontInfo_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_Init. Expected _wxNativeFontInfo_p."); return NULL; } } { - _arg1 = wxString_in_helper(_obj1); - if (_arg1 == NULL) - return NULL; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxNativeFontInfo_Init(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; } + +#define wxNativeFontInfo_GetPointSize(_swigobj) (_swigobj->GetPointSize()) +static PyObject *_wrap_wxNativeFontInfo_GetPointSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + int _result; + wxNativeFontInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetPointSize",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetPointSize. Expected _wxNativeFontInfo_p."); + return NULL; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNativeFontInfo_FromXFontName(_arg0,*_arg1); + _result = (int )wxNativeFontInfo_GetPointSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNativeFontInfo_GetStyle(_swigobj) (_swigobj->GetStyle()) +static PyObject *_wrap_wxNativeFontInfo_GetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontStyle _result; + wxNativeFontInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetStyle",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetStyle. Expected _wxNativeFontInfo_p."); + return NULL; + } + } { - if (_obj1) - delete _arg1; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFontStyle )wxNativeFontInfo_GetStyle(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; } + +#define wxNativeFontInfo_GetWeight(_swigobj) (_swigobj->GetWeight()) +static PyObject *_wrap_wxNativeFontInfo_GetWeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontWeight _result; + wxNativeFontInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetWeight",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetWeight. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFontWeight )wxNativeFontInfo_GetWeight(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxNativeFontInfo_IsDefault(_swigobj) (_swigobj->IsDefault()) -static PyObject *_wrap_wxNativeFontInfo_IsDefault(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNativeFontInfo_GetUnderlined(_swigobj) (_swigobj->GetUnderlined()) +static PyObject *_wrap_wxNativeFontInfo_GetUnderlined(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxNativeFontInfo * _arg0; @@ -221,18 +345,18 @@ static PyObject *_wrap_wxNativeFontInfo_IsDefault(PyObject *self, PyObject *args char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_IsDefault",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetUnderlined",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_IsDefault. Expected _wxNativeFontInfo_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetUnderlined. Expected _wxNativeFontInfo_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxNativeFontInfo_IsDefault(_arg0); + _result = (bool )wxNativeFontInfo_GetUnderlined(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -240,8 +364,8 @@ static PyObject *_wrap_wxNativeFontInfo_IsDefault(PyObject *self, PyObject *args return _resultobj; } -#define wxNativeFontInfo_GetXFontName(_swigobj) (_swigobj->GetXFontName()) -static PyObject *_wrap_wxNativeFontInfo_GetXFontName(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNativeFontInfo_GetFaceName(_swigobj) (_swigobj->GetFaceName()) +static PyObject *_wrap_wxNativeFontInfo_GetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxString * _result; wxNativeFontInfo * _arg0; @@ -249,24 +373,24 @@ static PyObject *_wrap_wxNativeFontInfo_GetXFontName(PyObject *self, PyObject *a char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetXFontName",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetFaceName",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetXFontName. Expected _wxNativeFontInfo_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetFaceName. Expected _wxNativeFontInfo_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxString (wxNativeFontInfo_GetXFontName(_arg0)); + _result = new wxString (wxNativeFontInfo_GetFaceName(_arg0)); wxPyEndAllowThreads(__tstate); 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 @@ -277,22 +401,196 @@ static PyObject *_wrap_wxNativeFontInfo_GetXFontName(PyObject *self, PyObject *a return _resultobj; } -#define wxNativeFontInfo_SetXFontName(_swigobj,_swigarg0) (_swigobj->SetXFontName(_swigarg0)) -static PyObject *_wrap_wxNativeFontInfo_SetXFontName(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNativeFontInfo_GetFamily(_swigobj) (_swigobj->GetFamily()) +static PyObject *_wrap_wxNativeFontInfo_GetFamily(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontFamily _result; + wxNativeFontInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetFamily",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetFamily. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFontFamily )wxNativeFontInfo_GetFamily(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNativeFontInfo_GetEncoding(_swigobj) (_swigobj->GetEncoding()) +static PyObject *_wrap_wxNativeFontInfo_GetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFontEncoding _result; + wxNativeFontInfo * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_GetEncoding",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_GetEncoding. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (wxFontEncoding )wxNativeFontInfo_GetEncoding(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxNativeFontInfo_SetPointSize(_swigobj,_swigarg0) (_swigobj->SetPointSize(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetPointSize(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNativeFontInfo * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","pointsize", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetPointSize",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetPointSize. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxNativeFontInfo_SetPointSize(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNativeFontInfo_SetStyle(_swigobj,_swigarg0) (_swigobj->SetStyle(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetStyle(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNativeFontInfo * _arg0; + wxFontStyle _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","style", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetStyle",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetStyle. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxNativeFontInfo_SetStyle(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNativeFontInfo_SetWeight(_swigobj,_swigarg0) (_swigobj->SetWeight(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetWeight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNativeFontInfo * _arg0; + wxFontWeight _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","weight", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetWeight",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetWeight. Expected _wxNativeFontInfo_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxNativeFontInfo_SetWeight(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNativeFontInfo_SetUnderlined(_swigobj,_swigarg0) (_swigobj->SetUnderlined(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetUnderlined(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxNativeFontInfo * _arg0; + bool _arg1; + PyObject * _argo0 = 0; + int tempbool1; + char *_kwnames[] = { "self","underlined", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetUnderlined",_kwnames,&_argo0,&tempbool1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetUnderlined. Expected _wxNativeFontInfo_p."); + return NULL; + } + } + _arg1 = (bool ) tempbool1; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxNativeFontInfo_SetUnderlined(_arg0,_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxNativeFontInfo_SetFaceName(_swigobj,_swigarg0) (_swigobj->SetFaceName(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxNativeFontInfo * _arg0; wxString * _arg1; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "self","xFontName", NULL }; + char *_kwnames[] = { "self","facename", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNativeFontInfo_SetXFontName",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxNativeFontInfo_SetFaceName",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetXFontName. Expected _wxNativeFontInfo_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetFaceName. Expected _wxNativeFontInfo_p."); return NULL; } } @@ -303,7 +601,7 @@ static PyObject *_wrap_wxNativeFontInfo_SetXFontName(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_SetXFontName(_arg0,*_arg1); + wxNativeFontInfo_SetFaceName(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -316,52 +614,56 @@ static PyObject *_wrap_wxNativeFontInfo_SetXFontName(PyObject *self, PyObject *a return _resultobj; } -#define new_wxNativeFontInfo() (new wxNativeFontInfo()) -static PyObject *_wrap_new_wxNativeFontInfo(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNativeFontInfo_SetFamily(_swigobj,_swigarg0) (_swigobj->SetFamily(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetFamily(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxNativeFontInfo * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; + wxNativeFontInfo * _arg0; + wxFontFamily _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","family", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxNativeFontInfo",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetFamily",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetFamily. Expected _wxNativeFontInfo_p."); return NULL; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxNativeFontInfo *)new_wxNativeFontInfo(); + wxNativeFontInfo_SetFamily(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxNativeFontInfo_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxNativeFontInfo_Init(_swigobj) (_swigobj->Init()) -static PyObject *_wrap_wxNativeFontInfo_Init(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxNativeFontInfo_SetEncoding(_swigobj,_swigarg0) (_swigobj->SetEncoding(_swigarg0)) +static PyObject *_wrap_wxNativeFontInfo_SetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxNativeFontInfo * _arg0; + wxFontEncoding _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","encoding", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxNativeFontInfo_Init",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxNativeFontInfo_SetEncoding",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxNativeFontInfo_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_Init. Expected _wxNativeFontInfo_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNativeFontInfo_SetEncoding. Expected _wxNativeFontInfo_p."); return NULL; } } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxNativeFontInfo_Init(_arg0); + wxNativeFontInfo_SetEncoding(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -435,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 @@ -474,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 @@ -550,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 @@ -828,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 @@ -856,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 @@ -1035,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 @@ -1111,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; } @@ -1133,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; @@ -1355,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 @@ -1483,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 @@ -1520,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 @@ -1766,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; } @@ -1848,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 @@ -1885,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 @@ -1922,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 @@ -1933,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; @@ -2458,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 @@ -2496,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 @@ -2537,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 @@ -2575,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 @@ -2611,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; @@ -2630,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; } } @@ -2660,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; @@ -2680,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; } @@ -2760,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 @@ -2825,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 @@ -2890,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 @@ -2927,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 @@ -3081,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; } @@ -3139,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 @@ -3185,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 @@ -3319,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 @@ -3409,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 }, @@ -3431,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 }, @@ -3456,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 }, @@ -3477,12 +3919,22 @@ static PyMethodDef fontscMethods[] = { { "wxNativeFontInfo___str__", (PyCFunction) _wrap_wxNativeFontInfo___str__, METH_VARARGS | METH_KEYWORDS }, { "wxNativeFontInfo_ToString", (PyCFunction) _wrap_wxNativeFontInfo_ToString, METH_VARARGS | METH_KEYWORDS }, { "wxNativeFontInfo_FromString", (PyCFunction) _wrap_wxNativeFontInfo_FromString, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetEncoding", (PyCFunction) _wrap_wxNativeFontInfo_SetEncoding, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetFamily", (PyCFunction) _wrap_wxNativeFontInfo_SetFamily, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetFaceName", (PyCFunction) _wrap_wxNativeFontInfo_SetFaceName, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetUnderlined", (PyCFunction) _wrap_wxNativeFontInfo_SetUnderlined, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetWeight", (PyCFunction) _wrap_wxNativeFontInfo_SetWeight, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetStyle", (PyCFunction) _wrap_wxNativeFontInfo_SetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_SetPointSize", (PyCFunction) _wrap_wxNativeFontInfo_SetPointSize, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetEncoding", (PyCFunction) _wrap_wxNativeFontInfo_GetEncoding, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetFamily", (PyCFunction) _wrap_wxNativeFontInfo_GetFamily, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetFaceName", (PyCFunction) _wrap_wxNativeFontInfo_GetFaceName, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetUnderlined", (PyCFunction) _wrap_wxNativeFontInfo_GetUnderlined, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetWeight", (PyCFunction) _wrap_wxNativeFontInfo_GetWeight, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetStyle", (PyCFunction) _wrap_wxNativeFontInfo_GetStyle, METH_VARARGS | METH_KEYWORDS }, + { "wxNativeFontInfo_GetPointSize", (PyCFunction) _wrap_wxNativeFontInfo_GetPointSize, METH_VARARGS | METH_KEYWORDS }, { "wxNativeFontInfo_Init", (PyCFunction) _wrap_wxNativeFontInfo_Init, METH_VARARGS | METH_KEYWORDS }, { "new_wxNativeFontInfo", (PyCFunction) _wrap_new_wxNativeFontInfo, METH_VARARGS | METH_KEYWORDS }, - { "wxNativeFontInfo_SetXFontName", (PyCFunction) _wrap_wxNativeFontInfo_SetXFontName, METH_VARARGS | METH_KEYWORDS }, - { "wxNativeFontInfo_GetXFontName", (PyCFunction) _wrap_wxNativeFontInfo_GetXFontName, METH_VARARGS | METH_KEYWORDS }, - { "wxNativeFontInfo_IsDefault", (PyCFunction) _wrap_wxNativeFontInfo_IsDefault, METH_VARARGS | METH_KEYWORDS }, - { "wxNativeFontInfo_FromXFontName", (PyCFunction) _wrap_wxNativeFontInfo_FromXFontName, METH_VARARGS | METH_KEYWORDS }, { "wxGetTranslation", (PyCFunction) _wrap_wxGetTranslation, METH_VARARGS | METH_KEYWORDS }, { "wxGetLocale", (PyCFunction) _wrap_wxGetLocale, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } @@ -3661,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/gtk/fonts.py b/wxPython/src/gtk/fonts.py index 71e013f9c6..4f2f474f91 100644 --- a/wxPython/src/gtk/fonts.py +++ b/wxPython/src/gtk/fonts.py @@ -6,20 +6,50 @@ class wxNativeFontInfoPtr : def __init__(self,this): self.this = this self.thisown = 0 - def FromXFontName(self, *_args, **_kwargs): - val = apply(fontsc.wxNativeFontInfo_FromXFontName,(self,) + _args, _kwargs) + def Init(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_Init,(self,) + _args, _kwargs) return val - def IsDefault(self, *_args, **_kwargs): - val = apply(fontsc.wxNativeFontInfo_IsDefault,(self,) + _args, _kwargs) + def GetPointSize(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_GetPointSize,(self,) + _args, _kwargs) return val - def GetXFontName(self, *_args, **_kwargs): - val = apply(fontsc.wxNativeFontInfo_GetXFontName,(self,) + _args, _kwargs) + def GetStyle(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_GetStyle,(self,) + _args, _kwargs) return val - def SetXFontName(self, *_args, **_kwargs): - val = apply(fontsc.wxNativeFontInfo_SetXFontName,(self,) + _args, _kwargs) + def GetWeight(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_GetWeight,(self,) + _args, _kwargs) return val - def Init(self, *_args, **_kwargs): - val = apply(fontsc.wxNativeFontInfo_Init,(self,) + _args, _kwargs) + def GetUnderlined(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_GetUnderlined,(self,) + _args, _kwargs) + return val + def GetFaceName(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_GetFaceName,(self,) + _args, _kwargs) + return val + def GetFamily(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_GetFamily,(self,) + _args, _kwargs) + return val + def GetEncoding(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_GetEncoding,(self,) + _args, _kwargs) + return val + def SetPointSize(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_SetPointSize,(self,) + _args, _kwargs) + return val + def SetStyle(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_SetStyle,(self,) + _args, _kwargs) + return val + def SetWeight(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_SetWeight,(self,) + _args, _kwargs) + return val + def SetUnderlined(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_SetUnderlined,(self,) + _args, _kwargs) + return val + def SetFaceName(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_SetFaceName,(self,) + _args, _kwargs) + return val + def SetFamily(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_SetFamily,(self,) + _args, _kwargs) + return val + def SetEncoding(self, *_args, **_kwargs): + val = apply(fontsc.wxNativeFontInfo_SetEncoding,(self,) + _args, _kwargs) return val def FromString(self, *_args, **_kwargs): val = apply(fontsc.wxNativeFontInfo_FromString,(self,) + _args, _kwargs) @@ -50,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 @@ -88,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 @@ -164,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): @@ -209,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 @@ -274,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 @@ -309,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) @@ -321,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 @@ -453,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/gtk/frames.cpp b/wxPython/src/gtk/frames.cpp index f814996bb8..4ed6489256 100644 --- a/wxPython/src/gtk/frames.cpp +++ b/wxPython/src/gtk/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/gtk/frames.py b/wxPython/src/gtk/frames.py index 26b4e08cff..0fae1a5d20 100644 --- a/wxPython/src/gtk/frames.py +++ b/wxPython/src/gtk/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/gtk/gdi.cpp b/wxPython/src/gtk/gdi.cpp index 430f4145bc..c4e48dacdf 100644 --- a/wxPython/src/gtk/gdi.cpp +++ b/wxPython/src/gtk/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) { @@ -346,8 +353,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; } @@ -416,8 +422,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; } @@ -510,8 +515,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; } @@ -558,6 +562,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; @@ -2003,8 +2040,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; } @@ -2040,8 +2076,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; } @@ -2433,8 +2468,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; } @@ -2527,8 +2561,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; } @@ -2597,8 +2630,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; } @@ -2974,9 +3006,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) { @@ -3007,6 +3047,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; @@ -3095,7 +3213,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 @@ -3114,15 +3232,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 @@ -4207,8 +4325,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; } @@ -4476,13 +4593,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; @@ -4490,7 +4607,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; } @@ -4548,13 +4665,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; } @@ -4605,14 +4722,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; } @@ -4623,25 +4740,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; } @@ -4652,25 +4769,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; } @@ -4681,25 +4798,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; } @@ -4710,11 +4827,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; } @@ -4722,17 +4839,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; } @@ -4756,14 +4873,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; } @@ -4787,15 +4904,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; } @@ -4819,17 +4936,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; } @@ -4854,14 +4971,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; } @@ -4871,8 +4988,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; } @@ -4975,8 +5091,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; } @@ -5005,15 +5120,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; } @@ -5039,15 +5154,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; } @@ -5086,8 +5201,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; @@ -5095,7 +5210,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; } @@ -5132,13 +5247,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; } @@ -5162,15 +5277,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; } @@ -5272,16 +5387,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; } @@ -5351,14 +5466,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; } @@ -5476,8 +5591,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; @@ -5486,7 +5601,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; } @@ -5573,7 +5688,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 }; @@ -5590,18 +5705,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 }; @@ -5618,11 +5733,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; } @@ -5630,14 +5745,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 }; @@ -5886,7 +6001,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; @@ -5895,14 +6010,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; } @@ -6070,10 +6185,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 }; @@ -6129,14 +6244,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; @@ -6212,66 +6327,57 @@ 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; + } + } +{ + _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_GetUserScale(_arg0,_arg1,_arg2); + wxDC_GetMultiLineTextExtent(_arg0,*_arg1,_arg2,_arg3,_arg4,_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -6279,28 +6385,115 @@ static PyObject *_wrap_wxDC_GetUserScale(PyObject *self, PyObject *args, PyObjec _resultobj = Py_None; { PyObject *o; - o = PyFloat_FromDouble((double) (*_arg1)); + o = PyInt_FromLong((long) (*_arg2)); _resultobj = t_output_helper(_resultobj, o); } { PyObject *o; - o = PyFloat_FromDouble((double) (*_arg2)); + o = PyInt_FromLong((long) (*_arg3)); _resultobj = t_output_helper(_resultobj, o); } - return _resultobj; +{ + 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); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*_arg1)); + _resultobj = t_output_helper(_resultobj, o); +} +{ + PyObject *o; + o = PyFloat_FromDouble((double) (*_arg2)); + _resultobj = t_output_helper(_resultobj, o); +} + return _resultobj; } #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; } @@ -6311,25 +6504,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; } @@ -6340,25 +6533,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; } @@ -6369,25 +6562,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; } @@ -6398,18 +6591,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 }; @@ -6426,18 +6619,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 }; @@ -6454,18 +6647,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 }; @@ -6482,18 +6675,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 }; @@ -6510,11 +6703,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; } @@ -6550,13 +6743,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; } @@ -6596,8 +6789,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; } @@ -6646,15 +6838,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; } @@ -6694,8 +6886,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; } @@ -6767,8 +6958,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; } @@ -6804,8 +6994,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; } @@ -6841,8 +7030,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; } @@ -6997,8 +7185,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; } @@ -7188,15 +7375,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; } @@ -7206,8 +7393,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; } @@ -7622,110 +7808,123 @@ static PyObject *_wrap_wxDC_GetBoundingBox(PyObject *self, PyObject *args, PyObj 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; } } @@ -7735,9 +7934,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; @@ -7747,110 +7949,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; } } @@ -7860,9 +8077,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; @@ -7934,8 +8157,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; } @@ -7997,8 +8219,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; } @@ -8144,8 +8365,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; } @@ -8783,15 +9003,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; } @@ -8830,8 +9048,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; } @@ -8872,8 +9089,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; } @@ -8910,8 +9126,7 @@ 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; } @@ -8953,8 +9168,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; } @@ -9124,15 +9338,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(); @@ -9285,13 +9499,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; } @@ -9387,15 +9601,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; } @@ -9449,15 +9663,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; } @@ -9533,8 +9747,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; } @@ -9582,15 +9795,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; } @@ -9666,8 +9879,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; } @@ -9687,15 +9899,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; } @@ -9771,8 +9983,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; } @@ -9792,15 +10003,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; } @@ -9876,8 +10087,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; } @@ -9913,8 +10123,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; } @@ -9966,7 +10175,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 }; @@ -9983,18 +10192,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 }; @@ -10011,18 +10220,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 }; @@ -10039,18 +10248,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 }; @@ -10067,18 +10276,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 }; @@ -10095,18 +10304,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 }; @@ -10123,11 +10332,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; } @@ -10312,6 +10521,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_GetBoundingBox", (PyCFunction) _wrap_wxDC_GetBoundingBox, METH_VARARGS | METH_KEYWORDS }, @@ -10356,6 +10569,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 }, @@ -10443,6 +10657,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 }, @@ -10496,6 +10712,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/gtk/gdi.py b/wxPython/src/gtk/gdi.py index 364bb91b86..a5a770e9aa 100644 --- a/wxPython/src/gtk/gdi.py +++ b/wxPython/src/gtk/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) @@ -85,13 +92,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) @@ -121,9 +125,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 @@ -153,14 +160,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) @@ -173,9 +172,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 @@ -210,9 +212,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 Ok(self, *_args, **_kwargs): val = apply(gdic.wxCursor_Ok,(self,) + _args, _kwargs) return val @@ -229,9 +234,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 @@ -250,11 +258,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) @@ -290,9 +309,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 @@ -347,9 +369,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 @@ -393,9 +418,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 @@ -459,9 +487,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 @@ -615,6 +646,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 @@ -749,6 +783,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,) @@ -759,7 +805,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: @@ -768,7 +815,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): @@ -901,9 +1024,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 @@ -927,9 +1053,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 @@ -971,9 +1100,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 @@ -1054,9 +1186,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 @@ -1147,6 +1282,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/gtk/grid.cpp b/wxPython/src/gtk/grid.cpp index e0f5dd6baf..03315a8688 100644 --- a/wxPython/src/gtk/grid.cpp +++ b/wxPython/src/gtk/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/gtk/grid.py b/wxPython/src/gtk/grid.py index 7cbd1c0df1..1d15cdc4e6 100644 --- a/wxPython/src/gtk/grid.py +++ b/wxPython/src/gtk/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/gtk/help.cpp b/wxPython/src/gtk/help.cpp index 5d0570f0a4..c9770753d4 100644 --- a/wxPython/src/gtk/help.cpp +++ b/wxPython/src/gtk/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/gtk/help.py b/wxPython/src/gtk/help.py index add867a444..ac1612ba19 100644 --- a/wxPython/src/gtk/help.py +++ b/wxPython/src/gtk/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/gtk/html.cpp b/wxPython/src/gtk/html.cpp index 45ce76a2ad..b9de532bd3 100644 --- a/wxPython/src/gtk/html.cpp +++ b/wxPython/src/gtk/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/gtk/html.py b/wxPython/src/gtk/html.py index 09c3573b15..8766b132a2 100644 --- a/wxPython/src/gtk/html.py +++ b/wxPython/src/gtk/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/gtk/htmlhelp.cpp b/wxPython/src/gtk/htmlhelp.cpp index 263c8eef25..29ff3251a5 100644 --- a/wxPython/src/gtk/htmlhelp.cpp +++ b/wxPython/src/gtk/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/gtk/htmlhelp.py b/wxPython/src/gtk/htmlhelp.py index fd3a642bac..33fdd1e5df 100644 --- a/wxPython/src/gtk/htmlhelp.py +++ b/wxPython/src/gtk/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/gtk/image.cpp b/wxPython/src/gtk/image.cpp index 1d38d4311a..867fa4be08 100644 --- a/wxPython/src/gtk/image.cpp +++ b/wxPython/src/gtk/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/gtk/image.py b/wxPython/src/gtk/image.py index 51a559ae51..d19383f178 100644 --- a/wxPython/src/gtk/image.py +++ b/wxPython/src/gtk/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/gtk/mdi.cpp b/wxPython/src/gtk/mdi.cpp index 85ac9adc33..19b703bb87 100644 --- a/wxPython/src/gtk/mdi.cpp +++ b/wxPython/src/gtk/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/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp index 80e1ce3b82..c4c16c3099 100644 --- a/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/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; @@ -385,7 +341,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 @@ -498,7 +454,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 @@ -623,67 +579,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; @@ -707,7 +602,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 @@ -738,7 +633,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 @@ -765,7 +660,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 @@ -792,7 +687,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 @@ -819,7 +714,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 @@ -846,7 +741,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 @@ -873,7 +768,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 @@ -908,7 +803,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 @@ -1020,7 +915,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 @@ -1455,24 +1350,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; @@ -1480,13 +1377,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; @@ -1727,9 +1661,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; @@ -1758,7 +1691,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; @@ -1767,9 +1700,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; @@ -1798,7 +1730,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; @@ -1807,24 +1739,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; @@ -1832,13 +1766,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; @@ -2079,9 +2050,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; @@ -2110,7 +2080,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; @@ -2119,9 +2089,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; @@ -2150,7 +2119,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; @@ -2159,24 +2128,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; @@ -2184,13 +2155,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; @@ -2206,7 +2214,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; @@ -2823,8 +2831,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; @@ -2834,7 +2842,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; @@ -2843,7 +2851,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; @@ -2852,19 +2860,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; @@ -2873,26 +2880,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; @@ -2901,7 +2910,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; @@ -2909,26 +2918,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; @@ -2936,27 +2953,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; @@ -2964,17 +2988,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; @@ -2983,24 +3008,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; @@ -3101,6 +3272,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); @@ -3139,9 +3346,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; @@ -3170,7 +3376,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; @@ -3179,24 +3385,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; @@ -3204,13 +3412,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; @@ -3218,6 +3463,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; @@ -4254,9 +5396,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 }, @@ -4265,8 +5439,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 }, @@ -4289,7 +5468,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 }, @@ -4300,7 +5480,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 }, @@ -4311,7 +5492,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 }, @@ -4342,7 +5524,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 }, @@ -4360,8 +5541,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/gtk/misc.py b/wxPython/src/gtk/misc.py index 54223d7bf5..e1f06cc4f9 100644 --- a/wxPython/src/gtk/misc.py +++ b/wxPython/src/gtk/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 @@ -593,8 +787,6 @@ wxYieldIfNeeded = miscc.wxYieldIfNeeded wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows -wxGetResource = miscc.wxGetResource - wxStripMenuCodes = miscc.wxStripMenuCodes wxGetEmailAddress = miscc.wxGetEmailAddress diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index a5a461c8e2..0bc97d4c48 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/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; } @@ -1463,208 +1461,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; @@ -1706,11 +1502,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; } @@ -1719,9 +1517,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; @@ -1748,8 +1547,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; } @@ -1948,7 +1746,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 @@ -2104,6 +1902,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; @@ -2685,7 +2512,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 @@ -3498,7 +3325,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 @@ -3570,7 +3397,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 @@ -3681,15 +3508,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; } @@ -3725,15 +3550,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; } @@ -3774,8 +3597,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; } @@ -3815,15 +3637,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; } @@ -3858,8 +3678,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; } @@ -4002,8 +3821,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; @@ -4015,15 +3834,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; } } @@ -4035,20 +3854,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; @@ -5149,7 +4968,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 @@ -5232,6 +5051,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); @@ -5262,7 +5118,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 @@ -6478,7 +6334,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; } @@ -6513,7 +6369,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; } @@ -7149,7 +7005,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 @@ -8068,19 +7924,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; @@ -8091,6 +7971,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; } @@ -8117,11 +8013,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); } @@ -8306,7 +8201,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 @@ -8341,7 +8236,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 @@ -8376,7 +8271,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 @@ -8411,7 +8306,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 @@ -8446,7 +8341,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 @@ -8542,7 +8437,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 @@ -8591,8 +8486,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; } @@ -8617,7 +8511,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 @@ -8775,9 +8669,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 @@ -8821,7 +8715,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 @@ -8861,7 +8755,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 @@ -8924,7 +8818,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 @@ -9190,8 +9084,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; } @@ -9204,7 +9097,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 @@ -9609,8 +9502,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; } @@ -9648,8 +9540,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; } @@ -9983,24 +9874,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; @@ -10254,8 +10127,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; } @@ -10291,8 +10163,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; } @@ -10400,7 +10271,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 @@ -10923,8 +10794,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; } @@ -10976,15 +10846,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; } @@ -11215,7 +11083,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 }, @@ -11358,6 +11225,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 }, @@ -11401,7 +11270,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 }, @@ -11459,6 +11328,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 }, @@ -11476,15 +11346,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 }, { "wxFindWindowAtPoint", (PyCFunction) _wrap_wxFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS }, { "wxGenericFindWindowAtPoint", (PyCFunction) _wrap_wxGenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/misc2.py b/wxPython/src/gtk/misc2.py index d4e0d0c096..0780c1886a 100644 --- a/wxPython/src/gtk/misc2.py +++ b/wxPython/src/gtk/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 @@ -1186,32 +1232,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 @@ -1249,6 +1269,8 @@ wxLogMessage = misc2c.wxLogMessage wxLogInfo = misc2c.wxLogInfo +wxLogDebug = misc2c.wxLogDebug + wxLogVerbose = misc2c.wxLogVerbose wxLogStatus = misc2c.wxLogStatus @@ -1338,6 +1360,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 @@ -1367,8 +1393,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/gtk/printfw.cpp b/wxPython/src/gtk/printfw.cpp index c09e325013..de74f530b3 100644 --- a/wxPython/src/gtk/printfw.cpp +++ b/wxPython/src/gtk/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_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; } @@ -1626,8 +1624,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; } @@ -2627,8 +2624,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; } @@ -3434,8 +3430,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/gtk/printfw.py b/wxPython/src/gtk/printfw.py index 230d839866..b9bbff1719 100644 --- a/wxPython/src/gtk/printfw.py +++ b/wxPython/src/gtk/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 @@ -187,9 +190,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 @@ -319,9 +325,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 @@ -491,9 +500,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/gtk/sizers.cpp b/wxPython/src/gtk/sizers.cpp index 65d40d34b7..b7fd73d8aa 100644 --- a/wxPython/src/gtk/sizers.cpp +++ b/wxPython/src/gtk/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/gtk/sizers.py b/wxPython/src/gtk/sizers.py index 88d328f1d6..64306d0a6d 100644 --- a/wxPython/src/gtk/sizers.py +++ b/wxPython/src/gtk/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/gtk/stattool.cpp b/wxPython/src/gtk/stattool.cpp index fe798221e6..fe2caa0657 100644 --- a/wxPython/src/gtk/stattool.cpp +++ b/wxPython/src/gtk/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/gtk/stattool.py b/wxPython/src/gtk/stattool.py index cea709ed3e..0c74eee1b4 100644 --- a/wxPython/src/gtk/stattool.py +++ b/wxPython/src/gtk/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/gtk/streams.cpp b/wxPython/src/gtk/streams.cpp index ac2708efe7..388cc1e300 100644 --- a/wxPython/src/gtk/streams.cpp +++ b/wxPython/src/gtk/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/gtk/streams.py b/wxPython/src/gtk/streams.py index 6394f60946..d2a8b18800 100644 --- a/wxPython/src/gtk/streams.py +++ b/wxPython/src/gtk/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/gtk/utils.cpp b/wxPython/src/gtk/utils.cpp index 79b7f37f73..81b7b53b0e 100644 --- a/wxPython/src/gtk/utils.cpp +++ b/wxPython/src/gtk/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/gtk/utils.py b/wxPython/src/gtk/utils.py index da54031f64..5dc18f722d 100644 --- a/wxPython/src/gtk/utils.py +++ b/wxPython/src/gtk/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/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index c89603067a..be97b5e797 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/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 *); @@ -312,8 +311,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; } @@ -348,8 +346,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; } @@ -1549,6 +1546,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; @@ -1645,6 +1670,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; @@ -2165,7 +2218,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 @@ -2241,7 +2294,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 @@ -2726,7 +2779,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 @@ -3218,63 +3271,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; @@ -4208,8 +4204,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; } @@ -4754,6 +4749,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; @@ -4841,8 +4866,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; } @@ -5618,8 +5642,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; } @@ -5767,6 +5790,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; @@ -5949,7 +6002,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 @@ -6302,8 +6355,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; } @@ -7183,8 +7235,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; } @@ -8882,7 +8933,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 @@ -8959,7 +9010,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 @@ -9037,7 +9088,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 @@ -9978,6 +10029,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; @@ -10045,7 +10125,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 @@ -10363,7 +10443,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 @@ -10441,7 +10521,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 @@ -10708,7 +10788,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 @@ -10746,7 +10826,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 @@ -11146,7 +11226,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 @@ -11249,7 +11329,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 @@ -11284,8 +11364,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; } @@ -11377,6 +11456,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 }, @@ -11491,6 +11571,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 }, @@ -11523,6 +11604,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 }, @@ -11565,7 +11647,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 }, @@ -11613,9 +11694,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_IsBeingDeleted", (PyCFunction) _wrap_wxWindow_IsBeingDeleted, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_DestroyChildren", (PyCFunction) _wrap_wxWindow_DestroyChildren, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index 757dd2a53b..de800237a3 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -162,6 +162,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 @@ -171,6 +174,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 @@ -323,9 +329,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 @@ -454,6 +457,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 @@ -561,6 +568,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 @@ -977,6 +988,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/gtk/windows2.cpp b/wxPython/src/gtk/windows2.cpp index 39082ffe3c..5da5995de3 100644 --- a/wxPython/src/gtk/windows2.cpp +++ b/wxPython/src/gtk/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)) @@ -3254,8 +3253,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/gtk/windows3.cpp b/wxPython/src/gtk/windows3.cpp index e605e79535..4fe2badf76 100644 --- a/wxPython/src/gtk/windows3.cpp +++ b/wxPython/src/gtk/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/gtk/windows3.py b/wxPython/src/gtk/windows3.py index 994e73cca0..c7a571f564 100644 --- a/wxPython/src/gtk/windows3.py +++ b/wxPython/src/gtk/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/gtk/wizard.cpp b/wxPython/src/gtk/wizard.cpp index 013fc0e23c..fedb5d0455 100644 --- a/wxPython/src/gtk/wizard.cpp +++ b/wxPython/src/gtk/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/gtk/wizard.py b/wxPython/src/gtk/wizard.py index 391048f193..845cdb939f 100644 --- a/wxPython/src/gtk/wizard.py +++ b/wxPython/src/gtk/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/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index 22c5fa7251..0878d8ce00 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/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 @@ -1085,7 +1116,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 @@ -1206,7 +1237,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 @@ -1418,9 +1449,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; @@ -1689,7 +1720,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 }, @@ -1711,6 +2058,7 @@ static PyMethodDef wxcMethods[] = { { "wxPyApp_GetExitOnFrameDelete", (PyCFunction) _wrap_wxPyApp_GetExitOnFrameDelete, METH_VARARGS | METH_KEYWORDS }, { "wxPyApp_GetClassName", (PyCFunction) _wrap_wxPyApp_GetClassName, 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 }, @@ -1962,6 +2310,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)); @@ -2483,10 +2832,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)); @@ -2611,6 +2956,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. @@ -2619,7 +2968,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 @@ -2654,7 +3003,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/gtk/wx.py b/wxPython/src/gtk/wx.py index 627080b5ae..76811ff9d7 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/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 @@ -112,12 +118,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) @@ -146,11 +160,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 ------------------ @@ -271,6 +308,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 @@ -792,10 +830,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 @@ -920,13 +954,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 @@ -1057,6 +1095,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) @@ -1189,7 +1233,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) @@ -1513,17 +1557,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. @@ -1534,7 +1611,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__. @@ -1586,6 +1667,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 @@ -1611,6 +1704,9 @@ def wxCallAfter(callable, *args, **kw): evt.kw = kw wxPostEvent(app, evt) +# an alias +wxRunLater = wxCallAfter + #---------------------------------------------------------------------- class wxPyDeadObjectError(AttributeError): @@ -1670,7 +1766,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) @@ -1691,12 +1787,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) @@ -1723,7 +1824,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 @@ -1731,6 +1832,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): @@ -1738,7 +1854,7 @@ class wxPySimpleApp(wxApp): wxApp.__init__(self, flag) def OnInit(self): wxInitAllImageHandlers() - return true + return True class wxPyWidgetTester(wxApp): @@ -1749,11 +1865,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