Update wx to r75363 to address a wx bug that was breaking netplay on OS X.

This commit is contained in:
comex
2013-12-08 15:37:10 -05:00
parent 9722be069b
commit 1334d7fc41
185 changed files with 2040 additions and 5175 deletions

View File

@ -175,7 +175,7 @@ public:
virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH) = 0;
virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) = 0;
virtual bool CreateScaled(int w, int h, int d, double logicalScale)
{ return Create(w*logicalScale,h*logicalScale,d); }
{ return Create(wxRound(w*logicalScale), wxRound(h*logicalScale), d); }
virtual int GetHeight() const = 0;
virtual int GetWidth() const = 0;
@ -189,7 +189,7 @@ public:
virtual double GetScaledWidth() const { return GetWidth() / GetScaleFactor(); }
virtual double GetScaledHeight() const { return GetHeight() / GetScaleFactor(); }
virtual wxSize GetScaledSize() const
{ return wxSize(GetScaledWidth(), GetScaledHeight()); }
{ return wxSize(wxRound(GetScaledWidth()), wxRound(GetScaledHeight())); }
#if wxUSE_IMAGE
virtual wxImage ConvertToImage() const = 0;

View File

@ -268,9 +268,22 @@ public:
wxCharTypeBuffer(size_t len)
{
this->m_data =
new Data((CharType *)malloc((len + 1)*sizeof(CharType)), len);
this->m_data->Get()[len] = (CharType)0;
CharType* const str = (CharType *)malloc((len + 1)*sizeof(CharType));
if ( str )
{
str[len] = (CharType)0;
// There is a potential memory leak here if new throws because it
// fails to allocate Data, we ought to use new(nothrow) here, but
// this might fail to compile under some platforms so until this
// can be fully tested, just live with this (rather unlikely, as
// Data is a small object) potential leak.
this->m_data = new Data(str, len);
}
else
{
this->m_data = this->GetNullData();
}
}
wxCharTypeBuffer(const wxCharTypeBuffer& src)

View File

@ -11,11 +11,12 @@
#ifndef _WX_CHOICDLG_H_BASE_
#define _WX_CHOICDLG_H_BASE_
#include "wx/defs.h"
#if wxUSE_CHOICEDLG
#include "wx/generic/choicdgg.h"
#endif
#endif
// _WX_CHOICDLG_H_BASE_
#endif // _WX_CHOICDLG_H_BASE_

View File

@ -560,7 +560,7 @@ protected:
// just recalculate.
void CalculateAreas( int btnWidth = 0 );
// Standard textctrl positioning routine. Just give it platform-dependant
// Standard textctrl positioning routine. Just give it platform-dependent
// textctrl coordinate adjustment.
virtual void PositionTextCtrl( int textCtrlXAdjust = 0,
int textCtrlYAdjust = 0);
@ -701,7 +701,7 @@ protected:
// area used by the button
wxSize m_btnSize;
// platform-dependant customization and other flags
// platform-dependent customization and other flags
wxUint32 m_iFlags;
// custom style for m_text

View File

@ -19,7 +19,7 @@
/*
Notice that Intel compiler can be used as Microsoft Visual C++ add-on and
so we should define both __INTELC__ and __VISUALC__ for it.
*/
*/
#ifdef __INTEL_COMPILER
# define __INTELC__
#endif
@ -135,15 +135,40 @@
#endif
/*
This macro can be used to check that the version of mingw32 compiler is
at least maj.min
This macro can be used to check that the version of mingw32 CRT is at least
maj.min
*/
/* Check for Mingw runtime version: */
#if defined(__MINGW32_MAJOR_VERSION) && defined(__MINGW32_MINOR_VERSION)
#ifdef __MINGW32__
/* Include the header defining __MINGW32_{MAJ,MIN}OR_VERSION */
#include <_mingw.h>
#define wxCHECK_MINGW32_VERSION( major, minor ) \
( ( ( __MINGW32_MAJOR_VERSION > (major) ) \
|| ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) )
/*
MinGW-w64 project provides compilers for both Win32 and Win64 but only
defines the same __MINGW32__ symbol for the former as MinGW32 toolchain
which is quite different (notably doesn't provide many SDK headers that
MinGW-w64 does include). So we define a separate symbol which, unlike the
predefined __MINGW64__, can be used to detect this toolchain in both 32 and
64 bit builds.
And define __MINGW32_TOOLCHAIN__ for consistency and also because it's
convenient as we often want to have some workarounds only for the (old)
MinGW32 but not (newer) MinGW-w64, which still predefines __MINGW32__.
*/
# ifdef __MINGW64_VERSION_MAJOR
# ifndef __MINGW64_TOOLCHAIN__
# define __MINGW64_TOOLCHAIN__
# endif
# else
# ifndef __MINGW32_TOOLCHAIN__
# define __MINGW32_TOOLCHAIN__
# endif
# endif
#else
#define wxCHECK_MINGW32_VERSION( major, minor ) (0)
#endif

View File

@ -972,6 +972,7 @@ public:
void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxUIntPtr data = 0 );
void DeleteItem( unsigned int pos );
void DeleteAllItems();
void ClearColumns();
unsigned int GetItemCount() const;
@ -1040,6 +1041,7 @@ public:
virtual bool PrependColumn( wxDataViewColumn *col );
virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
virtual bool AppendColumn( wxDataViewColumn *col );
virtual bool ClearColumns();
wxDataViewColumn *AppendTextColumn( const wxString &label,
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,

View File

@ -310,8 +310,10 @@ typedef short int WXTYPE;
inline T wx_truncate_cast_impl(X x)
{
#pragma warning(push)
/* conversion from 'X' to 'T', possible loss of data */
/* conversion from 'size_t' to 'type', possible loss of data */
#pragma warning(disable: 4267)
/* conversion from 'type1' to 'type2', possible loss of data */
#pragma warning(disable: 4242)
return x;
@ -951,6 +953,10 @@ typedef wxUint16 wxWord;
#define SIZEOF_LONG 4
#endif
#ifndef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
#endif
#ifndef SIZEOF_WCHAR_T
/* Windows uses UTF-16 */
#define SIZEOF_WCHAR_T 2
@ -2287,8 +2293,13 @@ enum wxStandardID
wxID_OSX_HIDE = wxID_OSX_MENU_FIRST,
wxID_OSX_HIDEOTHERS,
wxID_OSX_SHOWALL,
#if wxABI_VERSION >= 30001
wxID_OSX_SERVICES,
wxID_OSX_MENU_LAST = wxID_OSX_SERVICES,
#else
wxID_OSX_MENU_LAST = wxID_OSX_SHOWALL,
#endif
/* IDs used by generic file dialog (13 consecutive starting from this value) */
wxID_FILEDLGG = 5900,

View File

@ -13,6 +13,7 @@
#include "wx/toplevel.h"
#include "wx/containr.h"
#include "wx/sharedptr.h"
class WXDLLIMPEXP_FWD_CORE wxSizer;
class WXDLLIMPEXP_FWD_CORE wxStdDialogButtonSizer;
@ -402,24 +403,29 @@ class wxWindowModalDialogEventFunctor
{
public:
wxWindowModalDialogEventFunctor(const Functor& f)
: m_f(f), m_wasCalled(false)
: m_f(new Functor(f))
{}
void operator()(wxWindowModalDialogEvent& event)
{
if ( m_wasCalled )
if ( m_f )
{
// We only want to call this handler once. Also, by deleting
// the functor here, its data (such as wxWindowPtr pointing to
// the dialog) are freed immediately after exiting this operator().
wxSharedPtr<Functor> functor(m_f);
m_f.reset();
(*functor)(event.GetReturnCode());
}
else // was already called once
{
event.Skip();
return;
}
m_wasCalled = true;
m_f(event.GetReturnCode());
}
private:
Functor m_f;
bool m_wasCalled;
wxSharedPtr<Functor> m_f;
};
template<typename Functor>
@ -428,7 +434,7 @@ void wxDialogBase::ShowWindowModalThenDo(const Functor& onEndModal)
Bind(wxEVT_WINDOW_MODAL_DIALOG_CLOSED,
wxWindowModalDialogEventFunctor<Functor>(onEndModal));
ShowWindowModal();
};
}
#endif // wxHAS_EVENT_BIND
#endif

