projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix warnings in EventsSuppressor ctor from gcc with -O option
[wxWidgets.git]
/
include
/
wx
/
ownerdrw.h
diff --git
a/include/wx/ownerdrw.h
b/include/wx/ownerdrw.h
index 7d388880bb87b229ca85029470e5a775a1d2b02b..55ec29893f678ff7fc41e0858818fc2ded426634 100644
(file)
--- a/
include/wx/ownerdrw.h
+++ b/
include/wx/ownerdrw.h
@@
-12,11
+12,9
@@
#ifndef _OWNERDRW_H
#define _OWNERDRW_H
#ifndef _OWNERDRW_H
#define _OWNERDRW_H
-#i
f wxUSE_OWNER_DRAWN
+#i
nclude "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"
#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
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)
// fix appearance
void SetFont(const wxFont& font)
@@
-140,6
+138,13
@@
public:
virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat);
protected:
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
wxString m_strName, // label for a manu item
m_strAccel; // the accel string ("Ctrl-F17") if any
@@
-148,7
+153,8
@@
private:
static size_t ms_nLastMarginWidth; // handy for aligning all items
bool m_bCheckable, // used only for menu or check listbox items
static size_t ms_nLastMarginWidth; // handy for aligning all items
bool m_bCheckable, // used only for menu or check listbox items
- m_bOwnerDrawn; // true if something is non standard
+ m_bOwnerDrawn, // true if something is non standard
+ m_isMenuItem; // true if this is a menu item
wxFont m_font; // font to use for drawing
wxColour m_colText, // color ----"---"---"----
wxFont m_font; // font to use for drawing
wxColour m_colText, // color ----"---"---"----