]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/menuitem.h
enable more wx stuff when using gcc xml
[wxWidgets.git] / include / wx / gtk / menuitem.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: menuitem.h
3 // Purpose: wxMenuItem class
4 // Author: Robert Roebling
5 // RCS-ID: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTKMENUITEM_H_
11 #define _WX_GTKMENUITEM_H_
12
13 #include "wx/bitmap.h"
14
15 //-----------------------------------------------------------------------------
16 // wxMenuItem
17 //-----------------------------------------------------------------------------
18
19 class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase
20 {
21 public:
22 wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL,
23 int id = wxID_SEPARATOR,
24 const wxString& text = wxEmptyString,
25 const wxString& help = wxEmptyString,
26 wxItemKind kind = wxITEM_NORMAL,
27 wxMenu *subMenu = (wxMenu *)NULL);
28 virtual ~wxMenuItem();
29
30 // implement base class virtuals
31 virtual void SetItemLabel( const wxString& str );
32 virtual void Enable( bool enable = true );
33 virtual void Check( bool check = true );
34 virtual bool IsChecked() const;
35 virtual void SetBitmap(const wxBitmap& bitmap);
36 virtual const wxBitmap& GetBitmap() const { return m_bitmap; }
37
38 // implementation
39 void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; }
40 GtkWidget *GetMenuItem() const { return m_menuItem; }
41 void SetGtkLabel();
42
43 #if WXWIN_COMPATIBILITY_2_8
44 // compatibility only, don't use in new code
45 wxDEPRECATED(
46 inline
47 wxMenuItem(wxMenu *parentMenu,
48 int id,
49 const wxString& text,
50 const wxString& help,
51 bool isCheckable,
52 wxMenu *subMenu = NULL)
53 );
54 #endif
55
56 private:
57 wxBitmap m_bitmap; // Bitmap for menuitem, if any
58 GtkWidget *m_menuItem; // GtkMenuItem
59
60 DECLARE_DYNAMIC_CLASS(wxMenuItem)
61 };
62
63 #endif // _WX_GTKMENUITEM_H_