mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-14 10:09:13 +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.
118 lines
4.0 KiB
C++
118 lines
4.0 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/osx/slider.h
|
|
// Purpose: wxSlider class
|
|
// Author: Stefan Csomor
|
|
// Modified by:
|
|
// Created: 1998-01-01
|
|
// Copyright: (c) Stefan Csomor
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_SLIDER_H_
|
|
#define _WX_SLIDER_H_
|
|
|
|
#include "wx/compositewin.h"
|
|
#include "wx/stattext.h"
|
|
|
|
// Slider
|
|
class WXDLLIMPEXP_CORE wxSlider: public wxCompositeWindow<wxSliderBase>
|
|
{
|
|
wxDECLARE_DYNAMIC_CLASS(wxSlider);
|
|
|
|
public:
|
|
wxSlider();
|
|
|
|
wxSlider(wxWindow *parent, wxWindowID id,
|
|
int value, int minValue, int maxValue,
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
const wxSize& size = wxDefaultSize,
|
|
long style = wxSL_HORIZONTAL,
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
const wxString& name = wxSliderNameStr)
|
|
{
|
|
Create(parent, id, value, minValue, maxValue, pos, size, style, validator, name);
|
|
}
|
|
|
|
virtual ~wxSlider();
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
int value, int minValue, int maxValue,
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
const wxSize& size = wxDefaultSize,
|
|
long style = wxSL_HORIZONTAL,
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
const wxString& name = wxSliderNameStr);
|
|
|
|
virtual int GetValue() const wxOVERRIDE;
|
|
virtual void SetValue(int) wxOVERRIDE;
|
|
|
|
void SetRange(int minValue, int maxValue) wxOVERRIDE;
|
|
|
|
int GetMin() const wxOVERRIDE { return m_rangeMin; }
|
|
int GetMax() const wxOVERRIDE { return m_rangeMax; }
|
|
|
|
void SetMin(int minValue) { SetRange(minValue, m_rangeMax); }
|
|
void SetMax(int maxValue) { SetRange(m_rangeMin, maxValue); }
|
|
|
|
// For trackbars only
|
|
int GetTickFreq() const wxOVERRIDE { return m_tickFreq; }
|
|
void SetPageSize(int pageSize) wxOVERRIDE;
|
|
int GetPageSize() const wxOVERRIDE;
|
|
void ClearSel() wxOVERRIDE;
|
|
void ClearTicks() wxOVERRIDE;
|
|
void SetLineSize(int lineSize) wxOVERRIDE;
|
|
int GetLineSize() const wxOVERRIDE;
|
|
int GetSelEnd() const wxOVERRIDE;
|
|
int GetSelStart() const wxOVERRIDE;
|
|
void SetSelection(int minPos, int maxPos) wxOVERRIDE;
|
|
void SetThumbLength(int len) wxOVERRIDE;
|
|
int GetThumbLength() const wxOVERRIDE;
|
|
void SetTick(int tickPos) wxOVERRIDE;
|
|
|
|
void Command(wxCommandEvent& event) wxOVERRIDE;
|
|
// osx specific event handling common for all osx-ports
|
|
|
|
virtual bool OSXHandleClicked( double timestampsec ) wxOVERRIDE;
|
|
virtual void TriggerScrollEvent( wxEventType scrollEvent ) wxOVERRIDE;
|
|
|
|
protected:
|
|
// Platform-specific implementation of SetTickFreq
|
|
virtual void DoSetTickFreq(int freq) wxOVERRIDE;
|
|
|
|
virtual wxSize DoGetBestSize() const wxOVERRIDE;
|
|
virtual void DoSetSize(int x, int y, int w, int h, int sizeFlags) wxOVERRIDE;
|
|
virtual void DoMoveWindow(int x, int y, int w, int h) wxOVERRIDE;
|
|
|
|
// set min/max size of the slider
|
|
virtual void DoSetSizeHints( int minW, int minH,
|
|
int maxW, int maxH,
|
|
int incW, int incH) wxOVERRIDE;
|
|
|
|
// Common processing to invert slider values based on wxSL_INVERSE
|
|
virtual int ValueInvertOrNot(int value) const wxOVERRIDE;
|
|
|
|
wxStaticText* m_macMinimumStatic ;
|
|
wxStaticText* m_macMaximumStatic ;
|
|
wxStaticText* m_macValueStatic ;
|
|
|
|
int m_rangeMin;
|
|
int m_rangeMax;
|
|
int m_pageSize;
|
|
int m_lineSize;
|
|
int m_tickFreq;
|
|
private :
|
|
virtual wxWindowList GetCompositeWindowParts() const wxOVERRIDE
|
|
{
|
|
wxWindowList parts;
|
|
parts.push_back(m_macMinimumStatic);
|
|
parts.push_back(m_macMaximumStatic);
|
|
parts.push_back(m_macValueStatic);
|
|
return parts;
|
|
}
|
|
|
|
wxDECLARE_EVENT_TABLE();
|
|
};
|
|
|
|
#endif
|
|
// _WX_SLIDER_H_
|