X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fce4e96684d8709038e18dc3fc0ac6414e058e8..7e664d85e6512d807ce2eb186ed9e0bbd60d6e8b:/wxPython/src/grid.i diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index ec563fc7f2..e2c63de53a 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -35,8 +35,6 @@ %pythoncode { __docfilter__ = wx.__DocFilter(globals()) } -%include _grid_rename.i - MAKE_CONST_WXSTRING_NOSWIG(EmptyString); MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr); MAKE_CONST_WXSTRING_NOSWIG(DefaultDateTimeFormat); @@ -1127,7 +1125,7 @@ class wxGridTableBase : public wxObject { public: // wxGridTableBase(); This is an ABC - //~wxGridTableBase(); + ~wxGridTableBase(); %extend { void _setOORInfo(PyObject* _self) { @@ -1631,7 +1629,12 @@ public: 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, @@ -1659,9 +1662,12 @@ public: 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 ); @@ -1740,7 +1746,7 @@ public: } int YToRow( int y ); - int XToCol( int x ); + int XToCol( int x, bool clipToMinMax = false ); int YToEdgeOfRow( int y ); int XToEdgeOfCol( int x ); @@ -1823,6 +1829,9 @@ public: 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(); @@ -1888,6 +1897,10 @@ public: 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 @@ -2061,7 +2074,7 @@ public: bool MetaDown(); bool ShiftDown(); bool AltDown(); - + bool CmdDown(); }; @@ -2078,7 +2091,7 @@ public: bool MetaDown(); bool ShiftDown(); bool AltDown(); - + bool CmdDown(); }; @@ -2103,6 +2116,7 @@ public: bool MetaDown(); bool ShiftDown(); bool AltDown(); + bool CmdDown(); };