X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c02082608f0646056053f99bdcccccd67dcaf03..b7aef858828222a05e57671fa01d3cac78aee3ac:/wxPython/src/grid.i?ds=inline diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 8abc7cc0a6..0d0f37e65b 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -10,7 +10,11 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -%module grid +%define DOCSTRING +"Classes for implementing a spreadsheet-like control." +%enddef +%module(docstring=DOCSTRING) grid + %{ #include "wx/wxPython/wxPython.h" @@ -26,7 +30,8 @@ //--------------------------------------------------------------------------- %import windows.i -%pythoncode { wx = core } +%pythoncode { wx = _core } +%pythoncode { __docfilter__ = wx.__DocFilter(globals()) } %include _grid_rename.i @@ -1504,7 +1509,7 @@ public: bool operator!=( const wxGridCellCoords& other ) const; %extend { - PyObject* asTuple() { + PyObject* Get() { PyObject* tup = PyTuple_New(2); PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow())); PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol())); @@ -1512,9 +1517,10 @@ public: } } %pythoncode { - def __str__(self): return str(self.asTuple()) - def __repr__(self): return 'wxGridCellCoords'+str(self.asTuple()) - def __len__(self): return len(self.asTuple()) + asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") + def __str__(self): return str(self.Get()) + def __repr__(self): return 'wxGridCellCoords'+str(self.Get()) + def __len__(self): return len(self.Get()) def __getitem__(self, index): return self.asTuple()[index] def __setitem__(self, index, val): if index == 0: self.SetRow(val) @@ -1937,6 +1943,8 @@ public: wxWindow* GetGridCornerLabelWindow(); + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); };