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

@@ -234,8 +234,13 @@ public:
virtual void DrawCheckBox(wxWindow *win, wxDC& dc,
const wxRect& rect, int flags = 0 );
virtual void DrawCheckMark(wxWindow *win, wxDC& dc,
const wxRect& rect, int flags = 0 );
virtual wxSize GetCheckBoxSize(wxWindow *win);
virtual wxSize GetCheckMarkSize(wxWindow *win);
virtual wxSize GetExpanderSize(wxWindow* win);
virtual void DrawPushButton(wxWindow *win, wxDC& dc,
@@ -532,6 +537,17 @@ public:
wxTitleBarButton button,
int flags = 0) = 0;
/**
Draw a check mark.
@a flags may have the @c wxCONTROL_DISABLED bit set, see
@ref wxCONTROL_FLAGS.
@since 3.1.3
*/
virtual void DrawCheckMark(wxWindow* win, wxDC& dc, const wxRect& rect,
int flags = 0) = 0;
/**
Return the currently used renderer.
*/
@@ -560,6 +576,16 @@ public:
*/
virtual wxSize GetCheckBoxSize(wxWindow* win) = 0;
/**
Returns the size of a check mark.
@param win A valid, i.e. non-null, window pointer which is used to get
the theme defining the checkmark size under some platforms.
@since 3.1.3
*/
virtual wxSize GetCheckMarkSize(wxWindow* win) = 0;
/**
Returns the size of the expander used in tree-like controls.