]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/menuitem.h
SCROLLWIN instead of SCROLL again
[wxWidgets.git] / include / wx / gtk / menuitem.h
... / ...
CommitLineData
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 license
8///////////////////////////////////////////////////////////////////////////////
9
10#ifndef __GTKMENUITEMH__
11#define __GTKMENUITEMH__
12
13#ifdef __GNUG__
14#pragma interface
15#endif
16
17//-----------------------------------------------------------------------------
18// wxMenuItem
19//-----------------------------------------------------------------------------
20
21class wxMenuItem : public wxMenuItemBase
22{
23public:
24 wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL,
25 int id = wxID_SEPARATOR,
26 const wxString& text = wxEmptyString,
27 const wxString& help = wxEmptyString,
28 bool isCheckable = FALSE,
29 wxMenu *subMenu = (wxMenu *)NULL);
30 ~wxMenuItem();
31
32 // implement base class virtuals
33 virtual void SetText( const wxString& str );
34 virtual void Enable( bool enable = TRUE );
35 virtual void Check( bool check = TRUE );
36 virtual bool IsChecked() const;
37
38#if wxUSE_ACCEL
39 virtual wxAcceleratorEntry *GetAccel() const;
40#endif // wxUSE_ACCEL
41
42 // implementation
43 void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; }
44 GtkWidget *GetMenuItem() const { return m_menuItem; }
45 wxString GetFactoryPath() const;
46
47 wxString GetHotKey() const { return m_hotKey; }
48
49private:
50 // DoSetText() transforms the accel mnemonics in our label from MSW/wxWin
51 // style to GTK+ and is called from ctor and SetText()
52 void DoSetText(const wxString& text);
53
54 wxString m_hotKey;
55
56 GtkWidget *m_menuItem; // GtkMenuItem
57
58 DECLARE_DYNAMIC_CLASS(wxMenuItem)
59};
60
61
62#endif
63 //__GTKMENUITEMH__