]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/menuitem.h
When handling accelerators in wxWebView make sure that we do not block right-alt...
[wxWidgets.git] / include / wx / gtk / menuitem.h
... / ...
CommitLineData
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk/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
19class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase
20{
21public:
22 wxMenuItem(wxMenu *parentMenu = NULL,
23 int id = wxID_SEPARATOR,
24 const wxString& text = wxEmptyString,
25 const wxString& help = wxEmptyString,
26 wxItemKind kind = wxITEM_NORMAL,
27 wxMenu *subMenu = 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);
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_CONSTRUCTOR(
46 wxMenuItem(wxMenu *parentMenu,
47 int id,
48 const wxString& text,
49 const wxString& help,
50 bool isCheckable,
51 wxMenu *subMenu = NULL)
52 );
53#endif
54
55private:
56 wxBitmap m_bitmap; // Bitmap for menuitem, if any
57 GtkWidget *m_menuItem; // GtkMenuItem
58
59 DECLARE_DYNAMIC_CLASS(wxMenuItem)
60};
61
62#endif // _WX_GTKMENUITEM_H_