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
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; }
*/
//@{
+ /**
+ Returns @true if the item is a check item.
+
+ Unlike IsCheckable() this doesn't return @true for the radio buttons.
+
+ @since 2.9.5
+ */
+ bool IsCheck() const;
+
/**
Returns @true if the item is checkable.
+
+ Notice that the radio buttons are considered to be checkable as well,
+ so this method returns @true for them too. Use IsCheck() if you want to
+ test for the check items only.
*/
bool IsCheckable() const;
*/
virtual bool IsEnabled() const;
+ /**
+ Returns @true if the item is a radio button.
+
+ @since 2.9.5
+ */
+ bool IsRadio() const;
+
/**
Returns @true if the item is a separator.
*/