mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-12 09:09:12 +01:00
822326eea9
From wxWidgets master 81570ae070b35c9d52de47b1f14897f3ff1a66c7. include/wx/defs.h -- __w64 warning disable patch by comex brought forward. include/wx/msw/window.h -- added GetContentScaleFactor() which was not implemented on Windows but is necessary for wxBitmap scaling on Mac OS X so it needs to work to avoid #ifdef-ing the code. src/gtk/window.cpp -- Modified DoSetClientSize() to direct call wxWindowGTK::DoSetSize() instead of using public wxWindowBase::SetSize() which now prevents derived classes (like wxAuiToolbar) intercepting the call and breaking it. This matches Windows which does NOT need to call DoSetSize internally. End result is this fixes Dolphin's debug tools toolbars on Linux. src/osx/window_osx.cpp -- Same fix as for GTK since it has the same issue. src/msw/radiobox.cpp -- Hacked to fix display in HiDPI (was clipping off end of text). Updated CMakeLists for Linux and Mac OS X. Small code changes to Dolphin to fix debug error boxes, deprecation warnings, and retain previous UI behavior on Windows.
331 lines
9.4 KiB
C++
331 lines
9.4 KiB
C++
//////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/aui/tabart.h
|
|
// Purpose: wxaui: wx advanced user interface - notebook
|
|
// Author: Benjamin I. Williams
|
|
// Modified by: Jens Lody (extracted from wx/aui/auibook.h)
|
|
// Created: 2012-03-21
|
|
// Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved.
|
|
// Licence: wxWindows Library Licence, Version 3.1
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
#ifndef _WX_AUI_TABART_H_
|
|
#define _WX_AUI_TABART_H_
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// headers
|
|
// ----------------------------------------------------------------------------
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#if wxUSE_AUI
|
|
|
|
#include "wx/colour.h"
|
|
#include "wx/gdicmn.h"
|
|
#include "wx/font.h"
|
|
#include "wx/pen.h"
|
|
#include "wx/brush.h"
|
|
#include "wx/bitmap.h"
|
|
|
|
|
|
class wxAuiNotebookPage;
|
|
class wxAuiNotebookPageArray;
|
|
class wxWindow;
|
|
class wxDC;
|
|
|
|
|
|
// tab art class
|
|
|
|
class WXDLLIMPEXP_AUI wxAuiTabArt
|
|
{
|
|
public:
|
|
|
|
wxAuiTabArt() { }
|
|
virtual ~wxAuiTabArt() { }
|
|
|
|
virtual wxAuiTabArt* Clone() = 0;
|
|
virtual void SetFlags(unsigned int flags) = 0;
|
|
|
|
virtual void SetSizingInfo(const wxSize& tabCtrlSize,
|
|
size_t tabCount) = 0;
|
|
|
|
virtual void SetNormalFont(const wxFont& font) = 0;
|
|
virtual void SetSelectedFont(const wxFont& font) = 0;
|
|
virtual void SetMeasuringFont(const wxFont& font) = 0;
|
|
virtual void SetColour(const wxColour& colour) = 0;
|
|
virtual void SetActiveColour(const wxColour& colour) = 0;
|
|
|
|
virtual void DrawBorder(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxRect& rect) = 0;
|
|
|
|
virtual void DrawBackground(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxRect& rect) = 0;
|
|
|
|
virtual void DrawTab(wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxAuiNotebookPage& pane,
|
|
const wxRect& inRect,
|
|
int closeButtonState,
|
|
wxRect* outTabRect,
|
|
wxRect* outButtonRect,
|
|
int* xExtent) = 0;
|
|
|
|
virtual void DrawButton(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxRect& inRect,
|
|
int bitmapId,
|
|
int buttonState,
|
|
int orientation,
|
|
wxRect* outRect) = 0;
|
|
|
|
virtual wxSize GetTabSize(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxString& caption,
|
|
const wxBitmap& bitmap,
|
|
bool active,
|
|
int closeButtonState,
|
|
int* xExtent) = 0;
|
|
|
|
virtual int ShowDropDown(
|
|
wxWindow* wnd,
|
|
const wxAuiNotebookPageArray& items,
|
|
int activeIdx) = 0;
|
|
|
|
virtual int GetIndentSize() = 0;
|
|
|
|
virtual int GetBorderWidth(
|
|
wxWindow* wnd) = 0;
|
|
|
|
virtual int GetAdditionalBorderSpace(
|
|
wxWindow* wnd) = 0;
|
|
|
|
virtual int GetBestTabCtrlSize(
|
|
wxWindow* wnd,
|
|
const wxAuiNotebookPageArray& pages,
|
|
const wxSize& requiredBmpSize) = 0;
|
|
};
|
|
|
|
|
|
class WXDLLIMPEXP_AUI wxAuiGenericTabArt : public wxAuiTabArt
|
|
{
|
|
|
|
public:
|
|
|
|
wxAuiGenericTabArt();
|
|
virtual ~wxAuiGenericTabArt();
|
|
|
|
wxAuiTabArt* Clone() wxOVERRIDE;
|
|
void SetFlags(unsigned int flags) wxOVERRIDE;
|
|
void SetSizingInfo(const wxSize& tabCtrlSize,
|
|
size_t tabCount) wxOVERRIDE;
|
|
|
|
void SetNormalFont(const wxFont& font) wxOVERRIDE;
|
|
void SetSelectedFont(const wxFont& font) wxOVERRIDE;
|
|
void SetMeasuringFont(const wxFont& font) wxOVERRIDE;
|
|
void SetColour(const wxColour& colour) wxOVERRIDE;
|
|
void SetActiveColour(const wxColour& colour) wxOVERRIDE;
|
|
|
|
void DrawBorder(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxRect& rect) wxOVERRIDE;
|
|
|
|
void DrawBackground(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxRect& rect) wxOVERRIDE;
|
|
|
|
void DrawTab(wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxAuiNotebookPage& pane,
|
|
const wxRect& inRect,
|
|
int closeButtonState,
|
|
wxRect* outTabRect,
|
|
wxRect* outButtonRect,
|
|
int* xExtent) wxOVERRIDE;
|
|
|
|
void DrawButton(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxRect& inRect,
|
|
int bitmapId,
|
|
int buttonState,
|
|
int orientation,
|
|
wxRect* outRect) wxOVERRIDE;
|
|
|
|
int GetIndentSize() wxOVERRIDE;
|
|
|
|
int GetBorderWidth(
|
|
wxWindow* wnd) wxOVERRIDE;
|
|
|
|
int GetAdditionalBorderSpace(
|
|
wxWindow* wnd) wxOVERRIDE;
|
|
|
|
wxSize GetTabSize(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxString& caption,
|
|
const wxBitmap& bitmap,
|
|
bool active,
|
|
int closeButtonState,
|
|
int* xExtent) wxOVERRIDE;
|
|
|
|
int ShowDropDown(
|
|
wxWindow* wnd,
|
|
const wxAuiNotebookPageArray& items,
|
|
int activeIdx) wxOVERRIDE;
|
|
|
|
int GetBestTabCtrlSize(wxWindow* wnd,
|
|
const wxAuiNotebookPageArray& pages,
|
|
const wxSize& requiredBmpSize) wxOVERRIDE;
|
|
|
|
protected:
|
|
|
|
wxFont m_normalFont;
|
|
wxFont m_selectedFont;
|
|
wxFont m_measuringFont;
|
|
wxColour m_baseColour;
|
|
wxPen m_baseColourPen;
|
|
wxPen m_borderPen;
|
|
wxBrush m_baseColourBrush;
|
|
wxColour m_activeColour;
|
|
wxBitmap m_activeCloseBmp;
|
|
wxBitmap m_disabledCloseBmp;
|
|
wxBitmap m_activeLeftBmp;
|
|
wxBitmap m_disabledLeftBmp;
|
|
wxBitmap m_activeRightBmp;
|
|
wxBitmap m_disabledRightBmp;
|
|
wxBitmap m_activeWindowListBmp;
|
|
wxBitmap m_disabledWindowListBmp;
|
|
|
|
int m_fixedTabWidth;
|
|
int m_tabCtrlHeight;
|
|
unsigned int m_flags;
|
|
};
|
|
|
|
|
|
class WXDLLIMPEXP_AUI wxAuiSimpleTabArt : public wxAuiTabArt
|
|
{
|
|
|
|
public:
|
|
|
|
wxAuiSimpleTabArt();
|
|
virtual ~wxAuiSimpleTabArt();
|
|
|
|
wxAuiTabArt* Clone() wxOVERRIDE;
|
|
void SetFlags(unsigned int flags) wxOVERRIDE;
|
|
|
|
void SetSizingInfo(const wxSize& tabCtrlSize,
|
|
size_t tabCount) wxOVERRIDE;
|
|
|
|
void SetNormalFont(const wxFont& font) wxOVERRIDE;
|
|
void SetSelectedFont(const wxFont& font) wxOVERRIDE;
|
|
void SetMeasuringFont(const wxFont& font) wxOVERRIDE;
|
|
void SetColour(const wxColour& colour) wxOVERRIDE;
|
|
void SetActiveColour(const wxColour& colour) wxOVERRIDE;
|
|
|
|
void DrawBorder(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxRect& rect) wxOVERRIDE;
|
|
|
|
void DrawBackground(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxRect& rect) wxOVERRIDE;
|
|
|
|
void DrawTab(wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxAuiNotebookPage& pane,
|
|
const wxRect& inRect,
|
|
int closeButtonState,
|
|
wxRect* outTabRect,
|
|
wxRect* outButtonRect,
|
|
int* xExtent) wxOVERRIDE;
|
|
|
|
void DrawButton(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxRect& inRect,
|
|
int bitmapId,
|
|
int buttonState,
|
|
int orientation,
|
|
wxRect* outRect) wxOVERRIDE;
|
|
|
|
int GetIndentSize() wxOVERRIDE;
|
|
|
|
int GetBorderWidth(
|
|
wxWindow* wnd) wxOVERRIDE;
|
|
|
|
int GetAdditionalBorderSpace(
|
|
wxWindow* wnd) wxOVERRIDE;
|
|
|
|
wxSize GetTabSize(
|
|
wxDC& dc,
|
|
wxWindow* wnd,
|
|
const wxString& caption,
|
|
const wxBitmap& bitmap,
|
|
bool active,
|
|
int closeButtonState,
|
|
int* xExtent) wxOVERRIDE;
|
|
|
|
int ShowDropDown(
|
|
wxWindow* wnd,
|
|
const wxAuiNotebookPageArray& items,
|
|
int activeIdx) wxOVERRIDE;
|
|
|
|
int GetBestTabCtrlSize(wxWindow* wnd,
|
|
const wxAuiNotebookPageArray& pages,
|
|
const wxSize& requiredBmpSize) wxOVERRIDE;
|
|
|
|
protected:
|
|
|
|
wxFont m_normalFont;
|
|
wxFont m_selectedFont;
|
|
wxFont m_measuringFont;
|
|
wxColour m_normalTextColour;
|
|
wxColour m_selectedTextColour;
|
|
wxPen m_normalBkPen;
|
|
wxPen m_selectedBkPen;
|
|
wxBrush m_normalBkBrush;
|
|
wxBrush m_selectedBkBrush;
|
|
wxBrush m_bkBrush;
|
|
wxBitmap m_activeCloseBmp;
|
|
wxBitmap m_disabledCloseBmp;
|
|
wxBitmap m_activeLeftBmp;
|
|
wxBitmap m_disabledLeftBmp;
|
|
wxBitmap m_activeRightBmp;
|
|
wxBitmap m_disabledRightBmp;
|
|
wxBitmap m_activeWindowListBmp;
|
|
wxBitmap m_disabledWindowListBmp;
|
|
|
|
int m_fixedTabWidth;
|
|
unsigned int m_flags;
|
|
};
|
|
|
|
#ifndef __WXUNIVERSAL__
|
|
#if defined(__WXGTK20__) && !defined(__WXGTK3__)
|
|
#define wxHAS_NATIVE_TABART
|
|
#include "wx/aui/tabartgtk.h"
|
|
#define wxAuiDefaultTabArt wxAuiGtkTabArt
|
|
#elif defined(__WXMSW__)
|
|
#define wxHAS_NATIVE_TABART
|
|
#include "wx/aui/tabartmsw.h"
|
|
#define wxAuiDefaultTabArt wxAuiMSWTabArt
|
|
#endif
|
|
#endif // !__WXUNIVERSAL__
|
|
|
|
#ifndef wxHAS_NATIVE_TABART
|
|
#define wxAuiDefaultTabArt wxAuiGenericTabArt
|
|
#endif
|
|
|
|
#endif // wxUSE_AUI
|
|
|
|
#endif // _WX_AUI_TABART_H_
|