From 091fdbfacb880124683f94944225e71ced00d978 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 7 Feb 2005 21:04:17 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/mac/_controls.py | 5 ++++ wxPython/src/mac/_controls_wrap.cpp | 34 ++++++++++++++++++++++++ wxPython/src/mac/_core.py | 27 ++++++++++++++----- wxPython/src/mac/_misc.py | 24 ++++++++++++----- wxPython/src/mac/_misc_wrap.cpp | 40 ++++++++++++----------------- wxPython/src/msw/_controls.py | 5 ++++ wxPython/src/msw/_controls_wrap.cpp | 34 ++++++++++++++++++++++++ wxPython/src/msw/_core.py | 27 ++++++++++++++----- wxPython/src/msw/_misc.py | 24 ++++++++++++----- wxPython/src/msw/_misc_wrap.cpp | 40 ++++++++++++----------------- wxPython/wxPython/_controls.py | 1 + 11 files changed, 191 insertions(+), 70 deletions(-) diff --git a/wxPython/src/mac/_controls.py b/wxPython/src/mac/_controls.py index 033ad9cb18..1fa4f849d2 100644 --- a/wxPython/src/mac/_controls.py +++ b/wxPython/src/mac/_controls.py @@ -3103,6 +3103,7 @@ NB_LEFT = _controls_.NB_LEFT NB_RIGHT = _controls_.NB_RIGHT NB_BOTTOM = _controls_.NB_BOTTOM NB_MULTILINE = _controls_.NB_MULTILINE +NB_NOPAGETHEME = _controls_.NB_NOPAGETHEME NB_HITTEST_NOWHERE = _controls_.NB_HITTEST_NOWHERE NB_HITTEST_ONICON = _controls_.NB_HITTEST_ONICON NB_HITTEST_ONLABEL = _controls_.NB_HITTEST_ONLABEL @@ -3154,6 +3155,10 @@ class Notebook(BookCtrlBase): """CalcSizeFromPage(self, Size sizePage) -> Size""" return _controls_.Notebook_CalcSizeFromPage(*args, **kwargs) + def GetThemeBackgroundColour(*args, **kwargs): + """GetThemeBackgroundColour(self) -> Colour""" + return _controls_.Notebook_GetThemeBackgroundColour(*args, **kwargs) + def GetClassDefaultAttributes(*args, **kwargs): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes diff --git a/wxPython/src/mac/_controls_wrap.cpp b/wxPython/src/mac/_controls_wrap.cpp index 1b01aff04f..21c6a32ccf 100644 --- a/wxPython/src/mac/_controls_wrap.cpp +++ b/wxPython/src/mac/_controls_wrap.cpp @@ -17461,6 +17461,36 @@ static PyObject *_wrap_Notebook_CalcSizeFromPage(PyObject *, PyObject *args, PyO } +static PyObject *_wrap_Notebook_GetThemeBackgroundColour(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxNotebook *arg1 = (wxNotebook *) 0 ; + wxColour result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Notebook_GetThemeBackgroundColour",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxNotebook, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxNotebook const *)arg1)->GetThemeBackgroundColour(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxColour * resultptr; + resultptr = new wxColour((wxColour &)(result)); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxColour, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Notebook_GetClassDefaultAttributes(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindowVariant arg1 = (wxWindowVariant) wxWINDOW_VARIANT_NORMAL ; @@ -34800,6 +34830,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Notebook_SetTabSize", (PyCFunction) _wrap_Notebook_SetTabSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Notebook_HitTest", (PyCFunction) _wrap_Notebook_HitTest, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Notebook_CalcSizeFromPage", (PyCFunction) _wrap_Notebook_CalcSizeFromPage, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Notebook_GetThemeBackgroundColour", (PyCFunction) _wrap_Notebook_GetThemeBackgroundColour, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Notebook_GetClassDefaultAttributes", (PyCFunction) _wrap_Notebook_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Notebook_swigregister", Notebook_swigregister, METH_VARARGS, NULL}, { (char *)"new_NotebookEvent", (PyCFunction) _wrap_new_NotebookEvent, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -37112,6 +37143,9 @@ SWIGEXPORT(void) SWIG_init(void) { { PyDict_SetItemString(d,"NB_MULTILINE", SWIG_From_int((int)(wxNB_MULTILINE))); } + { + PyDict_SetItemString(d,"NB_NOPAGETHEME", SWIG_From_int((int)(wxNB_NOPAGETHEME))); + } { PyDict_SetItemString(d,"NB_HITTEST_NOWHERE", SWIG_From_int((int)(wxNB_HITTEST_NOWHERE))); } diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index 45ea472e5d..d3a6fad0ab 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -1194,9 +1194,24 @@ class Rect(object): """ Inflate(self, int dx, int dy) -> Rect - Increase the rectangle size by dx in x direction and dy in y - direction. Both (or one of) parameters may be negative to decrease the - rectangle size. + Increases the size of the rectangle. + + The left border is moved farther left and the right border is moved + farther right by ``dx``. The upper border is moved farther up and the + bottom border is moved farther down by ``dy``. (Note the the width and + height of the rectangle thus change by ``2*dx`` and ``2*dy``, + respectively.) If one or both of ``dx`` and ``dy`` are negative, the + opposite happens: the rectangle size decreases in the respective + direction. + + The change is made to the rectangle inplace, if instead you need a + copy that is inflated, preserving the original then make the copy + first:: + + copy = wx.Rect(*original) + copy.Inflate(10,15) + + """ return _core_.Rect_Inflate(*args, **kwargs) @@ -1204,9 +1219,9 @@ class Rect(object): """ Deflate(self, int dx, int dy) -> Rect - Decrease the rectangle size by dx in x direction and dy in y - direction. Both (or one of) parameters may be negative to increase the - rectngle size. This method is the opposite of Inflate. + Decrease the rectangle size. This method is the opposite of `Inflate` + in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to + `Inflate` for a full description. """ return _core_.Rect_Deflate(*args, **kwargs) diff --git a/wxPython/src/mac/_misc.py b/wxPython/src/mac/_misc.py index 2221ad8bde..2f1235a772 100644 --- a/wxPython/src/mac/_misc.py +++ b/wxPython/src/mac/_misc.py @@ -658,11 +658,13 @@ class Caret(object): self.this = newobj.this self.thisown = 1 del newobj.thisown - def __del__(self, destroy=_misc_.delete_Caret): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass + def Destroy(*args, **kwargs): + """ + Destroy(self) + + Deletes the C++ object this Python object is a proxy for. + """ + return _misc_.Caret_Destroy(*args, **kwargs) def IsOk(*args, **kwargs): """IsOk(self) -> bool""" @@ -717,6 +719,16 @@ class Caret(object): return _misc_.Caret_Hide(*args, **kwargs) def __nonzero__(self): return self.IsOk() + def GetBlinkTime(*args, **kwargs): + """GetBlinkTime() -> int""" + return _misc_.Caret_GetBlinkTime(*args, **kwargs) + + GetBlinkTime = staticmethod(GetBlinkTime) + def SetBlinkTime(*args, **kwargs): + """SetBlinkTime(int milliseconds)""" + return _misc_.Caret_SetBlinkTime(*args, **kwargs) + + SetBlinkTime = staticmethod(SetBlinkTime) class CaretPtr(Caret): def __init__(self, this): @@ -725,7 +737,6 @@ class CaretPtr(Caret): self.__class__ = Caret _misc_.Caret_swigregister(CaretPtr) - def Caret_GetBlinkTime(*args, **kwargs): """Caret_GetBlinkTime() -> int""" return _misc_.Caret_GetBlinkTime(*args, **kwargs) @@ -733,6 +744,7 @@ def Caret_GetBlinkTime(*args, **kwargs): def Caret_SetBlinkTime(*args, **kwargs): """Caret_SetBlinkTime(int milliseconds)""" return _misc_.Caret_SetBlinkTime(*args, **kwargs) + class BusyCursor(object): """Proxy of C++ BusyCursor class""" def __repr__(self): diff --git a/wxPython/src/mac/_misc_wrap.cpp b/wxPython/src/mac/_misc_wrap.cpp index 4b833cc243..912ad0bd4e 100644 --- a/wxPython/src/mac/_misc_wrap.cpp +++ b/wxPython/src/mac/_misc_wrap.cpp @@ -1708,15 +1708,9 @@ SWIGINTERNSHORT PyObject* #endif } - - int wxCaret_GetBlinkTime() { - return wxCaret::GetBlinkTime(); - } - - void wxCaret_SetBlinkTime(int milliseconds) { - wxCaret::SetBlinkTime(milliseconds); - } - +static void wxCaret_Destroy(wxCaret *self){ + delete self; + } #include @@ -6262,7 +6256,7 @@ static PyObject *_wrap_new_Caret(PyObject *, PyObject *args, PyObject *kwargs) { } -static PyObject *_wrap_delete_Caret(PyObject *, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_Caret_Destroy(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxCaret *arg1 = (wxCaret *) 0 ; PyObject * obj0 = 0 ; @@ -6270,12 +6264,12 @@ static PyObject *_wrap_delete_Caret(PyObject *, PyObject *args, PyObject *kwargs (char *) "self", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_Caret",kwnames,&obj0)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Caret_Destroy",kwnames,&obj0)) goto fail; SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxCaret, SWIG_POINTER_EXCEPTION | 0); if (SWIG_arg_fail(1)) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete arg1; + wxCaret_Destroy(arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -6701,13 +6695,6 @@ static PyObject *_wrap_Caret_Hide(PyObject *, PyObject *args, PyObject *kwargs) } -static PyObject * Caret_swigregister(PyObject *, PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; - SWIG_TypeClientData(SWIGTYPE_p_wxCaret, obj); - Py_INCREF(obj); - return Py_BuildValue((char *)""); -} static PyObject *_wrap_Caret_GetBlinkTime(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; int result; @@ -6718,7 +6705,7 @@ static PyObject *_wrap_Caret_GetBlinkTime(PyObject *, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Caret_GetBlinkTime",kwnames)) goto fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)wxCaret_GetBlinkTime(); + result = (int)wxCaret::GetBlinkTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -6747,7 +6734,7 @@ static PyObject *_wrap_Caret_SetBlinkTime(PyObject *, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_SetBlinkTime(arg1); + wxCaret::SetBlinkTime(arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -6759,6 +6746,13 @@ static PyObject *_wrap_Caret_SetBlinkTime(PyObject *, PyObject *args, PyObject * } +static PyObject * Caret_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_wxCaret, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} static PyObject *_wrap_new_BusyCursor(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxCursor *arg1 = (wxCursor *) wxHOURGLASS_CURSOR ; @@ -31077,7 +31071,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ToolTip_SetDelay", (PyCFunction) _wrap_ToolTip_SetDelay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ToolTip_swigregister", ToolTip_swigregister, METH_VARARGS, NULL}, { (char *)"new_Caret", (PyCFunction) _wrap_new_Caret, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"delete_Caret", (PyCFunction) _wrap_delete_Caret, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Caret_Destroy", (PyCFunction) _wrap_Caret_Destroy, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_IsOk", (PyCFunction) _wrap_Caret_IsOk, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_IsVisible", (PyCFunction) _wrap_Caret_IsVisible, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_GetPosition", (PyCFunction) _wrap_Caret_GetPosition, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -31091,9 +31085,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"Caret_SetSize", (PyCFunction) _wrap_Caret_SetSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_Show", (PyCFunction) _wrap_Caret_Show, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_Hide", (PyCFunction) _wrap_Caret_Hide, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Caret_swigregister", Caret_swigregister, METH_VARARGS, NULL}, { (char *)"Caret_GetBlinkTime", (PyCFunction) _wrap_Caret_GetBlinkTime, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_SetBlinkTime", (PyCFunction) _wrap_Caret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Caret_swigregister", Caret_swigregister, METH_VARARGS, NULL}, { (char *)"new_BusyCursor", (PyCFunction) _wrap_new_BusyCursor, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"delete_BusyCursor", (PyCFunction) _wrap_delete_BusyCursor, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BusyCursor_swigregister", BusyCursor_swigregister, METH_VARARGS, NULL}, diff --git a/wxPython/src/msw/_controls.py b/wxPython/src/msw/_controls.py index 1fcc5760b8..e3cdde547d 100644 --- a/wxPython/src/msw/_controls.py +++ b/wxPython/src/msw/_controls.py @@ -3124,6 +3124,7 @@ NB_LEFT = _controls_.NB_LEFT NB_RIGHT = _controls_.NB_RIGHT NB_BOTTOM = _controls_.NB_BOTTOM NB_MULTILINE = _controls_.NB_MULTILINE +NB_NOPAGETHEME = _controls_.NB_NOPAGETHEME NB_HITTEST_NOWHERE = _controls_.NB_HITTEST_NOWHERE NB_HITTEST_ONICON = _controls_.NB_HITTEST_ONICON NB_HITTEST_ONLABEL = _controls_.NB_HITTEST_ONLABEL @@ -3175,6 +3176,10 @@ class Notebook(BookCtrlBase): """CalcSizeFromPage(self, Size sizePage) -> Size""" return _controls_.Notebook_CalcSizeFromPage(*args, **kwargs) + def GetThemeBackgroundColour(*args, **kwargs): + """GetThemeBackgroundColour(self) -> Colour""" + return _controls_.Notebook_GetThemeBackgroundColour(*args, **kwargs) + def GetClassDefaultAttributes(*args, **kwargs): """ GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes diff --git a/wxPython/src/msw/_controls_wrap.cpp b/wxPython/src/msw/_controls_wrap.cpp index 925fc54808..73f2f6de79 100644 --- a/wxPython/src/msw/_controls_wrap.cpp +++ b/wxPython/src/msw/_controls_wrap.cpp @@ -17590,6 +17590,36 @@ static PyObject *_wrap_Notebook_CalcSizeFromPage(PyObject *, PyObject *args, PyO } +static PyObject *_wrap_Notebook_GetThemeBackgroundColour(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxNotebook *arg1 = (wxNotebook *) 0 ; + wxColour result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Notebook_GetThemeBackgroundColour",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxNotebook, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxNotebook const *)arg1)->GetThemeBackgroundColour(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxColour * resultptr; + resultptr = new wxColour((wxColour &)(result)); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxColour, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Notebook_GetClassDefaultAttributes(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindowVariant arg1 = (wxWindowVariant) wxWINDOW_VARIANT_NORMAL ; @@ -35081,6 +35111,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Notebook_SetTabSize", (PyCFunction) _wrap_Notebook_SetTabSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Notebook_HitTest", (PyCFunction) _wrap_Notebook_HitTest, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Notebook_CalcSizeFromPage", (PyCFunction) _wrap_Notebook_CalcSizeFromPage, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Notebook_GetThemeBackgroundColour", (PyCFunction) _wrap_Notebook_GetThemeBackgroundColour, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Notebook_GetClassDefaultAttributes", (PyCFunction) _wrap_Notebook_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Notebook_swigregister", Notebook_swigregister, METH_VARARGS, NULL}, { (char *)"new_NotebookEvent", (PyCFunction) _wrap_new_NotebookEvent, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -37403,6 +37434,9 @@ SWIGEXPORT(void) SWIG_init(void) { { PyDict_SetItemString(d,"NB_MULTILINE", SWIG_From_int((int)(wxNB_MULTILINE))); } + { + PyDict_SetItemString(d,"NB_NOPAGETHEME", SWIG_From_int((int)(wxNB_NOPAGETHEME))); + } { PyDict_SetItemString(d,"NB_HITTEST_NOWHERE", SWIG_From_int((int)(wxNB_HITTEST_NOWHERE))); } diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 5cc6a644ea..cf4f48ee81 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -1194,9 +1194,24 @@ class Rect(object): """ Inflate(self, int dx, int dy) -> Rect - Increase the rectangle size by dx in x direction and dy in y - direction. Both (or one of) parameters may be negative to decrease the - rectangle size. + Increases the size of the rectangle. + + The left border is moved farther left and the right border is moved + farther right by ``dx``. The upper border is moved farther up and the + bottom border is moved farther down by ``dy``. (Note the the width and + height of the rectangle thus change by ``2*dx`` and ``2*dy``, + respectively.) If one or both of ``dx`` and ``dy`` are negative, the + opposite happens: the rectangle size decreases in the respective + direction. + + The change is made to the rectangle inplace, if instead you need a + copy that is inflated, preserving the original then make the copy + first:: + + copy = wx.Rect(*original) + copy.Inflate(10,15) + + """ return _core_.Rect_Inflate(*args, **kwargs) @@ -1204,9 +1219,9 @@ class Rect(object): """ Deflate(self, int dx, int dy) -> Rect - Decrease the rectangle size by dx in x direction and dy in y - direction. Both (or one of) parameters may be negative to increase the - rectngle size. This method is the opposite of Inflate. + Decrease the rectangle size. This method is the opposite of `Inflate` + in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to + `Inflate` for a full description. """ return _core_.Rect_Deflate(*args, **kwargs) diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index 2221ad8bde..2f1235a772 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -658,11 +658,13 @@ class Caret(object): self.this = newobj.this self.thisown = 1 del newobj.thisown - def __del__(self, destroy=_misc_.delete_Caret): - """__del__(self)""" - try: - if self.thisown: destroy(self) - except: pass + def Destroy(*args, **kwargs): + """ + Destroy(self) + + Deletes the C++ object this Python object is a proxy for. + """ + return _misc_.Caret_Destroy(*args, **kwargs) def IsOk(*args, **kwargs): """IsOk(self) -> bool""" @@ -717,6 +719,16 @@ class Caret(object): return _misc_.Caret_Hide(*args, **kwargs) def __nonzero__(self): return self.IsOk() + def GetBlinkTime(*args, **kwargs): + """GetBlinkTime() -> int""" + return _misc_.Caret_GetBlinkTime(*args, **kwargs) + + GetBlinkTime = staticmethod(GetBlinkTime) + def SetBlinkTime(*args, **kwargs): + """SetBlinkTime(int milliseconds)""" + return _misc_.Caret_SetBlinkTime(*args, **kwargs) + + SetBlinkTime = staticmethod(SetBlinkTime) class CaretPtr(Caret): def __init__(self, this): @@ -725,7 +737,6 @@ class CaretPtr(Caret): self.__class__ = Caret _misc_.Caret_swigregister(CaretPtr) - def Caret_GetBlinkTime(*args, **kwargs): """Caret_GetBlinkTime() -> int""" return _misc_.Caret_GetBlinkTime(*args, **kwargs) @@ -733,6 +744,7 @@ def Caret_GetBlinkTime(*args, **kwargs): def Caret_SetBlinkTime(*args, **kwargs): """Caret_SetBlinkTime(int milliseconds)""" return _misc_.Caret_SetBlinkTime(*args, **kwargs) + class BusyCursor(object): """Proxy of C++ BusyCursor class""" def __repr__(self): diff --git a/wxPython/src/msw/_misc_wrap.cpp b/wxPython/src/msw/_misc_wrap.cpp index 31b2849233..3d814eb3d2 100644 --- a/wxPython/src/msw/_misc_wrap.cpp +++ b/wxPython/src/msw/_misc_wrap.cpp @@ -1708,15 +1708,9 @@ SWIGINTERNSHORT PyObject* #endif } - - int wxCaret_GetBlinkTime() { - return wxCaret::GetBlinkTime(); - } - - void wxCaret_SetBlinkTime(int milliseconds) { - wxCaret::SetBlinkTime(milliseconds); - } - +static void wxCaret_Destroy(wxCaret *self){ + delete self; + } #include @@ -6261,7 +6255,7 @@ static PyObject *_wrap_new_Caret(PyObject *, PyObject *args, PyObject *kwargs) { } -static PyObject *_wrap_delete_Caret(PyObject *, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_Caret_Destroy(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxCaret *arg1 = (wxCaret *) 0 ; PyObject * obj0 = 0 ; @@ -6269,12 +6263,12 @@ static PyObject *_wrap_delete_Caret(PyObject *, PyObject *args, PyObject *kwargs (char *) "self", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_Caret",kwnames,&obj0)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Caret_Destroy",kwnames,&obj0)) goto fail; SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxCaret, SWIG_POINTER_EXCEPTION | 0); if (SWIG_arg_fail(1)) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - delete arg1; + wxCaret_Destroy(arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -6700,13 +6694,6 @@ static PyObject *_wrap_Caret_Hide(PyObject *, PyObject *args, PyObject *kwargs) } -static PyObject * Caret_swigregister(PyObject *, PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; - SWIG_TypeClientData(SWIGTYPE_p_wxCaret, obj); - Py_INCREF(obj); - return Py_BuildValue((char *)""); -} static PyObject *_wrap_Caret_GetBlinkTime(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; int result; @@ -6717,7 +6704,7 @@ static PyObject *_wrap_Caret_GetBlinkTime(PyObject *, PyObject *args, PyObject * if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Caret_GetBlinkTime",kwnames)) goto fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (int)wxCaret_GetBlinkTime(); + result = (int)wxCaret::GetBlinkTime(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -6746,7 +6733,7 @@ static PyObject *_wrap_Caret_SetBlinkTime(PyObject *, PyObject *args, PyObject * } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxCaret_SetBlinkTime(arg1); + wxCaret::SetBlinkTime(arg1); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -6758,6 +6745,13 @@ static PyObject *_wrap_Caret_SetBlinkTime(PyObject *, PyObject *args, PyObject * } +static PyObject * Caret_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_wxCaret, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} static PyObject *_wrap_new_BusyCursor(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxCursor *arg1 = (wxCursor *) wxHOURGLASS_CURSOR ; @@ -31076,7 +31070,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ToolTip_SetDelay", (PyCFunction) _wrap_ToolTip_SetDelay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"ToolTip_swigregister", ToolTip_swigregister, METH_VARARGS, NULL}, { (char *)"new_Caret", (PyCFunction) _wrap_new_Caret, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"delete_Caret", (PyCFunction) _wrap_delete_Caret, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Caret_Destroy", (PyCFunction) _wrap_Caret_Destroy, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_IsOk", (PyCFunction) _wrap_Caret_IsOk, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_IsVisible", (PyCFunction) _wrap_Caret_IsVisible, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_GetPosition", (PyCFunction) _wrap_Caret_GetPosition, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -31090,9 +31084,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"Caret_SetSize", (PyCFunction) _wrap_Caret_SetSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_Show", (PyCFunction) _wrap_Caret_Show, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_Hide", (PyCFunction) _wrap_Caret_Hide, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"Caret_swigregister", Caret_swigregister, METH_VARARGS, NULL}, { (char *)"Caret_GetBlinkTime", (PyCFunction) _wrap_Caret_GetBlinkTime, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Caret_SetBlinkTime", (PyCFunction) _wrap_Caret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Caret_swigregister", Caret_swigregister, METH_VARARGS, NULL}, { (char *)"new_BusyCursor", (PyCFunction) _wrap_new_BusyCursor, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"delete_BusyCursor", (PyCFunction) _wrap_delete_BusyCursor, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BusyCursor_swigregister", BusyCursor_swigregister, METH_VARARGS, NULL}, diff --git a/wxPython/wxPython/_controls.py b/wxPython/wxPython/_controls.py index ddffa027cb..c5d9133908 100644 --- a/wxPython/wxPython/_controls.py +++ b/wxPython/wxPython/_controls.py @@ -216,6 +216,7 @@ wxNB_LEFT = wx._controls.NB_LEFT wxNB_RIGHT = wx._controls.NB_RIGHT wxNB_BOTTOM = wx._controls.NB_BOTTOM wxNB_MULTILINE = wx._controls.NB_MULTILINE +wxNB_NOPAGETHEME = wx._controls.NB_NOPAGETHEME wxNB_HITTEST_NOWHERE = wx._controls.NB_HITTEST_NOWHERE wxNB_HITTEST_ONICON = wx._controls.NB_HITTEST_ONICON wxNB_HITTEST_ONLABEL = wx._controls.NB_HITTEST_ONLABEL