From ce41e186c1887f2b0a41a2890a929b1b5163a6b4 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 6 Feb 2003 18:37:47 +0000 Subject: [PATCH] SWIGged updates for wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/controls2.cpp | 33 +++++++++++++++++++++++++++++++++ wxPython/src/gtk/controls2.py | 3 +++ wxPython/src/gtk/sizers.py | 4 ++-- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/wxPython/src/gtk/controls2.cpp b/wxPython/src/gtk/controls2.cpp index c7f564bd0c..4cbb0f0725 100644 --- a/wxPython/src/gtk/controls2.cpp +++ b/wxPython/src/gtk/controls2.cpp @@ -3713,6 +3713,38 @@ static PyObject *_wrap_wxListCtrl_GetItemSpacing(PyObject *self, PyObject *args, return _resultobj; } +#define wxListCtrl_SetItemSpacing(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetItemSpacing(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxListCtrl_SetItemSpacing(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyListCtrl * _arg0; + int _arg1; + bool _arg2 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool2 = (int) FALSE; + char *_kwnames[] = { "self","spacing","isSmall", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|i:wxListCtrl_SetItemSpacing",_kwnames,&_argo0,&_arg1,&tempbool2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyListCtrl_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxListCtrl_SetItemSpacing. Expected _wxPyListCtrl_p."); + return NULL; + } + } + _arg2 = (bool ) tempbool2; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxListCtrl_SetItemSpacing(_arg0,_arg1,_arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxListCtrl_GetSelectedItemCount(_swigobj) (_swigobj->GetSelectedItemCount()) static PyObject *_wrap_wxListCtrl_GetSelectedItemCount(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -10868,6 +10900,7 @@ static PyMethodDef controls2cMethods[] = { { "wxListCtrl_SetTextColour", (PyCFunction) _wrap_wxListCtrl_SetTextColour, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetTextColour", (PyCFunction) _wrap_wxListCtrl_GetTextColour, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetSelectedItemCount", (PyCFunction) _wrap_wxListCtrl_GetSelectedItemCount, METH_VARARGS | METH_KEYWORDS }, + { "wxListCtrl_SetItemSpacing", (PyCFunction) _wrap_wxListCtrl_SetItemSpacing, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetItemSpacing", (PyCFunction) _wrap_wxListCtrl_GetItemSpacing, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetColumnCount", (PyCFunction) _wrap_wxListCtrl_GetColumnCount, METH_VARARGS | METH_KEYWORDS }, { "wxListCtrl_GetItemCount", (PyCFunction) _wrap_wxListCtrl_GetItemCount, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/controls2.py b/wxPython/src/gtk/controls2.py index 40afd577d6..f863aea182 100644 --- a/wxPython/src/gtk/controls2.py +++ b/wxPython/src/gtk/controls2.py @@ -511,6 +511,9 @@ class wxListCtrlPtr(wxControlPtr): def GetItemSpacing(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetItemSpacing,(self,) + _args, _kwargs) return val + def SetItemSpacing(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_SetItemSpacing,(self,) + _args, _kwargs) + return val def GetSelectedItemCount(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetSelectedItemCount,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/gtk/sizers.py b/wxPython/src/gtk/sizers.py index 53c769a251..922d4a60e9 100644 --- a/wxPython/src/gtk/sizers.py +++ b/wxPython/src/gtk/sizers.py @@ -244,9 +244,9 @@ class wxSizerPtr(wxObjectPtr): def Insert(self, *args, **kw): if type(args[1]) == type(1): apply(self.InsertSpacer, args, kw) - elif isinstance(args[0], wxSizerPtr): + elif isinstance(args[1], wxSizerPtr): apply(self.InsertSizer, args, kw) - elif isinstance(args[0], wxWindowPtr): + elif isinstance(args[1], wxWindowPtr): apply(self.InsertWindow, args, kw) else: raise TypeError, 'Expected int, wxSizer or wxWindow parameter'