X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/71908213057690d5452f72b2b9c8e62b53357170..efd17a1d4fa08bf549023a1cc74ce98f9db91be3:/include/wx/univ/menuitem.h diff --git a/include/wx/univ/menuitem.h b/include/wx/univ/menuitem.h index 4022b33113..c0554556a0 100644 --- a/include/wx/univ/menuitem.h +++ b/include/wx/univ/menuitem.h @@ -12,8 +12,8 @@ #ifndef _WX_UNIV_MENUITEM_H_ #define _WX_UNIV_MENUITEM_H_ -#ifdef __GNUG__ - #pragma interface "menuitem.h" +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) + #pragma interface "univmenuitem.h" #endif // ---------------------------------------------------------------------------- @@ -28,7 +28,7 @@ public: int id = wxID_SEPARATOR, const wxString& name = wxEmptyString, const wxString& help = wxEmptyString, - bool isCheckable = FALSE, + wxItemKind kind = wxITEM_NORMAL, wxMenu *subMenu = (wxMenu *)NULL); virtual ~wxMenuItem(); @@ -48,6 +48,16 @@ public: const wxBitmap& GetBitmap(bool checked = TRUE) const { return checked ? m_bmpChecked : m_bmpUnchecked; } + void SetDisabledBitmap( const wxBitmap& bmpDisabled ) + { m_bmpDisabled = bmpDisabled; } + const wxBitmap& GetDisabledBitmap() const + { return m_bmpDisabled; } + + // mark item as belonging to the given radio group + void SetAsRadioGroupStart(); + void SetRadioGroupStart(int start); + void SetRadioGroupEnd(int end); + // wxUniv-specific methods for implementation only starting from here // get the accel index of our label or -1 if none @@ -87,7 +97,21 @@ protected: // the bitmaps (may be invalid, then they're not used) wxBitmap m_bmpChecked, - m_bmpUnchecked; + m_bmpUnchecked, + m_bmpDisabled; + + // the positions of the first and last items of the radio group this item + // belongs to or -1: start is the radio group start and is valid for all + // but first radio group items (m_isRadioGroupStart == FALSE), end is valid + // only for the first one + union + { + int start; + int end; + } m_radioGroup; + + // does this item start a radio group? + bool m_isRadioGroupStart; // the position of the accelerator in our label, -1 if none int m_indexAccel;