+// ----------------------------------------------------------------------------
+// wxGridHeaderLabelsRenderer and related classes
+// ----------------------------------------------------------------------------
+
+void wxGridHeaderLabelsRenderer::DrawLabel(const wxGrid& grid,
+ wxDC& dc,
+ const wxString& value,
+ const wxRect& rect,
+ int horizAlign,
+ int vertAlign,
+ int textOrientation) const
+{
+ dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
+ dc.SetTextForeground(grid.GetLabelTextColour());
+ dc.SetFont(grid.GetLabelFont());
+ grid.DrawTextRectangle(dc, value, rect, horizAlign, vertAlign, textOrientation);
+}
+
+
+void wxGridRowHeaderRendererDefault::DrawBorder(const wxGrid& WXUNUSED(grid),
+ wxDC& dc,
+ wxRect& rect) const
+{
+ dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)));
+ dc.DrawLine(rect.GetRight(), rect.GetTop(),
+ rect.GetRight(), rect.GetBottom());
+ dc.DrawLine(rect.GetLeft(), rect.GetTop(),
+ rect.GetLeft(), rect.GetBottom());
+ dc.DrawLine(rect.GetLeft(), rect.GetBottom(),
+ rect.GetRight() + 1, rect.GetBottom());
+
+ dc.SetPen(*wxWHITE_PEN);
+ dc.DrawLine(rect.GetLeft() + 1, rect.GetTop(),
+ rect.GetLeft() + 1, rect.GetBottom());
+ dc.DrawLine(rect.GetLeft() + 1, rect.GetTop(),
+ rect.GetRight(), rect.GetTop());
+
+ rect.Deflate(2);
+}
+
+void wxGridColumnHeaderRendererDefault::DrawBorder(const wxGrid& WXUNUSED(grid),
+ wxDC& dc,
+ wxRect& rect) const
+{
+ dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)));
+ dc.DrawLine(rect.GetRight(), rect.GetTop(),
+ rect.GetRight(), rect.GetBottom());
+ dc.DrawLine(rect.GetLeft(), rect.GetTop(),
+ rect.GetRight(), rect.GetTop());
+ dc.DrawLine(rect.GetLeft(), rect.GetBottom(),
+ rect.GetRight() + 1, rect.GetBottom());
+
+ dc.SetPen(*wxWHITE_PEN);
+ dc.DrawLine(rect.GetLeft(), rect.GetTop() + 1,
+ rect.GetLeft(), rect.GetBottom());
+ dc.DrawLine(rect.GetLeft(), rect.GetTop() + 1,
+ rect.GetRight(), rect.GetTop() + 1);
+
+ rect.Deflate(2);
+}
+
+void wxGridCornerHeaderRendererDefault::DrawBorder(const wxGrid& WXUNUSED(grid),
+ wxDC& dc,
+ wxRect& rect) const
+{
+ dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)));
+ dc.DrawLine(rect.GetRight() - 1, rect.GetBottom() - 1,
+ rect.GetRight() - 1, rect.GetTop());
+ dc.DrawLine(rect.GetRight() - 1, rect.GetBottom() - 1,
+ rect.GetLeft(), rect.GetBottom() - 1);
+ dc.DrawLine(rect.GetLeft(), rect.GetTop(),
+ rect.GetRight(), rect.GetTop());
+ dc.DrawLine(rect.GetLeft(), rect.GetTop(),
+ rect.GetLeft(), rect.GetBottom());
+
+ dc.SetPen(*wxWHITE_PEN);
+ dc.DrawLine(rect.GetLeft() + 1, rect.GetTop() + 1,
+ rect.GetRight() - 1, rect.GetTop() + 1);
+ dc.DrawLine(rect.GetLeft() + 1, rect.GetTop() + 1,
+ rect.GetLeft() + 1, rect.GetBottom() - 1);
+
+ rect.Deflate(2);
+}
+