X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6dc3c14ff279d139e151b8eff53ab7fcf64b47ac..e17b6377be593ce71d722beb3cdcffb67baccf00:/wxPython/src/grid.i diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index dfab9d1215..5262a244e6 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -36,7 +36,7 @@ MAKE_CONST_WXSTRING_NOSWIG(EmptyString); -MAKE_CONST_WXSTRING_NOSWIG(PanelNameStr); +MAKE_CONST_WXSTRING_NOSWIG(GridNameStr); MAKE_CONST_WXSTRING_NOSWIG(DefaultDateTimeFormat); //--------------------------------------------------------------------------- @@ -1613,7 +1613,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, - const wxString& name = wxPyPanelNameStr); + const wxString& name = wxPyGridNameStr); %RenameCtor(PreGrid, wxGrid()); @@ -1627,7 +1627,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, - const wxString& name = wxPyPanelNameStr ); + const wxString& name = wxPyGridNameStr ); // Override the global renamer to leave these as they are, for backwards // compatibility @@ -1746,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 ); @@ -1804,6 +1804,12 @@ public: 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(); @@ -1829,6 +1835,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(); @@ -1894,6 +1903,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