X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/28a77bc43bd49b7239af90310ca31ba2e3d56cbf..bb338b31a760f9ad5c875db1c182a9bb2f3e1431:/include/wx/generic/grid.h diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 19e4ed419d..06345817af 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -260,11 +260,9 @@ public: // to begin editing. Set the focus to the edit control. virtual void BeginEdit(int row, int col, wxGrid* grid) = 0; - // Complete the editing of the current cell. If saveValue is - // true then send the new value back to the table. Returns true - // if the value has changed. If necessary, the control may be - // destroyed. - virtual bool EndEdit(int row, int col, bool saveValue, wxGrid* grid) = 0; + // Complete the editing of the current cell. Returns true if the value has + // changed. If necessary, the control may be destroyed. + virtual bool EndEdit(int row, int col, wxGrid* grid) = 0; // Reset the value in the control back to its starting value virtual void Reset() = 0; @@ -311,7 +309,7 @@ public: virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); virtual void BeginEdit(int row, int col, wxGrid* grid); - virtual bool EndEdit(int row, int col, bool saveValue, wxGrid* grid); + virtual bool EndEdit(int row, int col, wxGrid* grid); virtual void Reset(); virtual void StartingKey(wxKeyEvent& event); @@ -341,7 +339,7 @@ public: wxEvtHandler* evtHandler); virtual void BeginEdit(int row, int col, wxGrid* grid); - virtual bool EndEdit(int row, int col, bool saveValue, wxGrid* grid); + virtual bool EndEdit(int row, int col, wxGrid* grid); virtual void Reset(); virtual void StartingKey(wxKeyEvent& event); @@ -372,7 +370,7 @@ public: wxEvtHandler* evtHandler); virtual void BeginEdit(int row, int col, wxGrid* grid); - virtual bool EndEdit(int row, int col, bool saveValue, wxGrid* grid); + virtual bool EndEdit(int row, int col, wxGrid* grid); virtual void Reset(); virtual void StartingKey(wxKeyEvent& event); @@ -398,7 +396,7 @@ public: virtual void Show(bool show, wxGridCellAttr *attr = (wxGridCellAttr *)NULL); virtual void BeginEdit(int row, int col, wxGrid* grid); - virtual bool EndEdit(int row, int col, bool saveValue, wxGrid* grid); + virtual bool EndEdit(int row, int col, wxGrid* grid); virtual void Reset(); virtual void StartingClick(); @@ -425,7 +423,7 @@ public: virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); virtual void BeginEdit(int row, int col, wxGrid* grid); - virtual bool EndEdit(int row, int col, bool saveValue, wxGrid* grid); + virtual bool EndEdit(int row, int col, wxGrid* grid); virtual void Reset(); @@ -902,6 +900,7 @@ public: bool DeleteCols( int pos = 0, int numCols = 1, bool updateLabels=TRUE ); void DrawGridCellArea( wxDC& dc ); + void DrawGridSpace( wxDC& dc ); void DrawCellBorder( wxDC& dc, const wxGridCellCoords& ); void DrawAllGridLines( wxDC& dc, const wxRegion & reg ); void DrawCell( wxDC& dc, const wxGridCellCoords& ); @@ -958,7 +957,6 @@ public: void ShowCellEditControl(); void HideCellEditControl(); - void SetEditControlValue( const wxString& s = wxEmptyString ); void SaveEditControlValue(); @@ -1041,6 +1039,10 @@ public: void EnableDragColSize( bool enable = TRUE ); void DisableDragColSize() { EnableDragColSize( FALSE ); } bool CanDragColSize() { return m_canDragColSize; } + void EnableDragGridSize(bool enable = TRUE); + void DisableDragGridSize() { EnableDragGridSize(FALSE); } + bool CanDragGridSize() { return m_canDragGridSize; } + // this sets the specified attribute for all cells in this row/col void SetRowAttr(int row, wxGridCellAttr *attr); @@ -1078,6 +1080,12 @@ public: // auto size all columns (very ineffective for big grids!) void AutoSizeColumns( bool setAsMin = TRUE ); + void AutoSizeRows( bool setAsMin = TRUE ); + + // auto size the grid, that is make the columns/rows of the "right" size + // and also set the grid size to just fit its contents + void AutoSize(); + // column won't be resized to be lesser width - this must be called during // the grid creation because it won't resize the column if it's already // narrower than the minimal width @@ -1530,6 +1538,7 @@ protected: bool m_canDragRowSize; bool m_canDragColSize; + bool m_canDragGridSize; int m_dragLastPos; int m_dragRowOrCol; bool m_isDragging;