Add DrawCheckMark and GetCheckMarkSize to wxRendererNative

Show its use in the render sample. Also use the recently added GetExpanderSize
for the size of DrawTreeItemButton.
This commit is contained in:
Maarten Bent
2019-08-08 00:52:06 +02:00
parent 97320c312e
commit 2874dab7f0
5 changed files with 152 additions and 3 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.