Fix missing wxOwnerDrawn functions in WXQT wxMenuItem
This commit is contained in:
parent
bb82470640
commit
4e23b3e7f4
2 changed files with 57 additions and 0 deletions
|
|
@ -9,12 +9,20 @@
|
|||
#define _WX_QT_MENUITEM_H_
|
||||
|
||||
#include "wx/menuitem.h"
|
||||
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
#include "wx/ownerdrw.h"
|
||||
#endif
|
||||
|
||||
class QAction;
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMenu;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
, public wxOwnerDrawnBase
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
wxMenuItem(wxMenu *parentMenu = NULL,
|
||||
|
|
@ -33,15 +41,30 @@ public:
|
|||
virtual void Check(bool check = true);
|
||||
virtual bool IsChecked() const;
|
||||
|
||||
void SetBitmaps(const wxBitmap& bmpChecked,
|
||||
const wxBitmap& bmpUnchecked = wxNullBitmap);
|
||||
void SetBitmap(const wxBitmap& bitmap);
|
||||
const wxBitmap& GetBitmap() const;
|
||||
|
||||
virtual QAction *GetHandle() const;
|
||||
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
void SetDisabledBitmap(const wxBitmap& bmpDisabled);
|
||||
const wxBitmap& GetDisabledBitmap() const;
|
||||
|
||||
// override wxOwnerDrawn base class virtuals
|
||||
virtual wxString GetName() const wxOVERRIDE;
|
||||
virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat) wxOVERRIDE;
|
||||
#endif // wxUSE_OWNER_DRAWN
|
||||
|
||||
private:
|
||||
// Qt is using an action instead of a menu item.
|
||||
QAction *m_qtAction;
|
||||
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
wxBitmap m_bmpDisabled;
|
||||
#endif // wxUSE_OWNER_DRAWN
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS( wxMenuItem );
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue