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