From c9c7117a2031edaa824ca7473c3c46e69fe9894a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 11 Dec 2003 20:14:28 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp | 5 +- .../contrib/glcanvas/gtk/glcanvas_wrap.cpp | 5 +- wxPython/contrib/ogl/gtk/ogl_wrap.cpp | 5 +- wxPython/contrib/stc/stc_wrap.cpp | 5 +- wxPython/contrib/xrc/xrc_wrap.cpp | 5 +- wxPython/src/gtk/calendar.py | 16 +++ wxPython/src/gtk/calendar_wrap.cpp | 118 +++++++++++++++- wxPython/src/gtk/controls.py | 9 +- wxPython/src/gtk/controls_wrap.cpp | 48 ++++++- wxPython/src/gtk/core.py | 16 +++ wxPython/src/gtk/core_wrap.cpp | 129 +++++++++++++++++- wxPython/src/gtk/gdi.py | 14 +- wxPython/src/gtk/gdi_wrap.cpp | 78 ++++++++++- wxPython/src/gtk/grid_wrap.cpp | 5 +- wxPython/src/gtk/html_wrap.cpp | 5 +- wxPython/src/gtk/misc_wrap.cpp | 5 +- wxPython/src/gtk/windows_wrap.cpp | 5 +- wxPython/src/gtk/wizard_wrap.cpp | 5 +- 18 files changed, 442 insertions(+), 36 deletions(-) diff --git a/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp b/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp index a38102eeac..0dbc576861 100644 --- a/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython diff --git a/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp b/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp index c27da7308c..cc0020cd57 100644 --- a/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp +++ b/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython diff --git a/wxPython/contrib/ogl/gtk/ogl_wrap.cpp b/wxPython/contrib/ogl/gtk/ogl_wrap.cpp index b42376d55b..fea4eaade1 100644 --- a/wxPython/contrib/ogl/gtk/ogl_wrap.cpp +++ b/wxPython/contrib/ogl/gtk/ogl_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython diff --git a/wxPython/contrib/stc/stc_wrap.cpp b/wxPython/contrib/stc/stc_wrap.cpp index 68d689dbf8..721b61be26 100644 --- a/wxPython/contrib/stc/stc_wrap.cpp +++ b/wxPython/contrib/stc/stc_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython diff --git a/wxPython/contrib/xrc/xrc_wrap.cpp b/wxPython/contrib/xrc/xrc_wrap.cpp index 61ea7fe92a..08776ffa19 100644 --- a/wxPython/contrib/xrc/xrc_wrap.cpp +++ b/wxPython/contrib/xrc/xrc_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython diff --git a/wxPython/src/gtk/calendar.py b/wxPython/src/gtk/calendar.py index 8c64bf55b4..6c2b37a0d3 100644 --- a/wxPython/src/gtk/calendar.py +++ b/wxPython/src/gtk/calendar.py @@ -130,6 +130,14 @@ class CalendarEvent(core.CommandEvent): """GetDate() -> DateTime""" return _calendar.CalendarEvent_GetDate(*args, **kwargs) + def SetDate(*args, **kwargs): + """SetDate(DateTime date)""" + return _calendar.CalendarEvent_SetDate(*args, **kwargs) + + def SetWeekDay(*args, **kwargs): + """SetWeekDay(wxDateTime::WeekDay wd)""" + return _calendar.CalendarEvent_SetWeekDay(*args, **kwargs) + def GetWeekDay(*args, **kwargs): """GetWeekDay() -> wxDateTime::WeekDay""" return _calendar.CalendarEvent_GetWeekDay(*args, **kwargs) @@ -284,6 +292,14 @@ class CalendarCtrl(core.Control): """Show(bool show=True) -> bool""" return _calendar.CalendarCtrl_Show(*args, **kwargs) + def GetMonthControl(*args, **kwargs): + """GetMonthControl() -> Control""" + return _calendar.CalendarCtrl_GetMonthControl(*args, **kwargs) + + def GetYearControl(*args, **kwargs): + """GetYearControl() -> Control""" + return _calendar.CalendarCtrl_GetYearControl(*args, **kwargs) + class CalendarCtrlPtr(CalendarCtrl): def __init__(self, this): diff --git a/wxPython/src/gtk/calendar_wrap.cpp b/wxPython/src/gtk/calendar_wrap.cpp index 473c3ff5fe..75063351dc 100644 --- a/wxPython/src/gtk/calendar_wrap.cpp +++ b/wxPython/src/gtk/calendar_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython @@ -865,6 +866,61 @@ static PyObject *_wrap_CalendarEvent_GetDate(PyObject *self, PyObject *args, PyO } +static PyObject *_wrap_CalendarEvent_SetDate(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxCalendarEvent *arg1 = (wxCalendarEvent *) 0 ; + wxDateTime *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "date", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:CalendarEvent_SetDate",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_wxDateTime,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (arg2 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetDate((wxDateTime const &)*arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_CalendarEvent_SetWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxCalendarEvent *arg1 = (wxCalendarEvent *) 0 ; + int arg2 ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "wd", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"Oi:CalendarEvent_SetWeekDay",kwnames,&obj0,&arg2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetWeekDay((wxDateTime::WeekDay )arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_CalendarEvent_GetWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxCalendarEvent *arg1 = (wxCalendarEvent *) 0 ; @@ -1895,6 +1951,60 @@ static PyObject *_wrap_CalendarCtrl_Show(PyObject *self, PyObject *args, PyObjec } +static PyObject *_wrap_CalendarCtrl_GetMonthControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxCalendarCtrl *arg1 = (wxCalendarCtrl *) 0 ; + wxControl *result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:CalendarCtrl_GetMonthControl",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxControl *)((wxCalendarCtrl const *)arg1)->GetMonthControl(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_CalendarCtrl_GetYearControl(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxCalendarCtrl *arg1 = (wxCalendarCtrl *) 0 ; + wxControl *result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:CalendarCtrl_GetYearControl",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxCalendarCtrl,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxControl *)((wxCalendarCtrl const *)arg1)->GetYearControl(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = wxPyMake_wxObject(result); + } + return resultobj; + fail: + return NULL; +} + + static PyObject * CalendarCtrl_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -1925,6 +2035,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"CalendarDateAttr_swigregister", CalendarDateAttr_swigregister, METH_VARARGS }, { (char *)"new_CalendarEvent", (PyCFunction) _wrap_new_CalendarEvent, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarEvent_GetDate", (PyCFunction) _wrap_CalendarEvent_GetDate, METH_VARARGS | METH_KEYWORDS }, + { (char *)"CalendarEvent_SetDate", (PyCFunction) _wrap_CalendarEvent_SetDate, METH_VARARGS | METH_KEYWORDS }, + { (char *)"CalendarEvent_SetWeekDay", (PyCFunction) _wrap_CalendarEvent_SetWeekDay, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarEvent_GetWeekDay", (PyCFunction) _wrap_CalendarEvent_GetWeekDay, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarEvent_swigregister", CalendarEvent_swigregister, METH_VARARGS }, { (char *)"new_CalendarCtrl", (PyCFunction) _wrap_new_CalendarCtrl, METH_VARARGS | METH_KEYWORDS }, @@ -1956,6 +2068,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"CalendarCtrl_HitTest", (PyCFunction) _wrap_CalendarCtrl_HitTest, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarCtrl_Enable", (PyCFunction) _wrap_CalendarCtrl_Enable, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarCtrl_Show", (PyCFunction) _wrap_CalendarCtrl_Show, METH_VARARGS | METH_KEYWORDS }, + { (char *)"CalendarCtrl_GetMonthControl", (PyCFunction) _wrap_CalendarCtrl_GetMonthControl, METH_VARARGS | METH_KEYWORDS }, + { (char *)"CalendarCtrl_GetYearControl", (PyCFunction) _wrap_CalendarCtrl_GetYearControl, METH_VARARGS | METH_KEYWORDS }, { (char *)"CalendarCtrl_swigregister", CalendarCtrl_swigregister, METH_VARARGS }, { NULL, NULL } }; diff --git a/wxPython/src/gtk/controls.py b/wxPython/src/gtk/controls.py index 4c5bc82490..4a05b92fa3 100644 --- a/wxPython/src/gtk/controls.py +++ b/wxPython/src/gtk/controls.py @@ -3065,7 +3065,7 @@ class ListEvent(core.NotifyEvent): """GetPoint() -> Point""" return _controls.ListEvent_GetPoint(*args, **kwargs) - GetPostiion = GetPoint + GetPosition = GetPoint def GetLabel(*args, **kwargs): """GetLabel() -> wxString""" return _controls.ListEvent_GetLabel(*args, **kwargs) @@ -3737,6 +3737,7 @@ wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK = _controls.wxEVT_COMMAND_TREE_ITEM_RIGHT_CL wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK = _controls.wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK wxEVT_COMMAND_TREE_END_DRAG = _controls.wxEVT_COMMAND_TREE_END_DRAG wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK = _controls.wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK +wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP = _controls.wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP EVT_TREE_BEGIN_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_DRAG , 1) EVT_TREE_BEGIN_RDRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_RDRAG , 1) EVT_TREE_BEGIN_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT , 1) @@ -3756,7 +3757,7 @@ EVT_TREE_ITEM_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLIC EVT_TREE_ITEM_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, 1) EVT_TREE_END_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_END_DRAG , 1) EVT_TREE_STATE_IMAGE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 1) - +EVT_TREE_ITEM_GETTOOLTIP = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 1) class TreeEvent(core.NotifyEvent): def __repr__(self): @@ -3819,6 +3820,10 @@ class TreeEvent(core.NotifyEvent): """SetEditCanceled(bool editCancelled)""" return _controls.TreeEvent_SetEditCanceled(*args, **kwargs) + def SetToolTip(*args, **kwargs): + """SetToolTip(wxString toolTip)""" + return _controls.TreeEvent_SetToolTip(*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 5b72d82f38..76f75031c3 100644 --- a/wxPython/src/gtk/controls_wrap.cpp +++ b/wxPython/src/gtk/controls_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython @@ -20444,6 +20445,46 @@ static PyObject *_wrap_TreeEvent_SetEditCanceled(PyObject *self, PyObject *args, } +static PyObject *_wrap_TreeEvent_SetToolTip(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxTreeEvent *arg1 = (wxTreeEvent *) 0 ; + wxString *arg2 = 0 ; + bool temp2 = False ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "toolTip", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TreeEvent_SetToolTip",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxTreeEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg2 = wxString_in_helper(obj1); + if (arg2 == NULL) SWIG_fail; + temp2 = True; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetToolTip((wxString const &)*arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + { + if (temp2) + delete arg2; + } + return resultobj; + fail: + { + if (temp2) + delete arg2; + } + return NULL; +} + + static PyObject * TreeEvent_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -26420,6 +26461,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeEvent_SetLabel", (PyCFunction) _wrap_TreeEvent_SetLabel, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeEvent_IsEditCancelled", (PyCFunction) _wrap_TreeEvent_IsEditCancelled, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeEvent_SetEditCanceled", (PyCFunction) _wrap_TreeEvent_SetEditCanceled, METH_VARARGS | METH_KEYWORDS }, + { (char *)"TreeEvent_SetToolTip", (PyCFunction) _wrap_TreeEvent_SetToolTip, METH_VARARGS | METH_KEYWORDS }, { (char *)"TreeEvent_swigregister", TreeEvent_swigregister, METH_VARARGS }, { (char *)"new_TreeCtrl", (PyCFunction) _wrap_new_TreeCtrl, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_PreTreeCtrl", (PyCFunction) _wrap_new_PreTreeCtrl, METH_VARARGS | METH_KEYWORDS }, @@ -27962,6 +28004,7 @@ static swig_const_info swig_const_table[] = { { SWIG_PY_INT, (char *)"wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK", (long) wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, 0, 0, 0}, { SWIG_PY_INT, (char *)"wxEVT_COMMAND_TREE_END_DRAG", (long) wxEVT_COMMAND_TREE_END_DRAG, 0, 0, 0}, { SWIG_PY_INT, (char *)"wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK", (long) wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP", (long) wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 0, 0, 0}, { SWIG_PY_INT, (char *)"DIRCTRL_DIR_ONLY", (long) wxDIRCTRL_DIR_ONLY, 0, 0, 0}, { SWIG_PY_INT, (char *)"DIRCTRL_SELECT_FIRST", (long) wxDIRCTRL_SELECT_FIRST, 0, 0, 0}, { SWIG_PY_INT, (char *)"DIRCTRL_SHOW_FILTERS", (long) wxDIRCTRL_SHOW_FILTERS, 0, 0, 0}, @@ -28052,6 +28095,7 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d, "wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK", PyInt_FromLong(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK)); PyDict_SetItemString(d, "wxEVT_COMMAND_TREE_END_DRAG", PyInt_FromLong(wxEVT_COMMAND_TREE_END_DRAG)); PyDict_SetItemString(d, "wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK", PyInt_FromLong(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK)); + PyDict_SetItemString(d, "wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP", PyInt_FromLong(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP)); // Map renamed classes back to their common name for OOR wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData"); diff --git a/wxPython/src/gtk/core.py b/wxPython/src/gtk/core.py index c59b42b558..ceae460f07 100644 --- a/wxPython/src/gtk/core.py +++ b/wxPython/src/gtk/core.py @@ -1072,6 +1072,22 @@ class Rect(object): """SetSize(Size s)""" return _core.Rect_SetSize(*args, **kwargs) + def GetTopLeft(*args, **kwargs): + """GetTopLeft() -> Point""" + return _core.Rect_GetTopLeft(*args, **kwargs) + + def SetTopLeft(*args, **kwargs): + """SetTopLeft(Point p)""" + return _core.Rect_SetTopLeft(*args, **kwargs) + + def GetBottomRight(*args, **kwargs): + """GetBottomRight() -> Point""" + return _core.Rect_GetBottomRight(*args, **kwargs) + + def SetBottomRight(*args, **kwargs): + """SetBottomRight(Point p)""" + return _core.Rect_SetBottomRight(*args, **kwargs) + def GetLeft(*args, **kwargs): """GetLeft() -> int""" return _core.Rect_GetLeft(*args, **kwargs) diff --git a/wxPython/src/gtk/core_wrap.cpp b/wxPython/src/gtk/core_wrap.cpp index d93fe3e626..8e3c9163b2 100644 --- a/wxPython/src/gtk/core_wrap.cpp +++ b/wxPython/src/gtk/core_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython @@ -3016,6 +3017,126 @@ static PyObject *_wrap_Rect_SetSize(PyObject *self, PyObject *args, PyObject *kw } +static PyObject *_wrap_Rect_GetTopLeft(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Rect_GetTopLeft",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxRect const *)arg1)->GetTopLeft(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxPoint * resultptr; + resultptr = new wxPoint((wxPoint &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_wxPoint, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Rect_SetTopLeft(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint *arg2 = 0 ; + wxPoint temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Rect_SetTopLeft",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetTopLeft((wxPoint const &)*arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Rect_GetBottomRight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Rect_GetBottomRight",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxRect const *)arg1)->GetBottomRight(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxPoint * resultptr; + resultptr = new wxPoint((wxPoint &) result); + resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_wxPoint, 1); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Rect_SetBottomRight(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxRect *arg1 = (wxRect *) 0 ; + wxPoint *arg2 = 0 ; + wxPoint temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "p", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Rect_SetBottomRight",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxRect,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxPoint_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetBottomRight((wxPoint const &)*arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Rect_GetLeft(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxRect *arg1 = (wxRect *) 0 ; @@ -35413,6 +35534,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"Rect_SetPosition", (PyCFunction) _wrap_Rect_SetPosition, METH_VARARGS | METH_KEYWORDS }, { (char *)"Rect_GetSize", (PyCFunction) _wrap_Rect_GetSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Rect_SetSize", (PyCFunction) _wrap_Rect_SetSize, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Rect_GetTopLeft", (PyCFunction) _wrap_Rect_GetTopLeft, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Rect_SetTopLeft", (PyCFunction) _wrap_Rect_SetTopLeft, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Rect_GetBottomRight", (PyCFunction) _wrap_Rect_GetBottomRight, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Rect_SetBottomRight", (PyCFunction) _wrap_Rect_SetBottomRight, METH_VARARGS | METH_KEYWORDS }, { (char *)"Rect_GetLeft", (PyCFunction) _wrap_Rect_GetLeft, METH_VARARGS | METH_KEYWORDS }, { (char *)"Rect_GetTop", (PyCFunction) _wrap_Rect_GetTop, METH_VARARGS | METH_KEYWORDS }, { (char *)"Rect_GetBottom", (PyCFunction) _wrap_Rect_GetBottom, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/gdi.py b/wxPython/src/gtk/gdi.py index 7252637aac..04fa689fb1 100644 --- a/wxPython/src/gtk/gdi.py +++ b/wxPython/src/gtk/gdi.py @@ -79,9 +79,9 @@ class Colour(core.Object): """Set(unsigned char red, unsigned char green, unsigned char blue)""" return _gdi.Colour_Set(*args, **kwargs) - def SetRBG(*args, **kwargs): - """SetRBG(unsigned long colRGB)""" - return _gdi.Colour_SetRBG(*args, **kwargs) + def SetRGB(*args, **kwargs): + """SetRGB(unsigned long colRGB)""" + return _gdi.Colour_SetRGB(*args, **kwargs) def __eq__(*args, **kwargs): """__eq__(Colour colour) -> bool""" @@ -91,6 +91,10 @@ class Colour(core.Object): """__ne__(Colour colour) -> bool""" return _gdi.Colour___ne__(*args, **kwargs) + def InitFromName(*args, **kwargs): + """InitFromName(wxString colourName)""" + return _gdi.Colour_InitFromName(*args, **kwargs) + def Get(*args, **kwargs): """Get() -> PyObject""" return _gdi.Colour_Get(*args, **kwargs) @@ -231,6 +235,10 @@ class Pen(GDIObject): """GetDashes() -> PyObject""" return _gdi.Pen_GetDashes(*args, **kwargs) + def GetDashCount(*args, **kwargs): + """GetDashCount() -> int""" + return _gdi.Pen_GetDashCount(*args, **kwargs) + def __nonzero__(self): return self.Ok() class PenPtr(Pen): diff --git a/wxPython/src/gtk/gdi_wrap.cpp b/wxPython/src/gtk/gdi_wrap.cpp index 184b1c1f14..b0372a48b5 100644 --- a/wxPython/src/gtk/gdi_wrap.cpp +++ b/wxPython/src/gtk/gdi_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython @@ -1000,7 +1001,7 @@ static PyObject *_wrap_Colour_Set(PyObject *self, PyObject *args, PyObject *kwar } -static PyObject *_wrap_Colour_SetRBG(PyObject *self, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_Colour_SetRGB(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxColour *arg1 = (wxColour *) 0 ; unsigned long arg2 ; @@ -1010,7 +1011,7 @@ static PyObject *_wrap_Colour_SetRBG(PyObject *self, PyObject *args, PyObject *k (char *) "self",(char *) "colRGB", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Colour_SetRBG",kwnames,&obj0,&obj1)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Colour_SetRGB",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; arg2 = (unsigned long) PyInt_AsLong(obj1); if (PyErr_Occurred()) SWIG_fail; @@ -1092,6 +1093,46 @@ static PyObject *_wrap_Colour___ne__(PyObject *self, PyObject *args, PyObject *k } +static PyObject *_wrap_Colour_InitFromName(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxColour *arg1 = (wxColour *) 0 ; + wxString *arg2 = 0 ; + bool temp2 = False ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "colourName", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Colour_InitFromName",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxColour,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + arg2 = wxString_in_helper(obj1); + if (arg2 == NULL) SWIG_fail; + temp2 = True; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->InitFromName((wxString const &)*arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + { + if (temp2) + delete arg2; + } + return resultobj; + fail: + { + if (temp2) + delete arg2; + } + return NULL; +} + + static PyObject *_wrap_Colour_Get(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxColour *arg1 = (wxColour *) 0 ; @@ -1699,6 +1740,31 @@ static PyObject *_wrap_Pen_GetDashes(PyObject *self, PyObject *args, PyObject *k } +static PyObject *_wrap_Pen_GetDashCount(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxPen *arg1 = (wxPen *) 0 ; + int result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Pen_GetDashCount",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_wxPen,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)((wxPen const *)arg1)->GetDashCount(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + static PyObject * Pen_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -15807,9 +15873,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"Colour_Blue", (PyCFunction) _wrap_Colour_Blue, METH_VARARGS | METH_KEYWORDS }, { (char *)"Colour_Ok", (PyCFunction) _wrap_Colour_Ok, METH_VARARGS | METH_KEYWORDS }, { (char *)"Colour_Set", (PyCFunction) _wrap_Colour_Set, METH_VARARGS | METH_KEYWORDS }, - { (char *)"Colour_SetRBG", (PyCFunction) _wrap_Colour_SetRBG, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Colour_SetRGB", (PyCFunction) _wrap_Colour_SetRGB, METH_VARARGS | METH_KEYWORDS }, { (char *)"Colour___eq__", (PyCFunction) _wrap_Colour___eq__, METH_VARARGS | METH_KEYWORDS }, { (char *)"Colour___ne__", (PyCFunction) _wrap_Colour___ne__, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Colour_InitFromName", (PyCFunction) _wrap_Colour_InitFromName, METH_VARARGS | METH_KEYWORDS }, { (char *)"Colour_Get", (PyCFunction) _wrap_Colour_Get, METH_VARARGS | METH_KEYWORDS }, { (char *)"Colour_swigregister", Colour_swigregister, METH_VARARGS }, { (char *)"new_Palette", (PyCFunction) _wrap_new_Palette, METH_VARARGS | METH_KEYWORDS }, @@ -15833,6 +15900,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Pen_SetWidth", (PyCFunction) _wrap_Pen_SetWidth, METH_VARARGS | METH_KEYWORDS }, { (char *)"Pen_SetDashes", (PyCFunction) _wrap_Pen_SetDashes, METH_VARARGS | METH_KEYWORDS }, { (char *)"Pen_GetDashes", (PyCFunction) _wrap_Pen_GetDashes, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Pen_GetDashCount", (PyCFunction) _wrap_Pen_GetDashCount, METH_VARARGS | METH_KEYWORDS }, { (char *)"Pen_swigregister", Pen_swigregister, METH_VARARGS }, { (char *)"new_PyPen", (PyCFunction) _wrap_new_PyPen, METH_VARARGS | METH_KEYWORDS }, { (char *)"delete_PyPen", (PyCFunction) _wrap_delete_PyPen, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/grid_wrap.cpp b/wxPython/src/gtk/grid_wrap.cpp index 1fcc52dfc6..098a647334 100644 --- a/wxPython/src/gtk/grid_wrap.cpp +++ b/wxPython/src/gtk/grid_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython diff --git a/wxPython/src/gtk/html_wrap.cpp b/wxPython/src/gtk/html_wrap.cpp index 8a789ddcee..84542ae7a5 100644 --- a/wxPython/src/gtk/html_wrap.cpp +++ b/wxPython/src/gtk/html_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython diff --git a/wxPython/src/gtk/misc_wrap.cpp b/wxPython/src/gtk/misc_wrap.cpp index bed1995547..5201c5ab8c 100644 --- a/wxPython/src/gtk/misc_wrap.cpp +++ b/wxPython/src/gtk/misc_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython diff --git a/wxPython/src/gtk/windows_wrap.cpp b/wxPython/src/gtk/windows_wrap.cpp index 57d89ca9c5..7a1bb8fb19 100644 --- a/wxPython/src/gtk/windows_wrap.cpp +++ b/wxPython/src/gtk/windows_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython diff --git a/wxPython/src/gtk/wizard_wrap.cpp b/wxPython/src/gtk/wizard_wrap.cpp index 864e455450..0e71e04262 100644 --- a/wxPython/src/gtk/wizard_wrap.cpp +++ b/wxPython/src/gtk/wizard_wrap.cpp @@ -45,8 +45,9 @@ private: #define SWIG_TypeName SWIG_Python_TypeName #define SWIG_TypeQuery SWIG_Python_TypeQuery #define SWIG_TypeClientData SWIG_Python_TypeClientData -#define SWIG_PackData SWIG_Python_PackData -#define SWIG_UnpackData SWIG_Python_UnpackData +#define SWIG_PackData SWIG_Python_PackData +#define SWIG_UnpackData SWIG_Python_UnpackData + /*********************************************************************** * common.swg for wxPython -- 2.45.2