X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7e548f6b13a27eee6f2740d922cab636f0b305e0..259c43f679ca655362b5a439e11c87fc0666d663:/include/wx/ownerdrw.h diff --git a/include/wx/ownerdrw.h b/include/wx/ownerdrw.h index a8b5a1b8ad..0e5a8f312f 100644 --- a/include/wx/ownerdrw.h +++ b/include/wx/ownerdrw.h @@ -12,11 +12,9 @@ #ifndef _OWNERDRW_H #define _OWNERDRW_H -#if wxUSE_OWNER_DRAWN +#include "wx/defs.h" -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "ownerdrw.h" -#endif +#if wxUSE_OWNER_DRAWN #include "wx/bitmap.h" #include "wx/colour.h" @@ -38,7 +36,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) @@ -131,7 +129,8 @@ public: wxODDisabled = 0x0004, // item is to be drawn as disabled wxODChecked = 0x0008, // item is to be checked wxODHasFocus = 0x0010, // item has the keyboard focus - wxODDefault = 0x0020 // item is the default item + wxODDefault = 0x0020, // item is the default item + wxODHidePrefix= 0x0100 // hide keyboard cues (w2k and xp only) }; // virtual functions to implement drawing (return true if processed) @@ -139,6 +138,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