]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/menuitem.h
*** empty log message ***
[wxWidgets.git] / include / wx / motif / menuitem.h
CommitLineData
23d1d521
JS
1///////////////////////////////////////////////////////////////////////////////
2// Name: menuitem.h
3// Purpose: wxMenuItem class
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 11.11.97
7// RCS-ID: $Id$
8// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9// Licence: wxWindows license
10///////////////////////////////////////////////////////////////////////////////
11
9874b4ee
VZ
12#ifndef _WX_MOTIF_MENUITEM_H
13#define _WX_MOTIF_MENUITEM_H
23d1d521
JS
14
15#ifdef __GNUG__
9874b4ee 16 #pragma interface "menuitem.h"
23d1d521
JS
17#endif
18
23d1d521
JS
19// ----------------------------------------------------------------------------
20// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
21// ----------------------------------------------------------------------------
23d1d521 22
9874b4ee
VZ
23class WXDLLEXPORT wxMenuItem: public wxMenuItemBase
24{
23d1d521 25public:
9874b4ee
VZ
26 // ctor & dtor
27 wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL,
28 int id = wxID_SEPARATOR,
29 const wxString& text = wxEmptyString,
30 const wxString& help = wxEmptyString,
31 bool isCheckable = FALSE,
32 wxMenu *subMenu = (wxMenu *)NULL);
33 ~wxMenuItem();
23d1d521 34
9874b4ee
VZ
35 // accessors (some more are inherited from wxOwnerDrawn or are below)
36 virtual void SetText(const wxString& label);
37 virtual void Enable(bool enable = TRUE);
38 virtual void Check(bool check = TRUE);
23d1d521 39
9874b4ee 40 void DeleteSubMenu();
23d1d521 41
9874b4ee
VZ
42 // implementation from now on
43 void CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMenu);
44 void DestroyItem(bool full);
23d1d521 45
9874b4ee 46 WXWidget GetButtonWidget() const { return m_buttonWidget; }
23d1d521 47
9874b4ee
VZ
48 wxMenuBar* GetMenuBar() const { return m_menuBar; }
49 void SetMenuBar(wxMenuBar* menuBar) { m_menuBar = menuBar; }
23d1d521 50
9874b4ee
VZ
51 wxMenu* GetTopMenu() const { return m_topMenu; }
52 void SetTopMenu(wxMenu* menu) { m_topMenu = menu; }
23d1d521
JS
53
54private:
9874b4ee
VZ
55 WXWidget m_buttonWidget;
56 wxMenuBar* m_menuBar;
57 wxMenu* m_topMenu; // Top-level menu e.g. popup-menu
23d1d521 58
9874b4ee 59 DECLARE_DYNAMIC_CLASS(wxMenuItem)
23d1d521
JS
60};
61
9874b4ee 62#endif // _WX_MOTIF_MENUITEM_H