]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/menuitem.h
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxMenuItem class
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows license
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef __GTKMENUITEMH__
11 #define __GTKMENUITEMH__
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 class wxMenuItem
: public wxMenuItemBase
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
);
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;
39 void SetMenuItem(GtkWidget
*menuItem
) { m_menuItem
= menuItem
; }
40 GtkWidget
*GetMenuItem() const { return m_menuItem
; }
41 wxString
GetFactoryPath() const;
43 wxString
GetHotKey() const { return m_hotKey
; }
46 // DoSetText() transforms the accel mnemonics in our label from MSW/wxWin
47 // style to GTK+ and is called from ctor and SetText()
48 void DoSetText(const wxString
& text
);
52 GtkWidget
*m_menuItem
; // GtkMenuItem
54 DECLARE_DYNAMIC_CLASS(wxMenuItem
)