]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/classic/menuitem.h
Removed unused files.
[wxWidgets.git] / include / wx / mac / classic / menuitem.h
CommitLineData
52479aef 1///////////////////////////////////////////////////////////////////////////////
b73e73f9 2// Name: wx/mac/classic/menuitem.h
52479aef
SC
3// Purpose: wxMenuItem class
4// Author: Vadim Zeitlin
b73e73f9 5// Modified by:
52479aef
SC
6// Created: 11.11.97
7// RCS-ID: $Id$
8// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
65571936 9// Licence: wxWindows licence
52479aef
SC
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _MENUITEM_H
13#define _MENUITEM_H
14
52479aef
SC
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
b73e73f9 19#include "wx/defs.h"
52479aef
SC
20
21// ----------------------------------------------------------------------------
22// wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
23// ----------------------------------------------------------------------------
24class WXDLLEXPORT wxMenuItem: public wxMenuItemBase
25{
26public:
27 // ctor & dtor
28 wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL,
29 int id = wxID_SEPARATOR,
30 const wxString& name = wxEmptyString,
31 const wxString& help = wxEmptyString,
32 wxItemKind kind = wxITEM_NORMAL,
33 wxMenu *subMenu = (wxMenu *)NULL);
34 virtual ~wxMenuItem();
35
36 // override base class virtuals
37 virtual void SetText(const wxString& strName);
38
b73e73f9
WS
39 virtual void Enable(bool bDoEnable = true);
40 virtual void Check(bool bDoCheck = true);
52479aef
SC
41
42 virtual void SetBitmap(const wxBitmap& bitmap) ;
43 virtual const wxBitmap& GetBitmap() const { return m_bitmap; }
44
45 // update the os specific representation
46 void UpdateItemBitmap() ;
47 void UpdateItemText() ;
48 void UpdateItemStatus() ;
49
50 // mark item as belonging to the given radio group
51 void SetAsRadioGroupStart();
52 void SetRadioGroupStart(int start);
53 void SetRadioGroupEnd(int end);
54
55private:
56 void UncheckRadio() ;
b73e73f9 57
52479aef
SC
58 // the positions of the first and last items of the radio group this item
59 // belongs to or -1: start is the radio group start and is valid for all
60 // but first radio group items (m_isRadioGroupStart == FALSE), end is valid
61 // only for the first one
62 union
63 {
64 int start;
65 int end;
66 } m_radioGroup;
67
68 // does this item start a radio group?
69 bool m_isRadioGroupStart;
70
71 wxBitmap m_bitmap; // Bitmap for menuitem, if any
72 void* m_menu ; // the appropriate menu , may also be a system menu
73
74 DECLARE_DYNAMIC_CLASS(wxMenuItem)
75};
76
77#endif //_MENUITEM_H