Allow ignoring margins in wxRendererNative::GetCheckBoxSize()

Add ability to get the size of the checkbox without any margins by
passing wxCONTROL_CELL flag: this can be useful when the checkbox is
part of some "cell", e.g. wxGrid one, and doesn't need any extra margins
around it.

Currently wxCONTROL_CELL is only really used by wxGTK2 implementation.
This commit is contained in:
Ilya Sinitsyn
2019-11-07 01:13:32 +07:00
committed by Vadim Zeitlin
parent 5ad2470504
commit 53ffbf6cf5
6 changed files with 55 additions and 22 deletions

View File

@@ -259,7 +259,7 @@ public:
int flags = 0) = 0;
// Returns the default size of a check box.
virtual wxSize GetCheckBoxSize(wxWindow *win) = 0;
virtual wxSize GetCheckBoxSize(wxWindow *win, int flags = 0) = 0;
// Returns the default size of a check mark.
virtual wxSize GetCheckMarkSize(wxWindow *win) = 0;
@@ -496,8 +496,8 @@ public:
int flags = 0) wxOVERRIDE
{ m_rendererNative.DrawCheckMark( win, dc, rect, flags ); }
virtual wxSize GetCheckBoxSize(wxWindow *win) wxOVERRIDE
{ return m_rendererNative.GetCheckBoxSize(win); }
virtual wxSize GetCheckBoxSize(wxWindow *win, int flags = 0) wxOVERRIDE
{ return m_rendererNative.GetCheckBoxSize(win, flags); }
virtual wxSize GetCheckMarkSize(wxWindow *win) wxOVERRIDE
{ return m_rendererNative.GetCheckMarkSize(win); }