View File

@ -279,6 +279,9 @@ public:
// destroyed
void SetDocChildFrame(wxDocChildFrameAnyBase *docChildFrame);
// get the associated frame, may be NULL during destruction
wxDocChildFrameAnyBase* GetDocChildFrame() const { return m_docChildFrame; }
protected:
// hook the document into event handlers chain here
virtual bool TryBefore(wxEvent& event);
@ -597,9 +600,10 @@ public:
m_childDocument = NULL;
m_childView = NULL;
m_win = NULL;
m_lastEvent = NULL;
}
// full ctor equivalent to using the default one and Create(0
// full ctor equivalent to using the default one and Create()
wxDocChildFrameAnyBase(wxDocument *doc, wxView *view, wxWindow *win)
{
Create(doc, view, win);
@ -638,6 +642,14 @@ public:
wxWindow *GetWindow() const { return m_win; }
// implementation only
// Check if this event had been just processed in this frame.
bool HasAlreadyProcessed(wxEvent& event) const
{
return m_lastEvent == &event;
}
protected:
// we're not a wxEvtHandler but we provide this wxEvtHandler-like function
// which is called from TryBefore() of the derived classes to give our view
@ -656,6 +668,10 @@ protected:
// allows us to avoid having any virtual functions in this class
wxWindow* m_win;
private:
// Pointer to the last processed event used to avoid sending the same event
// twice to wxDocManager, from here and from wxDocParentFrameAnyBase.
wxEvent* m_lastEvent;
wxDECLARE_NO_COPY_CLASS(wxDocChildFrameAnyBase);
};
@ -894,7 +910,11 @@ protected:
// hook the document manager into event handling chain here
virtual bool TryBefore(wxEvent& event)
{
return TryProcessEvent(event) || BaseFrame::TryBefore(event);
// It is important to send the event to the base class first as
// wxMDIParentFrame overrides its TryBefore() to send the menu events
// to the currently active child frame and the child must get them
// before our own TryProcessEvent() is executed, not afterwards.
return BaseFrame::TryBefore(event) || TryProcessEvent(event);
}
private:

View File

@ -163,9 +163,7 @@ public:
virtual bool IsCustomRenderer() const { return false; }
protected:
// Called from {Cancel,Finish}Editing() to cleanup m_editorCtrl
void DestroyEditControl();
// Implementation only from now on.
// Return the alignment of this renderer if it's specified (i.e. has value
// different from the default wxDVR_DEFAULT_ALIGNMENT) or the alignment of
@ -176,6 +174,10 @@ protected:
// wxDVR_DEFAULT_ALIGNMENT.
int GetEffectiveAlignment() const;
protected:
// Called from {Cancel,Finish}Editing() to cleanup m_editorCtrl
void DestroyEditControl();
wxString m_variantType;
wxDataViewColumn *m_owner;
wxWeakRef<wxWindow> m_editorCtrl;

View File

@ -2275,19 +2275,36 @@ private:
class WXDLLIMPEXP_CORE wxActivateEvent : public wxEvent
{
public:
wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true, int Id = 0)
: wxEvent(Id, type)
{ m_active = active; }
// Type of activation. For now we can only detect if it was by mouse or by
// some other method and even this is only available under wxMSW.
enum Reason
{
Reason_Mouse,
Reason_Unknown
};
wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true,
int Id = 0, Reason activationReason = Reason_Unknown)
: wxEvent(Id, type),
m_activationReason(activationReason)
{
m_active = active;
}
wxActivateEvent(const wxActivateEvent& event)
: wxEvent(event)
{ m_active = event.m_active; }
{
m_active = event.m_active;
m_activationReason = event.m_activationReason;
}
bool GetActive() const { return m_active; }
Reason GetActivationReason() const { return m_activationReason;}
virtual wxEvent *Clone() const { return new wxActivateEvent(*this); }
private:
bool m_active;
Reason m_activationReason;
private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxActivateEvent)

View File

@ -116,7 +116,8 @@
*/
#if wxCHECK_GCC_VERSION(3, 2) || wxCHECK_VISUALC_VERSION(7) \
|| (defined(__SUNCC__) && __SUNCC__ >= 0x5100) \
|| (defined(__xlC__) && __xlC__ >= 0x700)
|| (defined(__xlC__) && __xlC__ >= 0x700) \
|| defined(__INTELC__)
#define wxHAS_EVENT_BIND
#endif

View File

@ -77,7 +77,7 @@
// constants
// ----------------------------------------------------------------------------
#if defined(__VISUALC__) || defined(__INTELC__) || defined(__DIGITALMARS__)
#if defined(__VISUALC__) || defined(__DIGITALMARS__)
typedef int mode_t;
#endif
@ -204,7 +204,7 @@ enum wxPosixPermissions
#if defined(__VISUALC__)
#define wxHAS_HUGE_FILES 1
#elif defined(__MINGW32__) || defined(__MINGW64__)
#define wxHAS_HUGE_FILES 1
#define wxHAS_HUGE_FILES 1f
#elif defined(_LARGE_FILES)
#define wxHAS_HUGE_FILES 1
#endif
@ -476,7 +476,6 @@ enum wxPosixPermissions
#define wxSeek lseek
#define wxFsync fsync
#define wxEof eof
#define wxCRT_MkDir mkdir
#define wxCRT_RmDir rmdir

View File

