// 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;
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);
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);
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);
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();
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();
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& );
void ShowCellEditControl();
void HideCellEditControl();
- void SetEditControlValue( const wxString& s = wxEmptyString );
void SaveEditControlValue();
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);
// 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
bool m_canDragRowSize;
bool m_canDragColSize;
+ bool m_canDragGridSize;
int m_dragLastPos;
int m_dragRowOrCol;
bool m_isDragging;