X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/51d2fa37c431389260d70805f06e0158d85bdb3a..1d54b9d29706dbb43de5624bdf4a2aaa74b2350b:/include/wx/ownerdrw.h diff --git a/include/wx/ownerdrw.h b/include/wx/ownerdrw.h index 7d388880bb..367802df02 100644 --- a/include/wx/ownerdrw.h +++ b/include/wx/ownerdrw.h @@ -12,6 +12,8 @@ #ifndef _OWNERDRW_H #define _OWNERDRW_H +#include "wx/defs.h" + #if wxUSE_OWNER_DRAWN #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -38,7 +40,7 @@ public: wxOwnerDrawn(const wxString& str = wxEmptyString, bool bCheckable = false, bool bMenuItem = false); // FIXME kludge for colors - virtual ~wxOwnerDrawn() { } + virtual ~wxOwnerDrawn(); // fix appearance void SetFont(const wxFont& font) @@ -140,6 +142,13 @@ public: virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat); protected: + // return true if this is a menu item + bool IsMenuItem() const; + + // get the font to use, whether m_font is set or not + wxFont GetFontToUse() const; + + wxString m_strName, // label for a manu item m_strAccel; // the accel string ("Ctrl-F17") if any