@ -142,9 +142,7 @@ public:
return *this;
}
#if wxOSX_USE_CORE_TEXT
void Init(CTFontDescriptorRef descr);
#endif
void Init(const wxNativeFontInfo& info);
void Init(int size,
wxFontFamily family,

View File

@ -66,6 +66,13 @@ enum wxFSWPathType
wxFSWPath_Tree // Watch a directory and all its children recursively.
};
// Type of the warning for the events notifying about them.
enum wxFSWWarningType
{
wxFSW_WARNING_NONE,
wxFSW_WARNING_GENERAL,
wxFSW_WARNING_OVERFLOW
};
/**
* Event containing information about file system change.
@ -77,24 +84,36 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_FSWATCHER,
class WXDLLIMPEXP_BASE wxFileSystemWatcherEvent: public wxEvent
{
public:
// Constructor for any kind of events, also used as default ctor.
wxFileSystemWatcherEvent(int changeType = 0, int watchid = wxID_ANY) :
wxEvent(watchid, wxEVT_FSWATCHER),
m_changeType(changeType)
m_changeType(changeType),
m_warningType(wxFSW_WARNING_NONE)
{
}
wxFileSystemWatcherEvent(int changeType, const wxString& errorMsg,
// Constructor for the error or warning events.
wxFileSystemWatcherEvent(int changeType,
wxFSWWarningType warningType,
const wxString& errorMsg = wxString(),
int watchid = wxID_ANY) :
wxEvent(watchid, wxEVT_FSWATCHER),
m_changeType(changeType), m_errorMsg(errorMsg)
m_changeType(changeType),
m_warningType(warningType),
m_errorMsg(errorMsg)
{
}
// Constructor for the normal events carrying information about the changes.
wxFileSystemWatcherEvent(int changeType,
const wxFileName& path, const wxFileName& newPath,
int watchid = wxID_ANY) :
wxEvent(watchid, wxEVT_FSWATCHER),
m_changeType(changeType), m_path(path), m_newPath(newPath)
m_changeType(changeType),
m_warningType(wxFSW_WARNING_NONE),
m_path(path),
m_newPath(newPath)
{
}
@ -146,6 +165,7 @@ public:
evt->m_errorMsg = m_errorMsg.Clone();
evt->m_path = wxFileName(m_path.GetFullPath().Clone());
evt->m_newPath = wxFileName(m_newPath.GetFullPath().Clone());
evt->m_warningType = m_warningType;
return evt;
}
@ -168,6 +188,11 @@ public:
return m_errorMsg;
}
wxFSWWarningType GetWarningType() const
{
return m_warningType;
}
/**
* Returns a wxString describing an event useful for debugging or testing
*/
@ -175,6 +200,7 @@ public:
protected:
int m_changeType;
wxFSWWarningType m_warningType;
wxFileName m_path;
wxFileName m_newPath;
wxString m_errorMsg;

View File

@ -227,6 +227,9 @@ public: // utility functions not part of the API
// return the index of the given column in m_cols
int GetColumnIndex(const wxDataViewColumn *column) const;
// Return the index of the column having the given model index.
int GetModelColumnIndex(unsigned int model_column) const;
// return the column displayed at the given position in the control
wxDataViewColumn *GetColumnAt(unsigned int pos) const;

View File

@ -15,6 +15,8 @@
#if wxUSE_GRID
#include "wx/scopedptr.h"
class wxGridCellEditorEvtHandler : public wxEvtHandler
{
public:

View File

@ -79,6 +79,9 @@ public:
// (default font is a larger and bold version of the normal one)
virtual bool SetFont(const wxFont& font);
// same thing with the colour: this affects the text colour
virtual bool SetForegroundColour(const wxColor& colour);
protected:
// info bar shouldn't have any border by default, the colour difference
// between it and the main window separates it well enough

View File

@ -60,8 +60,8 @@ public:
private:
wxSize GetBitmapSize()
{
return m_bitmap.IsOk() ? wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight())
: wxSize(16, 16); // this is completely arbitrary
return m_bitmap.IsOk() ? m_bitmap.GetScaledSize()
: wxSize(16, 16); // this is completely arbitrary
}
void OnPaint(wxPaintEvent& event);

View File

@ -103,7 +103,6 @@ public:
wxMask *GetMask() const;
void SetMask( wxMask *mask );
wxBitmap GetMaskBitmap() const;
wxBitmap GetSubBitmap( const wxRect& rect ) const;

View File

@ -39,15 +39,13 @@ public:
virtual void EndModal( int retCode );
virtual bool IsModal() const;
// implementation
// --------------
bool m_modalShowing;
private:
// common part of all ctors
void Init();
bool m_modalShowing;
wxGUIEventLoop *m_modalLoop;
DECLARE_DYNAMIC_CLASS(wxDialog)
};

View File

