-void wxGrid::SetDefaultCellBackgroundColour( const wxColour& col )
-{
- m_gridWin->SetBackgroundColour(col);
-}
-
-void wxGrid::SetDefaultCellTextColour( const wxColour& col )
-{
- m_gridWin->SetForegroundColour(col);
-}
-
-void wxGrid::SetDefaultCellAlignment( int horiz, int vert )
-{
- m_defaultCellHAlign = horiz;
- m_defaultCellVAlign = vert;
-}
-
-bool wxGrid::CanHaveAttributes()
-{
- if ( !m_table )
- {
- return FALSE;
- }
-
- if ( !m_table->GetAttrProvider() )
- {
- // use the default attr provider by default
- // (another choice would be to just return FALSE thus forcing the user
- // to it himself)
- m_table->SetAttrProvider(new wxGridCellAttrProvider);
- }
-
- return TRUE;
-}
-
-void wxGrid::SetCellBackgroundColour( int row, int col, const wxColour& colour )
-{
- if ( CanHaveAttributes() )
- {
- wxGridCellAttr *attr = new wxGridCellAttr;
- attr->SetBackgroundColour(colour);
-
- m_table->SetAttr(attr, row, col);
- }
-}
-
-void wxGrid::SetCellTextColour( int row, int col, const wxColour& colour )
-{
- if ( CanHaveAttributes() )
- {
- wxGridCellAttr *attr = new wxGridCellAttr;
- attr->SetTextColour(colour);
-
- m_table->SetAttr(attr, row, col);
- }
-}
-
-void wxGrid::SetDefaultCellFont( const wxFont& font )
-{
- m_defaultCellFont = font;
-}
-
-void wxGrid::SetCellFont( int row, int col, const wxFont& font )
-{
- if ( CanHaveAttributes() )
- {
- wxGridCellAttr *attr = new wxGridCellAttr;
- attr->SetFont(font);
-
- m_table->SetAttr(attr, row, col);
- }
-}
-
-void wxGrid::SetCellAlignment( int row, int col, int horiz, int vert )
-{
- if ( CanHaveAttributes() )
- {
- wxGridCellAttr *attr = new wxGridCellAttr;
- attr->SetAlignment(horiz, vert);
-
- m_table->SetAttr(attr, row, col);
- }
-}
-
-