]>
Commit | Line | Data |
---|---|---|
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 |
23d1d521 JS |
7 | // Licence: wxWindows license |
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | ||
6ca41e57 RR |
10 | #ifndef __GTKMENUITEMH__ |
11 | #define __GTKMENUITEMH__ | |
23d1d521 JS |
12 | |
13 | #ifdef __GNUG__ | |
6ca41e57 | 14 | #pragma interface |
23d1d521 JS |
15 | #endif |
16 | ||
6ca41e57 RR |
17 | //----------------------------------------------------------------------------- |
18 | // wxMenuItem | |
19 | //----------------------------------------------------------------------------- | |
23d1d521 | 20 | |
974e8d94 | 21 | class wxMenuItem : public wxMenuItemBase |
6ca41e57 | 22 | { |
6ca41e57 | 23 | public: |
974e8d94 VZ |
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); | |
d1b15f03 | 30 | ~wxMenuItem(); |
c626a8b7 | 31 | |
974e8d94 VZ |
32 | // implement base class virtuals |
33 | virtual void SetText( const wxString& str ) { DoSetText(str); } | |
34 | virtual void Enable( bool enable = TRUE ); | |
35 | virtual void Check( bool check = TRUE ); | |
36 | virtual bool IsChecked() const; | |
c626a8b7 VZ |
37 | |
38 | // implementation | |
39 | void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; } | |
40 | GtkWidget *GetMenuItem() const { return m_menuItem; } | |
41 | ||
974e8d94 | 42 | wxString GetHotKey() const { return m_hotKey; } |
c626a8b7 VZ |
43 | |
44 | private: | |
974e8d94 VZ |
45 | // DoSetText() transforms the accel mnemonics in our label from MSW/wxWin |
46 | // style to GTK+ and is called from ctor and SetText() | |
47 | void DoSetText(const wxString& text); | |
48 | ||
49 | wxString m_hotKey; | |
50 | ||
51 | GtkWidget *m_menuItem; // GtkMenuItem | |
c626a8b7 | 52 | |
974e8d94 | 53 | DECLARE_DYNAMIC_CLASS(wxMenuItem) |
23d1d521 JS |
54 | }; |
55 | ||
6ca41e57 | 56 | |
8bbe427f | 57 | #endif |
6ca41e57 | 58 | //__GTKMENUITEMH__ |