@ -1,351 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/gtk/gnome/gprint.h
// Author: Robert Roebling
// Purpose: GNOME printing support
// Created: 09/20/04
// Copyright: Robert Roebling
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_GTK_GPRINT_H_
#define _WX_GTK_GPRINT_H_
#include "wx/defs.h"
#if wxUSE_LIBGNOMEPRINT
#include "wx/print.h"
#include "wx/printdlg.h"
#include "wx/dc.h"
#include "wx/module.h"
typedef struct _GnomePrintJob GnomePrintJob;
typedef struct _GnomePrintContext GnomePrintContext;
typedef struct _GnomePrintConfig GnomePrintConfig;
// ----------------------------------------------------------------------------
// wxGnomePrintModule
// ----------------------------------------------------------------------------
class wxGnomePrintModule: public wxModule
{
public:
wxGnomePrintModule() {}
bool OnInit();
void OnExit();
private:
DECLARE_DYNAMIC_CLASS(wxGnomePrintModule)
};
//----------------------------------------------------------------------------
// wxGnomePrintNativeData
//----------------------------------------------------------------------------
class wxGnomePrintNativeData: public wxPrintNativeDataBase
{
public:
wxGnomePrintNativeData();
virtual ~wxGnomePrintNativeData();
virtual bool TransferTo( wxPrintData &data );
virtual bool TransferFrom( const wxPrintData &data );
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const { return true; }
GnomePrintConfig* GetPrintConfig() { return m_config; }
void SetPrintJob( GnomePrintJob *job ) { m_job = job; }
GnomePrintJob* GetPrintJob() { return m_job; }
private:
GnomePrintConfig *m_config;
GnomePrintJob *m_job;
DECLARE_DYNAMIC_CLASS(wxGnomePrintNativeData)
};
//----------------------------------------------------------------------------
// wxGnomePrintFactory
//----------------------------------------------------------------------------
class wxGnomePrintFactory: public wxPrintFactory
{
public:
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data );
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
wxPrintout *printout = NULL,
wxPrintDialogData *data = NULL );
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
wxPrintout *printout,
wxPrintData *data );
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
wxPrintDialogData *data = NULL );
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
wxPrintData *data );
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
wxPageSetupDialogData * data = NULL );
#if wxUSE_NEW_DC
virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
#else
virtual wxDC* CreatePrinterDC( const wxPrintData& data );
#endif
virtual bool HasPrintSetupDialog();
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
virtual bool HasOwnPrintToFile();
virtual bool HasPrinterLine();
virtual wxString CreatePrinterLine();
virtual bool HasStatusLine();
virtual wxString CreateStatusLine();
virtual wxPrintNativeDataBase *CreatePrintNativeData();
};
//----------------------------------------------------------------------------
// wxGnomePrintDialog
//----------------------------------------------------------------------------
class wxGnomePrintDialog: public wxPrintDialogBase
{
public:
wxGnomePrintDialog( wxWindow *parent,
wxPrintDialogData* data = NULL );
wxGnomePrintDialog( wxWindow *parent, wxPrintData* data);
virtual ~wxGnomePrintDialog();
wxPrintData& GetPrintData()
{ return m_printDialogData.GetPrintData(); }
wxPrintDialogData& GetPrintDialogData()
{ return m_printDialogData; }
wxDC *GetPrintDC();
virtual int ShowModal();
virtual bool Validate();
virtual bool TransferDataToWindow();
virtual bool TransferDataFromWindow();
protected:
// Implement some base class methods to do nothing to avoid asserts and
// GTK warnings, since this is not a real wxDialog.
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height),
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height)) {}
private:
void Init();
wxPrintDialogData m_printDialogData;
DECLARE_DYNAMIC_CLASS(wxGnomePrintDialog)
};
//----------------------------------------------------------------------------
// wxGnomePageSetupDialog
//----------------------------------------------------------------------------
class wxGnomePageSetupDialog: public wxPageSetupDialogBase
{
public:
wxGnomePageSetupDialog( wxWindow *parent,
wxPageSetupDialogData* data = NULL );
virtual ~wxGnomePageSetupDialog();
virtual wxPageSetupDialogData& GetPageSetupDialogData();
virtual int ShowModal();
virtual bool Validate();
virtual bool TransferDataToWindow();
virtual bool TransferDataFromWindow();
protected:
// Implement some base class methods to do nothing to avoid asserts and
// GTK warnings, since this is not a real wxDialog.
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height),
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height)) {}
private:
wxPageSetupDialogData m_pageDialogData;
DECLARE_DYNAMIC_CLASS(wxGnomePageSetupDialog)
};
//----------------------------------------------------------------------------
// wxGnomePrinter
//----------------------------------------------------------------------------
class wxGnomePrinter: public wxPrinterBase
{
public:
wxGnomePrinter(wxPrintDialogData *data = NULL);
virtual ~wxGnomePrinter();
virtual bool Print(wxWindow *parent,
wxPrintout *printout,
bool prompt = true);
virtual wxDC* PrintDialog(wxWindow *parent);
virtual bool Setup(wxWindow *parent);
private:
bool m_native_preview;
private:
DECLARE_DYNAMIC_CLASS(wxGnomePrinter)
wxDECLARE_NO_COPY_CLASS(wxGnomePrinter);
};
//-----------------------------------------------------------------------------
// wxGnomePrinterDC
//-----------------------------------------------------------------------------
#if wxUSE_NEW_DC
class wxGnomePrinterDCImpl : public wxDCImpl
#else
#define wxGnomePrinterDCImpl wxGnomePrinterDC
class wxGnomePrinterDC : public wxDC
#endif
{
public:
#if wxUSE_NEW_DC
wxGnomePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
#else
wxGnomePrinterDC( const wxPrintData& data );
#endif
virtual ~wxGnomePrinterDCImpl();
bool Ok() const { return IsOk(); }
bool IsOk() const;
bool CanDrawBitmap() const { return true; }
void Clear();
void SetFont( const wxFont& font );
void SetPen( const wxPen& pen );
void SetBrush( const wxBrush& brush );
void SetLogicalFunction( wxRasterOperationMode function );
void SetBackground( const wxBrush& brush );
void DestroyClippingRegion();
bool StartDoc(const wxString& message);
void EndDoc();
void StartPage();
void EndPage();
wxCoord GetCharHeight() const;
wxCoord GetCharWidth() const;
bool CanGetTextExtent() const { return true; }
wxSize GetPPI() const;
virtual int GetDepth() const { return 24; }
void SetBackgroundMode(int WXUNUSED(mode)) { }
void SetPalette(const wxPalette& WXUNUSED(palette)) { }
protected:
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col,
wxFloodFillStyle style=wxFLOOD_SURFACE );
bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const;
void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
void DoCrossHair(wxCoord x, wxCoord y);
void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc);
void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea);
void DoDrawPoint(wxCoord x, wxCoord y);
void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0);
void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE);
void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE);
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0);
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
#if wxUSE_SPLINES
void DoDrawSpline(const wxPointList *points);
#endif
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc,
wxRasterOperationMode = wxCOPY, bool useMask = false,
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y );
void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false );
void DoDrawText(const wxString& text, wxCoord x, wxCoord y );
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DoSetDeviceClippingRegion( const wxRegion &WXUNUSED(clip) )
{
wxFAIL_MSG( "not implemented" );
}
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
const wxFont *theFont = NULL ) const;
void DoGetSize(int* width, int* height) const;
void DoGetSizeMM(int *width, int *height) const;
void SetPrintData(const wxPrintData& data);
wxPrintData& GetPrintData() { return m_printData; }
// overridden for wxPrinterDC Impl
virtual wxRect GetPaperRect() const;
virtual int GetResolution() const;
virtual void* GetHandle() const { return (void*)m_gpc; }
private:
wxPrintData m_printData;
PangoContext *m_context;
PangoLayout *m_layout;
PangoFontDescription *m_fontdesc;
unsigned char m_currentRed;
unsigned char m_currentGreen;
unsigned char m_currentBlue;
double m_pageHeight;
GnomePrintContext *m_gpc;
GnomePrintJob* m_job;
void makeEllipticalPath(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
private:
DECLARE_DYNAMIC_CLASS(wxGnomePrinterDCImpl)
wxDECLARE_NO_COPY_CLASS(wxGnomePrinterDCImpl);
};
// ----------------------------------------------------------------------------
// wxGnomePrintPreview: programmer creates an object of this class to preview a
// wxPrintout.
// ----------------------------------------------------------------------------
class wxGnomePrintPreview : public wxPrintPreviewBase
{
public:
wxGnomePrintPreview(wxPrintout *printout,
wxPrintout *printoutForPrinting = NULL,
wxPrintDialogData *data = NULL);
wxGnomePrintPreview(wxPrintout *printout,
wxPrintout *printoutForPrinting,
wxPrintData *data);
virtual ~wxGnomePrintPreview();
virtual bool Print(bool interactive);
virtual void DetermineScaling();
private:
void Init(wxPrintout *printout, wxPrintout *printoutForPrinting);
private:
DECLARE_CLASS(wxGnomePrintPreview)
};
#endif
// wxUSE_LIBGNOMEPRINT
#endif

View File

@ -16,6 +16,11 @@
#include "wx/gtk/private/string.h"
#include "wx/gtk/private/gtk2-compat.h"
#ifndef G_VALUE_INIT
// introduced in GLib 2.30
#define G_VALUE_INIT { 0, { { 0 } } }
#endif
// pango_version_check symbol is quite recent ATM (4/2007)... so we
// use our own wrapper which implements a smart trick.
// Use this function as you'd use pango_version_check:

View File

@ -47,8 +47,6 @@ public:
virtual bool Enable( bool enable = true );
// implementation
void OnSize( wxSizeEvent &event );
int m_pos;
protected:
@ -61,9 +59,7 @@ protected:
private:
typedef wxSpinButtonBase base_type;
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxSpinButton)
};
#endif
// _WX_GTK_SPINBUTT_H_
#endif // _WX_GTK_SPINBUTT_H_

View File

@ -48,6 +48,11 @@ public:
virtual void SetMaxLength(unsigned long len);
#ifdef __WXGTK3__
virtual bool SetHint(const wxString& hint);
virtual wxString GetHint() const;
#endif
// implementation only from now on
void SendMaxLenEvent();
bool GTKEntryOnInsertText(const char* text);

View File

@ -510,7 +510,7 @@ public:
const wxString& GetLabel() const { return m_item.m_text; }
const wxString& GetText() const { return m_item.m_text; }
int GetImage() const { return m_item.m_image; }
long GetData() const { return static_cast<long>(m_item.m_data); }
wxUIntPtr GetData() const { return m_item.m_data; }
long GetMask() const { return m_item.m_mask; }
const wxListItem& GetItem() const { return m_item; }

View File

@ -60,7 +60,7 @@
#elif defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
#include <float.h>
#define wxFinite(x) _finite(x)
#elif defined(__MINGW64__) || defined(__clang__)
#elif defined(__MINGW64_TOOLCHAIN__) || defined(__clang__)
/*
add more compilers with C99 support here: using C99 isfinite() is
preferable to using BSD-ish finite()

View File

@ -133,6 +133,9 @@ protected:
virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const;
// Override this one to avoid eating events from our popup listbox.
virtual wxWindow *MSWFindItem(long id, WXHWND hWnd) const;
// this is the implementation of GetEditHWND() which can also be used when
// we don't have the edit control, it simply returns NULL then
//

View File

@ -121,6 +121,9 @@ protected:
// one
virtual WXHBRUSH DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd);
// Look in our GetSubcontrols() for the windows with the given ID.
virtual wxWindow *MSWFindItem(long id, WXHWND hWnd) const;
// for controls like radiobuttons which are really composite this array
// holds the ids (not HWNDs!) of the sub controls
wxArrayLong m_subControls;

View File

@ -54,7 +54,9 @@ public:
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected:
#if wxUSE_INTL
virtual wxLocaleInfo MSWGetFormat() const;
#endif // wxUSE_INTL
virtual bool MSWAllowsNone() const { return HasFlag(wxDP_ALLOWNONE); }
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch);

View File

@ -55,12 +55,14 @@ protected:
// override these methods anyhow, it does work -- but is definitely ugly
// and need to be changed (but how?) in the future.
#if wxUSE_INTL
// Override to return the date/time format used by this control.
virtual wxLocaleInfo MSWGetFormat() const /* = 0 */
{
wxFAIL_MSG( "Unreachable" );
return wxLOCALE_TIME_FMT;
}
#endif // wxUSE_INTL
// Override to indicate whether we can have no date at all.
virtual bool MSWAllowsNone() const /* = 0 */

View File

@ -19,7 +19,7 @@ EMIT(#define wxUSE_RC_MANIFEST 1)
EMIT(#define wxUSE_RC_MANIFEST 1)
#endif
#ifdef _M_AMD64
#if defined _M_AMD64 || defined __x86_64__
EMIT(#define WX_CPU_AMD64)
#endif
@ -27,7 +27,7 @@ EMIT(#define WX_CPU_AMD64)
EMIT(#define WX_CPU_ARM)
#endif
#ifdef _M_IA64
#if defined _M_IA64 || defined __ia64__
EMIT(#define WX_CPU_IA64)
#endif

View File

@ -664,7 +664,7 @@ typedef struct
#include <_mingw.h>
#endif
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
#ifdef __MINGW32_TOOLCHAIN__
typedef enum CommandStateChangeConstants {
CSC_UPDATECOMMANDS = (int) 0xFFFFFFFF,
CSC_NAVIGATEFORWARD = 0x1,

View File

@ -37,7 +37,12 @@
#endif
#include <stdlib.h>
#ifndef _CRTBLD
// Defining _CRTBLD should never be necessary at all, but keep it for now
// as there is no time to retest all the compilers before 3.0 release.
// Definitely do not use it with MSVS 2013 as defining it results in errors
// if the standard <assert.h> is included afterwards.
#if !defined(_CRTBLD) && !wxCHECK_VISUALC_VERSION(12)
// Needed when building with pure MS SDK
#define _CRTBLD
#endif

View File

@ -115,11 +115,22 @@ public:
// this object. The default is LOCALE_SYSTEM_DEFAULT.
void SetLCID(WXLCID lcid);
// Returns the flags used for conversions between wxVariant and OLE
// VARIANT, see wxOleConvertVariantFlags. The default value is
// wxOleConvertVariant_Default but all the objects obtained by GetObject()
// inherit the flags from the one that created them.
long GetConvertVariantFlags() const;
// Sets the flags used for conversions between wxVariant and OLE VARIANT,
// see wxOleConvertVariantFlags (default is wxOleConvertVariant_Default.
void SetConvertVariantFlags(long flags);
public: // public for compatibility only, don't use m_dispatchPtr directly.
WXIDISPATCH* m_dispatchPtr;
private:
WXLCID m_lcid;
long m_convertVariantFlags;
wxDECLARE_NO_COPY_CLASS(wxAutomationObject);
};

View File

@ -39,14 +39,10 @@ public:
// default copy ctor/assignment operators ok
// comparison (must have both versions)
bool operator==(wxDataFormatId format) const
{ return m_format == (NativeFormat)format; }
bool operator!=(wxDataFormatId format) const
{ return m_format != (NativeFormat)format; }
bool operator==(const wxDataFormat& format) const
{ return m_format == format.m_format; }
bool operator!=(const wxDataFormat& format) const
{ return m_format != format.m_format; }
bool operator==(wxDataFormatId format) const;
bool operator!=(wxDataFormatId format) const;
bool operator==(const wxDataFormat& format) const;
bool operator!=(const wxDataFormat& format) const;
// explicit and implicit conversions to NativeFormat which is one of
// standard data types (implicit conversion is useful for preserving the

View File

@ -316,9 +316,25 @@ private:
SAFEARRAY* m_value;
};
// Used by wxAutomationObject for its wxConvertOleToVariant() calls.
enum wxOleConvertVariantFlags
{
wxOleConvertVariant_Default = 0,
// If wxOleConvertVariant_ReturnSafeArrays flag is set, SAFEARRAYs
// contained in OLE VARIANTs will be returned as wxVariants
// with wxVariantDataSafeArray type instead of wxVariants
// with the list type containing the (flattened) SAFEARRAY's elements.
wxOleConvertVariant_ReturnSafeArrays = 1
};
WXDLLIMPEXP_CORE
bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant);
WXDLLIMPEXP_CORE
bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant,
long flags = wxOleConvertVariant_Default);
WXDLLIMPEXP_CORE bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant);
WXDLLIMPEXP_CORE bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant);
#endif // wxUSE_VARIANT
// Convert string to Unicode

View File

@ -50,7 +50,9 @@ public:
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
protected:
#if wxUSE_INTL
virtual wxLocaleInfo MSWGetFormat() const;
#endif // wxUSE_INTL
virtual bool MSWAllowsNone() const { return false; }
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch);

View File

@ -304,6 +304,9 @@ private:
// item visually spans the entire breadth of the window then
bool MSWIsOnItem(unsigned flags) const;
// Delete the given item from the native control.
bool MSWDeleteItem(const wxTreeItemId& item);
// the hash storing the items attributes (indexed by item ids)
wxMapTreeAttr m_attrs;

View File

@ -206,7 +206,7 @@ public:
// to understand why does it work, look at SubclassWin() code and comments
bool IsOfStandardClass() const { return m_oldWndProc != NULL; }
wxWindow *FindItem(long id) const;
wxWindow *FindItem(long id, WXHWND hWnd = NULL) const;
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const;
// MSW only: true if this control is part of the main control
@ -663,6 +663,15 @@ protected:
bool MSWEnableHWND(WXHWND hWnd, bool enable);
// Return the pointer to this window or one of its sub-controls if this ID
// and HWND combination belongs to one of them.
//
// This is used by FindItem() and is overridden in wxControl, see there.
virtual wxWindow* MSWFindItem(long WXUNUSED(id), WXHWND WXUNUSED(hWnd)) const
{
return NULL;
}
private:
// common part of all ctors
void Init();

View File

@ -129,18 +129,24 @@ public:
virtual short MacHandleAERApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
#endif
// in response of an openFiles message with Cocoa and an
// open-document apple event with Carbon
// open-document apple event
virtual void MacOpenFiles(const wxArrayString &fileNames) ;
// called by MacOpenFiles for each file.
virtual void MacOpenFile(const wxString &fileName) ;
// in response of a get-url apple event
virtual void MacOpenURL(const wxString &url) ;
// in response of a print-document apple event
virtual void MacPrintFiles(const wxArrayString &fileNames) ;
// called by MacPrintFiles for each file
virtual void MacPrintFile(const wxString &fileName) ;
// in response of a open-application apple event
virtual void MacNewFile() ;
// in response of a reopen-application apple event
virtual void MacReopenApp() ;
// override this to return false from a non-bundled console app in order to stay in background ...
virtual bool OSXIsGUIApplication() { return true; }
#if wxOSX_USE_COCOA_OR_IPHONE
// immediately before the native event loop launches
virtual void OSXOnWillFinishLaunching();
@ -153,9 +159,16 @@ public:
private:
bool m_onInitResult;
bool m_inited;
wxArrayString m_openFiles;
wxArrayString m_printFiles;
wxString m_getURL;
public:
bool OSXInitWasCalled() { return m_inited; }
void OSXStoreOpenFiles(const wxArrayString &files ) { m_openFiles = files ; }
void OSXStorePrintFiles(const wxArrayString &files ) { m_printFiles = files ; }
void OSXStoreOpenURL(const wxString &url ) { m_getURL = url ; }
#endif
// Hide the application windows the same as the system hide command would do it.

View File

@ -30,22 +30,7 @@
* text rendering system
*/
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
#define wxOSX_USE_CORE_TEXT 1
// MLTE-TextControl uses ATSU
#define wxOSX_USE_ATSU_TEXT 1
#else // platform < 10.5
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
#define wxOSX_USE_CORE_TEXT 1
#else
#define wxOSX_USE_CORE_TEXT 0
#endif
#define wxOSX_USE_ATSU_TEXT 1
#endif
#define wxOSX_USE_ATSU_TEXT 1
/*
* Audio System

View File

@ -155,9 +155,7 @@ public:
OSStatus EnableCellSizeModification(bool enableHeight=true, bool enableWidth=true); // enables or disables the column width and row height modification (default: false)
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
OSStatus GetAttributes (OptionBits* attributes);
#endif
OSStatus GetColumnWidth (DataBrowserPropertyID column, UInt16 *width ) const; // returns the column width in pixels
OSStatus GetDefaultColumnWidth(UInt16 *width ) const; // returns the default column width in pixels
OSStatus GetDefaultRowHeight (UInt16 * height ) const;
@ -166,9 +164,7 @@ public:
OSStatus GetRowHeight (DataBrowserItemID item , UInt16 *height) const;
OSStatus GetScrollPosition (UInt32* top, UInt32 *left) const;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
OSStatus SetAttributes (OptionBits attributes);
#endif
OSStatus SetColumnWidth(DataBrowserPropertyID column, UInt16 width); // sets the column width in pixels
OSStatus SetDefaultColumnWidth( UInt16 width );
OSStatus SetDefaultRowHeight( UInt16 height );

View File

@ -22,8 +22,6 @@
// near future
//
#if ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
class WXDLLIMPEXP_ADV wxDrawerWindow : public wxTopLevelWindow
{
DECLARE_DYNAMIC_CLASS(wxDrawerWindow)
@ -64,7 +62,4 @@ public:
wxDirection GetCurrentEdge() const; // not necessarily the preferred, due to screen constraints
};
#endif // defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
#endif
// _WX_DRAWERWINDOW_H_
#endif // _WX_DRAWERWINDOW_H_

View File

@ -13,11 +13,6 @@
#ifndef _WX_PRIVATE_H_
#define _WX_PRIVATE_H_
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
typedef UInt32 URefCon;
typedef SInt32 SRefCon;
#endif
#if wxUSE_GUI
#include "wx/osx/uma.h"
@ -29,10 +24,6 @@ typedef SInt32 SRefCon;
// app.h
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
bool wxMacConvertEventToRecord( EventRef event , EventRecord *rec);
#endif
#endif // wxUSE_GUI
// filefn.h
@ -269,12 +260,6 @@ ControlActionUPP GetwxMacLiveScrollbarActionProc();
// additional optional event defines
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
enum {
kEventControlFocusPartChanged = 164
};
#endif
class WXDLLIMPEXP_CORE wxMacControl : public wxWidgetImpl
{
public :

View File

@ -41,33 +41,14 @@
* text rendering system
*/
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
#define wxOSX_USE_CORE_TEXT 1
#define wxOSX_USE_ATSU_TEXT 0
#else // platform < 10.5
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
#define wxOSX_USE_CORE_TEXT 1
#else
#define wxOSX_USE_CORE_TEXT 0
#endif
#define wxOSX_USE_ATSU_TEXT 1
#endif
#define wxOSX_USE_ATSU_TEXT 0
/*
* Audio System
*/
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
#define wxOSX_USE_QUICKTIME 0
#define wxOSX_USE_AUDIOTOOLBOX 1
#else // platform < 10.5
#define wxOSX_USE_QUICKTIME 1
#define wxOSX_USE_AUDIOTOOLBOX 0
#endif
#define wxOSX_USE_QUICKTIME 0
#define wxOSX_USE_AUDIOTOOLBOX 1
/*
* turning off capabilities that don't work under cocoa yet

View File

@ -19,12 +19,6 @@
#import <Cocoa/Cocoa.h>
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
// available in 10.4 but not in the headers
enum {
kEventMouseScroll = 11
};
#endif
//
// shared between Cocoa and Carbon
//
@ -160,6 +154,7 @@ public :
virtual void cursorUpdate(WX_NSEvent event, WXWidget slf, void* _cmd);
virtual void keyEvent(WX_NSEvent event, WXWidget slf, void* _cmd);
virtual void insertText(NSString* text, WXWidget slf, void* _cmd);
virtual void doCommandBySelector(void* sel, WXWidget slf, void* _cmd);
virtual bool performKeyEquivalent(WX_NSEvent event, WXWidget slf, void* _cmd);
virtual bool acceptsFirstResponder(WXWidget slf, void* _cmd);
virtual bool becomeFirstResponder(WXWidget slf, void* _cmd);

View File

@ -45,11 +45,7 @@
#define WX_GMTOFF_IN_TM 1
#define HAVE_PW_GECOS 1
#define HAVE_DLOPEN 1
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
/* #undef HAVE_CXA_DEMANGLE */
#else
#define HAVE_CXA_DEMANGLE 1
#endif
#define HAVE_GETTIMEOFDAY 1
#define HAVE_FSYNC 1
#define HAVE_ROUND 1
@ -108,11 +104,7 @@
#define HAVE_WCHAR_H 1
/* better to use the built-in CF conversions, also avoid iconv versioning problems */
/* #undef HAVE_ICONV */
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
#define ICONV_CONST const
#else
#define ICONV_CONST
#endif
#define HAVE_LANGINFO_H 1
#define HAVE_WCSRTOMBS 1
#define HAVE_FPUTWS 1
@ -131,9 +123,9 @@
#define WXWIN_OS_DESCRIPTION "Darwin 7.9.0 Power Macintosh"
#define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org"
#define PACKAGE_NAME "wxWidgets"
#define PACKAGE_STRING "wxWidgets 3.0.0"
#define PACKAGE_STRING "wxWidgets 3.1.0"
#define PACKAGE_TARNAME "wxwidgets"
#define PACKAGE_VERSION "3.0.0"
#define PACKAGE_VERSION "3.1.0"
// for regex
#define WX_NO_REGEX_ADVANCED 1

View File

@ -30,7 +30,9 @@ public:
#ifdef __WXOSX_COCOA__
// skip wxGUIEventLoop to avoid missing Enter/Exit notifications
int Run() { return wxCFEventLoop::Run(); }
virtual int Run() { return wxCFEventLoop::Run(); }
virtual bool ProcessIdle();
#endif
protected:
virtual void OSXDoRun();

View File

@ -152,9 +152,7 @@ public:
CGFontRef OSXGetCGFont() const;
#endif
#if wxOSX_USE_CORE_TEXT
CTFontRef OSXGetCTFont() const;
#endif
#if wxOSX_USE_ATSU_TEXT
// Returns an ATSUStyle not ATSUStyle*

View File

@ -19,7 +19,6 @@
* under a certain platform
*/
#define wxOSX_USE_CORE_TEXT 1
#define wxOSX_USE_ATSU_TEXT 0
#define wxHAS_OPENGL_ES
@ -362,6 +361,11 @@
#define wxUSE_RICHTOOLTIP 0
#endif
#if wxUSE_WEBVIEW
#undef wxUSE_WEBVIEW
#define wxUSE_WEBVIEW 0
#endif
#endif
/* _WX_OSX_IPHONE_CHKCONF_H_ */

View File

@ -146,6 +146,10 @@ public:
// call this function to update it (m_menuBarFrame should be !NULL)
void Refresh(bool eraseBackground = true, const wxRect *rect = NULL);
#if wxABI_VERSION >= 30001
wxMenu *OSXGetAppleMenu() const { return m_appleMenu; }
#endif
static void SetAutoWindowMenu( bool enable ) { s_macAutoWindowMenu = enable ; }
static bool GetAutoWindowMenu() { return s_macAutoWindowMenu ; }

View File

@ -74,10 +74,6 @@ public:
virtual void MarkDirty();
virtual void DiscardEdits();
// set the grayed out hint text
virtual bool SetHint(const wxString& hint);
virtual wxString GetHint() const;
// text control under some platforms supports the text styles: these
// methods apply the given text style to the given selection or to
// set/get the style which will be used for all appended text
@ -151,7 +147,6 @@ protected:
private :
wxMenu *m_privateContextMenu;
wxString m_hintString;
DECLARE_EVENT_TABLE()
};

View File

@ -81,6 +81,10 @@ public:
virtual bool SendMaxLenEvent();
// set the grayed out hint text
virtual bool SetHint(const wxString& hint);
virtual wxString GetHint() const;
// Implementation
// --------------
@ -102,6 +106,8 @@ protected:
// need to make this public because of the current implementation via callbacks
unsigned long m_maxLength;
private:
wxString m_hintString;
};
#endif // _WX_OSX_TEXTENTRY_H_

View File

@ -95,8 +95,13 @@
# endif
#endif /* __WINDOWS__ */
/* Don't use widget toolkit specific code in non-GUI code */
#if defined(wxUSE_GUI) && !wxUSE_GUI
/*
Don't use widget toolkit specific code in non-GUI code in the library
itself to ensure that the same base library is used for both MSW and GTK
ports. But keep __WXMSW__ defined for (console) applications using
wxWidgets for compatibility.
*/
#if defined(WXBUILDING) && defined(wxUSE_GUI) && !wxUSE_GUI
# ifdef __WXMSW__
# undef __WXMSW__
# endif

View File

