X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d65c269b3f665e15a8ae1b8fff063b2ec0ef19a7..047ac72bbe45c9ee5ea271fdfa7a3c033dd93d05:/include/wx/menuitem.h diff --git a/include/wx/menuitem.h b/include/wx/menuitem.h index dac0c55cf5..b8d23c5edd 100644 --- a/include/wx/menuitem.h +++ b/include/wx/menuitem.h @@ -41,7 +41,7 @@ public: int id = wxID_SEPARATOR, const wxString& text = wxEmptyString, const wxString& help = wxEmptyString, - wxItemKind kind = wxItem_Normal, + wxItemKind kind = wxITEM_NORMAL, wxMenu *subMenu = (wxMenu *)NULL); // destruction: wxMenuItem will delete its submenu @@ -71,8 +71,9 @@ public: // what kind of menu item we are wxItemKind GetKind() const { return m_kind; } - virtual void SetCheckable(bool checkable) { m_kind = wxItem_Check; } - bool IsCheckable() const { return m_kind == wxItem_Check; } + virtual void SetCheckable(bool checkable) { m_kind = checkable ? wxITEM_CHECK : wxITEM_NORMAL; } + bool IsCheckable() const + { return m_kind == wxITEM_CHECK || m_kind == wxITEM_RADIO; } bool IsSubMenu() const { return m_subMenu != NULL; } void SetSubMenu(wxMenu *menu) { m_subMenu = menu; } @@ -115,7 +116,7 @@ public: wxMenu *subMenu = (wxMenu *)NULL) { return New(parentMenu, id, text, help, - isCheckable ? wxItem_Check : wxItem_Normal, subMenu); + isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu); } protected: @@ -133,7 +134,7 @@ protected: int id = wxID_SEPARATOR, const wxString& text = wxEmptyString, const wxString& help = wxEmptyString, - wxItemKind kind = wxItem_Normal, + wxItemKind kind = wxITEM_NORMAL, wxMenu *subMenu = (wxMenu *)NULL); private: