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

@ -3,7 +3,6 @@
// Purpose: helper functions used with native BUTTON control
// Author: Vadim Zeitlin
// Created: 2008-06-07
// RCS-ID: $Id: button.h 68922 2011-08-27 14:11:28Z VZ $
// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,129 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/comptr.h
// Purpose: Smart pointer for COM interfaces.
// Author: PB
// Created: 2012-04-16
// Copyright: (c) 2012 wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_COMPTR_H_
#define _WX_MSW_PRIVATE_COMPTR_H_
// ----------------------------------------------------------------------------
// wxCOMPtr: A minimalistic smart pointer for use with COM interfaces.
// ----------------------------------------------------------------------------
template <class T>
class wxCOMPtr
{
public:
typedef T element_type;
wxCOMPtr()
: m_ptr(NULL)
{
}
wxEXPLICIT wxCOMPtr(T* ptr)
: m_ptr(ptr)
{
if ( m_ptr )
m_ptr->AddRef();
}
wxCOMPtr(const wxCOMPtr& ptr)
: m_ptr(ptr.get())
{
if ( m_ptr )
m_ptr->AddRef();
}
~wxCOMPtr()
{
if ( m_ptr )
m_ptr->Release();
}
void reset(T* ptr = NULL)
{
if ( m_ptr != ptr)
{
if ( ptr )
ptr->AddRef();
if ( m_ptr )
m_ptr->Release();
m_ptr = ptr;
}
}
wxCOMPtr& operator=(const wxCOMPtr& ptr)
{
reset(ptr.get());
return *this;
}
wxCOMPtr& operator=(T* ptr)
{
reset(ptr);
return *this;
}
operator T*() const
{
return m_ptr;
}
T& operator*() const
{
return *m_ptr;
}
T* operator->() const
{
return m_ptr;
}
// It would be better to forbid direct access completely but we do need
// for QueryInterface() and similar functions, so provide it but it can
// only be used to initialize the pointer, not to modify an existing one.
T** operator&()
{
wxASSERT_MSG(!m_ptr,
wxS("Can't get direct access to initialized pointer"));
return &m_ptr;
}
T* get() const
{
return m_ptr;
}
bool operator<(T* ptr) const
{
return get() < ptr;
}
private:
T* m_ptr;
};
// Define a helper for the macro below: we just need a function taking a
// pointer and not returning anything to avoid warnings about unused return
// value of the cast in the macro itself.
namespace wxPrivate { inline void PPV_ARGS_CHECK(void*) { } }
// Takes the interface name and a pointer to a pointer of the interface type
// and expands into the IID of this interface and the same pointer but after a
// type-safety check.
//
// This is similar to the standard IID_PPV_ARGS macro but takes the pointer
// type instead of relying on the non-standard Microsoft __uuidof().
#define wxIID_PPV_ARGS(IType, pType) \
IID_##IType, \
(wxPrivate::PPV_ARGS_CHECK(static_cast<IType*>(*pType)), \
reinterpret_cast<void**>(pType))
#endif // _WX_MSW_PRIVATE_COMPTR_H_

View File

@ -3,7 +3,6 @@
// Purpose: implementation helpers for wxDatePickerCtrl and wxCalendarCtrl
// Author: Vadim Zeitlin
// Created: 2008-04-04
// RCS-ID: $Id: datecontrols.h 67254 2011-03-20 00:14:35Z DS $
// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////

View File

@ -3,7 +3,6 @@
// Purpose: private wxMSW helpers for working with HDCs
// Author: Vadim Zeitlin
// Created: 2009-06-16 (extracted from src/msw/dc.cpp)
// RCS-ID: $Id: dc.h 67254 2011-03-20 00:14:35Z DS $
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////

View File

@ -3,7 +3,6 @@
// Purpose: File system watcher impl classes
// Author: Bartosz Bekier
// Created: 2009-05-26
// RCS-ID: $Id: fswatcher.h 67806 2011-05-28 19:35:13Z VZ $
// Copyright: (c) 2009 Bartosz Bekier <bartosz.bekier@gmail.com>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////

View File

@ -3,7 +3,6 @@
// Purpose: Helper for creating a hidden window used by wxMSW internally.
// Author: Vadim Zeitlin
// Created: 2011-09-16
// RCS-ID: $Id: hiddenwin.h 69170 2011-09-21 15:07:32Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////

View File

@ -3,7 +3,6 @@
// Purpose: Helper keyboard-related functions.
// Author: Vadim Zeitlin
// Created: 2010-09-09
// RCS-ID: $Id: keyboard.h 65590 2010-09-22 13:31:41Z VZ $
// Copyright: (c) 2010 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////

View File

@ -3,7 +3,6 @@
// Purpose: various helper functions to retrieve system metrics
// Author: Vadim Zeitlin
// Created: 2008-09-05
// RCS-ID: $Id: metrics.h 61508 2009-07-23 20:30:22Z VZ $
// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////

View File

@ -3,7 +3,6 @@
// Purpose: helper functions used with native message dialog
// Author: Rickard Westerlund
// Created: 2010-07-12
// RCS-ID: $Id: msgdlg.h 68537 2011-08-04 22:53:42Z VZ $
// Copyright: (c) 2010 wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -19,10 +18,7 @@
// by the task dialogs only. Also notice that task dialogs are available for
// Unicode applications only.
#if defined(TD_WARNING_ICON) && wxUSE_UNICODE
// (shuffle2) This is turned off because as of wxW svn r70933,
// there is a bug with the wxPD_AUTO_HIDE style which can cause a non-dolphin
// window to come to the foreground after auto-closing of the TaskDialog.
// #define wxHAS_MSW_TASKDIALOG
#define wxHAS_MSW_TASKDIALOG
#endif
// Provides methods for creating a task dialog.

View File

@ -0,0 +1,50 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/pipestream.h
// Purpose: MSW wxPipeInputStream and wxPipeOutputStream declarations
// Author: Vadim Zeitlin
// Created: 2013-06-08 (extracted from src/msw/utilsexc.cpp)
// Copyright: (c) 2013 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_PIPESTREAM_H_
#define _WX_MSW_PRIVATE_PIPESTREAM_H_
class wxPipeInputStream : public wxInputStream
{
public:
wxEXPLICIT wxPipeInputStream(HANDLE hInput);
virtual ~wxPipeInputStream();
// returns true if the pipe is still opened
bool IsOpened() const { return m_hInput != INVALID_HANDLE_VALUE; }
// returns true if there is any data to be read from the pipe
virtual bool CanRead() const;
protected:
virtual size_t OnSysRead(void *buffer, size_t len);
protected:
HANDLE m_hInput;
wxDECLARE_NO_COPY_CLASS(wxPipeInputStream);
};
class wxPipeOutputStream: public wxOutputStream
{
public:
wxEXPLICIT wxPipeOutputStream(HANDLE hOutput);
virtual ~wxPipeOutputStream() { Close(); }
bool Close();
protected:
size_t OnSysWrite(const void *buffer, size_t len);
protected:
HANDLE m_hOutput;
wxDECLARE_NO_COPY_CLASS(wxPipeOutputStream);
};
#endif // _WX_MSW_PRIVATE_PIPESTREAM_H_

View File

@ -6,7 +6,6 @@
// Copyright: (C) 1999-1997, Guilhem Lavaux
// (C) 1999-2000, Guillermo Rodriguez Garcia
// (C) 2008 Vadim Zeitlin
// RCS_ID: $Id: sockmsw.h 67254 2011-03-20 00:14:35Z DS $
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,63 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/private/textmeasure.h
// Purpose: wxMSW-specific declaration of wxTextMeasure class
// Author: Manuel Martin
// Created: 2012-10-05
// Copyright: (c) 1997-2012 wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_PRIVATE_TEXTMEASURE_H_
#define _WX_MSW_PRIVATE_TEXTMEASURE_H_
#include "wx/msw/wrapwin.h"
// ----------------------------------------------------------------------------
// wxTextMeasure for MSW.
// ----------------------------------------------------------------------------
class wxTextMeasure : public wxTextMeasureBase
{
public:
wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL)
: wxTextMeasureBase(dc, font)
{
Init();
}
wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL)
: wxTextMeasureBase(win, font)
{
Init();
}
protected:
void Init();
virtual void BeginMeasuring();
virtual void EndMeasuring();
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);
// We use either the HDC of the provided wxDC or an HDC created for our
// window.
HDC m_hdc;
// If we change the font in BeginMeasuring(), we restore it to the old one
// in EndMeasuring().
HFONT m_hfontOld;
wxDECLARE_NO_COPY_CLASS(wxTextMeasure);
};
#endif // _WX_MSW_PRIVATE_TEXTMEASURE_H_

View File

@ -3,7 +3,6 @@
// Purpose: wxTimer class
// Author: Julian Smart
// Created: 01/02/97
// RCS-ID: $Id: timer.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////