void OnMouseEvent( wxMouseEvent& event );
void OnKeyDown( wxKeyEvent& event );
+ void OnPaint( wxPaintEvent& event );
DECLARE_DYNAMIC_CLASS(wxGridCornerLabelWindow)
DECLARE_EVENT_TABLE()
{
public:
wxGrid()
- { Create(); }
+ {
+ m_table = (wxGridTableBase *) NULL;
+ m_gridWin = (wxGridWindow *) NULL;
+ m_rowLabelWin = (wxGridRowLabelWindow *) NULL;
+ m_colLabelWin = (wxGridColLabelWindow *) NULL;
+ m_cornerLabelWin = (wxGridCornerLabelWindow *) NULL;
+ m_cellEditCtrl = (wxWindow *) NULL;
+ }
wxGrid( wxWindow *parent,
wxWindowID id,
// ------ display update functions
//
void CalcRowLabelsExposed( wxRegion& reg );
+
void CalcColLabelsExposed( wxRegion& reg );
void CalcCellsExposed( wxRegion& reg );
void DrawRowLabels( wxDC& dc );
void DrawRowLabel( wxDC& dc, int row );
+
void DrawColLabels( wxDC& dc );
void DrawColLabel( wxDC& dc, int col );
void SetDefaultRowSize( int height, bool resizeExistingRows = FALSE );
void SetRowSize( int row, int height );
void SetDefaultColSize( int width, bool resizeExistingCols = FALSE );
+
void SetColSize( int col, int width );
void SetDefaultCellBackgroundColour( const wxColour& );
void SetCellBackgroundColour( int row, int col, const wxColour& );
void SetDefaultCellTextColour( const wxColour& );
+
void SetCellTextColour( int row, int col, const wxColour& );
void SetDefaultCellFont( const wxFont& );
void SetCellFont( int row, int col, const wxFont& );
*rightCol = m_selectedBottomRight.GetCol();
}
+
+ // This function returns the rectangle that encloses the block of cells
+ // limited by TopLeft and BottomRight cell in device coords and clipped
+ // to the client size of the grid window.
+ //
+ wxRect BlockToDeviceRect( const wxGridCellCoords & topLeft,
+ const wxGridCellCoords & bottomRight );
+
// This function returns the rectangle that encloses the selected cells
// in device coords and clipped to the client size of the grid window.
//
- wxRect SelectionToDeviceRect();
-
+ wxRect SelectionToDeviceRect()
+ {
+ return BlockToDeviceRect( m_selectedTopLeft,
+ m_selectedBottomRight );
+ }
// ------ For compatibility with previous wxGrid only...
bool GetEditable() { return IsEditable(); }
void SetEditable( bool edit = TRUE ) { EnableEditing( edit ); }
bool GetEditInPlace() { return IsCellEditControlEnabled(); }
+
void SetEditInPlace(bool edit = TRUE) { }
void SetCellAlignment( int align, int row, int col)
bool SetModelValues();
- ////////////////////// Public section ////////////////////
-
-
DECLARE_DYNAMIC_CLASS( wxGrid )
DECLARE_EVENT_TABLE()
};
#endif // #ifndef __WXGRID_H__
#endif // ifndef wxUSE_NEW_GRID
+