]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/menuitem.h
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxMenuItem class
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
16 #pragma interface "menuitem.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
25 // an exception to the general rule that a normal header doesn't include other
26 // headers - only because ownerdrw.h is not always included and I don't want
27 // to write #ifdef's everywhere...
29 #include "wx/ownerdrw.h"
32 // ----------------------------------------------------------------------------
34 // ----------------------------------------------------------------------------
36 // ----------------------------------------------------------------------------
37 // wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour
38 // ----------------------------------------------------------------------------
39 class WXDLLEXPORT wxMenuItem
: public wxMenuItemBase
46 wxMenuItem( wxMenu
* pParentMenu
= NULL
47 ,int nId
= wxID_SEPARATOR
48 ,const wxString
& rStrName
= ""
49 ,const wxString
& rWxHelp
= ""
50 ,wxItemKind kind
= wxItem_Normal
51 ,wxMenu
* pSubMenu
= NULL
53 virtual ~wxMenuItem();
55 // override base class virtuals
56 virtual void SetText(const wxString
& rStrName
);
57 virtual void SetCheckable(bool bCheckable
);
59 virtual void Enable(bool bDoEnable
= TRUE
);
60 virtual void Check(bool bDoCheck
= TRUE
);
61 virtual bool IsChecked(void) const;
63 // unfortunately needed to resolve ambiguity between
64 // wxMenuItemBase::IsCheckable() and wxOwnerDrawn::IsCheckable()
65 bool IsCheckable(void) const { return wxMenuItemBase::IsCheckable(); }
67 // the id for a popup menu is really its menu handle (as required by
68 // ::AppendMenu() API), so this function will return either the id or the
69 // menu handle depending on what we're
70 int GetRealId(void) const;
73 // All OS/2PM Submenus and menus have one of these
78 DECLARE_DYNAMIC_CLASS(wxMenuItem
)
79 }; // end of CLASS wxMenuItem