Add native wxAuiToolbarArt for MSW.
Using UXTheme or generic fallback for executables without manifest.
This commit is contained in:
@@ -750,6 +750,12 @@ typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&);
|
||||
#define wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK wxEVT_AUITOOLBAR_MIDDLE_CLICK
|
||||
#define wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG wxEVT_AUITOOLBAR_BEGIN_DRAG
|
||||
|
||||
#ifdef __WXMSW__
|
||||
#define wxHAS_NATIVE_TOOLBAR_ART
|
||||
#include "wx/aui/barartmsw.h"
|
||||
#define wxAuiDefaultToolBarArt wxAuiMSWToolBarArt
|
||||
#endif
|
||||
|
||||
#ifndef wxHAS_NATIVE_TOOLBAR_ART
|
||||
#define wxAuiDefaultToolBarArt wxAuiGenericToolBarArt
|
||||
#endif
|
||||
|
88
include/wx/aui/barartmsw.h
Normal file
88
include/wx/aui/barartmsw.h
Normal file
@@ -0,0 +1,88 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/aui/barartmsw.h
|
||||
// Purpose: Interface of wxAuiMSWToolBarArt
|
||||
// Author: Tobias Taschner
|
||||
// Created: 2015-09-22
|
||||
// Copyright: (c) 2015 wxWidgets development team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_AUI_BARART_MSW_H_
|
||||
#define _WX_AUI_BARART_MSW_H_
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiMSWToolBarArt : public wxAuiGenericToolBarArt
|
||||
{
|
||||
public:
|
||||
|
||||
wxAuiMSWToolBarArt();
|
||||
virtual ~wxAuiMSWToolBarArt();
|
||||
|
||||
virtual wxAuiToolBarArt* Clone() wxOVERRIDE;
|
||||
|
||||
virtual void DrawBackground(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxRect& rect) wxOVERRIDE;
|
||||
|
||||
virtual void DrawLabel(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxAuiToolBarItem& item,
|
||||
const wxRect& rect) wxOVERRIDE;
|
||||
|
||||
virtual void DrawButton(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxAuiToolBarItem& item,
|
||||
const wxRect& rect) wxOVERRIDE;
|
||||
|
||||
virtual void DrawDropDownButton(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxAuiToolBarItem& item,
|
||||
const wxRect& rect) wxOVERRIDE;
|
||||
|
||||
virtual void DrawControlLabel(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxAuiToolBarItem& item,
|
||||
const wxRect& rect) wxOVERRIDE;
|
||||
|
||||
virtual void DrawSeparator(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxRect& rect) wxOVERRIDE;
|
||||
|
||||
virtual void DrawGripper(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxRect& rect) wxOVERRIDE;
|
||||
|
||||
virtual void DrawOverflowButton(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxRect& rect,
|
||||
int state) wxOVERRIDE;
|
||||
|
||||
virtual wxSize GetLabelSize(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxAuiToolBarItem& item) wxOVERRIDE;
|
||||
|
||||
virtual wxSize GetToolSize(
|
||||
wxDC& dc,
|
||||
wxWindow* wnd,
|
||||
const wxAuiToolBarItem& item) wxOVERRIDE;
|
||||
|
||||
virtual int GetElementSize(int element) wxOVERRIDE;
|
||||
virtual void SetElementSize(int elementId, int size) wxOVERRIDE;
|
||||
|
||||
virtual int ShowDropDown(wxWindow* wnd,
|
||||
const wxAuiToolBarItemArray& items) wxOVERRIDE;
|
||||
|
||||
private:
|
||||
bool m_themed;
|
||||
wxSize m_buttonSize;
|
||||
};
|
||||
|
||||
#endif // _WX_AUI_BARART_MSW_H_
|
Reference in New Issue
Block a user