From 562ecc31436845f22982493b398137a3c21ab4a4 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 2 Mar 2005 22:02:55 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_window.i | 9 +++++ wxPython/src/gtk/_controls.py | 4 ++ wxPython/src/gtk/_controls_wrap.cpp | 33 ++++++++++++++++ wxPython/src/gtk/_core.py | 8 ++++ wxPython/src/gtk/_core_wrap.cpp | 58 +++++++++++++++++++++++++++++ 5 files changed, 112 insertions(+) diff --git a/wxPython/src/_window.i b/wxPython/src/_window.i index 18032eae1b..668b6d5264 100644 --- a/wxPython/src/_window.i +++ b/wxPython/src/_window.i @@ -1363,6 +1363,15 @@ not be used at all.", ""); foreground colour is dependent on the window class; it may be the text colour or other colour, or it may not be used at all.", ""); + DocDeclStr( + bool , InheritsBackgroundColour() const, + "", ""); + + DocDeclStr( + bool , UseBgCol() const, + "", ""); + + // TODO: // // if the window shouldn't inherit its colour from the parent, override // // this function to return true diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index 8e84e2809b..1eb8448ce7 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -5213,6 +5213,10 @@ class TreeEvent(_core.NotifyEvent): """SetToolTip(self, String toolTip)""" return _controls_.TreeEvent_SetToolTip(*args, **kwargs) + def GetToolTip(*args, **kwargs): + """GetToolTip(self) -> String""" + return _controls_.TreeEvent_GetToolTip(*args, **kwargs) + class TreeEventPtr(TreeEvent): def __init__(self, this): diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index 05177a8cce..666757304e 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -27887,6 +27887,38 @@ static PyObject *_wrap_TreeEvent_SetToolTip(PyObject *, PyObject *args, PyObject } +static PyObject *_wrap_TreeEvent_GetToolTip(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxTreeEvent *arg1 = (wxTreeEvent *) 0 ; + wxString result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TreeEvent_GetToolTip",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxTreeEvent, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (arg1)->GetToolTip(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { +#if wxUSE_UNICODE + resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len()); +#else + resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len()); +#endif + } + return resultobj; + fail: + return NULL; +} + + static PyObject * TreeEvent_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -35545,6 +35577,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeEvent_IsEditCancelled", (PyCFunction) _wrap_TreeEvent_IsEditCancelled, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeEvent_SetEditCanceled", (PyCFunction) _wrap_TreeEvent_SetEditCanceled, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeEvent_SetToolTip", (PyCFunction) _wrap_TreeEvent_SetToolTip, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"TreeEvent_GetToolTip", (PyCFunction) _wrap_TreeEvent_GetToolTip, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"TreeEvent_swigregister", TreeEvent_swigregister, METH_VARARGS, NULL}, { (char *)"new_TreeCtrl", (PyCFunction) _wrap_new_TreeCtrl, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_PreTreeCtrl", (PyCFunction) _wrap_new_PreTreeCtrl, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index 6ccb1d5b0e..d64f158bbb 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -7389,6 +7389,14 @@ class Window(EvtHandler): """ return _core_.Window_GetForegroundColour(*args, **kwargs) + def InheritsBackgroundColour(*args, **kwargs): + """InheritsBackgroundColour(self) -> bool""" + return _core_.Window_InheritsBackgroundColour(*args, **kwargs) + + def UseBgCol(*args, **kwargs): + """UseBgCol(self) -> bool""" + return _core_.Window_UseBgCol(*args, **kwargs) + def SetBackgroundStyle(*args, **kwargs): """ SetBackgroundStyle(self, int style) -> bool diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index 8580d65dea..ad0e5f9846 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -29449,6 +29449,62 @@ static PyObject *_wrap_Window_GetForegroundColour(PyObject *, PyObject *args, Py } +static PyObject *_wrap_Window_InheritsBackgroundColour(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Window_InheritsBackgroundColour",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxWindow const *)arg1)->InheritsBackgroundColour(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Window_UseBgCol(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Window_UseBgCol",kwnames,&obj0)) goto fail; + SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0); + if (SWIG_arg_fail(1)) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxWindow const *)arg1)->UseBgCol(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Window_SetBackgroundStyle(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -45634,6 +45690,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_SetOwnForegroundColour", (PyCFunction) _wrap_Window_SetOwnForegroundColour, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetBackgroundColour", (PyCFunction) _wrap_Window_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetForegroundColour", (PyCFunction) _wrap_Window_GetForegroundColour, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Window_InheritsBackgroundColour", (PyCFunction) _wrap_Window_InheritsBackgroundColour, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"Window_UseBgCol", (PyCFunction) _wrap_Window_UseBgCol, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_SetBackgroundStyle", (PyCFunction) _wrap_Window_SetBackgroundStyle, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_GetBackgroundStyle", (PyCFunction) _wrap_Window_GetBackgroundStyle, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Window_HasTransparentBackground", (PyCFunction) _wrap_Window_HasTransparentBackground, METH_VARARGS | METH_KEYWORDS, NULL}, -- 2.47.2