// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
-%module grid
+%define DOCSTRING
+"Classes for implementing a spreadsheet-like control."
+%enddef
+%module(docstring=DOCSTRING) grid
+
%{
#include "wx/wxPython/wxPython.h"
//---------------------------------------------------------------------------
%import windows.i
-%pythoncode { wx = core }
+%pythoncode { wx = _core }
+%pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
%include _grid_rename.i
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()));
}
}
%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)
+MustHaveApp(wxGrid);
+
class wxGrid : public wxScrolledWindow
{
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,
wxWindow* GetGridCornerLabelWindow();
+ static wxVisualAttributes
+ GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
};