]>
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 // ----------------------------------------------------------------------------
20 // wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
21 // ----------------------------------------------------------------------------
23 class WXDLLEXPORT wxMenuItem
: public wxMenuItemBase
27 wxMenuItem(wxMenu
*parentMenu
= (wxMenu
*)NULL
,
28 int id
= wxID_SEPARATOR
,
29 const wxString
& text
= wxEmptyString
,
30 const wxString
& help
= wxEmptyString
,
31 bool isCheckable
= FALSE
,
32 wxMenu
*subMenu
= (wxMenu
*)NULL
);
35 // accessors (some more are inherited from wxOwnerDrawn or are below)
36 virtual void SetText(const wxString
& label
);
37 virtual void Enable(bool enable
= TRUE
);
38 virtual void Check(bool check
= TRUE
);
42 // implementation from now on
43 void CreateItem (WXWidget menu
, wxMenuBar
* menuBar
, wxMenu
* topMenu
);
44 void DestroyItem(bool full
);
46 WXWidget
GetButtonWidget() const { return m_buttonWidget
; }
48 wxMenuBar
* GetMenuBar() const { return m_menuBar
; }
49 void SetMenuBar(wxMenuBar
* menuBar
) { m_menuBar
= menuBar
; }
51 wxMenu
* GetTopMenu() const { return m_topMenu
; }
52 void SetTopMenu(wxMenu
* menu
) { m_topMenu
= menu
; }
55 WXWidget m_buttonWidget
;
57 wxMenu
* m_topMenu
; // Top-level menu e.g. popup-menu
59 DECLARE_DYNAMIC_CLASS(wxMenuItem
)
62 #endif // _WX_MOTIF_MENUITEM_H