mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Upgrade WX to r74856, mainly to support @2x.
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
// Author: Michael Bedward (based on code by Julian Smart, Robin Dunn)
|
||||
// Modified by: Santiago Palacios
|
||||
// Created: 1/08/1999
|
||||
// RCS-ID: $Id: grid.h 69861 2011-11-28 19:15:59Z VZ $
|
||||
// Copyright: (c) Michael Bedward
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -16,6 +15,10 @@
|
||||
|
||||
#if wxUSE_GRID
|
||||
|
||||
// Internally used (and hence intentionally not exported) event telling wxGrid
|
||||
// to hide the currently shown editor.
|
||||
wxDECLARE_EVENT( wxEVT_GRID_HIDE_EDITOR, wxCommandEvent );
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// array classes
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -553,7 +556,7 @@ public:
|
||||
// NB: As GetLineAt(), currently this is always identity for rows.
|
||||
virtual int GetLinePos(const wxGrid *grid, int line) const = 0;
|
||||
|
||||
// Return the index of the line just before the given one.
|
||||
// Return the index of the line just before the given one or wxNOT_FOUND.
|
||||
virtual int GetLineBefore(const wxGrid* grid, int line) const = 0;
|
||||
|
||||
// Get the row or column label window
|
||||
@ -626,7 +629,7 @@ public:
|
||||
{ return line; } // TODO: implement row reordering
|
||||
|
||||
virtual int GetLineBefore(const wxGrid* WXUNUSED(grid), int line) const
|
||||
{ return line ? line - 1 : line; }
|
||||
{ return line - 1; }
|
||||
|
||||
virtual wxWindow *GetHeaderWindow(wxGrid *grid) const
|
||||
{ return grid->GetGridRowLabelWindow(); }
|
||||
@ -692,7 +695,10 @@ public:
|
||||
{ return grid->GetColPos(line); }
|
||||
|
||||
virtual int GetLineBefore(const wxGrid* grid, int line) const
|
||||
{ return grid->GetColAt(wxMax(0, grid->GetColPos(line) - 1)); }
|
||||
{
|
||||
int posBefore = grid->GetColPos(line) - 1;
|
||||
return posBefore >= 0 ? grid->GetColAt(posBefore) : wxNOT_FOUND;
|
||||
}
|
||||
|
||||
virtual wxWindow *GetHeaderWindow(wxGrid *grid) const
|
||||
{ return grid->GetGridColLabelWindow(); }
|
||||
|
@ -1,9 +1,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/generic/listctrl.h
|
||||
// Name: wx/generic/private/listctrl.h
|
||||
// Purpose: private definitions of wxListCtrl helpers
|
||||
// Author: Robert Roebling
|
||||
// Vadim Zeitlin (virtual list control support)
|
||||
// Id: $Id: listctrl.h 70285 2012-01-07 15:09:54Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -336,22 +335,27 @@ protected:
|
||||
public:
|
||||
wxListHeaderWindow();
|
||||
|
||||
wxListHeaderWindow( wxWindow *win,
|
||||
wxWindowID id,
|
||||
wxListMainWindow *owner,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString &name = wxT("wxlistctrlcolumntitles") );
|
||||
// We provide only Create(), not the ctor, because we need to create the
|
||||
// C++ object before creating the window, see the explanations in
|
||||
// CreateOrDestroyHeaderWindowAsNeeded()
|
||||
bool Create( wxWindow *win,
|
||||
wxWindowID id,
|
||||
wxListMainWindow *owner,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString &name = wxT("wxlistctrlcolumntitles") );
|
||||
|
||||
virtual ~wxListHeaderWindow();
|
||||
|
||||
// We never need focus as we don't have any keyboard interface.
|
||||
virtual bool AcceptsFocus() const { return false; }
|
||||
|
||||
void DrawCurrent();
|
||||
void AdjustDC( wxDC& dc );
|
||||
|
||||
void OnPaint( wxPaintEvent &event );
|
||||
void OnMouse( wxMouseEvent &event );
|
||||
void OnSetFocus( wxFocusEvent &event );
|
||||
|
||||
// needs refresh
|
||||
bool m_dirty;
|
||||
@ -388,6 +392,27 @@ public:
|
||||
void Notify();
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListFindTimer (internal)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxListFindTimer: public wxTimer
|
||||
{
|
||||
public:
|
||||
// reset the current prefix after half a second of inactivity
|
||||
enum { DELAY = 500 };
|
||||
|
||||
wxListFindTimer( wxListMainWindow *owner )
|
||||
: m_owner(owner)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void Notify();
|
||||
|
||||
private:
|
||||
wxListMainWindow *m_owner;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListTextCtrlWrapper: wraps a wxTextCtrl to make it work for inline editing
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -448,10 +473,8 @@ public:
|
||||
wxListMainWindow();
|
||||
wxListMainWindow( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString &name = wxT("listctrlmainwindow") );
|
||||
const wxPoint& pos,
|
||||
const wxSize& size );
|
||||
|
||||
virtual ~wxListMainWindow();
|
||||
|
||||
@ -556,6 +579,11 @@ public:
|
||||
bool OnRenameAccept(size_t itemEdit, const wxString& value);
|
||||
void OnRenameCancelled(size_t itemEdit);
|
||||
|
||||
void OnFindTimer();
|
||||
// set whether or not to ring the find bell
|
||||
// (does nothing on MSW - bell is always rung)
|
||||
void EnableBellOnNoMatch( bool on );
|
||||
|
||||
void OnMouse( wxMouseEvent &event );
|
||||
|
||||
// called to switch the selection from the current item to newCurrent,
|
||||
@ -644,7 +672,7 @@ public:
|
||||
long FindItem( const wxPoint& pt );
|
||||
long HitTest( int x, int y, int &flags ) const;
|
||||
void InsertItem( wxListItem &item );
|
||||
void InsertColumn( long col, const wxListItem &item );
|
||||
long InsertColumn( long col, const wxListItem &item );
|
||||
int GetItemWidthWithImage(wxListItem * item);
|
||||
void SortItems( wxListCtrlCompare fn, wxIntPtr data );
|
||||
|
||||
@ -729,6 +757,15 @@ protected:
|
||||
|
||||
bool m_lastOnSame;
|
||||
wxTimer *m_renameTimer;
|
||||
|
||||
// incremental search data
|
||||
wxString m_findPrefix;
|
||||
wxTimer *m_findTimer;
|
||||
// This flag is set to 0 if the bell is disabled, 1 if it is enabled and -1
|
||||
// if it is globally enabled but has been temporarily disabled because we
|
||||
// had already beeped for this particular search.
|
||||
int m_findBell;
|
||||
|
||||
bool m_isCreated;
|
||||
int m_dragCount;
|
||||
wxPoint m_dragStart;
|
||||
@ -779,6 +816,9 @@ protected:
|
||||
// force us to recalculate the range of visible lines
|
||||
void ResetVisibleLinesRange() { m_lineFrom = (size_t)-1; }
|
||||
|
||||
// find the first item starting with the given prefix after the given item
|
||||
size_t PrefixFindItem(size_t item, const wxString& prefix) const;
|
||||
|
||||
// get the colour to be used for drawing the rules
|
||||
wxColour GetRuleColour() const
|
||||
{
|
||||
|
@ -3,7 +3,6 @@
|
||||
// Purpose: Generic wxMarkupText class for managing text with markup.
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2011-02-21
|
||||
// RCS-ID: $Id: markuptext.h 67064 2011-02-27 12:48:21Z VZ $
|
||||
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -3,13 +3,12 @@
|
||||
// Purpose: wxRichToolTipGenericImpl declaration.
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2011-10-18
|
||||
// RCS-ID: $Id: richtooltip.h 69488 2011-10-20 16:20:19Z VZ $
|
||||
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_
|
||||
#define _GENERIC_PRIVATE_RICHTOOLTIP_H_
|
||||
#define _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_
|
||||
|
||||
#include "wx/icon.h"
|
||||
#include "wx/colour.h"
|
||||
@ -30,17 +29,19 @@ public:
|
||||
// This is pretty arbitrary, we could follow MSW and use some multiple
|
||||
// of double-click time here.
|
||||
m_timeout = 5000;
|
||||
m_delay = 0;
|
||||
}
|
||||
|
||||
virtual void SetBackgroundColour(const wxColour& col,
|
||||
const wxColour& colEnd);
|
||||
virtual void SetCustomIcon(const wxIcon& icon);
|
||||
virtual void SetStandardIcon(int icon);
|
||||
virtual void SetTimeout(unsigned milliseconds);
|
||||
virtual void SetTimeout(unsigned milliseconds,
|
||||
unsigned millisecondsDelay = 0);
|
||||
virtual void SetTipKind(wxTipKind tipKind);
|
||||
virtual void SetTitleFont(const wxFont& font);
|
||||
|
||||
virtual void ShowFor(wxWindow* win);
|
||||
virtual void ShowFor(wxWindow* win, const wxRect* rect = NULL);
|
||||
|
||||
protected:
|
||||
wxString m_title,
|
||||
@ -52,7 +53,8 @@ private:
|
||||
wxColour m_colStart,
|
||||
m_colEnd;
|
||||
|
||||
unsigned m_timeout;
|
||||
unsigned m_timeout,
|
||||
m_delay;
|
||||
|
||||
wxTipKind m_tipKind;
|
||||
|
||||
|
39
Externals/wxWidgets3/include/wx/generic/private/textmeasure.h
vendored
Normal file
39
Externals/wxWidgets3/include/wx/generic/private/textmeasure.h
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/generic/private/textmeasure.h
|
||||
// Purpose: Generic wxTextMeasure declaration.
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2012-10-17
|
||||
// Copyright: (c) 1997-2012 wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GENERIC_PRIVATE_TEXTMEASURE_H_
|
||||
#define _WX_GENERIC_PRIVATE_TEXTMEASURE_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTextMeasure for the platforms without native support.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxTextMeasure : public wxTextMeasureBase
|
||||
{
|
||||
public:
|
||||
wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL)
|
||||
: wxTextMeasureBase(dc, font) {}
|
||||
wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL)
|
||||
: wxTextMeasureBase(win, font) {}
|
||||
|
||||
protected:
|
||||
virtual void DoGetTextExtent(const wxString& string,
|
||||
wxCoord *width,
|
||||
wxCoord *height,
|
||||
wxCoord *descent = NULL,
|
||||
wxCoord *externalLeading = NULL);
|
||||
|
||||
virtual bool DoGetPartialTextExtents(const wxString& text,
|
||||
wxArrayInt& widths,
|
||||
double scaleX);
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxTextMeasure);
|
||||
};
|
||||
|
||||
#endif // _WX_GENERIC_PRIVATE_TEXTMEASURE_H_
|
@ -2,7 +2,6 @@
|
||||
// Name: wx/generic/private/timer.h
|
||||
// Purpose: Generic implementation of wxTimer class
|
||||
// Author: Vaclav Slavik
|
||||
// Id: $Id: timer.h 50646 2007-12-12 01:35:53Z VZ $
|
||||
// Copyright: (c) Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user