1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/menuitem.h
3 // Purpose: wxMenuItem class
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 ///////////////////////////////////////////////////////////////////////////////
9 #ifndef _WX_GTKMENUITEM_H_
10 #define _WX_GTKMENUITEM_H_
12 #include "wx/bitmap.h"
14 //-----------------------------------------------------------------------------
16 //-----------------------------------------------------------------------------
18 class WXDLLIMPEXP_CORE wxMenuItem
: public wxMenuItemBase
21 wxMenuItem(wxMenu
*parentMenu
= NULL
,
22 int id
= wxID_SEPARATOR
,
23 const wxString
& text
= wxEmptyString
,
24 const wxString
& help
= wxEmptyString
,
25 wxItemKind kind
= wxITEM_NORMAL
,
26 wxMenu
*subMenu
= NULL
);
27 virtual ~wxMenuItem();
29 // implement base class virtuals
30 virtual void SetItemLabel( const wxString
& str
);
31 virtual void Enable( bool enable
= true );
32 virtual void Check( bool check
= true );
33 virtual bool IsChecked() const;
34 virtual void SetBitmap(const wxBitmap
& bitmap
);
35 virtual const wxBitmap
& GetBitmap() const { return m_bitmap
; }
38 void SetMenuItem(GtkWidget
*menuItem
);
39 GtkWidget
*GetMenuItem() const { return m_menuItem
; }
42 #if WXWIN_COMPATIBILITY_2_8
43 // compatibility only, don't use in new code
44 wxDEPRECATED_CONSTRUCTOR(
45 wxMenuItem(wxMenu
*parentMenu
,
50 wxMenu
*subMenu
= NULL
)
55 wxBitmap m_bitmap
; // Bitmap for menuitem, if any
56 GtkWidget
*m_menuItem
; // GtkMenuItem
58 DECLARE_DYNAMIC_CLASS(wxMenuItem
)
61 #endif // _WX_GTKMENUITEM_H_