From 5e4ca4a83789f804948ff9b217f1ac1c5bdac9d5 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 17 May 2004 19:22:49 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/xrc/gtk/xrc.py | 2 +- wxPython/src/gtk/_controls.py | 6 +++- wxPython/src/gtk/_controls_wrap.cpp | 39 +++++++++++++++++++++-- wxPython/src/gtk/_core.py | 10 +++--- wxPython/src/gtk/_core_wrap.cpp | 22 ------------- wxPython/src/gtk/calendar.py | 48 ----------------------------- 6 files changed, 48 insertions(+), 79 deletions(-) diff --git a/wxPython/contrib/xrc/gtk/xrc.py b/wxPython/contrib/xrc/gtk/xrc.py index ae353c6bb0..4dedbfea2d 100644 --- a/wxPython/contrib/xrc/gtk/xrc.py +++ b/wxPython/contrib/xrc/gtk/xrc.py @@ -3,7 +3,7 @@ """ The `XmlResource` class allows program resources defining menus, layout of -controls on a panel, etc. +controls on a panel, etc. to be loaded from an XML file. """ import _xrc diff --git a/wxPython/src/gtk/_controls.py b/wxPython/src/gtk/_controls.py index 405180dfde..445f48e93d 100644 --- a/wxPython/src/gtk/_controls.py +++ b/wxPython/src/gtk/_controls.py @@ -1496,7 +1496,7 @@ class TextAttr(object): return _controls_.TextAttr_SetTabs(*args, **kwargs) def SetLeftIndent(*args, **kwargs): - """SetLeftIndent(self, int indent)""" + """SetLeftIndent(self, int indent, int subIndent=0)""" return _controls_.TextAttr_SetLeftIndent(*args, **kwargs) def SetRightIndent(*args, **kwargs): @@ -1563,6 +1563,10 @@ class TextAttr(object): """GetLeftIndent(self) -> long""" return _controls_.TextAttr_GetLeftIndent(*args, **kwargs) + def GetLeftSubIndent(*args, **kwargs): + """GetLeftSubIndent(self) -> long""" + return _controls_.TextAttr_GetLeftSubIndent(*args, **kwargs) + def GetRightIndent(*args, **kwargs): """GetRightIndent(self) -> long""" return _controls_.TextAttr_GetRightIndent(*args, **kwargs) diff --git a/wxPython/src/gtk/_controls_wrap.cpp b/wxPython/src/gtk/_controls_wrap.cpp index 59f6cb6945..dbfd8c5476 100644 --- a/wxPython/src/gtk/_controls_wrap.cpp +++ b/wxPython/src/gtk/_controls_wrap.cpp @@ -7263,20 +7263,26 @@ static PyObject *_wrap_TextAttr_SetLeftIndent(PyObject *self, PyObject *args, Py PyObject *resultobj; wxTextAttr *arg1 = (wxTextAttr *) 0 ; int arg2 ; + int arg3 = (int) 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; char *kwnames[] = { - (char *) "self",(char *) "indent", NULL + (char *) "self",(char *) "indent",(char *) "subIndent", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TextAttr_SetLeftIndent",kwnames,&obj0,&obj1)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:TextAttr_SetLeftIndent",kwnames,&obj0,&obj1,&obj2)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTextAttr, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetLeftIndent(arg2); + (arg1)->SetLeftIndent(arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -7753,6 +7759,32 @@ static PyObject *_wrap_TextAttr_GetLeftIndent(PyObject *self, PyObject *args, Py } +static PyObject *_wrap_TextAttr_GetLeftSubIndent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxTextAttr *arg1 = (wxTextAttr *) 0 ; + long result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TextAttr_GetLeftSubIndent",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTextAttr, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (long)((wxTextAttr const *)arg1)->GetLeftSubIndent(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_TextAttr_GetRightIndent(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxTextAttr *arg1 = (wxTextAttr *) 0 ; @@ -31179,6 +31211,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TextAttr_GetAlignment", (PyCFunction) _wrap_TextAttr_GetAlignment, METH_VARARGS | METH_KEYWORDS }, { (char *)"TextAttr_GetTabs", (PyCFunction) _wrap_TextAttr_GetTabs, METH_VARARGS | METH_KEYWORDS }, { (char *)"TextAttr_GetLeftIndent", (PyCFunction) _wrap_TextAttr_GetLeftIndent, METH_VARARGS | METH_KEYWORDS }, + { (char *)"TextAttr_GetLeftSubIndent", (PyCFunction) _wrap_TextAttr_GetLeftSubIndent, METH_VARARGS | METH_KEYWORDS }, { (char *)"TextAttr_GetRightIndent", (PyCFunction) _wrap_TextAttr_GetRightIndent, METH_VARARGS | METH_KEYWORDS }, { (char *)"TextAttr_GetFlags", (PyCFunction) _wrap_TextAttr_GetFlags, METH_VARARGS | METH_KEYWORDS }, { (char *)"TextAttr_IsDefault", (PyCFunction) _wrap_TextAttr_IsDefault, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/_core.py b/wxPython/src/gtk/_core.py index 786fa727e6..45028d1ba4 100644 --- a/wxPython/src/gtk/_core.py +++ b/wxPython/src/gtk/_core.py @@ -2322,10 +2322,13 @@ def Image_GetImageExtWildcard(*args, **kwargs): """Image_GetImageExtWildcard() -> String""" return _core_.Image_GetImageExtWildcard(*args, **kwargs) +def InitAllImageHandlers(): + """ + The former functionality of InitAllImageHanders is now done internal to + the _core_ extension module and so this function has become a simple NOP. + """ + pass -def InitAllImageHandlers(*args, **kwargs): - """InitAllImageHandlers()""" - return _core_.InitAllImageHandlers(*args, **kwargs) IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM BMP_24BPP = _core_.BMP_24BPP @@ -5198,7 +5201,6 @@ class PySimpleApp(wx.App): wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt) def OnInit(self): - wx.InitAllImageHandlers() return True diff --git a/wxPython/src/gtk/_core_wrap.cpp b/wxPython/src/gtk/_core_wrap.cpp index f2f7aae54a..9c538f75f8 100644 --- a/wxPython/src/gtk/_core_wrap.cpp +++ b/wxPython/src/gtk/_core_wrap.cpp @@ -11275,27 +11275,6 @@ static PyObject * Image_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } -static PyObject *_wrap_InitAllImageHandlers(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - char *kwnames[] = { - NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":InitAllImageHandlers",kwnames)) goto fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - wxInitAllImageHandlers(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - static int _wrap_NullImage_set(PyObject *_val) { PyErr_SetString(PyExc_TypeError,"Variable NullImage is read-only."); return 1; @@ -40459,7 +40438,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Image_ConvertToBitmap", (PyCFunction) _wrap_Image_ConvertToBitmap, METH_VARARGS | METH_KEYWORDS }, { (char *)"Image_ConvertToMonoBitmap", (PyCFunction) _wrap_Image_ConvertToMonoBitmap, METH_VARARGS | METH_KEYWORDS }, { (char *)"Image_swigregister", Image_swigregister, METH_VARARGS }, - { (char *)"InitAllImageHandlers", (PyCFunction) _wrap_InitAllImageHandlers, METH_VARARGS | METH_KEYWORDS }, { (char *)"new_BMPHandler", (PyCFunction) _wrap_new_BMPHandler, METH_VARARGS | METH_KEYWORDS }, { (char *)"BMPHandler_swigregister", BMPHandler_swigregister, METH_VARARGS }, { (char *)"new_ICOHandler", (PyCFunction) _wrap_new_ICOHandler, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/calendar.py b/wxPython/src/gtk/calendar.py index 6753cd41f1..8680354bb4 100644 --- a/wxPython/src/gtk/calendar.py +++ b/wxPython/src/gtk/calendar.py @@ -194,46 +194,6 @@ class CalendarCtrl(_core.Control): As the attributes are specified for each day, they may change when the month is changed, so you will often want to update them in an EVT_CALENDAR_MONTH event handler. - - Window Styles - ------------- - ============================== ============================ - CAL_SUNDAY_FIRST Show Sunday as the first day - in the week - CAL_MONDAY_FIRST Show Monday as the first day - in the week - CAL_SHOW_HOLIDAYS Highlight holidays in the - calendar - CAL_NO_YEAR_CHANGE Disable the year changing - CAL_NO_MONTH_CHANGE Disable the month (and, - implicitly, the year) changing - CAL_SHOW_SURROUNDING_WEEKS Show the neighbouring weeks in - the previous and next months - CAL_SEQUENTIAL_MONTH_SELECTION Use alternative, more compact, - style for the month and year - selection controls. - ============================== ============================ - - The default calendar style is CAL_SHOW_HOLIDAYS. - - Events - ------- - ============================= ============================== - EVT_CALENDAR A day was double clicked in the - calendar. - EVT_CALENDAR_SEL_CHANGED The selected date changed. - EVT_CALENDAR_DAY The selected day changed. - EVT_CALENDAR_MONTH The selected month changed. - EVT_CALENDAR_YEAR The selected year changed. - EVT_CALENDAR_WEEKDAY_CLICKED User clicked on the week day - header - ============================= ============================== - - Note that changing the selected date will result in one of - EVT_CALENDAR_DAY, MONTH or YEAR events and an EVT_CALENDAR_SEL_CHANGED - event. - - """ def __repr__(self): return "<%s.%s; proxy of C++ wxCalendarCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -469,14 +429,6 @@ class CalendarCtrl(_core.Control): Returns 3-tuple with information about the given position on the calendar control. The first value of the tuple is a result code and determines the validity of the remaining two values. - The result codes are: - - =================== ============================================ - CAL_HITTEST_NOWHERE hit outside of anything - CAL_HITTEST_HEADER hit on the header, weekday is valid - CAL_HITTEST_DAY hit on a day in the calendar, date is set. - =================== ============================================ - """ return _calendar.CalendarCtrl_HitTest(*args, **kwargs) -- 2.45.2