Upgrade WX to r74856, mainly to support @2x.

This commit is contained in:
comex
2013-09-22 18:44:55 -04:00
parent 0bdef3932f
commit 66ed9a1804
1935 changed files with 45373 additions and 22739 deletions

View File

@ -4,7 +4,6 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 05/25/99
// RCS-ID: $Id: dc.h 68935 2011-08-27 23:26:53Z RD $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -283,6 +282,8 @@ public:
return NULL;
}
virtual void* GetHandle() const { return NULL; }
// query dimension, colour deps, resolution
virtual void DoGetSize(int *width, int *height) const = 0;
@ -431,8 +432,12 @@ public:
// clipping
// Note that this pure virtual method has an implementation that updates
// the values returned by DoGetClippingBox() and so can be called from the
// derived class overridden version if it makes sense (i.e. if the clipping
// box coordinates are not already updated in some other way).
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
wxCoord width, wxCoord height) = 0;
wxCoord w, wxCoord h) = 0;
// NB: this function works with device coordinates, not the logical ones!
virtual void DoSetDeviceClippingRegion(const wxRegion& region) = 0;
@ -515,6 +520,8 @@ public:
// this needs to overidden if the axis is inverted
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
virtual double GetContentScaleFactor() const { return m_contentScaleFactor; }
#ifdef __WXMSW__
// Native Windows functions using the underlying HDC don't honour GDI+
@ -598,15 +605,15 @@ public:
{ return wxNullBitmap; }
virtual void DoDrawLines(int n, wxPoint points[],
virtual void DoDrawLines(int n, const wxPoint points[],
wxCoord xoffset, wxCoord yoffset ) = 0;
virtual void DrawLines(const wxPointList *list,
wxCoord xoffset, wxCoord yoffset );
virtual void DoDrawPolygon(int n, wxPoint points[],
virtual void DoDrawPolygon(int n, const wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle = wxODDEVEN_RULE) = 0;
virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
virtual void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle);
void DrawPolygon(const wxPointList *list,
@ -618,7 +625,7 @@ public:
void DrawSpline(wxCoord x1, wxCoord y1,
wxCoord x2, wxCoord y2,
wxCoord x3, wxCoord y3);
void DrawSpline(int n, wxPoint points[]);
void DrawSpline(int n, const wxPoint points[]);
void DrawSpline(const wxPointList *points) { DoDrawSpline(points); }
virtual void DoDrawSpline(const wxPointList *points);
@ -741,6 +748,8 @@ protected:
double m_scaleX, m_scaleY; // calculated from logical scale and user scale
int m_signX, m_signY; // Used by SetAxisOrientation() to invert the axes
double m_contentScaleFactor; // used by high resolution displays (retina)
// what is a mm on a screen you don't know the size of?
double m_mm_to_pix_x,
@ -787,6 +796,9 @@ public:
wxWindow *GetWindow() const
{ return m_pimpl->GetWindow(); }
void *GetHandle() const
{ return m_pimpl->GetHandle(); }
bool IsOk() const
{ return m_pimpl && m_pimpl->IsOk(); }
@ -821,6 +833,9 @@ public:
virtual int GetResolution() const
{ return m_pimpl->GetResolution(); }
double GetContentScaleFactor() const
{ return m_pimpl->GetContentScaleFactor(); }
// Right-To-Left (RTL) modes
void SetLayoutDirection(wxLayoutDirection dir)
@ -1130,7 +1145,7 @@ public:
void DrawPoint(const wxPoint& pt)
{ m_pimpl->DoDrawPoint(pt.x, pt.y); }
void DrawLines(int n, wxPoint points[],
void DrawLines(int n, const wxPoint points[],
wxCoord xoffset = 0, wxCoord yoffset = 0)
{ m_pimpl->DoDrawLines(n, points, xoffset, yoffset); }
void DrawLines(const wxPointList *list,
@ -1141,7 +1156,7 @@ public:
wxCoord xoffset = 0, wxCoord yoffset = 0) );
#endif // WXWIN_COMPATIBILITY_2_8
void DrawPolygon(int n, wxPoint points[],
void DrawPolygon(int n, const wxPoint points[],
wxCoord xoffset = 0, wxCoord yoffset = 0,
wxPolygonFillMode fillStyle = wxODDEVEN_RULE)
{ m_pimpl->DoDrawPolygon(n, points, xoffset, yoffset, fillStyle); }
@ -1149,7 +1164,7 @@ public:
wxCoord xoffset = 0, wxCoord yoffset = 0,
wxPolygonFillMode fillStyle = wxODDEVEN_RULE)
{ m_pimpl->DrawPolygon( list, xoffset, yoffset, fillStyle ); }
void DrawPolyPolygon(int n, int count[], wxPoint points[],
void DrawPolyPolygon(int n, const int count[], const wxPoint points[],
wxCoord xoffset = 0, wxCoord yoffset = 0,
wxPolygonFillMode fillStyle = wxODDEVEN_RULE)
{ m_pimpl->DoDrawPolyPolygon(n, count, points, xoffset, yoffset, fillStyle); }
@ -1272,7 +1287,7 @@ public:
wxCoord x2, wxCoord y2,
wxCoord x3, wxCoord y3)
{ m_pimpl->DrawSpline(x1,y1,x2,y2,x3,y3); }
void DrawSpline(int n, wxPoint points[])
void DrawSpline(int n, const wxPoint points[])
{ m_pimpl->DrawSpline(n,points); }
void DrawSpline(const wxPointList *points)
{ m_pimpl->DrawSpline(points); }