1 /////////////////////////////////////////////////////////////////////////////// 
   2 // Name:        wx/palmos/menuitem.h 
   3 // Purpose:     wxMenuItem class 
   4 // Author:      William Osborne - minimal working wxPalmOS port 
   8 // Copyright:   (c) William Osborne 
   9 // Licence:     wxWindows licence 
  10 /////////////////////////////////////////////////////////////////////////////// 
  15 // ---------------------------------------------------------------------------- 
  17 // ---------------------------------------------------------------------------- 
  20     #include  "wx/ownerdrw.h"   // base class 
  23 // ---------------------------------------------------------------------------- 
  24 // wxMenuItem: an item in the menu, optionally implements owner-drawn behaviour 
  25 // ---------------------------------------------------------------------------- 
  27 class WXDLLIMPEXP_CORE wxMenuItem 
: public wxMenuItemBase
 
  34     wxMenuItem(wxMenu 
*parentMenu 
= (wxMenu 
*)NULL
, 
  35                int id 
= wxID_SEPARATOR
, 
  36                const wxString
& name 
= wxEmptyString
, 
  37                const wxString
& help 
= wxEmptyString
, 
  38                wxItemKind kind 
= wxITEM_NORMAL
, 
  39                wxMenu 
*subMenu 
= (wxMenu 
*)NULL
); 
  40     virtual ~wxMenuItem(); 
  42     // override base class virtuals 
  43     virtual void SetItemLabel(const wxString
& strName
); 
  44     virtual void SetCheckable(bool checkable
); 
  46     virtual void Enable(bool bDoEnable 
= TRUE
); 
  47     virtual void Check(bool bDoCheck 
= TRUE
); 
  48     virtual bool IsChecked() const; 
  50     // unfortunately needed to resolve ambiguity between 
  51     // wxMenuItemBase::IsCheckable() and wxOwnerDrawn::IsCheckable() 
  52     bool IsCheckable() const { return wxMenuItemBase::IsCheckable(); } 
  54     // mark item as belonging to the given radio group 
  55     void SetAsRadioGroupStart(); 
  56     void SetRadioGroupStart(int start
); 
  57     void SetRadioGroupEnd(int end
); 
  59     // compatibility only, don't use in new code 
  60     wxMenuItem(wxMenu 
*parentMenu
, 
  65                wxMenu 
*subMenu 
= (wxMenu 
*)NULL
); 
  68     // common part of all ctors 
  71     // the positions of the first and last items of the radio group this item 
  72     // belongs to or -1: start is the radio group start and is valid for all 
  73     // but first radio group items (m_isRadioGroupStart == FALSE), end is valid 
  74     // only for the first one 
  81     // does this item start a radio group? 
  82     bool m_isRadioGroupStart
; 
  84     DECLARE_DYNAMIC_CLASS_NO_COPY(wxMenuItem
)