#ifndef _WX_UNIV_MENUITEM_H_
#define _WX_UNIV_MENUITEM_H_
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma interface "univmenuitem.h"
-#endif
-
// ----------------------------------------------------------------------------
// wxMenuItem implements wxMenuItemBase
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxMenuItem : public wxMenuItemBase
+class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase
{
public:
// ctor & dtor
- wxMenuItem(wxMenu *parentMenu = (wxMenu *)NULL,
+ wxMenuItem(wxMenu *parentMenu = NULL,
int id = wxID_SEPARATOR,
const wxString& name = wxEmptyString,
const wxString& help = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL,
- wxMenu *subMenu = (wxMenu *)NULL);
+ wxMenu *subMenu = NULL);
virtual ~wxMenuItem();
// override base class virtuals to update the item appearance on screen
- virtual void SetText(const wxString& text);
+ virtual void SetItemLabel(const wxString& text);
virtual void SetCheckable(bool checkable);
- virtual void Enable(bool enable = TRUE);
- virtual void Check(bool check = TRUE);
+ virtual void Enable(bool enable = true);
+ virtual void Check(bool check = true);
// we add some extra functions which are also available under MSW from
// wxOwnerDrawn class - they will be moved to wxMenuItemBase later
void SetBitmaps(const wxBitmap& bmpChecked,
const wxBitmap& bmpUnchecked = wxNullBitmap);
void SetBitmap(const wxBitmap& bmp) { SetBitmaps(bmp); }
- const wxBitmap& GetBitmap(bool checked = TRUE) const
+ const wxBitmap& GetBitmap(bool checked = true) const
{ return checked ? m_bmpChecked : m_bmpUnchecked; }
void SetDisabledBitmap( const wxBitmap& bmpDisabled )
wxCoord GetPosition() const
{
- wxASSERT_MSG( m_posY != -1, _T("must call SetHeight first!") );
+ wxASSERT_MSG( m_posY != wxDefaultCoord, _T("must call SetHeight first!") );
return m_posY;
}
wxCoord GetHeight() const
{
- wxASSERT_MSG( m_height != -1, _T("must call SetHeight first!") );
+ wxASSERT_MSG( m_height != wxDefaultCoord, _T("must call SetHeight first!") );
return m_height;
}
// the bitmaps (may be invalid, then they're not used)
wxBitmap m_bmpChecked,
m_bmpUnchecked,
- m_bmpDisabled;
+ m_bmpDisabled;
// the positions of the first and last items of the radio group this item
// belongs to or -1: start is the radio group start and is valid for all
- // but first radio group items (m_isRadioGroupStart == FALSE), end is valid
+ // but first radio group items (m_isRadioGroupStart == false), end is valid
// only for the first one
union
{