dolphin/Externals/wxWidgets3/include/wx/tipwin.h
EmptyChaos 822326eea9 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.
2016-06-26 15:25:29 +10:00

97 lines
2.7 KiB
C++

///////////////////////////////////////////////////////////////////////////////
// Name: wx/tipwin.h
// Purpose: wxTipWindow is a window like the one typically used for
// showing the tooltips
// Author: Vadim Zeitlin
// Modified by:
// Created: 10.09.00
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TIPWIN_H_
#define _WX_TIPWIN_H_
#if wxUSE_TIPWINDOW
#if wxUSE_POPUPWIN
#include "wx/popupwin.h"
#define wxTipWindowBase wxPopupTransientWindow
#else
#include "wx/frame.h"
#define wxTipWindowBase wxFrame
#endif
#include "wx/arrstr.h"
class WXDLLIMPEXP_FWD_CORE wxTipWindowView;
// ----------------------------------------------------------------------------
// wxTipWindow
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxTipWindow : public wxTipWindowBase
{
public:
// the mandatory ctor parameters are: the parent window and the text to
// show
//
// optionally you may also specify the length at which the lines are going
// to be broken in rows (100 pixels by default)
//
// windowPtr and rectBound are just passed to SetTipWindowPtr() and
// SetBoundingRect() - see below
wxTipWindow(wxWindow *parent,
const wxString& text,
wxCoord maxLength = 100,
wxTipWindow** windowPtr = NULL,
wxRect *rectBound = NULL);
virtual ~wxTipWindow();
// If windowPtr is not NULL the given address will be NULLed when the
// window has closed
void SetTipWindowPtr(wxTipWindow** windowPtr) { m_windowPtr = windowPtr; }
// If rectBound is not NULL, the window will disappear automatically when
// the mouse leave the specified rect: note that rectBound should be in the
// screen coordinates!
void SetBoundingRect(const wxRect& rectBound);
// Hide and destroy the window
void Close();
protected:
// called by wxTipWindowView only
bool CheckMouseInBounds(const wxPoint& pos);
// event handlers
void OnMouseClick(wxMouseEvent& event);
#if !wxUSE_POPUPWIN
void OnActivate(wxActivateEvent& event);
void OnKillFocus(wxFocusEvent& event);
#else // wxUSE_POPUPWIN
virtual void OnDismiss() wxOVERRIDE;
#endif // wxUSE_POPUPWIN/!wxUSE_POPUPWIN
private:
wxArrayString m_textLines;
wxCoord m_heightLine;
wxTipWindowView *m_view;
wxTipWindow** m_windowPtr;
wxRect m_rectBound;
wxDECLARE_EVENT_TABLE();
friend class wxTipWindowView;
wxDECLARE_NO_COPY_CLASS(wxTipWindow);
};
#endif // wxUSE_TIPWINDOW
#endif // _WX_TIPWIN_H_