virtual bool IsEmptyCell( int row, int col ) = 0;
virtual wxString GetValue( int row, int col ) = 0;
virtual void SetValue( int row, int col, const wxString& value ) = 0;
virtual bool IsEmptyCell( int row, int col ) = 0;
virtual wxString GetValue( int row, int col ) = 0;
virtual void SetValue( int row, int col, const wxString& value ) = 0;
wxString GetValue( int row, int col );
void SetValue( int row, int col, const wxString& s );
bool IsEmptyCell( int row, int col );
wxString GetValue( int row, int col );
void SetValue( int row, int col, const wxString& s );
bool IsEmptyCell( int row, int col );
- long GetRow() const { return m_row; }
- void SetRow( long n ) { m_row = n; }
- long GetCol() const { return m_col; }
- void SetCol( long n ) { m_col = n; }
- void Set( long row, long col ) { m_row = row; m_col = col; }
+ int GetRow() const { return m_row; }
+ void SetRow( int n ) { m_row = n; }
+ int GetCol() const { return m_col; }
+ void SetCol( int n ) { m_col = n; }
+ void Set( int row, int col ) { m_row = row; m_col = col; }
- bool SetTable( wxGridTableBase *table, bool takeOwnership=FALSE );
+ bool SetTable( wxGridTableBase *table, bool takeOwnership=FALSE,
+ wxGrid::wxGridSelectionModes selmode =
+ wxGrid::wxGridSelectCells );
void SetGridCursor( int row, int col )
{ SetCurrentCell( wxGridCellCoords(row, col) ); }
void SetGridCursor( int row, int col )
{ SetCurrentCell( wxGridCellCoords(row, col) ); }
- bool MoveCursorUp();
- bool MoveCursorDown();
- bool MoveCursorLeft();
- bool MoveCursorRight();
+ bool MoveCursorUp( bool expandSelection );
+ bool MoveCursorDown( bool expandSelection );
+ bool MoveCursorLeft( bool expandSelection );
+ bool MoveCursorRight( bool expandSelection );
- bool MoveCursorUpBlock();
- bool MoveCursorDownBlock();
- bool MoveCursorLeftBlock();
- bool MoveCursorRightBlock();
+ bool MoveCursorUpBlock( bool expandSelection );
+ bool MoveCursorDownBlock( bool expandSelection );
+ bool MoveCursorLeftBlock( bool expandSelection );
+ bool MoveCursorRightBlock( bool expandSelection );
void SetColumnWidth( int col, int width )
{ SetColSize( col, width ); }
void SetColumnWidth( int col, int width )
{ SetColSize( col, width ); }
void SetEditable( bool edit = TRUE ) { EnableEditing( edit ); }
bool GetEditInPlace() { return IsCellEditControlEnabled(); }
void SetEditable( bool edit = TRUE ) { EnableEditing( edit ); }
bool GetEditInPlace() { return IsCellEditControlEnabled(); }
void SetCellAlignment( int align, int row, int col)
{ SetCellAlignment(row, col, align, wxCENTER); }
void SetCellAlignment( int align, int row, int col)
{ SetCellAlignment(row, col, align, wxCENTER); }
void SetCellBitmap(wxBitmap *WXUNUSED(bitmap), int WXUNUSED(row), int WXUNUSED(col))
{ }
void SetDividerPen(const wxPen& WXUNUSED(pen)) { }
void SetCellBitmap(wxBitmap *WXUNUSED(bitmap), int WXUNUSED(row), int WXUNUSED(col))
{ }
void SetDividerPen(const wxPen& WXUNUSED(pen)) { }
wxGridSelection *m_selection;
wxColour m_selectionBackground;
wxColour m_selectionForeground;
wxGridSelection *m_selection;
wxColour m_selectionBackground;
wxColour m_selectionForeground;
public:
wxGridEvent()
: wxNotifyEvent(), m_row(-1), m_col(-1), m_x(-1), m_y(-1),
public:
wxGridEvent()
: wxNotifyEvent(), m_row(-1), m_col(-1), m_x(-1), m_y(-1),
- m_control(0), m_meta(0), m_shift(0), m_alt(0)
+ m_selecting(0), m_control(0), m_meta(0), m_shift(0), m_alt(0)
{
}
wxGridEvent(int id, wxEventType type, wxObject* obj,
{
}
wxGridEvent(int id, wxEventType type, wxObject* obj,
- int row=-1, int col=-1, int x=-1, int y=-1,
+ int row=-1, int col=-1, int x=-1, int y=-1, bool sel = TRUE,
bool control=FALSE, bool shift=FALSE, bool alt=FALSE, bool meta=FALSE);
virtual int GetRow() { return m_row; }
virtual int GetCol() { return m_col; }
wxPoint GetPosition() { return wxPoint( m_x, m_y ); }
bool control=FALSE, bool shift=FALSE, bool alt=FALSE, bool meta=FALSE);
virtual int GetRow() { return m_row; }
virtual int GetCol() { return m_col; }
wxPoint GetPosition() { return wxPoint( m_x, m_y ); }
bool ControlDown() { return m_control; }
bool MetaDown() { return m_meta; }
bool ShiftDown() { return m_shift; }
bool ControlDown() { return m_control; }
bool MetaDown() { return m_meta; }
bool ShiftDown() { return m_shift; }
wxGridRangeSelectEvent(int id, wxEventType type, wxObject* obj,
const wxGridCellCoords& topLeft,
const wxGridCellCoords& bottomRight,
wxGridRangeSelectEvent(int id, wxEventType type, wxObject* obj,
const wxGridCellCoords& topLeft,
const wxGridCellCoords& bottomRight,
bool control=FALSE, bool shift=FALSE,
bool alt=FALSE, bool meta=FALSE);
bool control=FALSE, bool shift=FALSE,
bool alt=FALSE, bool meta=FALSE);
int GetBottomRow() { return m_bottomRight.GetRow(); }
int GetLeftCol() { return m_topLeft.GetCol(); }
int GetRightCol() { return m_bottomRight.GetCol(); }
int GetBottomRow() { return m_bottomRight.GetRow(); }
int GetLeftCol() { return m_topLeft.GetCol(); }
int GetRightCol() { return m_bottomRight.GetCol(); }
bool ControlDown() { return m_control; }
bool MetaDown() { return m_meta; }
bool ShiftDown() { return m_shift; }
bool ControlDown() { return m_control; }
bool MetaDown() { return m_meta; }
bool ShiftDown() { return m_shift; }