%pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
-%include _grid_rename.i
-
MAKE_CONST_WXSTRING_NOSWIG(EmptyString);
MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr);
MAKE_CONST_WXSTRING_NOSWIG(DefaultDateTimeFormat);
{
public:
// wxGridTableBase(); This is an ABC
- //~wxGridTableBase();
+ ~wxGridTableBase();
%extend {
void _setOORInfo(PyObject* _self) {
void SetCol( int n );
void Set( int row, int col );
- bool operator==( const wxGridCellCoords& other ) const;
- bool operator!=( const wxGridCellCoords& other ) const;
+ %extend {
+ KeepGIL(__eq__);
+ DocStr(__eq__, "Test for equality of GridCellCoords objects.", "");
+ bool __eq__(PyObject* other) {
+ wxGridCellCoords temp, *obj = &temp;
+ if ( other == Py_None ) return false;
+ if ( ! wxGridCellCoords_helper(other, &obj) ) {
+ PyErr_Clear();
+ return false;
+ }
+ return self->operator==(*obj);
+ }
+
+
+ KeepGIL(__ne__);
+ DocStr(__ne__, "Test for inequality of GridCellCoords objects.", "");
+ bool __ne__(PyObject* other) {
+ wxGridCellCoords temp, *obj = &temp;
+ if ( other == Py_None ) return true;
+ if ( ! wxGridCellCoords_helper(other, &obj)) {
+ PyErr_Clear();
+ return true;
+ }
+ return self->operator!=(*obj);
+ }
+ }
+
%extend {
PyObject* Get() {
long style = wxWANTS_CHARS,
const wxString& name = wxPyPanelNameStr );
-
+ // Override the global renamer to leave these as they are, for backwards
+ // compatibility
+ %rename(wxGridSelectCells) wxGridSelectCells;
+ %rename(wxGridSelectRows) wxGridSelectRows;
+ %rename(wxGridSelectColumns) wxGridSelectColumns;
+
enum wxGridSelectionModes {
wxGridSelectCells,
wxGridSelectRows,
wxGridTableBase * GetTable() const;
+
+ %disownarg(wxGridTableBase *);
bool SetTable( wxGridTableBase *table, bool takeOwnership=false,
WXGRIDSELECTIONMODES selmode =
wxGrid::wxGridSelectCells );
+ %cleardisown(wxGridTableBase *);
void ClearGrid();
bool InsertRows( int pos = 0, int numRows = 1, bool updateLabels=true );
}
int YToRow( int y );
- int XToCol( int x );
+ int XToCol( int x, bool clipToMinMax = false );
int YToEdgeOfRow( int y );
int XToEdgeOfCol( int x );
wxString GetRowLabelValue( int row );
wxString GetColLabelValue( int col );
wxColour GetGridLineColour();
+
+ virtual wxPen GetDefaultGridLinePen();
+ virtual wxPen GetRowGridLinePen(int row);
+ virtual wxPen GetColGridLinePen(int col);
+
+
wxColour GetCellHighlightColour();
int GetCellHighlightPenWidth();
int GetCellHighlightROPenWidth();
void EnableDragColSize( bool enable = true );
void DisableDragColSize();
bool CanDragColSize();
+ void EnableDragColMove( bool enable = true );
+ void DisableDragColMove() { EnableDragColMove( false ); }
+ bool CanDragColMove() { return m_canDragColMove; }
void EnableDragGridSize(bool enable = true);
void DisableDragGridSize();
bool CanDragGridSize();
void SetColSize( int col, int width );
+ int GetColAt( int colPos ) const;
+ void SetColPos( int colID, int newPos );
+ int GetColPos( int colID ) const;
+
// automatically size the column or row to fit to its contents, if
// setAsMin is True, this optimal width will also be set as minimal width
// for this column
bool MetaDown();
bool ShiftDown();
bool AltDown();
-
+ bool CmdDown();
};
bool MetaDown();
bool ShiftDown();
bool AltDown();
-
+ bool CmdDown();
};
bool MetaDown();
bool ShiftDown();
bool AltDown();
+ bool CmdDown();
};