virtual bool AreScrollbarsInsideBorder() const;
+ virtual void AdjustSize(wxSize *size, const wxWindow *window);
+
+ virtual wxCoord GetListboxItemHeight(wxCoord fontHeight);
+
#if wxUSE_SCROLLBAR
virtual wxRect GetScrollbarRect(const wxScrollBar *scrollbar,
wxScrollBar::Element elem,
virtual int PixelToScrollbar(const wxScrollBar *scrollbar, wxCoord coord);
#endif // wxUSE_SCROLLBAR
+#if wxUSE_STATUSBAR
+ virtual void DrawStatusField(wxDC& dc,
+ const wxRect& rect,
+ const wxString& label,
+ int flags = 0, int style = 0);
+
+ virtual wxSize GetStatusBarBorders(wxCoord *borderBetweenFields) const;
+#endif // wxUSE_STATUSBAR
+
+ virtual wxCoord GetCheckItemMargin() const { return 0; }
+
protected:
// various constants
enum ArrowDirection
return rect;
}
+void wxStdRenderer::AdjustSize(wxSize *size, const wxWindow *window)
+{
+ // take into account the border width
+ wxRect rectBorder = GetBorderDimensions(window->GetBorder());
+ size->x += rectBorder.x + rectBorder.width;
+ size->y += rectBorder.y + rectBorder.height;
+}
+
bool wxStdRenderer::AreScrollbarsInsideBorder() const
{
return false;
}
+wxCoord wxStdRenderer::GetListboxItemHeight(wxCoord fontHeight)
+{
+ return fontHeight + 2;
+}
+
void wxStdRenderer::DrawTextBorder(wxDC& dc,
wxBorder border,
const wxRect& rect,
#endif // wxUSE_SCROLLBAR
+// ----------------------------------------------------------------------------
+// status bar
+// ----------------------------------------------------------------------------
+
+#if wxUSE_STATUSBAR
+
+wxSize wxStdRenderer::GetStatusBarBorders(wxCoord *borderBetweenFields) const
+{
+ if ( borderBetweenFields )
+ *borderBetweenFields = 2;
+
+ return wxSize(2, 2);
+}
+
+void wxStdRenderer::DrawStatusField(wxDC& dc,
+ const wxRect& rect,
+ const wxString& label,
+ int flags,
+ int style)
+{
+ wxRect rectIn;
+
+ if ( style == wxSB_RAISED )
+ DrawBorder(dc, wxBORDER_RAISED, rect, flags, &rectIn);
+ else if ( style != wxSB_FLAT )
+ DrawBorder(dc, wxBORDER_STATIC, rect, flags, &rectIn);
+
+ rectIn.Deflate(GetStatusBarBorders(NULL));
+
+ wxDCClipper clipper(dc, rectIn);
+ DrawLabel(dc, label, rectIn, flags, wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
+}
+
+#endif // wxUSE_STATUSBAR
wxOrientation orient,
const wxRect& rect,
int flags = 0);
- virtual void DrawScrollCorner(wxDC& dc,
- const wxRect& rect);
#if wxUSE_TOOLBAR
virtual void DrawToolBarButton(wxDC& dc,
const wxMenuGeometryInfo& geomInfo);
#endif // wxUSE_MENUS
-#if wxUSE_STATUSBAR
- virtual void DrawStatusField(wxDC& dc,
- const wxRect& rect,
- const wxString& label,
- int flags = 0, int style = 0);
-#endif // wxUSE_STATUSBAR
-
virtual void DrawFrameTitleBar(wxDC& dc,
const wxRect& rect,
const wxString& title,
int thumbPos = -1) const;
#endif // wxUSE_SCROLLBAR
- virtual wxCoord GetListboxItemHeight(wxCoord fontHeight)
- { return fontHeight + 2; }
virtual wxSize GetCheckBitmapSize() const
{ return wxSize(10, 10); }
virtual wxSize GetRadioBitmapSize() const
const wxMenu& menu) const;
#endif // wxUSE_MENUS
-#if wxUSE_STATUSBAR
- virtual wxSize GetStatusBarBorders(wxCoord *borderBetweenFields) const;
-#endif // wxUSE_STATUSBAR
-
// helpers for "wxBitmap wxColourScheme::Get()"
void DrawCheckBitmap(wxDC& dc, const wxRect& rect);
void DrawUncheckBitmap(wxDC& dc, const wxRect& rect, bool isPressed);
#endif // wxUSE_MENUS
-#if wxUSE_STATUSBAR
-
-// ----------------------------------------------------------------------------
-// status bar
-// ----------------------------------------------------------------------------
-
-wxSize
-wxGTKRenderer::GetStatusBarBorders(wxCoord * WXUNUSED(borderBetweenFields)) const
-{
- return wxSize(0,0);
-}
-
-void wxGTKRenderer::DrawStatusField(wxDC& WXUNUSED(dc),
- const wxRect& WXUNUSED(rect),
- const wxString& WXUNUSED(label),
- int WXUNUSED(flags), int WXUNUSED(style))
-{
-}
-
-#endif // wxUSE_STATUSBAR
-
// ----------------------------------------------------------------------------
// combobox
// ----------------------------------------------------------------------------
DrawSolidRect(dc, wxSCHEME_COLOUR(m_scheme, SCROLLBAR), rectBar);
}
-void wxGTKRenderer::DrawScrollCorner(wxDC& dc, const wxRect& rect)
-{
- DrawSolidRect(dc, wxSCHEME_COLOUR(m_scheme, CONTROL), rect);
-}
-
#if wxUSE_SCROLLBAR
wxRect wxGTKRenderer::GetScrollbarRect(const wxScrollBar *scrollbar,
wxScrollBar::Element elem,
#endif // wxUSE_SCROLLBAR
{
// take into account the border width
- wxRect rectBorder = GetBorderDimensions(window->GetBorder());
- size->x += rectBorder.x + rectBorder.width;
- size->y += rectBorder.y + rectBorder.height;
+ wxStdRenderer::AdjustSize(size, window);
}
}
virtual wxSize GetScrollbarArrowSize() const
{ return m_sizeScrollbarArrow; }
- virtual wxCoord GetListboxItemHeight(wxCoord fontHeight)
- { return fontHeight + 2; }
virtual wxSize GetCheckBitmapSize() const
{ return wxSize(13, 13); }
virtual wxSize GetRadioBitmapSize() const
const wxMenu& menu) const;
#endif // wxUSE_MENUS
-#if wxUSE_STATUSBAR
- virtual wxSize GetStatusBarBorders(wxCoord *borderBetweenFields) const;
-#endif // wxUSE_STATUSBAR
-
protected:
// overridden wxStdRenderer methods
virtual void DrawFrameWithLabel(wxDC& dc,
// status bar
// ----------------------------------------------------------------------------
-static const wxCoord STATBAR_BORDER_X = 2;
-static const wxCoord STATBAR_BORDER_Y = 2;
-
-wxSize wxWin32Renderer::GetStatusBarBorders(wxCoord *borderBetweenFields) const
-{
- if ( borderBetweenFields )
- *borderBetweenFields = 2;
-
- return wxSize(STATBAR_BORDER_X, STATBAR_BORDER_Y);
-}
-
void wxWin32Renderer::DrawStatusField(wxDC& dc,
const wxRect& rect,
const wxString& label,
- int flags, int style /*=0*/)
+ int flags,
+ int style)
{
wxRect rectIn;
- if ( flags & wxCONTROL_ISDEFAULT )
+ if ( flags & wxCONTROL_SIZEGRIP )
{
// draw the size grip: it is a normal rect except that in the lower
// right corner we have several bands which may be used for dragging
rectIn.Deflate(1);
rectIn.width -= STATUSBAR_GRIP_SIZE;
- }
- else // normal pane
- {
- if (style == wxSB_RAISED)
- DrawBorder(dc, wxBORDER_RAISED, rect, flags, &rectIn);
- else if (style != wxSB_FLAT)
- DrawBorder(dc, wxBORDER_STATIC, rect, flags, &rectIn);
- }
- rectIn.Deflate(STATBAR_BORDER_X, STATBAR_BORDER_Y);
+ // this will prevent the standard version from drawing any borders
+ style = wxSB_FLAT;
+ }
- wxDCClipper clipper(dc, rectIn);
- DrawLabel(dc, label, rectIn, flags, wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL);
+ DrawStatusField(dc, rect, label, flags, style);
}
#endif // wxUSE_STATUSBAR
}
#endif // wxUSE_BUTTON || wxUSE_TOGGLEBTN
- // take into account the border width
- wxRect rectBorder = GetBorderDimensions(window->GetBorder());
- size->x += rectBorder.x + rectBorder.width;
- size->y += rectBorder.y + rectBorder.height;
+ wxStdRenderer::AdjustSize(size, window);
}
// ============================================================================