X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4268f79856cbe66b8ad31b86ee183879cede98e3..d84a9306f0c1a8d535053ef03d9d416660d3251a:/wxPython/src/msw/windows3.cpp diff --git a/wxPython/src/msw/windows3.cpp b/wxPython/src/msw/windows3.cpp index 2b0c1c96ae..41a235941a 100644 --- a/wxPython/src/msw/windows3.cpp +++ b/wxPython/src/msw/windows3.cpp @@ -19,6 +19,8 @@ /* Implementation : PYTHON */ #define SWIGPYTHON +#include "Python.h" + #include #include /* Definitions for Windows/Unix exporting */ @@ -36,12 +38,9 @@ # define SWIGEXPORT(a) a #endif -#include "Python.h" - #ifdef __cplusplus extern "C" { #endif - extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -90,11 +89,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { return target; } -#if PYTHON_API_VERSION >= 1009 - static char* wxStringErrorMsg = "String or Unicode type required"; -#else - static char* wxStringErrorMsg = "String type required"; -#endif + // Put some wx default wxChar* values into wxStrings. + static const wxChar* wxSashNameStr = wxT("sashWindow"); + DECLARE_DEF_STRING(SashNameStr); + static const wxChar* wxSashLayoutNameStr = wxT("layoutWindow"); + DECLARE_DEF_STRING(SashLayoutNameStr); class wxPyPopupTransientWindow : public wxPopupTransientWindow { @@ -105,11 +104,13 @@ public: DEC_PYCALLBACK_BOOL_ME(ProcessLeftDown); DEC_PYCALLBACK__(OnDismiss); + DEC_PYCALLBACK_BOOL_(CanDismiss); PYPRIVATE; }; IMP_PYCALLBACK_BOOL_ME(wxPyPopupTransientWindow, wxPopupTransientWindow, ProcessLeftDown); IMP_PYCALLBACK__(wxPyPopupTransientWindow, wxPopupTransientWindow, OnDismiss); +IMP_PYCALLBACK_BOOL_(wxPyPopupTransientWindow, wxPopupTransientWindow, CanDismiss); #ifdef __cplusplus extern "C" { #endif @@ -151,7 +152,7 @@ static PyObject *_wrap_new_wxSashEvent(PyObject *self, PyObject *args, PyObject return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashEvent *)new_wxSashEvent(_arg0,_arg1); + _result = (wxSashEvent *)new_wxSashEvent(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -185,7 +186,7 @@ static PyObject *_wrap_wxSashEvent_SetEdge(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashEvent_SetEdge(_arg0,_arg1); + wxSashEvent_SetEdge(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -214,7 +215,7 @@ static PyObject *_wrap_wxSashEvent_GetEdge(PyObject *self, PyObject *args, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashEdgePosition )wxSashEvent_GetEdge(_arg0); + _result = (wxSashEdgePosition )wxSashEvent_GetEdge(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -249,7 +250,7 @@ static PyObject *_wrap_wxSashEvent_SetDragRect(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashEvent_SetDragRect(_arg0,*_arg1); + wxSashEvent_SetDragRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -279,7 +280,7 @@ static PyObject *_wrap_wxSashEvent_GetDragRect(PyObject *self, PyObject *args, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxSashEvent_GetDragRect(_arg0)); + _result = new wxRect (wxSashEvent_GetDragRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -308,7 +309,7 @@ static PyObject *_wrap_wxSashEvent_SetDragStatus(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashEvent_SetDragStatus(_arg0,_arg1); + wxSashEvent_SetDragStatus(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -337,7 +338,7 @@ static PyObject *_wrap_wxSashEvent_GetDragStatus(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashDragStatus )wxSashEvent_GetDragStatus(_arg0); + _result = (wxSashDragStatus )wxSashEvent_GetDragStatus(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -378,17 +379,18 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxCLIP_CHILDREN|(wxSW_3D); - char * _arg5 = (char *) "sashWindow"; + wxString * _arg5 = (wxString *) &wxPySashNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; + PyObject * _obj5 = 0; char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxSashWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlO:new_wxSashWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -408,10 +410,16 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject _arg3 = &temp0; if (! wxSize_helper(_obj3, &_arg3)) return NULL; +} + if (_obj5) +{ + _arg5 = wxString_in_helper(_obj5); + if (_arg5 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashWindow *)new_wxSashWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSashWindow *)new_wxSashWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -422,6 +430,10 @@ static PyObject *_wrap_new_wxSashWindow(PyObject *self, PyObject *args, PyObject Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj5) + delete _arg5; +} return _resultobj; } @@ -437,7 +449,7 @@ static PyObject *_wrap_new_wxPreSashWindow(PyObject *self, PyObject *args, PyObj return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashWindow *)new_wxPreSashWindow(); + _result = (wxSashWindow *)new_wxPreSashWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -461,17 +473,18 @@ static PyObject *_wrap_wxSashWindow_Create(PyObject *self, PyObject *args, PyObj wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxCLIP_CHILDREN|(wxSW_3D); - char * _arg6 = (char *) "sashWindow"; + wxString * _arg6 = (wxString *) &wxPySashNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxSashWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlO:wxSashWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -498,14 +511,24 @@ static PyObject *_wrap_wxSashWindow_Create(PyObject *self, PyObject *args, PyObj _arg4 = &temp0; if (! wxSize_helper(_obj4, &_arg4)) return NULL; +} + if (_obj6) +{ + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSashWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -530,7 +553,7 @@ static PyObject *_wrap_wxSashWindow_GetSashVisible(PyObject *self, PyObject *arg } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashWindow_GetSashVisible(_arg0,_arg1); + _result = (bool )wxSashWindow_GetSashVisible(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -558,7 +581,7 @@ static PyObject *_wrap_wxSashWindow_GetDefaultBorderSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetDefaultBorderSize(_arg0); + _result = (int )wxSashWindow_GetDefaultBorderSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -587,7 +610,7 @@ static PyObject *_wrap_wxSashWindow_GetEdgeMargin(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetEdgeMargin(_arg0,_arg1); + _result = (int )wxSashWindow_GetEdgeMargin(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -615,7 +638,7 @@ static PyObject *_wrap_wxSashWindow_GetExtraBorderSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetExtraBorderSize(_arg0); + _result = (int )wxSashWindow_GetExtraBorderSize(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -643,7 +666,7 @@ static PyObject *_wrap_wxSashWindow_GetMaximumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMaximumSizeX(_arg0); + _result = (int )wxSashWindow_GetMaximumSizeX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -671,7 +694,7 @@ static PyObject *_wrap_wxSashWindow_GetMaximumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMaximumSizeY(_arg0); + _result = (int )wxSashWindow_GetMaximumSizeY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -699,7 +722,7 @@ static PyObject *_wrap_wxSashWindow_GetMinimumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMinimumSizeX(_arg0); + _result = (int )wxSashWindow_GetMinimumSizeX(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -727,7 +750,7 @@ static PyObject *_wrap_wxSashWindow_GetMinimumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxSashWindow_GetMinimumSizeY(_arg0); + _result = (int )wxSashWindow_GetMinimumSizeY(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -756,7 +779,7 @@ static PyObject *_wrap_wxSashWindow_HasBorder(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashWindow_HasBorder(_arg0,_arg1); + _result = (bool )wxSashWindow_HasBorder(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -784,7 +807,7 @@ static PyObject *_wrap_wxSashWindow_SetDefaultBorderSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetDefaultBorderSize(_arg0,_arg1); + wxSashWindow_SetDefaultBorderSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -813,7 +836,7 @@ static PyObject *_wrap_wxSashWindow_SetExtraBorderSize(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetExtraBorderSize(_arg0,_arg1); + wxSashWindow_SetExtraBorderSize(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -842,7 +865,7 @@ static PyObject *_wrap_wxSashWindow_SetMaximumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMaximumSizeX(_arg0,_arg1); + wxSashWindow_SetMaximumSizeX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -871,7 +894,7 @@ static PyObject *_wrap_wxSashWindow_SetMaximumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMaximumSizeY(_arg0,_arg1); + wxSashWindow_SetMaximumSizeY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -900,7 +923,7 @@ static PyObject *_wrap_wxSashWindow_SetMinimumSizeX(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMinimumSizeX(_arg0,_arg1); + wxSashWindow_SetMinimumSizeX(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -929,7 +952,7 @@ static PyObject *_wrap_wxSashWindow_SetMinimumSizeY(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetMinimumSizeY(_arg0,_arg1); + wxSashWindow_SetMinimumSizeY(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -961,7 +984,7 @@ static PyObject *_wrap_wxSashWindow_SetSashVisible(PyObject *self, PyObject *arg _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetSashVisible(_arg0,_arg1,_arg2); + wxSashWindow_SetSashVisible(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -993,7 +1016,7 @@ static PyObject *_wrap_wxSashWindow_SetSashBorder(PyObject *self, PyObject *args _arg2 = (bool ) tempbool2; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashWindow_SetSashBorder(_arg0,_arg1,_arg2); + wxSashWindow_SetSashBorder(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1031,7 +1054,7 @@ static PyObject *_wrap_new_wxQueryLayoutInfoEvent(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxQueryLayoutInfoEvent *)new_wxQueryLayoutInfoEvent(_arg0); + _result = (wxQueryLayoutInfoEvent *)new_wxQueryLayoutInfoEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1065,7 +1088,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetRequestedLength(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetRequestedLength(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetRequestedLength(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1094,7 +1117,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetRequestedLength(PyObject *self, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxQueryLayoutInfoEvent_GetRequestedLength(_arg0); + _result = (int )wxQueryLayoutInfoEvent_GetRequestedLength(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1122,7 +1145,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetFlags(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1151,7 +1174,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxQueryLayoutInfoEvent_GetFlags(_arg0); + _result = (int )wxQueryLayoutInfoEvent_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1186,7 +1209,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetSize(_arg0,*_arg1); + wxQueryLayoutInfoEvent_SetSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1216,7 +1239,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetSize(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxSize (wxQueryLayoutInfoEvent_GetSize(_arg0)); + _result = new wxSize (wxQueryLayoutInfoEvent_GetSize(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1245,7 +1268,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetOrientation(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetOrientation(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1274,7 +1297,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetOrientation(PyObject *self, PyO } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutOrientation )wxQueryLayoutInfoEvent_GetOrientation(_arg0); + _result = (wxLayoutOrientation )wxQueryLayoutInfoEvent_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1302,7 +1325,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_SetAlignment(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxQueryLayoutInfoEvent_SetAlignment(_arg0,_arg1); + wxQueryLayoutInfoEvent_SetAlignment(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1331,7 +1354,7 @@ static PyObject *_wrap_wxQueryLayoutInfoEvent_GetAlignment(PyObject *self, PyObj } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutAlignment )wxQueryLayoutInfoEvent_GetAlignment(_arg0); + _result = (wxLayoutAlignment )wxQueryLayoutInfoEvent_GetAlignment(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1368,7 +1391,7 @@ static PyObject *_wrap_new_wxCalculateLayoutEvent(PyObject *self, PyObject *args return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxCalculateLayoutEvent *)new_wxCalculateLayoutEvent(_arg0); + _result = (wxCalculateLayoutEvent *)new_wxCalculateLayoutEvent(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1402,7 +1425,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_SetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalculateLayoutEvent_SetFlags(_arg0,_arg1); + wxCalculateLayoutEvent_SetFlags(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1431,7 +1454,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_GetFlags(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (int )wxCalculateLayoutEvent_GetFlags(_arg0); + _result = (int )wxCalculateLayoutEvent_GetFlags(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1466,7 +1489,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_SetRect(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCalculateLayoutEvent_SetRect(_arg0,*_arg1); + wxCalculateLayoutEvent_SetRect(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1496,7 +1519,7 @@ static PyObject *_wrap_wxCalculateLayoutEvent_GetRect(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = new wxRect (wxCalculateLayoutEvent_GetRect(_arg0)); + _result = new wxRect (wxCalculateLayoutEvent_GetRect(_arg0)); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1546,17 +1569,18 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition; wxSize * _arg3 = (wxSize *) &wxDefaultSize; long _arg4 = (long ) wxCLIP_CHILDREN|(wxSW_3D); - char * _arg5 = (char *) "layoutWindow"; + wxString * _arg5 = (wxString *) &wxPySashLayoutNameStr; PyObject * _argo0 = 0; wxPoint temp; PyObject * _obj2 = 0; wxSize temp0; PyObject * _obj3 = 0; + PyObject * _obj5 = 0; char *_kwnames[] = { "parent","id","pos","size","style","name", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOls:new_wxSashLayoutWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_arg5)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|OOlO:new_wxSashLayoutWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_arg4,&_obj5)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1576,10 +1600,16 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py _arg3 = &temp0; if (! wxSize_helper(_obj3, &_arg3)) return NULL; +} + if (_obj5) +{ + _arg5 = wxString_in_helper(_obj5); + if (_arg5 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashLayoutWindow *)new_wxSashLayoutWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,_arg5); + _result = (wxSashLayoutWindow *)new_wxSashLayoutWindow(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1590,6 +1620,10 @@ static PyObject *_wrap_new_wxSashLayoutWindow(PyObject *self, PyObject *args, Py Py_INCREF(Py_None); _resultobj = Py_None; } +{ + if (_obj5) + delete _arg5; +} return _resultobj; } @@ -1605,7 +1639,7 @@ static PyObject *_wrap_new_wxPreSashLayoutWindow(PyObject *self, PyObject *args, return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxSashLayoutWindow *)new_wxPreSashLayoutWindow(); + _result = (wxSashLayoutWindow *)new_wxPreSashLayoutWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1629,17 +1663,18 @@ static PyObject *_wrap_wxSashLayoutWindow_Create(PyObject *self, PyObject *args, wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; wxSize * _arg4 = (wxSize *) &wxDefaultSize; long _arg5 = (long ) wxCLIP_CHILDREN|(wxSW_3D); - char * _arg6 = (char *) "layoutWindow"; + wxString * _arg6 = (wxString *) &wxPySashLayoutNameStr; PyObject * _argo0 = 0; PyObject * _argo1 = 0; wxPoint temp; PyObject * _obj3 = 0; wxSize temp0; PyObject * _obj4 = 0; + PyObject * _obj6 = 0; char *_kwnames[] = { "self","parent","id","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOls:wxSashLayoutWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOi|OOlO:wxSashLayoutWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_arg5,&_obj6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1666,14 +1701,24 @@ static PyObject *_wrap_wxSashLayoutWindow_Create(PyObject *self, PyObject *args, _arg4 = &temp0; if (! wxSize_helper(_obj4, &_arg4)) return NULL; +} + if (_obj6) +{ + _arg6 = wxString_in_helper(_obj6); + if (_arg6 == NULL) + return NULL; } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxSashLayoutWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (bool )wxSashLayoutWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,_arg5,*_arg6); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; } _resultobj = Py_BuildValue("i",_result); +{ + if (_obj6) + delete _arg6; +} return _resultobj; } @@ -1697,7 +1742,7 @@ static PyObject *_wrap_wxSashLayoutWindow_GetAlignment(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutAlignment )wxSashLayoutWindow_GetAlignment(_arg0); + _result = (wxLayoutAlignment )wxSashLayoutWindow_GetAlignment(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1725,7 +1770,7 @@ static PyObject *_wrap_wxSashLayoutWindow_GetOrientation(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutOrientation )wxSashLayoutWindow_GetOrientation(_arg0); + _result = (wxLayoutOrientation )wxSashLayoutWindow_GetOrientation(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1753,7 +1798,7 @@ static PyObject *_wrap_wxSashLayoutWindow_SetAlignment(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashLayoutWindow_SetAlignment(_arg0,_arg1); + wxSashLayoutWindow_SetAlignment(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1789,7 +1834,7 @@ static PyObject *_wrap_wxSashLayoutWindow_SetDefaultSize(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashLayoutWindow_SetDefaultSize(_arg0,*_arg1); + wxSashLayoutWindow_SetDefaultSize(_arg0,*_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1818,7 +1863,7 @@ static PyObject *_wrap_wxSashLayoutWindow_SetOrientation(PyObject *self, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxSashLayoutWindow_SetOrientation(_arg0,_arg1); + wxSashLayoutWindow_SetOrientation(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1847,7 +1892,7 @@ static PyObject *_wrap_new_wxLayoutAlgorithm(PyObject *self, PyObject *args, PyO return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxLayoutAlgorithm *)new_wxLayoutAlgorithm(); + _result = (wxLayoutAlgorithm *)new_wxLayoutAlgorithm(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1880,7 +1925,7 @@ static PyObject *_wrap_delete_wxLayoutAlgorithm(PyObject *self, PyObject *args, } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete_wxLayoutAlgorithm(_arg0); + delete_wxLayoutAlgorithm(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1927,7 +1972,7 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutMDIFrame(PyObject *self, PyObject } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLayoutAlgorithm_LayoutMDIFrame(_arg0,_arg1,_arg2); + _result = (bool )wxLayoutAlgorithm_LayoutMDIFrame(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -1973,7 +2018,7 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutFrame(PyObject *self, PyObject *a } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLayoutAlgorithm_LayoutFrame(_arg0,_arg1,_arg2); + _result = (bool )wxLayoutAlgorithm_LayoutFrame(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2019,7 +2064,7 @@ static PyObject *_wrap_wxLayoutAlgorithm_LayoutWindow(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxLayoutAlgorithm_LayoutWindow(_arg0,_arg1,_arg2); + _result = (bool )wxLayoutAlgorithm_LayoutWindow(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2073,7 +2118,7 @@ static PyObject *_wrap_new_wxPopupWindow(PyObject *self, PyObject *args, PyObjec } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPopupWindow *)new_wxPopupWindow(_arg0,_arg1); + _result = (wxPopupWindow *)new_wxPopupWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2099,7 +2144,7 @@ static PyObject *_wrap_new_wxPrePopupWindow(PyObject *self, PyObject *args, PyOb return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPopupWindow *)new_wxPrePopupWindow(); + _result = (wxPopupWindow *)new_wxPrePopupWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2143,7 +2188,7 @@ static PyObject *_wrap_wxPopupWindow_Create(PyObject *self, PyObject *args, PyOb } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (bool )wxPopupWindow_Create(_arg0,_arg1,_arg2); + _result = (bool )wxPopupWindow_Create(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2186,7 +2231,7 @@ static PyObject *_wrap_wxPopupWindow_Position(PyObject *self, PyObject *args, Py } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupWindow_Position(_arg0,*_arg1,*_arg2); + wxPopupWindow_Position(_arg0,*_arg1,*_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2249,7 +2294,7 @@ static PyObject *_wrap_new_wxPopupTransientWindow(PyObject *self, PyObject *args } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPopupTransientWindow *)new_wxPopupTransientWindow(_arg0,_arg1); + _result = (wxPyPopupTransientWindow *)new_wxPopupTransientWindow(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2275,7 +2320,7 @@ static PyObject *_wrap_new_wxPrePopupTransientWindow(PyObject *self, PyObject *a return NULL; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxPyPopupTransientWindow *)new_wxPrePopupTransientWindow(); + _result = (wxPyPopupTransientWindow *)new_wxPrePopupTransientWindow(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2318,7 +2363,7 @@ static PyObject *_wrap_wxPopupTransientWindow__setCallbackInfo(PyObject *self, P } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupTransientWindow__setCallbackInfo(_arg0,_arg1,_arg2); + wxPopupTransientWindow__setCallbackInfo(_arg0,_arg1,_arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2355,7 +2400,7 @@ static PyObject *_wrap_wxPopupTransientWindow_Popup(PyObject *self, PyObject *ar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupTransientWindow_Popup(_arg0,_arg1); + wxPopupTransientWindow_Popup(_arg0,_arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2383,7 +2428,7 @@ static PyObject *_wrap_wxPopupTransientWindow_Dismiss(PyObject *self, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxPopupTransientWindow_Dismiss(_arg0); + wxPopupTransientWindow_Dismiss(_arg0); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2432,20 +2477,27 @@ static void *SwigwxTipWindowTowxObject(void *ptr) { return (void *) dest; } -#define new_wxTipWindow(_swigarg0,_swigarg1,_swigarg2) (new wxTipWindow(_swigarg0,_swigarg1,_swigarg2)) +static wxTipWindow *new_wxTipWindow(wxWindow *parent,const wxString *text,wxCoord maxLength,wxRect *rectBound) { + wxString tmp = *text; + return new wxTipWindow(parent, tmp, maxLength, NULL, rectBound); + } + static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxTipWindow * _result; wxWindow * _arg0; wxString * _arg1; wxCoord _arg2 = (wxCoord ) 100; + wxRect * _arg3 = (wxRect *) NULL; PyObject * _argo0 = 0; PyObject * _obj1 = 0; - char *_kwnames[] = { "parent","text","maxLength", NULL }; + wxRect temp; + PyObject * _obj3 = 0; + char *_kwnames[] = { "parent","text","maxLength","rectBound", NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:new_wxTipWindow",_kwnames,&_argo0,&_obj1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|iO:new_wxTipWindow",_kwnames,&_argo0,&_obj1,&_arg2,&_obj3)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -2455,26 +2507,19 @@ static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject } } { -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + _arg1 = wxString_in_helper(_obj1); + if (_arg1 == NULL) return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); +} + if (_obj3) +{ + _arg3 = &temp; + if (! wxRect_helper(_obj3, &_arg3)) return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - _result = (wxTipWindow *)new_wxTipWindow(_arg0,*_arg1,_arg2); + _result = (wxTipWindow *)new_wxTipWindow(_arg0,_arg1,_arg2,_arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; @@ -2492,7 +2537,73 @@ static PyObject *_wrap_new_wxTipWindow(PyObject *self, PyObject *args, PyObject return _resultobj; } +#define wxTipWindow_SetBoundingRect(_swigobj,_swigarg0) (_swigobj->SetBoundingRect(_swigarg0)) +static PyObject *_wrap_wxTipWindow_SetBoundingRect(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTipWindow * _arg0; + wxRect * _arg1; + PyObject * _argo0 = 0; + wxRect temp; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","rectBound", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTipWindow_SetBoundingRect",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTipWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTipWindow_SetBoundingRect. Expected _wxTipWindow_p."); + return NULL; + } + } +{ + _arg1 = &temp; + if (! wxRect_helper(_obj1, &_arg1)) + return NULL; +} +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTipWindow_SetBoundingRect(_arg0,*_arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxTipWindow_Close(_swigobj) (_swigobj->Close()) +static PyObject *_wrap_wxTipWindow_Close(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxTipWindow * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTipWindow_Close",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTipWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTipWindow_Close. Expected _wxTipWindow_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTipWindow_Close(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + static PyMethodDef windows3cMethods[] = { + { "wxTipWindow_Close", (PyCFunction) _wrap_wxTipWindow_Close, METH_VARARGS | METH_KEYWORDS }, + { "wxTipWindow_SetBoundingRect", (PyCFunction) _wrap_wxTipWindow_SetBoundingRect, METH_VARARGS | METH_KEYWORDS }, { "new_wxTipWindow", (PyCFunction) _wrap_new_wxTipWindow, METH_VARARGS | METH_KEYWORDS }, { "wxPopupTransientWindow_Dismiss", (PyCFunction) _wrap_wxPopupTransientWindow_Dismiss, METH_VARARGS | METH_KEYWORDS }, { "wxPopupTransientWindow_Popup", (PyCFunction) _wrap_wxPopupTransientWindow_Popup, METH_VARARGS | METH_KEYWORDS },