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.
87 lines
3.2 KiB
C++
87 lines
3.2 KiB
C++
///////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/tipdlg.h
|
|
// Purpose: declaration of wxTipDialog
|
|
// Author: Vadim Zeitlin
|
|
// Modified by:
|
|
// Created: 28.06.99
|
|
// Copyright: (c) Vadim Zeitlin
|
|
// Licence: wxWindows licence
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_TIPDLG_H_
|
|
#define _WX_TIPDLG_H_
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// headers which we must include here
|
|
// ----------------------------------------------------------------------------
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#if wxUSE_STARTUP_TIPS
|
|
|
|
#include "wx/textfile.h"
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// wxTipProvider - a class which is used by wxTipDialog to get the text of the
|
|
// tips
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// the abstract base class: it provides the tips, i.e. implements the GetTip()
|
|
// function which returns the new tip each time it's called. To support this,
|
|
// wxTipProvider evidently needs some internal state which is the tip "index"
|
|
// and which should be saved/restored by the program to not always show one and
|
|
// the same tip (of course, you may use random starting position as well...)
|
|
class WXDLLIMPEXP_ADV wxTipProvider
|
|
{
|
|
public:
|
|
wxTipProvider(size_t currentTip) { m_currentTip = currentTip; }
|
|
|
|
// get the current tip and update the internal state to return the next tip
|
|
// when called for the next time
|
|
virtual wxString GetTip() = 0;
|
|
|
|
// get the current tip "index" (or whatever allows the tip provider to know
|
|
// from where to start the next time)
|
|
size_t GetCurrentTip() const { return m_currentTip; }
|
|
|
|
// virtual dtor for the base class
|
|
virtual ~wxTipProvider() { }
|
|
|
|
|
|
#if WXWIN_COMPATIBILITY_3_0
|
|
wxDEPRECATED_MSG("this method does nothing, simply don't call it")
|
|
wxString PreprocessTip(const wxString& tip) { return tip; }
|
|
#endif
|
|
|
|
protected:
|
|
size_t m_currentTip;
|
|
};
|
|
|
|
// a function which returns an implementation of wxTipProvider using the
|
|
// specified text file as the source of tips (each line is a tip).
|
|
//
|
|
// NB: the caller is responsible for deleting the pointer!
|
|
#if wxUSE_TEXTFILE
|
|
WXDLLIMPEXP_ADV wxTipProvider *wxCreateFileTipProvider(const wxString& filename,
|
|
size_t currentTip);
|
|
#endif // wxUSE_TEXTFILE
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// wxTipDialog
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// A dialog which shows a "tip" - a short and helpful messages describing to
|
|
// the user some program characteristic. Many programs show the tips at
|
|
// startup, so the dialog has "Show tips on startup" checkbox which allows to
|
|
// the user to disable this (however, it's the program which should show, or
|
|
// not, the dialog on startup depending on its value, not this class).
|
|
//
|
|
// The function returns true if this checkbox is checked, false otherwise.
|
|
WXDLLIMPEXP_ADV bool wxShowTip(wxWindow *parent,
|
|
wxTipProvider *tipProvider,
|
|
bool showAtStartup = true);
|
|
|
|
#endif // wxUSE_STARTUP_TIPS
|
|
|
|
#endif // _WX_TIPDLG_H_
|