Add wxMenuItem::IsCheck() and IsRadio() accessors.

The latter will be convenient to use in the upcoming changes to wxOSX radio
items management code and add the former for the symmetry.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-07-16 14:10:20 +00:00
parent 75f9a95448
commit e3f4ca2e1e
2 changed files with 27 additions and 1 deletions

View File

@@ -82,7 +82,13 @@ public:
void SetKind(wxItemKind kind) { m_kind = kind; }
bool IsSeparator() const { return m_kind == wxITEM_SEPARATOR; }
virtual void SetCheckable(bool checkable) { m_kind = checkable ? wxITEM_CHECK : wxITEM_NORMAL; }
bool IsCheck() const { return m_kind == wxITEM_CHECK; }
bool IsRadio() const { return m_kind == wxITEM_RADIO; }
virtual void SetCheckable(bool checkable)
{ m_kind = checkable ? wxITEM_CHECK : wxITEM_NORMAL; }
// Notice that this doesn't quite match SetCheckable().
bool IsCheckable() const
{ return m_kind == wxITEM_CHECK || m_kind == wxITEM_RADIO; }