Merge branch 'mswdc-draw-point-checkbox' of https://github.com/MaartenBent/wxWidgets

Draw the same shape in wxDC::DrawCheckMark() under all platforms and
provide wxRenderer::DrawCheckMark() for drawing the platform-specific
shape.

Also fix wxGCDC::DrawPoint() to use the default one point wide pen.

See https://github.com/wxWidgets/wxWidgets/pull/1471
This commit is contained in:
Vadim Zeitlin
2019-08-20 13:20:48 +02:00
10 changed files with 192 additions and 36 deletions

View File

@@ -202,8 +202,6 @@ public:
virtual void DoDrawArc(wxCoord x1, wxCoord y1,
wxCoord x2, wxCoord y2,
wxCoord xc, wxCoord yc) wxOVERRIDE;
virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
wxCoord width, wxCoord height) wxOVERRIDE;
virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
double sa, double ea) wxOVERRIDE;

View File

@@ -250,9 +250,20 @@ public:
const wxRect& rect,
int flags = 0) = 0;
// draw check mark
//
// flags may use wxCONTROL_DISABLED
virtual void DrawCheckMark(wxWindow *win,
wxDC& dc,
const wxRect& rect,
int flags = 0) = 0;
// Returns the default size of a check box.
virtual wxSize GetCheckBoxSize(wxWindow *win) = 0;
// Returns the default size of a check mark.
virtual wxSize GetCheckMarkSize(wxWindow *win) = 0;
// Returns the default size of a expander.
virtual wxSize GetExpanderSize(wxWindow *win) = 0;
@@ -479,10 +490,19 @@ public:
int flags = 0) wxOVERRIDE
{ m_rendererNative.DrawCheckBox( win, dc, rect, flags ); }
virtual void DrawCheckMark(wxWindow *win,
wxDC& dc,
const wxRect& rect,
int flags = 0) wxOVERRIDE
{ m_rendererNative.DrawCheckMark( win, dc, rect, flags ); }
virtual wxSize GetCheckBoxSize(wxWindow *win) wxOVERRIDE
{ return m_rendererNative.GetCheckBoxSize(win); }
virtual wxSize GetExpanderSize(wxWindow *win) wxOVERRIDE
virtual wxSize GetCheckMarkSize(wxWindow *win) wxOVERRIDE
{ return m_rendererNative.GetCheckMarkSize(win); }
virtual wxSize GetExpanderSize(wxWindow *win) wxOVERRIDE
{ return m_rendererNative.GetExpanderSize(win); }
virtual void DrawPushButton(wxWindow *win,