]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/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 license
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MOTIF_MENUITEM_H
13 #define _WX_MOTIF_MENUITEM_H
16 #pragma interface "menuitem.h"
19 class WXDLLEXPORT wxMenuBar
;
21 // ----------------------------------------------------------------------------
22 // wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
23 // ----------------------------------------------------------------------------
25 class wxMenuItem
: public wxMenuItemBase
29 wxMenuItem(wxMenu
*parentMenu
= (wxMenu
*)NULL
,
30 int id
= wxID_SEPARATOR
,
31 const wxString
& text
= wxEmptyString
,
32 const wxString
& help
= wxEmptyString
,
33 bool isCheckable
= FALSE
,
34 wxMenu
*subMenu
= (wxMenu
*)NULL
);
37 // accessors (some more are inherited from wxOwnerDrawn or are below)
38 virtual void SetText(const wxString
& label
);
39 virtual wxString
GetLabel() const;
40 virtual void Enable(bool enable
= TRUE
);
41 virtual void Check(bool check
= TRUE
);
45 // implementation from now on
46 void CreateItem (WXWidget menu
, wxMenuBar
* menuBar
, wxMenu
* topMenu
);
47 void DestroyItem(bool full
);
49 WXWidget
GetButtonWidget() const { return m_buttonWidget
; }
51 wxMenuBar
* GetMenuBar() const { return m_menuBar
; }
52 void SetMenuBar(wxMenuBar
* menuBar
) { m_menuBar
= menuBar
; }
54 wxMenu
* GetTopMenu() const { return m_topMenu
; }
55 void SetTopMenu(wxMenu
* menu
) { m_topMenu
= menu
; }
58 WXWidget m_buttonWidget
;
60 wxMenu
* m_topMenu
; // Top-level menu e.g. popup-menu
62 DECLARE_DYNAMIC_CLASS(wxMenuItem
)
65 #endif // _WX_MOTIF_MENUITEM_H