X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/36c8c4718a0a3a5caccad927b43237a8fc8feec7..b7aef858828222a05e57671fa01d3cac78aee3ac:/wxPython/src/grid.i diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 9864f62b83..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 @@ -93,7 +98,7 @@ wxPyMake_TEMPLATE(wxGridTableBase) wxGridCellAttr* CBNAME(int a, int b, wxGridCellAttr::wxAttrKind c) { \ wxGridCellAttr* rval = NULL; \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ PyObject* ro; \ wxGridCellAttr* ptr; \ @@ -104,7 +109,7 @@ wxPyMake_TEMPLATE(wxGridTableBase) Py_DECREF(ro); \ } \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ rval = PCLASS::CBNAME(a, b, c); \ return rval; \ @@ -117,14 +122,14 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK__GCAINTINT(PCLASS, CBNAME) \ void CBNAME(wxGridCellAttr *attr, int a, int b) { \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ bool found; \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ PyObject* obj = wxPyMake_wxGridCellAttr(attr); \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oii)", obj, a, b)); \ Py_DECREF(obj); \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ PCLASS::CBNAME(attr, a, b); \ } \ @@ -136,14 +141,14 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK__GCAINT(PCLASS, CBNAME) \ void CBNAME(wxGridCellAttr *attr, int val) { \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ bool found; \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ PyObject* obj = wxPyMake_wxGridCellAttr(attr); \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(Oi)", obj, val)); \ Py_DECREF(obj); \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ PCLASS::CBNAME(attr, val); \ } \ @@ -155,11 +160,11 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK_INT__pure(CBNAME) \ int CBNAME() { \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ int rval = 0; \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ return rval; \ } @@ -167,18 +172,18 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK_BOOL_INTINT_pure(CBNAME) \ bool CBNAME(int a, int b) { \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ bool rval = 0; \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)",a,b)); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ return rval; \ } #define PYCALLBACK_STRING_INTINT_pure(CBNAME) \ wxString CBNAME(int a, int b) { \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ wxString rval; \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* ro; \ @@ -188,27 +193,27 @@ wxPyMake_TEMPLATE(wxGridTableBase) Py_DECREF(ro); \ } \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ return rval; \ } #define PYCALLBACK__INTINTSTRING_pure(CBNAME) \ void CBNAME(int a, int b, const wxString& c) { \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if (wxPyCBH_findCallback(m_myInst, #CBNAME)) { \ PyObject* s = wx2PyString(c); \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",a,b,s));\ Py_DECREF(s); \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ } #define PYCALLBACK_STRING_INTINT(PCLASS, CBNAME) \ wxString CBNAME(int a, int b) { \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ wxString rval; \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ PyObject* ro; \ @@ -218,7 +223,7 @@ wxPyMake_TEMPLATE(wxGridTableBase) Py_DECREF(ro); \ } \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ rval = PCLASS::CBNAME(a, b); \ return rval; \ @@ -232,13 +237,13 @@ wxPyMake_TEMPLATE(wxGridTableBase) bool CBNAME(int a, int b, const wxString& c) { \ bool rval = 0; \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ PyObject* s = wx2PyString(c); \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",a,b,s));\ Py_DECREF(s); \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ rval = PCLASS::CBNAME(a,b,c); \ return rval; \ @@ -254,10 +259,10 @@ wxPyMake_TEMPLATE(wxGridTableBase) long CBNAME(int a, int b) { \ long rval; \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ rval = PCLASS::CBNAME(a,b); \ return rval; \ @@ -272,10 +277,10 @@ wxPyMake_TEMPLATE(wxGridTableBase) bool CBNAME(int a, int b) { \ bool rval = 0; \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ rval = PCLASS::CBNAME(a,b); \ return rval; \ @@ -289,7 +294,7 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK_DOUBLE_INTINT(PCLASS, CBNAME) \ double CBNAME(int a, int b) { \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ double rval; \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ PyObject* ro; \ @@ -300,7 +305,7 @@ wxPyMake_TEMPLATE(wxGridTableBase) Py_DECREF(ro); Py_DECREF(str); \ } \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ rval = PCLASS::CBNAME(a, b); \ return rval; \ @@ -314,10 +319,10 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK__(PCLASS, CBNAME) \ void CBNAME() { \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ PCLASS::CBNAME(); \ } \ @@ -332,10 +337,10 @@ wxPyMake_TEMPLATE(wxGridTableBase) bool CBNAME(size_t a, size_t b) { \ bool rval = 0; \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ rval = PCLASS::CBNAME(a,b); \ return rval; \ @@ -350,10 +355,10 @@ wxPyMake_TEMPLATE(wxGridTableBase) bool CBNAME(size_t a) { \ bool rval = 0; \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(i)", a)); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ rval = PCLASS::CBNAME(a); \ return rval; \ @@ -366,7 +371,7 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK_STRING_INT(PCLASS, CBNAME) \ wxString CBNAME(int a) { \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ wxString rval; \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ PyObject* ro; \ @@ -376,7 +381,7 @@ wxPyMake_TEMPLATE(wxGridTableBase) Py_DECREF(ro); \ } \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ rval = PCLASS::CBNAME(a); \ return rval; \ @@ -389,13 +394,13 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK__INTSTRING(PCLASS, CBNAME) \ void CBNAME(int a, const wxString& c) { \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) { \ PyObject* s = wx2PyString(c); \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)",a,s)); \ Py_DECREF(s); \ } \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ PCLASS::CBNAME(a,c); \ } \ @@ -410,10 +415,10 @@ wxPyMake_TEMPLATE(wxGridTableBase) bool CBNAME() { \ bool rval = 0; \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ rval = PCLASS::CBNAME(); \ return rval; \ @@ -427,10 +432,10 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK__SIZETINT(PCLASS, CBNAME) \ void CBNAME(size_t a, int b) { \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(ii)", a,b)); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ PCLASS::CBNAME(a,b); \ } \ @@ -444,10 +449,10 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK__INTINTLONG(PCLASS, CBNAME) \ void CBNAME(int a, int b, long c) { \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ PCLASS::CBNAME(a,b,c); \ } \ @@ -461,10 +466,10 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK__INTINTDOUBLE(PCLASS, CBNAME) \ void CBNAME(int a, int b, double c) { \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iif)", a,b,c)); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ PCLASS::CBNAME(a,b,c); \ } \ @@ -477,10 +482,10 @@ wxPyMake_TEMPLATE(wxGridTableBase) #define PYCALLBACK__INTINTBOOL(PCLASS, CBNAME) \ void CBNAME(int a, int b, bool c) { \ bool found; \ - wxPyBeginBlockThreads(); \ + bool blocked = wxPyBeginBlockThreads(); \ if ((found = wxPyCBH_findCallback(m_myInst, #CBNAME))) \ wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", a,b,c)); \ - wxPyEndBlockThreads(); \ + wxPyEndBlockThreads(blocked); \ if (! found) \ PCLASS::CBNAME(a,b,c); \ } \ @@ -558,7 +563,7 @@ public: void Draw(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, const wxRect& rect, int row, int col, bool isSelected) { - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "Draw")) { PyObject* go = wxPyMake_wxObject(&grid); PyObject* dco = wxPyMake_wxObject(&dc); @@ -572,13 +577,13 @@ public: Py_DECREF(dco); Py_DECREF(ro); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); } wxSize GetBestSize(wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col) { wxSize rval; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "GetBestSize")) { PyObject* ro; wxSize* ptr; @@ -614,14 +619,14 @@ public: Py_DECREF(ro); } } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return rval; } wxGridCellRenderer *Clone() const { wxGridCellRenderer* rval = NULL; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "Clone")) { PyObject* ro; wxGridCellRenderer* ptr; @@ -632,7 +637,7 @@ public: Py_DECREF(ro); } } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return rval; } @@ -774,7 +779,7 @@ public: wxPyGridCellEditor() : wxGridCellEditor() {} void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler) { - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "Create")) { PyObject* po = wxPyMake_wxObject(parent); PyObject* eo = wxPyMake_wxObject(evtHandler); @@ -783,37 +788,37 @@ public: Py_DECREF(po); Py_DECREF(eo); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); } void BeginEdit(int row, int col, wxGrid* grid) { - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "BeginEdit")) { PyObject* go = wxPyMake_wxObject(grid); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, go)); Py_DECREF(go); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); } bool EndEdit(int row, int col, wxGrid* grid) { bool rv = False; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "EndEdit")) { PyObject* go = wxPyMake_wxObject(grid); rv = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)", row, col, go)); Py_DECREF(go); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return rv; } wxGridCellEditor* Clone() const { wxGridCellEditor* rval = NULL; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "Clone")) { PyObject* ro; wxGridCellEditor* ptr; @@ -824,20 +829,20 @@ public: Py_DECREF(ro); } } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return rval; } void Show(bool show, wxGridCellAttr *attr) { bool found; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "Show"))) { PyObject* ao = wxPyMake_wxGridCellAttr(attr); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iO)", show, ao)); Py_DECREF(ao); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); if (! found) wxGridCellEditor::Show(show, attr); } @@ -848,7 +853,7 @@ public: void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr) { bool found; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "PaintBackground)"))) { PyObject* ao = wxPyMake_wxGridCellAttr(attr); PyObject* ro = wxPyConstructObject((void*)&rectCell, wxT("wxRect"), 0); @@ -858,7 +863,7 @@ public: Py_DECREF(ro); Py_DECREF(ao); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); if (! found) wxGridCellEditor::PaintBackground(rectCell, attr); } @@ -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(); }; @@ -1213,7 +1218,7 @@ public: wxString GetValue(int row, int col) { - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); wxString rval; if (wxPyCBH_findCallback(m_myInst, "GetValue")) { PyObject* ro; @@ -1223,18 +1228,18 @@ public: Py_DECREF(ro); } } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return rval; } void SetValue(int row, int col, const wxString& val) { - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "SetValue")) { PyObject* s = wx2PyString(val); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iiO)",row,col,s)); Py_DECREF(s); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); } @@ -1242,7 +1247,7 @@ public: // the GetValue and SetValue python methods. long GetValueAsLong( int row, int col ) { long rval = 0; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "GetValue")) { PyObject* ro; PyObject* num; @@ -1256,13 +1261,13 @@ public: Py_DECREF(ro); } } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return rval; } double GetValueAsDouble( int row, int col ) { double rval = 0.0; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "GetValue")) { PyObject* ro; PyObject* num; @@ -1276,7 +1281,7 @@ public: Py_DECREF(ro); } } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return rval; } @@ -1285,19 +1290,19 @@ public: } void SetValueAsLong( int row, int col, long value ) { - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "SetValue")) { wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iii)", row, col, value)); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); } void SetValueAsDouble( int row, int col, double value ) { - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if (wxPyCBH_findCallback(m_myInst, "SetValue")) { wxPyCBH_callCallback(m_myInst, Py_BuildValue("(iid)", row, col, value)); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); } void SetValueAsBool( int row, int col, bool value ) { @@ -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) @@ -1561,7 +1567,7 @@ public: %pythoncode { SelectCells = wxGridSelectCells SelectRows = wxGridSelectRows - SelectColumns = wxGridSelectColumns, + SelectColumns = wxGridSelectColumns } bool CreateGrid( int numRows, int numCols, @@ -1937,6 +1943,8 @@ public: wxWindow* GetGridCornerLabelWindow(); + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); };