]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/menuitem.h
moved wxDash typedef to gdicmn.h
[wxWidgets.git] / include / wx / motif / menuitem.h
CommitLineData
23d1d521
JS
1///////////////////////////////////////////////////////////////////////////////
2// Name: menuitem.h
3// Purpose: wxMenuItem class
4// Author: Vadim Zeitlin
3b59cdbf 5// Modified by:
23d1d521
JS
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
c71830c3
VZ
19class WXDLLEXPORT wxMenuBar;
20
23d1d521
JS
21// ----------------------------------------------------------------------------
22// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
23// ----------------------------------------------------------------------------
23d1d521 24
c71830c3 25class wxMenuItem : public wxMenuItemBase
9874b4ee 26{
23d1d521 27public:
9874b4ee
VZ
28 // ctor & dtor
29 wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL,
30 int id = wxID_SEPARATOR,
31 const wxString& text = wxEmptyString,
32 const wxString& help = wxEmptyString,
33 bool isCheckable = FALSE,
34 wxMenu *subMenu = (wxMenu *)NULL);
35 ~wxMenuItem();
23d1d521 36
9874b4ee
VZ
37 // accessors (some more are inherited from wxOwnerDrawn or are below)
38 virtual void SetText(const wxString& label);
39 virtual void Enable(bool enable = TRUE);
40 virtual void Check(bool check = TRUE);
23d1d521 41
9874b4ee 42 void DeleteSubMenu();
23d1d521 43
9874b4ee
VZ
44 // implementation from now on
45 void CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMenu);
46 void DestroyItem(bool full);
23d1d521 47
9874b4ee 48 WXWidget GetButtonWidget() const { return m_buttonWidget; }
23d1d521 49
9874b4ee
VZ
50 wxMenuBar* GetMenuBar() const { return m_menuBar; }
51 void SetMenuBar(wxMenuBar* menuBar) { m_menuBar = menuBar; }
23d1d521 52
9874b4ee
VZ
53 wxMenu* GetTopMenu() const { return m_topMenu; }
54 void SetTopMenu(wxMenu* menu) { m_topMenu = menu; }
23d1d521
JS
55
56private:
9874b4ee
VZ
57 WXWidget m_buttonWidget;
58 wxMenuBar* m_menuBar;
59 wxMenu* m_topMenu; // Top-level menu e.g. popup-menu
23d1d521 60
9874b4ee 61 DECLARE_DYNAMIC_CLASS(wxMenuItem)
23d1d521
JS
62};
63
9874b4ee 64#endif // _WX_MOTIF_MENUITEM_H