@ -156,7 +156,7 @@ protected:
wxDECLARE_NO_COPY_CLASS(wxTextMeasureBase);
};
// Include the platform dependant class declaration, if any.
// Include the platform dependent class declaration, if any.
#if defined(__WXGTK20__)
#include "wx/gtk/private/textmeasure.h"
#elif defined(__WXMSW__)

View File

@ -80,7 +80,7 @@ public:
private:
// (re)init
void Init() { m_defaultState = false; }
void Init() { m_count = 0; m_defaultState = false; }
// the total number of items we handle
unsigned m_count;

View File

@ -79,8 +79,6 @@ struct WXDLLIMPEXP_BASE wxStringOperationsUtf8
template<typename Iterator>
static void DecIter(Iterator& i)
{
wxASSERT( IsValidUtf8LeadByte(*i) );
// Non-lead bytes are all in the 0x80..0xBF range (i.e. 10xxxxxx in
// binary), so we just have to go back until we hit a byte that is
// either < 0x80 (i.e. 0xxxxxxx in binary) or 0xC0..0xFF (11xxxxxx in

View File

@ -748,7 +748,7 @@ struct wxArgNormalizer<const wxUniChar&> : public wxArgNormalizer<wchar_t>
{
wxArgNormalizer(const wxUniChar& s,
const wxFormatString *fmt, unsigned index)
: wxArgNormalizer<wchar_t>(s.GetValue(), fmt, index) {}
: wxArgNormalizer<wchar_t>(wx_truncate_cast(wchar_t, s.GetValue()), fmt, index) {}
};
// for wchar_t, default handler does the right thing

View File

@ -205,6 +205,9 @@ enum wxTextAttrFlags
wxTEXT_ATTR_EFFECTS = 0x00800000,
wxTEXT_ATTR_OUTLINE_LEVEL = 0x01000000,
wxTEXT_ATTR_AVOID_PAGE_BREAK_BEFORE = 0x20000000,
wxTEXT_ATTR_AVOID_PAGE_BREAK_AFTER = 0x40000000,
/*!
* Character and paragraph combined styles
*/
@ -216,7 +219,8 @@ enum wxTextAttrFlags
wxTEXT_ATTR_PARAGRAPH = \
(wxTEXT_ATTR_ALIGNMENT|wxTEXT_ATTR_LEFT_INDENT|wxTEXT_ATTR_RIGHT_INDENT|wxTEXT_ATTR_TABS|\
wxTEXT_ATTR_PARA_SPACING_BEFORE|wxTEXT_ATTR_PARA_SPACING_AFTER|wxTEXT_ATTR_LINE_SPACING|\
wxTEXT_ATTR_BULLET|wxTEXT_ATTR_PARAGRAPH_STYLE_NAME|wxTEXT_ATTR_LIST_STYLE_NAME|wxTEXT_ATTR_OUTLINE_LEVEL|wxTEXT_ATTR_PAGE_BREAK),
wxTEXT_ATTR_BULLET|wxTEXT_ATTR_PARAGRAPH_STYLE_NAME|wxTEXT_ATTR_LIST_STYLE_NAME|wxTEXT_ATTR_OUTLINE_LEVEL|\
wxTEXT_ATTR_PAGE_BREAK|wxTEXT_ATTR_AVOID_PAGE_BREAK_BEFORE|wxTEXT_ATTR_AVOID_PAGE_BREAK_AFTER),
wxTEXT_ATTR_ALL = (wxTEXT_ATTR_CHARACTER|wxTEXT_ATTR_PARAGRAPH)
};
@ -262,7 +266,9 @@ enum wxTextAttrEffects
wxTEXT_ATTR_EFFECT_OUTLINE = 0x00000040,
wxTEXT_ATTR_EFFECT_ENGRAVE = 0x00000080,
wxTEXT_ATTR_EFFECT_SUPERSCRIPT = 0x00000100,
wxTEXT_ATTR_EFFECT_SUBSCRIPT = 0x00000200
wxTEXT_ATTR_EFFECT_SUBSCRIPT = 0x00000200,
wxTEXT_ATTR_EFFECT_RTL = 0x00000400,
wxTEXT_ATTR_EFFECT_SUPPRESS_HYPHENATION = 0x00001000
};
/*!

View File

@ -161,7 +161,7 @@ private:
return ToHi8bit(c);
#else
return c;
return wx_truncate_cast(char, c);
#endif
}

View File

@ -327,7 +327,7 @@ public:
if ( m_capacity + increment > n )
n = m_capacity + increment;
m_values = Ops::Realloc(m_values, n * sizeof(value_type), m_size);
m_values = Ops::Realloc(m_values, n, m_size);
m_capacity = n;
}

View File

@ -26,10 +26,10 @@
/* NB: this file is parsed by automatic tools so don't change its format! */
#define wxMAJOR_VERSION 3
#define wxMINOR_VERSION 0
#define wxMINOR_VERSION 1
#define wxRELEASE_NUMBER 0
#define wxSUBRELEASE_NUMBER 0
#define wxVERSION_STRING wxT("wxWidgets 3.0.0 RC1")
#define wxVERSION_STRING wxT("wxWidgets 3.1.0")
/* nothing to update below this line when updating the version */
/* ---------------------------------------------------------------------------- */

View File

@ -565,24 +565,6 @@ WXDLLIMPEXP_BASE wchar_t * wxCRT_GetenvW(const wchar_t *name);
/* wcstoi doesn't exist */
#endif
#ifdef __DARWIN__
#if !defined(__WXOSX_IPHONE__) && MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2
#define wxNEED_WX_MBSTOWCS
#endif
#endif
#ifdef wxNEED_WX_MBSTOWCS
/* even though they are defined and "implemented", they are bad and just
stubs so we need our own - we need these even in ANSI builds!! */
WXDLLIMPEXP_BASE size_t wxMbstowcs(wchar_t *, const char *, size_t);
WXDLLIMPEXP_BASE size_t wxWcstombs(char *, const wchar_t *, size_t);
#else
#define wxMbstowcs mbstowcs
#define wxWcstombs wcstombs
#endif
/* -------------------------------------------------------------------------
time.h
------------------------------------------------------------------------- */

View File

@ -238,7 +238,17 @@
#define wxCRT_ScanfA scanf
#define wxCRT_SscanfA sscanf
#define wxCRT_FscanfA fscanf
#define wxCRT_VsscanfA vsscanf
/* vsscanf() may have a wrong declaration with non-const first parameter, fix
* this by wrapping it if necessary. */
#if defined __cplusplus && defined HAVE_BROKEN_VSSCANF_DECL
inline int wxCRT_VsscanfA(const char *str, const char *format, va_list ap)
{
return vsscanf(const_cast<char *>(str), format, ap);
}
#else
#define wxCRT_VsscanfA vsscanf
#endif
#if defined(wxNEED_WPRINTF)
int wxCRT_ScanfW(const wchar_t *format, ...);