Merge native MSW appearance for AUI toolbars
Closes https://github.com/wxWidgets/wxWidgets/pull/200
This commit is contained in:
@@ -347,13 +347,13 @@ public:
|
||||
|
||||
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiDefaultToolBarArt : public wxAuiToolBarArt
|
||||
class WXDLLIMPEXP_AUI wxAuiGenericToolBarArt : public wxAuiToolBarArt
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
wxAuiDefaultToolBarArt();
|
||||
virtual ~wxAuiDefaultToolBarArt();
|
||||
wxAuiGenericToolBarArt();
|
||||
virtual ~wxAuiGenericToolBarArt();
|
||||
|
||||
virtual wxAuiToolBarArt* Clone() wxOVERRIDE;
|
||||
virtual void SetFlags(unsigned int flags) wxOVERRIDE;
|
||||
@@ -750,6 +750,16 @@ 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
|
||||
|
||||
#endif // wxUSE_AUI
|
||||
#endif // _WX_AUIBAR_H_
|
||||
|
||||
|
86
include/wx/aui/barartmsw.h
Normal file
86
include/wx/aui/barartmsw.h
Normal file
@@ -0,0 +1,86 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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 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