From 03837c5c878d3e612e9c80dc46f37def0a0835d9 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 31 Jul 2004 22:27:09 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/mac/_core.py | 36 +++- wxPython/src/mac/_core_wrap.cpp | 282 +++++++---------------------- wxPython/src/mac/_gdi_wrap.cpp | 6 +- wxPython/src/mac/_misc.py | 17 +- wxPython/src/mac/_windows.py | 7 + wxPython/src/mac/_windows_wrap.cpp | 43 +++++ wxPython/src/msw/_core.py | 36 +++- wxPython/src/msw/_core_wrap.cpp | 282 +++++++---------------------- wxPython/src/msw/_misc.py | 17 +- wxPython/src/msw/_windows.py | 7 + wxPython/src/msw/_windows_wrap.cpp | 43 +++++ 11 files changed, 317 insertions(+), 459 deletions(-) diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index 9a8f5fe49e..6001f1ab0c 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -5980,9 +5980,8 @@ class Window(EvtHandler): """ return _core_.Window_FitInside(*args, **kwargs) - def SetSizeHints(*args): + def SetSizeHints(*args, **kwargs): """ - SetSizeHints(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1) @@ -5995,11 +5994,25 @@ class Window(EvtHandler): The resizing increments are only significant under Motif or Xt. """ - return _core_.Window_SetSizeHints(*args) + return _core_.Window_SetSizeHints(*args, **kwargs) + + def SetSizeHintsSz(*args, **kwargs): + """ + SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) + + Allows specification of minimum and maximum window sizes, and window + size increments. If a pair of values is not set (or set to -1), the + default values will be used. If this function is called, the user + will not be able to size the window outside the given bounds (if it is + a top-level window.) Sizers will also inspect the minimum window size + and will use that value if set when calculating layout. + + The resizing increments are only significant under Motif or Xt. + """ + return _core_.Window_SetSizeHintsSz(*args, **kwargs) - def SetVirtualSizeHints(*args): + def SetVirtualSizeHints(*args, **kwargs): """ - SetVirtualSizeHints(self, Size minSize, Size maxSize=DefaultSize) SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1) Allows specification of minimum and maximum virtual window sizes. If a @@ -6007,7 +6020,18 @@ class Window(EvtHandler): used. If this function is called, the user will not be able to size the virtual area of the window outside the given bounds. """ - return _core_.Window_SetVirtualSizeHints(*args) + return _core_.Window_SetVirtualSizeHints(*args, **kwargs) + + def SetVirtualSizeHintsSz(*args, **kwargs): + """ + SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize) + + Allows specification of minimum and maximum virtual window sizes. If a + pair of values is not set (or set to -1), the default values will be + used. If this function is called, the user will not be able to size + the virtual area of the window outside the given bounds. + """ + return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs) def GetMaxSize(*args, **kwargs): """GetMaxSize(self) -> Size""" diff --git a/wxPython/src/mac/_core_wrap.cpp b/wxPython/src/mac/_core_wrap.cpp index e57f83b554..da2f09a1b6 100644 --- a/wxPython/src/mac/_core_wrap.cpp +++ b/wxPython/src/mac/_core_wrap.cpp @@ -23162,56 +23162,7 @@ static PyObject *_wrap_Window_FitInside(PyObject *self, PyObject *args, PyObject } -static PyObject *_wrap_Window_SetSizeHints__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj; - wxWindow *arg1 = (wxWindow *) 0 ; - wxSize *arg2 = 0 ; - wxSize const &arg3_defvalue = wxDefaultSize ; - wxSize *arg3 = (wxSize *) &arg3_defvalue ; - wxSize const &arg4_defvalue = wxDefaultSize ; - wxSize *arg4 = (wxSize *) &arg4_defvalue ; - wxSize temp2 ; - wxSize temp3 ; - wxSize temp4 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if(!PyArg_ParseTuple(args,(char *)"OO|OO:Window_SetSizeHints",&obj0,&obj1,&obj2,&obj3)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - arg2 = &temp2; - if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail; - } - if (obj2) { - { - arg3 = &temp3; - if ( ! wxSize_helper(obj2, &arg3)) SWIG_fail; - } - } - if (obj3) { - { - arg4 = &temp4; - if ( ! wxSize_helper(obj3, &arg4)) SWIG_fail; - } - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetSizeHints((wxSize const &)*arg2,(wxSize const &)*arg3,(wxSize const &)*arg4); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_Window_SetSizeHints__SWIG_1(PyObject *self, PyObject *args) { +static PyObject *_wrap_Window_SetSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; int arg2 ; @@ -23227,8 +23178,11 @@ static PyObject *_wrap_Window_SetSizeHints__SWIG_1(PyObject *self, PyObject *arg PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "minW",(char *) "minH",(char *) "maxW",(char *) "maxH",(char *) "incW",(char *) "incH", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OOO|OOOO:Window_SetSizeHints",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Window_SetSizeHints",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); @@ -23265,115 +23219,26 @@ static PyObject *_wrap_Window_SetSizeHints__SWIG_1(PyObject *self, PyObject *arg } -static PyObject *_wrap_Window_SetSizeHints(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[8]; - int ii; - - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 7); ii++) { - argv[ii] = PyTuple_GetItem(args,ii); - } - if ((argc >= 2) && (argc <= 4)) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[1], wxT("wxSize"), 2); - } - if (_v) { - if (argc <= 2) { - return _wrap_Window_SetSizeHints__SWIG_0(self,args); - } - { - _v = wxPySimple_typecheck(argv[2], wxT("wxSize"), 2); - } - if (_v) { - if (argc <= 3) { - return _wrap_Window_SetSizeHints__SWIG_0(self,args); - } - { - _v = wxPySimple_typecheck(argv[3], wxT("wxSize"), 2); - } - if (_v) { - return _wrap_Window_SetSizeHints__SWIG_0(self,args); - } - } - } - } - } - if ((argc >= 3) && (argc <= 7)) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - _v = SWIG_CheckInt(argv[1]); - if (_v) { - _v = SWIG_CheckInt(argv[2]); - if (_v) { - if (argc <= 3) { - return _wrap_Window_SetSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[3]); - if (_v) { - if (argc <= 4) { - return _wrap_Window_SetSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[4]); - if (_v) { - if (argc <= 5) { - return _wrap_Window_SetSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[5]); - if (_v) { - if (argc <= 6) { - return _wrap_Window_SetSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[6]); - if (_v) { - return _wrap_Window_SetSizeHints__SWIG_1(self,args); - } - } - } - } - } - } - } - } - - PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'Window_SetSizeHints'"); - return NULL; -} - - -static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_0(PyObject *self, PyObject *args) { +static PyObject *_wrap_Window_SetSizeHintsSz(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; wxSize *arg2 = 0 ; wxSize const &arg3_defvalue = wxDefaultSize ; wxSize *arg3 = (wxSize *) &arg3_defvalue ; + wxSize const &arg4_defvalue = wxDefaultSize ; + wxSize *arg4 = (wxSize *) &arg4_defvalue ; wxSize temp2 ; wxSize temp3 ; + wxSize temp4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "minSize",(char *) "maxSize",(char *) "incSize", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OO|O:Window_SetVirtualSizeHints",&obj0,&obj1,&obj2)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:Window_SetSizeHintsSz",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { @@ -23386,9 +23251,15 @@ static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_0(PyObject *self, PyObje if ( ! wxSize_helper(obj2, &arg3)) SWIG_fail; } } + if (obj3) { + { + arg4 = &temp4; + if ( ! wxSize_helper(obj3, &arg4)) SWIG_fail; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetVirtualSizeHints((wxSize const &)*arg2,(wxSize const &)*arg3); + (arg1)->SetSizeHints((wxSize const &)*arg2,(wxSize const &)*arg3,(wxSize const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -23400,7 +23271,7 @@ static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_0(PyObject *self, PyObje } -static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_1(PyObject *self, PyObject *args) { +static PyObject *_wrap_Window_SetVirtualSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; int arg2 ; @@ -23412,8 +23283,11 @@ static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_1(PyObject *self, PyObje PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "minW",(char *) "minH",(char *) "maxW",(char *) "maxH", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OOO|OO:Window_SetVirtualSizeHints",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:Window_SetVirtualSizeHints",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); @@ -23442,78 +23316,44 @@ static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_1(PyObject *self, PyObje } -static PyObject *_wrap_Window_SetVirtualSizeHints(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[6]; - int ii; +static PyObject *_wrap_Window_SetVirtualSizeHintsSz(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + wxSize *arg2 = 0 ; + wxSize const &arg3_defvalue = wxDefaultSize ; + wxSize *arg3 = (wxSize *) &arg3_defvalue ; + wxSize temp2 ; + wxSize temp3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "minSize",(char *) "maxSize", NULL + }; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 5); ii++) { - argv[ii] = PyTuple_GetItem(args,ii); + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Window_SetVirtualSizeHintsSz",kwnames,&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail; } - if ((argc >= 2) && (argc <= 3)) { - int _v; + if (obj2) { { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[1], wxT("wxSize"), 2); - } - if (_v) { - if (argc <= 2) { - return _wrap_Window_SetVirtualSizeHints__SWIG_0(self,args); - } - { - _v = wxPySimple_typecheck(argv[2], wxT("wxSize"), 2); - } - if (_v) { - return _wrap_Window_SetVirtualSizeHints__SWIG_0(self,args); - } - } + arg3 = &temp3; + if ( ! wxSize_helper(obj2, &arg3)) SWIG_fail; } } - if ((argc >= 3) && (argc <= 5)) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - _v = SWIG_CheckInt(argv[1]); - if (_v) { - _v = SWIG_CheckInt(argv[2]); - if (_v) { - if (argc <= 3) { - return _wrap_Window_SetVirtualSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[3]); - if (_v) { - if (argc <= 4) { - return _wrap_Window_SetVirtualSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[4]); - if (_v) { - return _wrap_Window_SetVirtualSizeHints__SWIG_1(self,args); - } - } - } - } - } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetVirtualSizeHints((wxSize const &)*arg2,(wxSize const &)*arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; } - - PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'Window_SetVirtualSizeHints'"); + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: return NULL; } @@ -40826,8 +40666,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_CenterOnParent", (PyCFunction) _wrap_Window_CenterOnParent, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_Fit", (PyCFunction) _wrap_Window_Fit, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_FitInside", (PyCFunction) _wrap_Window_FitInside, METH_VARARGS | METH_KEYWORDS }, - { (char *)"Window_SetSizeHints", _wrap_Window_SetSizeHints, METH_VARARGS }, - { (char *)"Window_SetVirtualSizeHints", _wrap_Window_SetVirtualSizeHints, METH_VARARGS }, + { (char *)"Window_SetSizeHints", (PyCFunction) _wrap_Window_SetSizeHints, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Window_SetSizeHintsSz", (PyCFunction) _wrap_Window_SetSizeHintsSz, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Window_SetVirtualSizeHints", (PyCFunction) _wrap_Window_SetVirtualSizeHints, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Window_SetVirtualSizeHintsSz", (PyCFunction) _wrap_Window_SetVirtualSizeHintsSz, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_GetMaxSize", (PyCFunction) _wrap_Window_GetMaxSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_GetMinSize", (PyCFunction) _wrap_Window_GetMinSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_SetMinSize", (PyCFunction) _wrap_Window_SetMinSize, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/mac/_gdi_wrap.cpp b/wxPython/src/mac/_gdi_wrap.cpp index ea99b4c852..af7167448c 100644 --- a/wxPython/src/mac/_gdi_wrap.cpp +++ b/wxPython/src/mac/_gdi_wrap.cpp @@ -708,10 +708,6 @@ wxCursor *new_wxCursor(wxString const *cursorName,long type,int hotSpotX,int hot } -wxRegion *new_wxRegion(int points,wxPoint *points_array,int fillStyle){ - wxPyRaiseNotImplemented(); - return NULL; - } void wxRegionIterator_Next(wxRegionIterator *self){ (*self) ++; } @@ -4745,7 +4741,7 @@ static PyObject *_wrap_new_RegionFromPoints(PyObject *self, PyObject *args, PyOb { if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxRegion *)new_wxRegion(arg1,arg2,arg3); + result = (wxRegion *)new wxRegion(arg1,arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; diff --git a/wxPython/src/mac/_misc.py b/wxPython/src/mac/_misc.py index 7dcb750e2f..adb5d3d26f 100644 --- a/wxPython/src/mac/_misc.py +++ b/wxPython/src/mac/_misc.py @@ -5639,7 +5639,22 @@ class Display(object): """ ChangeMode(self, VideoMode mode=DefaultVideoMode) -> bool - Change current mode, return true if succeeded, false otherwise + Changes the video mode of this display to the mode specified in the + mode parameter. + + If wx.DefaultVideoMode is passed in as the mode parameter, the defined + behaviour is that wx.Display will reset the video mode to the default + mode used by the display. On Windows, the behavior is normal. + However, there are differences on other platforms. On Unix variations + using X11 extensions it should behave as defined, but some + irregularities may occur. + + On wxMac passing in wx.DefaultVideoMode as the mode parameter does + nothing. This happens because Carbon no longer has access to + DMUseScreenPrefs, an undocumented function that changed the video mode + to the system default by using the system's 'scrn' resource. + + Returns True if succeeded, False otherwise """ return _misc_.Display_ChangeMode(*args, **kwargs) diff --git a/wxPython/src/mac/_windows.py b/wxPython/src/mac/_windows.py index 17958859a6..2cacb44063 100644 --- a/wxPython/src/mac/_windows.py +++ b/wxPython/src/mac/_windows.py @@ -764,6 +764,9 @@ _windows_.SplashScreen_swigregister(SplashScreenPtr) #--------------------------------------------------------------------------- +SB_NORMAL = _windows_.SB_NORMAL +SB_FLAT = _windows_.SB_FLAT +SB_RAISED = _windows_.SB_RAISED class StatusBar(_core.Window): def __repr__(self): return "<%s.%s; proxy of C++ wxStatusBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -807,6 +810,10 @@ class StatusBar(_core.Window): """SetStatusWidths(self, int widths, int widths_field)""" return _windows_.StatusBar_SetStatusWidths(*args, **kwargs) + def SetStatusStyles(*args, **kwargs): + """SetStatusStyles(self, int styles, int styles_field)""" + return _windows_.StatusBar_SetStatusStyles(*args, **kwargs) + def GetFieldRect(*args, **kwargs): """GetFieldRect(self, int i) -> Rect""" return _windows_.StatusBar_GetFieldRect(*args, **kwargs) diff --git a/wxPython/src/mac/_windows_wrap.cpp b/wxPython/src/mac/_windows_wrap.cpp index 590846c97a..429ff7e958 100644 --- a/wxPython/src/mac/_windows_wrap.cpp +++ b/wxPython/src/mac/_windows_wrap.cpp @@ -5577,6 +5577,45 @@ static PyObject *_wrap_StatusBar_SetStatusWidths(PyObject *self, PyObject *args, } +static PyObject *_wrap_StatusBar_SetStatusStyles(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxStatusBar *arg1 = (wxStatusBar *) 0 ; + int arg2 ; + int *arg3 = (int *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "styles", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StatusBar_SetStatusStyles",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStatusBar, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + arg2 = PyList_Size(obj1); + arg3 = int_LIST_helper(obj1); + if (arg3 == NULL) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetStatusStyles(arg2,(int const *)arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + { + if (arg3) delete [] arg3; + } + return resultobj; + fail: + { + if (arg3) delete [] arg3; + } + return NULL; +} + + static PyObject *_wrap_StatusBar_GetFieldRect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxStatusBar *arg1 = (wxStatusBar *) 0 ; @@ -24857,6 +24896,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"StatusBar_PushStatusText", (PyCFunction) _wrap_StatusBar_PushStatusText, METH_VARARGS | METH_KEYWORDS }, { (char *)"StatusBar_PopStatusText", (PyCFunction) _wrap_StatusBar_PopStatusText, METH_VARARGS | METH_KEYWORDS }, { (char *)"StatusBar_SetStatusWidths", (PyCFunction) _wrap_StatusBar_SetStatusWidths, METH_VARARGS | METH_KEYWORDS }, + { (char *)"StatusBar_SetStatusStyles", (PyCFunction) _wrap_StatusBar_SetStatusStyles, METH_VARARGS | METH_KEYWORDS }, { (char *)"StatusBar_GetFieldRect", (PyCFunction) _wrap_StatusBar_GetFieldRect, METH_VARARGS | METH_KEYWORDS }, { (char *)"StatusBar_SetMinHeight", (PyCFunction) _wrap_StatusBar_SetMinHeight, METH_VARARGS | METH_KEYWORDS }, { (char *)"StatusBar_GetBorderX", (PyCFunction) _wrap_StatusBar_GetBorderX, METH_VARARGS | METH_KEYWORDS }, @@ -26720,6 +26760,9 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d,"SPLASH_NO_CENTRE", SWIG_FromInt((int)wxSPLASH_NO_CENTRE)); PyDict_SetItemString(d,"SPLASH_TIMEOUT", SWIG_FromInt((int)wxSPLASH_TIMEOUT)); PyDict_SetItemString(d,"SPLASH_NO_TIMEOUT", SWIG_FromInt((int)wxSPLASH_NO_TIMEOUT)); + PyDict_SetItemString(d,"SB_NORMAL", SWIG_FromInt((int)wxSB_NORMAL)); + PyDict_SetItemString(d,"SB_FLAT", SWIG_FromInt((int)wxSB_FLAT)); + PyDict_SetItemString(d,"SB_RAISED", SWIG_FromInt((int)wxSB_RAISED)); SWIG_addvarlink(SWIG_globals,(char*)"SplitterNameStr",_wrap_SplitterNameStr_get, _wrap_SplitterNameStr_set); PyDict_SetItemString(d,"SP_NOBORDER", SWIG_FromInt((int)wxSP_NOBORDER)); PyDict_SetItemString(d,"SP_NOSASH", SWIG_FromInt((int)wxSP_NOSASH)); diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index f5f663a189..10c1507d04 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -5980,9 +5980,8 @@ class Window(EvtHandler): """ return _core_.Window_FitInside(*args, **kwargs) - def SetSizeHints(*args): + def SetSizeHints(*args, **kwargs): """ - SetSizeHints(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1) @@ -5995,11 +5994,25 @@ class Window(EvtHandler): The resizing increments are only significant under Motif or Xt. """ - return _core_.Window_SetSizeHints(*args) + return _core_.Window_SetSizeHints(*args, **kwargs) + + def SetSizeHintsSz(*args, **kwargs): + """ + SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) + + Allows specification of minimum and maximum window sizes, and window + size increments. If a pair of values is not set (or set to -1), the + default values will be used. If this function is called, the user + will not be able to size the window outside the given bounds (if it is + a top-level window.) Sizers will also inspect the minimum window size + and will use that value if set when calculating layout. + + The resizing increments are only significant under Motif or Xt. + """ + return _core_.Window_SetSizeHintsSz(*args, **kwargs) - def SetVirtualSizeHints(*args): + def SetVirtualSizeHints(*args, **kwargs): """ - SetVirtualSizeHints(self, Size minSize, Size maxSize=DefaultSize) SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1) Allows specification of minimum and maximum virtual window sizes. If a @@ -6007,7 +6020,18 @@ class Window(EvtHandler): used. If this function is called, the user will not be able to size the virtual area of the window outside the given bounds. """ - return _core_.Window_SetVirtualSizeHints(*args) + return _core_.Window_SetVirtualSizeHints(*args, **kwargs) + + def SetVirtualSizeHintsSz(*args, **kwargs): + """ + SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize) + + Allows specification of minimum and maximum virtual window sizes. If a + pair of values is not set (or set to -1), the default values will be + used. If this function is called, the user will not be able to size + the virtual area of the window outside the given bounds. + """ + return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs) def GetMaxSize(*args, **kwargs): """GetMaxSize(self) -> Size""" diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index 6913d1cc36..8e78ae1a27 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -23160,56 +23160,7 @@ static PyObject *_wrap_Window_FitInside(PyObject *self, PyObject *args, PyObject } -static PyObject *_wrap_Window_SetSizeHints__SWIG_0(PyObject *self, PyObject *args) { - PyObject *resultobj; - wxWindow *arg1 = (wxWindow *) 0 ; - wxSize *arg2 = 0 ; - wxSize const &arg3_defvalue = wxDefaultSize ; - wxSize *arg3 = (wxSize *) &arg3_defvalue ; - wxSize const &arg4_defvalue = wxDefaultSize ; - wxSize *arg4 = (wxSize *) &arg4_defvalue ; - wxSize temp2 ; - wxSize temp3 ; - wxSize temp4 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - - if(!PyArg_ParseTuple(args,(char *)"OO|OO:Window_SetSizeHints",&obj0,&obj1,&obj2,&obj3)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - arg2 = &temp2; - if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail; - } - if (obj2) { - { - arg3 = &temp3; - if ( ! wxSize_helper(obj2, &arg3)) SWIG_fail; - } - } - if (obj3) { - { - arg4 = &temp4; - if ( ! wxSize_helper(obj3, &arg4)) SWIG_fail; - } - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetSizeHints((wxSize const &)*arg2,(wxSize const &)*arg3,(wxSize const &)*arg4); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_Window_SetSizeHints__SWIG_1(PyObject *self, PyObject *args) { +static PyObject *_wrap_Window_SetSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; int arg2 ; @@ -23225,8 +23176,11 @@ static PyObject *_wrap_Window_SetSizeHints__SWIG_1(PyObject *self, PyObject *arg PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "minW",(char *) "minH",(char *) "maxW",(char *) "maxH",(char *) "incW",(char *) "incH", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OOO|OOOO:Window_SetSizeHints",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Window_SetSizeHints",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); @@ -23263,115 +23217,26 @@ static PyObject *_wrap_Window_SetSizeHints__SWIG_1(PyObject *self, PyObject *arg } -static PyObject *_wrap_Window_SetSizeHints(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[8]; - int ii; - - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 7); ii++) { - argv[ii] = PyTuple_GetItem(args,ii); - } - if ((argc >= 2) && (argc <= 4)) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[1], wxT("wxSize"), 2); - } - if (_v) { - if (argc <= 2) { - return _wrap_Window_SetSizeHints__SWIG_0(self,args); - } - { - _v = wxPySimple_typecheck(argv[2], wxT("wxSize"), 2); - } - if (_v) { - if (argc <= 3) { - return _wrap_Window_SetSizeHints__SWIG_0(self,args); - } - { - _v = wxPySimple_typecheck(argv[3], wxT("wxSize"), 2); - } - if (_v) { - return _wrap_Window_SetSizeHints__SWIG_0(self,args); - } - } - } - } - } - if ((argc >= 3) && (argc <= 7)) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - _v = SWIG_CheckInt(argv[1]); - if (_v) { - _v = SWIG_CheckInt(argv[2]); - if (_v) { - if (argc <= 3) { - return _wrap_Window_SetSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[3]); - if (_v) { - if (argc <= 4) { - return _wrap_Window_SetSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[4]); - if (_v) { - if (argc <= 5) { - return _wrap_Window_SetSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[5]); - if (_v) { - if (argc <= 6) { - return _wrap_Window_SetSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[6]); - if (_v) { - return _wrap_Window_SetSizeHints__SWIG_1(self,args); - } - } - } - } - } - } - } - } - - PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'Window_SetSizeHints'"); - return NULL; -} - - -static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_0(PyObject *self, PyObject *args) { +static PyObject *_wrap_Window_SetSizeHintsSz(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; wxSize *arg2 = 0 ; wxSize const &arg3_defvalue = wxDefaultSize ; wxSize *arg3 = (wxSize *) &arg3_defvalue ; + wxSize const &arg4_defvalue = wxDefaultSize ; + wxSize *arg4 = (wxSize *) &arg4_defvalue ; wxSize temp2 ; wxSize temp3 ; + wxSize temp4 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "minSize",(char *) "maxSize",(char *) "incSize", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OO|O:Window_SetVirtualSizeHints",&obj0,&obj1,&obj2)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:Window_SetSizeHintsSz",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { @@ -23384,9 +23249,15 @@ static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_0(PyObject *self, PyObje if ( ! wxSize_helper(obj2, &arg3)) SWIG_fail; } } + if (obj3) { + { + arg4 = &temp4; + if ( ! wxSize_helper(obj3, &arg4)) SWIG_fail; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetVirtualSizeHints((wxSize const &)*arg2,(wxSize const &)*arg3); + (arg1)->SetSizeHints((wxSize const &)*arg2,(wxSize const &)*arg3,(wxSize const &)*arg4); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -23398,7 +23269,7 @@ static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_0(PyObject *self, PyObje } -static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_1(PyObject *self, PyObject *args) { +static PyObject *_wrap_Window_SetVirtualSizeHints(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; int arg2 ; @@ -23410,8 +23281,11 @@ static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_1(PyObject *self, PyObje PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "minW",(char *) "minH",(char *) "maxW",(char *) "maxH", NULL + }; - if(!PyArg_ParseTuple(args,(char *)"OOO|OO:Window_SetVirtualSizeHints",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:Window_SetVirtualSizeHints",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); @@ -23440,78 +23314,44 @@ static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_1(PyObject *self, PyObje } -static PyObject *_wrap_Window_SetVirtualSizeHints(PyObject *self, PyObject *args) { - int argc; - PyObject *argv[6]; - int ii; +static PyObject *_wrap_Window_SetVirtualSizeHintsSz(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + wxSize *arg2 = 0 ; + wxSize const &arg3_defvalue = wxDefaultSize ; + wxSize *arg3 = (wxSize *) &arg3_defvalue ; + wxSize temp2 ; + wxSize temp3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "minSize",(char *) "maxSize", NULL + }; - argc = PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 5); ii++) { - argv[ii] = PyTuple_GetItem(args,ii); + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Window_SetVirtualSizeHintsSz",kwnames,&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail; } - if ((argc >= 2) && (argc <= 3)) { - int _v; + if (obj2) { { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - { - _v = wxPySimple_typecheck(argv[1], wxT("wxSize"), 2); - } - if (_v) { - if (argc <= 2) { - return _wrap_Window_SetVirtualSizeHints__SWIG_0(self,args); - } - { - _v = wxPySimple_typecheck(argv[2], wxT("wxSize"), 2); - } - if (_v) { - return _wrap_Window_SetVirtualSizeHints__SWIG_0(self,args); - } - } + arg3 = &temp3; + if ( ! wxSize_helper(obj2, &arg3)) SWIG_fail; } } - if ((argc >= 3) && (argc <= 5)) { - int _v; - { - void *ptr; - if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { - _v = 0; - PyErr_Clear(); - } else { - _v = 1; - } - } - if (_v) { - _v = SWIG_CheckInt(argv[1]); - if (_v) { - _v = SWIG_CheckInt(argv[2]); - if (_v) { - if (argc <= 3) { - return _wrap_Window_SetVirtualSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[3]); - if (_v) { - if (argc <= 4) { - return _wrap_Window_SetVirtualSizeHints__SWIG_1(self,args); - } - _v = SWIG_CheckInt(argv[4]); - if (_v) { - return _wrap_Window_SetVirtualSizeHints__SWIG_1(self,args); - } - } - } - } - } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetVirtualSizeHints((wxSize const &)*arg2,(wxSize const &)*arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; } - - PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'Window_SetVirtualSizeHints'"); + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: return NULL; } @@ -41326,8 +41166,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_CenterOnParent", (PyCFunction) _wrap_Window_CenterOnParent, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_Fit", (PyCFunction) _wrap_Window_Fit, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_FitInside", (PyCFunction) _wrap_Window_FitInside, METH_VARARGS | METH_KEYWORDS }, - { (char *)"Window_SetSizeHints", _wrap_Window_SetSizeHints, METH_VARARGS }, - { (char *)"Window_SetVirtualSizeHints", _wrap_Window_SetVirtualSizeHints, METH_VARARGS }, + { (char *)"Window_SetSizeHints", (PyCFunction) _wrap_Window_SetSizeHints, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Window_SetSizeHintsSz", (PyCFunction) _wrap_Window_SetSizeHintsSz, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Window_SetVirtualSizeHints", (PyCFunction) _wrap_Window_SetVirtualSizeHints, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Window_SetVirtualSizeHintsSz", (PyCFunction) _wrap_Window_SetVirtualSizeHintsSz, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_GetMaxSize", (PyCFunction) _wrap_Window_GetMaxSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_GetMinSize", (PyCFunction) _wrap_Window_GetMinSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_SetMinSize", (PyCFunction) _wrap_Window_SetMinSize, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index 7dcb750e2f..adb5d3d26f 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -5639,7 +5639,22 @@ class Display(object): """ ChangeMode(self, VideoMode mode=DefaultVideoMode) -> bool - Change current mode, return true if succeeded, false otherwise + Changes the video mode of this display to the mode specified in the + mode parameter. + + If wx.DefaultVideoMode is passed in as the mode parameter, the defined + behaviour is that wx.Display will reset the video mode to the default + mode used by the display. On Windows, the behavior is normal. + However, there are differences on other platforms. On Unix variations + using X11 extensions it should behave as defined, but some + irregularities may occur. + + On wxMac passing in wx.DefaultVideoMode as the mode parameter does + nothing. This happens because Carbon no longer has access to + DMUseScreenPrefs, an undocumented function that changed the video mode + to the system default by using the system's 'scrn' resource. + + Returns True if succeeded, False otherwise """ return _misc_.Display_ChangeMode(*args, **kwargs) diff --git a/wxPython/src/msw/_windows.py b/wxPython/src/msw/_windows.py index fc4f20f79b..7500a332fa 100644 --- a/wxPython/src/msw/_windows.py +++ b/wxPython/src/msw/_windows.py @@ -756,6 +756,9 @@ _windows_.SplashScreen_swigregister(SplashScreenPtr) #--------------------------------------------------------------------------- +SB_NORMAL = _windows_.SB_NORMAL +SB_FLAT = _windows_.SB_FLAT +SB_RAISED = _windows_.SB_RAISED class StatusBar(_core.Window): def __repr__(self): return "<%s.%s; proxy of C++ wxStatusBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -799,6 +802,10 @@ class StatusBar(_core.Window): """SetStatusWidths(self, int widths, int widths_field)""" return _windows_.StatusBar_SetStatusWidths(*args, **kwargs) + def SetStatusStyles(*args, **kwargs): + """SetStatusStyles(self, int styles, int styles_field)""" + return _windows_.StatusBar_SetStatusStyles(*args, **kwargs) + def GetFieldRect(*args, **kwargs): """GetFieldRect(self, int i) -> Rect""" return _windows_.StatusBar_GetFieldRect(*args, **kwargs) diff --git a/wxPython/src/msw/_windows_wrap.cpp b/wxPython/src/msw/_windows_wrap.cpp index 39cbef0bbf..70e585340f 100644 --- a/wxPython/src/msw/_windows_wrap.cpp +++ b/wxPython/src/msw/_windows_wrap.cpp @@ -5525,6 +5525,45 @@ static PyObject *_wrap_StatusBar_SetStatusWidths(PyObject *self, PyObject *args, } +static PyObject *_wrap_StatusBar_SetStatusStyles(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxStatusBar *arg1 = (wxStatusBar *) 0 ; + int arg2 ; + int *arg3 = (int *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "styles", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:StatusBar_SetStatusStyles",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxStatusBar, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + arg2 = PyList_Size(obj1); + arg3 = int_LIST_helper(obj1); + if (arg3 == NULL) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetStatusStyles(arg2,(int const *)arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + { + if (arg3) delete [] arg3; + } + return resultobj; + fail: + { + if (arg3) delete [] arg3; + } + return NULL; +} + + static PyObject *_wrap_StatusBar_GetFieldRect(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxStatusBar *arg1 = (wxStatusBar *) 0 ; @@ -25229,6 +25268,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"StatusBar_PushStatusText", (PyCFunction) _wrap_StatusBar_PushStatusText, METH_VARARGS | METH_KEYWORDS }, { (char *)"StatusBar_PopStatusText", (PyCFunction) _wrap_StatusBar_PopStatusText, METH_VARARGS | METH_KEYWORDS }, { (char *)"StatusBar_SetStatusWidths", (PyCFunction) _wrap_StatusBar_SetStatusWidths, METH_VARARGS | METH_KEYWORDS }, + { (char *)"StatusBar_SetStatusStyles", (PyCFunction) _wrap_StatusBar_SetStatusStyles, METH_VARARGS | METH_KEYWORDS }, { (char *)"StatusBar_GetFieldRect", (PyCFunction) _wrap_StatusBar_GetFieldRect, METH_VARARGS | METH_KEYWORDS }, { (char *)"StatusBar_SetMinHeight", (PyCFunction) _wrap_StatusBar_SetMinHeight, METH_VARARGS | METH_KEYWORDS }, { (char *)"StatusBar_GetBorderX", (PyCFunction) _wrap_StatusBar_GetBorderX, METH_VARARGS | METH_KEYWORDS }, @@ -27105,6 +27145,9 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d,"SPLASH_NO_CENTRE", SWIG_FromInt((int)wxSPLASH_NO_CENTRE)); PyDict_SetItemString(d,"SPLASH_TIMEOUT", SWIG_FromInt((int)wxSPLASH_TIMEOUT)); PyDict_SetItemString(d,"SPLASH_NO_TIMEOUT", SWIG_FromInt((int)wxSPLASH_NO_TIMEOUT)); + PyDict_SetItemString(d,"SB_NORMAL", SWIG_FromInt((int)wxSB_NORMAL)); + PyDict_SetItemString(d,"SB_FLAT", SWIG_FromInt((int)wxSB_FLAT)); + PyDict_SetItemString(d,"SB_RAISED", SWIG_FromInt((int)wxSB_RAISED)); SWIG_addvarlink(SWIG_globals,(char*)"SplitterNameStr",_wrap_SplitterNameStr_get, _wrap_SplitterNameStr_set); PyDict_SetItemString(d,"SP_NOBORDER", SWIG_FromInt((int)wxSP_NOBORDER)); PyDict_SetItemString(d,"SP_NOSASH", SWIG_FromInt((int)wxSP_NOSASH)); -- 2.45.2