mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-15 18:49:11 +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.
63 lines
2.1 KiB
C++
63 lines
2.1 KiB
C++
///////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/gtk/private/treeview.h
|
|
// Purpose: Private helpers for wxGTK controls using GtkTreeView
|
|
// Author: Vadim Zeitlin
|
|
// Created: 2016-02-06 (extracted from src/gtk/dataview.cpp)
|
|
// Copyright: (c) 2016 Vadim Zeitlin <vadim@wxwidgets.org>
|
|
// Licence: wxWindows licence
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _GTK_PRIVATE_TREEVIEW_H_
|
|
#define _GTK_PRIVATE_TREEVIEW_H_
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// wxGtkTreePath: RAII wrapper for GtkTreePath
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Usually this object is initialized with the associated GtkTreePath
|
|
// immediately when it's constructed but it can also be changed later either by
|
|
// using Assign() or by getting the pointer to the internally stored pointer
|
|
// value using ByRef(). The latter should be avoided but is very convenient
|
|
// when using GTK functions with GtkTreePath output parameters.
|
|
class wxGtkTreePath
|
|
{
|
|
public:
|
|
// Ctor takes ownership of the given path and will free it if non-NULL.
|
|
wxGtkTreePath(GtkTreePath *path = NULL) : m_path(path) { }
|
|
|
|
// Creates a tree path for the given string path.
|
|
wxGtkTreePath(const gchar *strpath)
|
|
: m_path(gtk_tree_path_new_from_string(strpath))
|
|
{
|
|
}
|
|
|
|
// Set the stored pointer if not done by ctor.
|
|
void Assign(GtkTreePath *path)
|
|
{
|
|
wxASSERT_MSG( !m_path, "shouldn't be already initialized" );
|
|
|
|
m_path = path;
|
|
}
|
|
|
|
// Return the pointer to the internally stored pointer. This should only be
|
|
// used to initialize the object by passing it to some GTK function.
|
|
GtkTreePath **ByRef()
|
|
{
|
|
wxASSERT_MSG( !m_path, "shouldn't be already initialized" );
|
|
|
|
return &m_path;
|
|
}
|
|
|
|
|
|
operator GtkTreePath *() const { return m_path; }
|
|
|
|
~wxGtkTreePath() { if ( m_path ) gtk_tree_path_free(m_path); }
|
|
|
|
private:
|
|
GtkTreePath *m_path;
|
|
|
|
wxDECLARE_NO_COPY_CLASS(wxGtkTreePath);
|
|
};
|
|
|
|
#endif // _GTK_PRIVATE_TREEVIEW_H_
|