mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 10:09:36 -06:00
Update wxWidgets to 3.1.0
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.
This commit is contained in:
90
Externals/wxWidgets3/include/wx/cmdline.h
vendored
90
Externals/wxWidgets3/include/wx/cmdline.h
vendored
@ -27,6 +27,7 @@ enum wxCmdLineSplitType
|
||||
|
||||
#if wxUSE_CMDLINE_PARSER
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxCmdLineParser;
|
||||
class WXDLLIMPEXP_FWD_BASE wxDateTime;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -93,6 +94,90 @@ struct wxCmdLineEntryDesc
|
||||
#define wxCMD_LINE_DESC_END \
|
||||
{ wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0x0 }
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCmdLineArg contains the value for one command line argument
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxCmdLineArg
|
||||
{
|
||||
public:
|
||||
virtual ~wxCmdLineArg() {}
|
||||
|
||||
virtual double GetDoubleVal() const = 0;
|
||||
virtual long GetLongVal() const = 0;
|
||||
virtual const wxString& GetStrVal() const = 0;
|
||||
#if wxUSE_DATETIME
|
||||
virtual const wxDateTime& GetDateVal() const = 0;
|
||||
#endif // wxUSE_DATETIME
|
||||
|
||||
virtual bool IsNegated() const = 0;
|
||||
|
||||
virtual wxCmdLineEntryType GetKind() const = 0;
|
||||
virtual wxString GetShortName() const = 0;
|
||||
virtual wxString GetLongName() const = 0;
|
||||
virtual wxCmdLineParamType GetType() const = 0;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCmdLineArgs is a container of command line arguments actually parsed and
|
||||
// allows enumerating them using the standard iterator-based approach.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxCmdLineArgs
|
||||
{
|
||||
public:
|
||||
class WXDLLIMPEXP_BASE const_iterator
|
||||
{
|
||||
public:
|
||||
typedef int difference_type;
|
||||
typedef wxCmdLineArg value_type;
|
||||
typedef const wxCmdLineArg* pointer;
|
||||
typedef const wxCmdLineArg& reference;
|
||||
|
||||
// We avoid dependency on standard library by default but if we do use
|
||||
// std::string, then it's ok to use iterator tags as well.
|
||||
#if wxUSE_STD_STRING
|
||||
typedef std::bidirectional_iterator_tag iterator_category;
|
||||
#endif // wx_USE_STD_STRING
|
||||
|
||||
const_iterator() : m_parser(NULL), m_index(0) {}
|
||||
reference operator *() const;
|
||||
pointer operator ->() const;
|
||||
const_iterator &operator ++ ();
|
||||
const_iterator operator ++ (int);
|
||||
const_iterator &operator -- ();
|
||||
const_iterator operator -- (int);
|
||||
|
||||
bool operator == (const const_iterator &other) const {
|
||||
return m_parser==other.m_parser && m_index==other.m_index;
|
||||
}
|
||||
bool operator != (const const_iterator &other) const {
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
private:
|
||||
const_iterator (const wxCmdLineParser& parser, size_t index)
|
||||
: m_parser(&parser), m_index(index) {
|
||||
}
|
||||
|
||||
const wxCmdLineParser* m_parser;
|
||||
size_t m_index;
|
||||
|
||||
friend class wxCmdLineArgs;
|
||||
};
|
||||
|
||||
wxCmdLineArgs (const wxCmdLineParser& parser) : m_parser(parser) {}
|
||||
|
||||
const_iterator begin() const { return const_iterator(m_parser, 0); }
|
||||
const_iterator end() const { return const_iterator(m_parser, size()); }
|
||||
|
||||
size_t size() const;
|
||||
|
||||
private:
|
||||
const wxCmdLineParser& m_parser;
|
||||
wxDECLARE_NO_ASSIGN_CLASS(wxCmdLineArgs);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCmdLineParser is a class for parsing command line.
|
||||
//
|
||||
@ -263,6 +348,9 @@ public:
|
||||
// gets the value of Nth parameter (as string only for now)
|
||||
wxString GetParam(size_t n = 0u) const;
|
||||
|
||||
// returns a reference to the container of all command line arguments
|
||||
wxCmdLineArgs GetArguments() const { return wxCmdLineArgs(*this); }
|
||||
|
||||
// Resets switches and options
|
||||
void Reset();
|
||||
|
||||
@ -277,6 +365,8 @@ private:
|
||||
|
||||
struct wxCmdLineParserData *m_data;
|
||||
|
||||
friend class wxCmdLineArgs;
|
||||
friend class wxCmdLineArgs::const_iterator;
|
||||
wxDECLARE_NO_COPY_CLASS(wxCmdLineParser);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user