]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/menuitem.h
1 ///////////////////////////////////////////////////////////////////////////////
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 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "menuitem.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
25 // ----------------------------------------------------------------------------
26 // wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
27 // ----------------------------------------------------------------------------
28 class WXDLLEXPORT wxMenuItem
: public wxMenuItemBase
32 wxMenuItem(wxMenu
*parentMenu
= (wxMenu
*)NULL
,
33 int id
= wxID_SEPARATOR
,
34 const wxString
& name
= wxEmptyString
,
35 const wxString
& help
= wxEmptyString
,
36 wxItemKind kind
= wxITEM_NORMAL
,
37 wxMenu
*subMenu
= (wxMenu
*)NULL
);
38 virtual ~wxMenuItem();
40 // override base class virtuals
41 virtual void SetText(const wxString
& strName
);
43 virtual void Enable(bool bDoEnable
= TRUE
);
44 virtual void Check(bool bDoCheck
= TRUE
);
46 virtual void SetBitmap(const wxBitmap
& bitmap
) ;
47 virtual const wxBitmap
& GetBitmap() const { return m_bitmap
; }
49 // update the os specific representation
50 void UpdateItemBitmap() ;
51 void UpdateItemText() ;
52 void UpdateItemStatus() ;
54 // mark item as belonging to the given radio group
55 void SetAsRadioGroupStart();
56 void SetRadioGroupStart(int start
);
57 void SetRadioGroupEnd(int end
);
62 // the positions of the first and last items of the radio group this item
63 // belongs to or -1: start is the radio group start and is valid for all
64 // but first radio group items (m_isRadioGroupStart == FALSE), end is valid
65 // only for the first one
72 // does this item start a radio group?
73 bool m_isRadioGroupStart
;
75 wxBitmap m_bitmap
; // Bitmap for menuitem, if any
76 void* m_menu
; // the appropriate menu , may also be a system menu
78 DECLARE_DYNAMIC_CLASS(wxMenuItem
)