X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da32eb53cbe7947f3f4599d7b6b5caa21a68d27f..30deac1fa50bd132e57aa386f3c844d275dc95ea:/wxPython/src/grid.i diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index d7d4d4bca3..bf6b371d04 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 @@ -938,7 +943,7 @@ class wxGridCellFloatEditor : public wxGridCellTextEditor { public: %pythonAppend wxGridCellFloatEditor "self._setOORInfo(self)" - wxGridCellFloatEditor(); + wxGridCellFloatEditor(int width = -1, int precision = -1); virtual wxString GetValue(); }; @@ -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) @@ -1552,7 +1558,17 @@ public: long style = wxWANTS_CHARS, const wxString& name = wxPyPanelNameStr); + %name(PreGrid) wxGrid(); + + + bool Create( wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxWANTS_CHARS, + const wxString& name = wxPyPanelNameStr ); + enum wxGridSelectionModes { wxGridSelectCells, wxGridSelectRows, @@ -1937,6 +1953,8 @@ public: wxWindow* GetGridCornerLabelWindow(); + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); };