git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38928
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxDC& dc,
const wxRect& rect,
int flags = 0);
wxDC& dc,
const wxRect& rect,
int flags = 0);
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win);
virtual wxRendererVersion GetVersion() const
virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win);
virtual wxRendererVersion GetVersion() const
dc.DrawPolygon(WXSIZEOF(pt), pt, rect.x, rect.y);
}
dc.DrawPolygon(WXSIZEOF(pt), pt, rect.x, rect.y);
}
wxRendererGeneric::DrawCheckButton(wxWindow *WXUNUSED(win),
wxDC& dc,
const wxRect& rect,
wxRendererGeneric::DrawCheckButton(wxWindow *WXUNUSED(win),
wxDC& dc,
const wxRect& rect,
dc.DrawRectangle(rect);
}
dc.DrawRectangle(rect);
}
-void
-wxRendererGeneric::DrawItemSelectionRect(wxWindow *win,
- wxDC& dc,
- const wxRect& rect,
- int flags )
+void
+wxRendererGeneric::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
- if (flags & wxCONTROL_SELECTED)
+ wxBrush brush;
+ if ( flags & wxCONTROL_SELECTED )
- if (flags & wxCONTROL_FOCUSED)
+ if ( flags & wxCONTROL_FOCUSED )
- wxBrush brush(
- wxSystemSettings::GetColour
- (
- wxSYS_COLOUR_HIGHLIGHT
- ),
- wxSOLID
- );
- dc.SetBrush( brush );
+ brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT));
- wxBrush brush(
- wxSystemSettings::GetColour
- (
- wxSYS_COLOUR_BTNSHADOW
- ),
- wxSOLID
- );
- dc.SetBrush( brush );
+ brush = wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW));
- dc.SetBrush( *wxTRANSPARENT_BRUSH );
+ brush = *wxTRANSPARENT_BRUSH;
-
-
- if (flags & wxCONTROL_CURRENT)
- dc.SetPen( *wxBLACK_PEN );
- else
- dc.SetPen( *wxTRANSPARENT_PEN );
-
- dc.DrawRectangle( rect );
+
+ dc.SetBrush(brush);
+ dc.SetPen(flags & wxCONTROL_CURRENT ? *wxBLACK_PEN : *wxTRANSPARENT_PEN);
+
+ dc.DrawRectangle( rect );