]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/classic/menuitem.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/classic/menuitem.h
3 // Purpose: wxMenuItem class
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
22 // wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
23 // ----------------------------------------------------------------------------
24 class WXDLLEXPORT wxMenuItem
: public wxMenuItemBase
28 wxMenuItem(wxMenu
*parentMenu
= (wxMenu
*)NULL
,
29 int id
= wxID_SEPARATOR
,
30 const wxString
& name
= wxEmptyString
,
31 const wxString
& help
= wxEmptyString
,
32 wxItemKind kind
= wxITEM_NORMAL
,
33 wxMenu
*subMenu
= (wxMenu
*)NULL
);
34 virtual ~wxMenuItem();
36 // override base class virtuals
37 virtual void SetText(const wxString
& strName
);
39 virtual void Enable(bool bDoEnable
= true);
40 virtual void Check(bool bDoCheck
= true);
42 virtual void SetBitmap(const wxBitmap
& bitmap
) ;
43 virtual const wxBitmap
& GetBitmap() const { return m_bitmap
; }
45 // update the os specific representation
46 void UpdateItemBitmap() ;
47 void UpdateItemText() ;
48 void UpdateItemStatus() ;
50 // mark item as belonging to the given radio group
51 void SetAsRadioGroupStart();
52 void SetRadioGroupStart(int start
);
53 void SetRadioGroupEnd(int end
);
58 // the positions of the first and last items of the radio group this item
59 // belongs to or -1: start is the radio group start and is valid for all
60 // but first radio group items (m_isRadioGroupStart == FALSE), end is valid
61 // only for the first one
68 // does this item start a radio group?
69 bool m_isRadioGroupStart
;
71 wxBitmap m_bitmap
; // Bitmap for menuitem, if any
72 void* m_menu
; // the appropriate menu , may also be a system menu
74 DECLARE_DYNAMIC_CLASS(wxMenuItem
)