// grey out fields if the grid is disabled
if( grid.IsEnabled() )
{
- if ( isSelected )
- {
- dc.SetBrush( wxBrush(grid.GetSelectionBackground(), wxSOLID) );
- }
- else
- {
- dc.SetBrush( wxBrush(attr.GetBackgroundColour(), wxSOLID) );
- }
+ if ( isSelected )
+ {
+ dc.SetBrush( wxBrush(grid.GetSelectionBackground(), wxSOLID) );
+ }
+ else
+ {
+ dc.SetBrush( wxBrush(attr.GetBackgroundColour(), wxSOLID) );
+ }
}
else
{
- dc.SetBrush(wxBrush(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE), wxSOLID));
+ dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE), wxSOLID));
}
dc.SetPen( *wxTRANSPARENT_PEN );
}
else
{
- dc.SetTextBackground(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE));
- dc.SetTextForeground(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_GRAYTEXT));
+ dc.SetTextBackground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
+ dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT));
}
dc.SetFont( attr.GetFont() );
else
{
wxString tmp = params.BeforeFirst(_T(','));
- if ( !!tmp )
+ if ( !tmp.empty() )
{
long width;
if ( tmp.ToLong(&width) )
}
tmp = params.AfterFirst(_T(','));
- if ( !!tmp )
+ if ( !tmp.empty() )
{
long precision;
if ( tmp.ToLong(&precision) )
else
{
// ...or remove the attribute
- m_attrs.RemoveAt((size_t)n);
+ // No need to DecRef the attribute itself since this is
+ // done be wxGridCellWithAttr's destructor!
+ m_attrs.RemoveAt(n);
n--; count--;
}
}
else
{
// ...or remove the attribute
- m_attrs.RemoveAt((size_t)n);
+ // No need to DecRef the attribute itself since this is
+ // done be wxGridCellWithAttr's destructor!
+ m_attrs.RemoveAt(n);
n--; count--;
}
}
rowOrCol += numRowsOrCols;
else
{
- m_rowsOrCols.RemoveAt((size_t)n);
- m_attrs.RemoveAt((size_t)n);
+ m_rowsOrCols.RemoveAt(n);
+ m_attrs[n]->DecRef();
+ m_attrs.RemoveAt(n);
n--; count--;
}
}
rect.SetY( 1 );
rect.SetWidth( client_width - 2 );
rect.SetHeight( client_height - 2 );
-
+
wxRendererNative::Get().DrawHeaderButton( this, dc, rect, 0 );
#else
dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW),1, wxSOLID) );
rect.SetY( GetRowTop(row) + 1 );
rect.SetWidth( m_rowLabelWidth - 2 );
rect.SetHeight( GetRowHeight(row) - 2 );
-
+
CalcScrolledPosition( 0, rect.y, NULL, &rect.y );
-
+
wxWindowDC *win_dc = (wxWindowDC*) &dc;
wxRendererNative::Get().DrawHeaderButton( win_dc->m_owner, dc, rect, 0 );
return;
int colLeft = GetColLeft(col);
-
+
wxRect rect;
#ifdef __WXGTK__
rect.SetX( colLeft + 1 );
rect.SetY( 1 );
rect.SetWidth( GetColWidth(col) - 2 );
rect.SetHeight( m_colLabelHeight - 2 );
-
+
wxWindowDC *win_dc = (wxWindowDC*) &dc;
wxRendererNative::Get().DrawHeaderButton( win_dc->m_owner, dc, rect, 0 );