]>
Commit | Line | Data |
---|---|---|
23d1d521 | 1 | /////////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/gtk/menuitem.h |
23d1d521 | 3 | // Purpose: wxMenuItem class |
6ca41e57 | 4 | // Author: Robert Roebling |
6ca41e57 | 5 | // Copyright: (c) 1998 Robert Roebling |
65571936 | 6 | // Licence: wxWindows licence |
23d1d521 JS |
7 | /////////////////////////////////////////////////////////////////////////////// |
8 | ||
aac7dbf3 PC |
9 | #ifndef _WX_GTKMENUITEM_H_ |
10 | #define _WX_GTKMENUITEM_H_ | |
23d1d521 | 11 | |
37d403aa JS |
12 | #include "wx/bitmap.h" |
13 | ||
6ca41e57 RR |
14 | //----------------------------------------------------------------------------- |
15 | // wxMenuItem | |
16 | //----------------------------------------------------------------------------- | |
23d1d521 | 17 | |
20123d49 | 18 | class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase |
6ca41e57 | 19 | { |
6ca41e57 | 20 | public: |
d3b9f782 | 21 | wxMenuItem(wxMenu *parentMenu = NULL, |
974e8d94 VZ |
22 | int id = wxID_SEPARATOR, |
23 | const wxString& text = wxEmptyString, | |
24 | const wxString& help = wxEmptyString, | |
546bfbea | 25 | wxItemKind kind = wxITEM_NORMAL, |
d3b9f782 | 26 | wxMenu *subMenu = NULL); |
d3c7fc99 | 27 | virtual ~wxMenuItem(); |
c626a8b7 | 28 | |
974e8d94 | 29 | // implement base class virtuals |
52af3158 | 30 | virtual void SetItemLabel( const wxString& str ); |
aac7dbf3 PC |
31 | virtual void Enable( bool enable = true ); |
32 | virtual void Check( bool check = true ); | |
974e8d94 | 33 | virtual bool IsChecked() const; |
1deef997 | 34 | virtual void SetBitmap(const wxBitmap& bitmap); |
37d403aa | 35 | virtual const wxBitmap& GetBitmap() const { return m_bitmap; } |
c626a8b7 VZ |
36 | |
37 | // implementation | |
40116524 | 38 | void SetMenuItem(GtkWidget *menuItem); |
c626a8b7 | 39 | GtkWidget *GetMenuItem() const { return m_menuItem; } |
1deef997 | 40 | void SetGtkLabel(); |
92159e3d | 41 | |
efebabb7 | 42 | #if WXWIN_COMPATIBILITY_2_8 |
2368dcda | 43 | // compatibility only, don't use in new code |
bb3a9c6d | 44 | wxDEPRECATED_CONSTRUCTOR( |
2368dcda VZ |
45 | wxMenuItem(wxMenu *parentMenu, |
46 | int id, | |
47 | const wxString& text, | |
48 | const wxString& help, | |
49 | bool isCheckable, | |
efebabb7 PC |
50 | wxMenu *subMenu = NULL) |
51 | ); | |
52 | #endif | |
2368dcda | 53 | |
c626a8b7 | 54 | private: |
37d403aa | 55 | wxBitmap m_bitmap; // Bitmap for menuitem, if any |
974e8d94 | 56 | GtkWidget *m_menuItem; // GtkMenuItem |
c626a8b7 | 57 | |
974e8d94 | 58 | DECLARE_DYNAMIC_CLASS(wxMenuItem) |
23d1d521 JS |
59 | }; |
60 | ||
aac7dbf3 | 61 | #endif // _WX_GTKMENUITEM_H_ |