Update wx to r75363 to address a wx bug that was breaking netplay on OS X.
This commit is contained in:
parent
9722be069b
commit
1334d7fc41
|
@ -1,4 +1,4 @@
|
||||||
# gtk, msw, osx and shared files as of r74856
|
# gtk, msw, osx and shared files as of r75363
|
||||||
|
|
||||||
set(SRCS_AUI
|
set(SRCS_AUI
|
||||||
"src/aui/auibar.cpp"
|
"src/aui/auibar.cpp"
|
||||||
|
@ -906,6 +906,7 @@ add_definitions(-Wno-shadow)
|
||||||
add_definitions(-Wno-parentheses-equality)
|
add_definitions(-Wno-parentheses-equality)
|
||||||
add_definitions(-Wno-self-assign)
|
add_definitions(-Wno-self-assign)
|
||||||
add_definitions(-Wno-null-conversion)
|
add_definitions(-Wno-null-conversion)
|
||||||
|
add_definitions(-Wno-sign-compare)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98")
|
||||||
|
|
||||||
enable_precompiled_headers(include/wx/wxprec.h src/common/dummy.cpp SRCS)
|
enable_precompiled_headers(include/wx/wxprec.h src/common/dummy.cpp SRCS)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
svn co -r 74856 http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets
|
svn co -r 75363 http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets
|
||||||
cd wxWidgets
|
cd wxWidgets
|
||||||
|
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
|
|
|
@ -148,6 +148,9 @@
|
||||||
#pragma comment(lib, wxWX_LIB_NAME("base", ""))
|
#pragma comment(lib, wxWX_LIB_NAME("base", ""))
|
||||||
|
|
||||||
#ifndef wxNO_NET_LIB
|
#ifndef wxNO_NET_LIB
|
||||||
|
#ifndef WXUSINGDLL
|
||||||
|
#pragma comment(lib, "wsock32")
|
||||||
|
#endif
|
||||||
#pragma comment(lib, wxBASE_LIB_NAME("net"))
|
#pragma comment(lib, wxBASE_LIB_NAME("net"))
|
||||||
#endif
|
#endif
|
||||||
#ifndef wxNO_XML_LIB
|
#ifndef wxNO_XML_LIB
|
||||||
|
@ -235,7 +238,6 @@
|
||||||
#pragma comment(lib, "uuid")
|
#pragma comment(lib, "uuid")
|
||||||
#pragma comment(lib, "rpcrt4")
|
#pragma comment(lib, "rpcrt4")
|
||||||
#pragma comment(lib, "advapi32")
|
#pragma comment(lib, "advapi32")
|
||||||
#pragma comment(lib, "wsock32")
|
|
||||||
#if wxUSE_URL_NATIVE
|
#if wxUSE_URL_NATIVE
|
||||||
#pragma comment(lib, "wininet")
|
#pragma comment(lib, "wininet")
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -175,7 +175,7 @@ public:
|
||||||
virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH) = 0;
|
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 Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) = 0;
|
||||||
virtual bool CreateScaled(int w, int h, int d, double logicalScale)
|
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 GetHeight() const = 0;
|
||||||
virtual int GetWidth() const = 0;
|
virtual int GetWidth() const = 0;
|
||||||
|
@ -189,7 +189,7 @@ public:
|
||||||
virtual double GetScaledWidth() const { return GetWidth() / GetScaleFactor(); }
|
virtual double GetScaledWidth() const { return GetWidth() / GetScaleFactor(); }
|
||||||
virtual double GetScaledHeight() const { return GetHeight() / GetScaleFactor(); }
|
virtual double GetScaledHeight() const { return GetHeight() / GetScaleFactor(); }
|
||||||
virtual wxSize GetScaledSize() const
|
virtual wxSize GetScaledSize() const
|
||||||
{ return wxSize(GetScaledWidth(), GetScaledHeight()); }
|
{ return wxSize(wxRound(GetScaledWidth()), wxRound(GetScaledHeight())); }
|
||||||
|
|
||||||
#if wxUSE_IMAGE
|
#if wxUSE_IMAGE
|
||||||
virtual wxImage ConvertToImage() const = 0;
|
virtual wxImage ConvertToImage() const = 0;
|
||||||
|
|
|
@ -268,9 +268,22 @@ public:
|
||||||
|
|
||||||
wxCharTypeBuffer(size_t len)
|
wxCharTypeBuffer(size_t len)
|
||||||
{
|
{
|
||||||
this->m_data =
|
CharType* const str = (CharType *)malloc((len + 1)*sizeof(CharType));
|
||||||
new Data((CharType *)malloc((len + 1)*sizeof(CharType)), len);
|
if ( str )
|
||||||
this->m_data->Get()[len] = (CharType)0;
|
{
|
||||||
|
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)
|
wxCharTypeBuffer(const wxCharTypeBuffer& src)
|
||||||
|
|
|
@ -11,11 +11,12 @@
|
||||||
#ifndef _WX_CHOICDLG_H_BASE_
|
#ifndef _WX_CHOICDLG_H_BASE_
|
||||||
#define _WX_CHOICDLG_H_BASE_
|
#define _WX_CHOICDLG_H_BASE_
|
||||||
|
|
||||||
|
#include "wx/defs.h"
|
||||||
|
|
||||||
#if wxUSE_CHOICEDLG
|
#if wxUSE_CHOICEDLG
|
||||||
|
|
||||||
#include "wx/generic/choicdgg.h"
|
#include "wx/generic/choicdgg.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif // _WX_CHOICDLG_H_BASE_
|
||||||
// _WX_CHOICDLG_H_BASE_
|
|
||||||
|
|
|
@ -560,7 +560,7 @@ protected:
|
||||||
// just recalculate.
|
// just recalculate.
|
||||||
void CalculateAreas( int btnWidth = 0 );
|
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.
|
// textctrl coordinate adjustment.
|
||||||
virtual void PositionTextCtrl( int textCtrlXAdjust = 0,
|
virtual void PositionTextCtrl( int textCtrlXAdjust = 0,
|
||||||
int textCtrlYAdjust = 0);
|
int textCtrlYAdjust = 0);
|
||||||
|
@ -701,7 +701,7 @@ protected:
|
||||||
// area used by the button
|
// area used by the button
|
||||||
wxSize m_btnSize;
|
wxSize m_btnSize;
|
||||||
|
|
||||||
// platform-dependant customization and other flags
|
// platform-dependent customization and other flags
|
||||||
wxUint32 m_iFlags;
|
wxUint32 m_iFlags;
|
||||||
|
|
||||||
// custom style for m_text
|
// custom style for m_text
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
/*
|
/*
|
||||||
Notice that Intel compiler can be used as Microsoft Visual C++ add-on and
|
Notice that Intel compiler can be used as Microsoft Visual C++ add-on and
|
||||||
so we should define both __INTELC__ and __VISUALC__ for it.
|
so we should define both __INTELC__ and __VISUALC__ for it.
|
||||||
*/
|
*/
|
||||||
#ifdef __INTEL_COMPILER
|
#ifdef __INTEL_COMPILER
|
||||||
# define __INTELC__
|
# define __INTELC__
|
||||||
#endif
|
#endif
|
||||||
|
@ -135,15 +135,40 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This macro can be used to check that the version of mingw32 compiler is
|
This macro can be used to check that the version of mingw32 CRT is at least
|
||||||
at least maj.min
|
maj.min
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Check for Mingw runtime version: */
|
/* 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 ) \
|
#define wxCHECK_MINGW32_VERSION( major, minor ) \
|
||||||
( ( ( __MINGW32_MAJOR_VERSION > (major) ) \
|
( ( ( __MINGW32_MAJOR_VERSION > (major) ) \
|
||||||
|| ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) )
|
|| ( __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
|
#else
|
||||||
#define wxCHECK_MINGW32_VERSION( major, minor ) (0)
|
#define wxCHECK_MINGW32_VERSION( major, minor ) (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -972,6 +972,7 @@ public:
|
||||||
void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxUIntPtr data = 0 );
|
void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxUIntPtr data = 0 );
|
||||||
void DeleteItem( unsigned int pos );
|
void DeleteItem( unsigned int pos );
|
||||||
void DeleteAllItems();
|
void DeleteAllItems();
|
||||||
|
void ClearColumns();
|
||||||
|
|
||||||
unsigned int GetItemCount() const;
|
unsigned int GetItemCount() const;
|
||||||
|
|
||||||
|
@ -1040,6 +1041,7 @@ public:
|
||||||
virtual bool PrependColumn( wxDataViewColumn *col );
|
virtual bool PrependColumn( wxDataViewColumn *col );
|
||||||
virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
|
virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
|
||||||
virtual bool AppendColumn( wxDataViewColumn *col );
|
virtual bool AppendColumn( wxDataViewColumn *col );
|
||||||
|
virtual bool ClearColumns();
|
||||||
|
|
||||||
wxDataViewColumn *AppendTextColumn( const wxString &label,
|
wxDataViewColumn *AppendTextColumn( const wxString &label,
|
||||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||||
|
|
|
@ -310,8 +310,10 @@ typedef short int WXTYPE;
|
||||||
inline T wx_truncate_cast_impl(X x)
|
inline T wx_truncate_cast_impl(X x)
|
||||||
{
|
{
|
||||||
#pragma warning(push)
|
#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)
|
#pragma warning(disable: 4267)
|
||||||
|
/* conversion from 'type1' to 'type2', possible loss of data */
|
||||||
|
#pragma warning(disable: 4242)
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
|
|
||||||
|
@ -951,6 +953,10 @@ typedef wxUint16 wxWord;
|
||||||
#define SIZEOF_LONG 4
|
#define SIZEOF_LONG 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef SIZEOF_LONG_LONG
|
||||||
|
#define SIZEOF_LONG_LONG 8
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SIZEOF_WCHAR_T
|
#ifndef SIZEOF_WCHAR_T
|
||||||
/* Windows uses UTF-16 */
|
/* Windows uses UTF-16 */
|
||||||
#define SIZEOF_WCHAR_T 2
|
#define SIZEOF_WCHAR_T 2
|
||||||
|
@ -2287,7 +2293,12 @@ enum wxStandardID
|
||||||
wxID_OSX_HIDE = wxID_OSX_MENU_FIRST,
|
wxID_OSX_HIDE = wxID_OSX_MENU_FIRST,
|
||||||
wxID_OSX_HIDEOTHERS,
|
wxID_OSX_HIDEOTHERS,
|
||||||
wxID_OSX_SHOWALL,
|
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,
|
wxID_OSX_MENU_LAST = wxID_OSX_SHOWALL,
|
||||||
|
#endif
|
||||||
|
|
||||||
/* IDs used by generic file dialog (13 consecutive starting from this value) */
|
/* IDs used by generic file dialog (13 consecutive starting from this value) */
|
||||||
wxID_FILEDLGG = 5900,
|
wxID_FILEDLGG = 5900,
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#include "wx/toplevel.h"
|
#include "wx/toplevel.h"
|
||||||
#include "wx/containr.h"
|
#include "wx/containr.h"
|
||||||
|
#include "wx/sharedptr.h"
|
||||||
|
|
||||||
class WXDLLIMPEXP_FWD_CORE wxSizer;
|
class WXDLLIMPEXP_FWD_CORE wxSizer;
|
||||||
class WXDLLIMPEXP_FWD_CORE wxStdDialogButtonSizer;
|
class WXDLLIMPEXP_FWD_CORE wxStdDialogButtonSizer;
|
||||||
|
@ -402,24 +403,29 @@ class wxWindowModalDialogEventFunctor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxWindowModalDialogEventFunctor(const Functor& f)
|
wxWindowModalDialogEventFunctor(const Functor& f)
|
||||||
: m_f(f), m_wasCalled(false)
|
: m_f(new Functor(f))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void operator()(wxWindowModalDialogEvent& event)
|
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();
|
event.Skip();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_wasCalled = true;
|
|
||||||
m_f(event.GetReturnCode());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Functor m_f;
|
wxSharedPtr<Functor> m_f;
|
||||||
bool m_wasCalled;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Functor>
|
template<typename Functor>
|
||||||
|
@ -428,7 +434,7 @@ void wxDialogBase::ShowWindowModalThenDo(const Functor& onEndModal)
|
||||||
Bind(wxEVT_WINDOW_MODAL_DIALOG_CLOSED,
|
Bind(wxEVT_WINDOW_MODAL_DIALOG_CLOSED,
|
||||||
wxWindowModalDialogEventFunctor<Functor>(onEndModal));
|
wxWindowModalDialogEventFunctor<Functor>(onEndModal));
|
||||||
ShowWindowModal();
|
ShowWindowModal();
|
||||||
};
|
}
|
||||||
#endif // wxHAS_EVENT_BIND
|
#endif // wxHAS_EVENT_BIND
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -279,6 +279,9 @@ public:
|
||||||
// destroyed
|
// destroyed
|
||||||
void SetDocChildFrame(wxDocChildFrameAnyBase *docChildFrame);
|
void SetDocChildFrame(wxDocChildFrameAnyBase *docChildFrame);
|
||||||
|
|
||||||
|
// get the associated frame, may be NULL during destruction
|
||||||
|
wxDocChildFrameAnyBase* GetDocChildFrame() const { return m_docChildFrame; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// hook the document into event handlers chain here
|
// hook the document into event handlers chain here
|
||||||
virtual bool TryBefore(wxEvent& event);
|
virtual bool TryBefore(wxEvent& event);
|
||||||
|
@ -597,9 +600,10 @@ public:
|
||||||
m_childDocument = NULL;
|
m_childDocument = NULL;
|
||||||
m_childView = NULL;
|
m_childView = NULL;
|
||||||
m_win = 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)
|
wxDocChildFrameAnyBase(wxDocument *doc, wxView *view, wxWindow *win)
|
||||||
{
|
{
|
||||||
Create(doc, view, win);
|
Create(doc, view, win);
|
||||||
|
@ -638,6 +642,14 @@ public:
|
||||||
|
|
||||||
wxWindow *GetWindow() const { return m_win; }
|
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:
|
protected:
|
||||||
// we're not a wxEvtHandler but we provide this wxEvtHandler-like function
|
// 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
|
// 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
|
// allows us to avoid having any virtual functions in this class
|
||||||
wxWindow* m_win;
|
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);
|
wxDECLARE_NO_COPY_CLASS(wxDocChildFrameAnyBase);
|
||||||
};
|
};
|
||||||
|
@ -894,7 +910,11 @@ protected:
|
||||||
// hook the document manager into event handling chain here
|
// hook the document manager into event handling chain here
|
||||||
virtual bool TryBefore(wxEvent& event)
|
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:
|
private:
|
||||||
|
|
|
@ -163,9 +163,7 @@ public:
|
||||||
virtual bool IsCustomRenderer() const { return false; }
|
virtual bool IsCustomRenderer() const { return false; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
// Implementation only from now on.
|
||||||
// Called from {Cancel,Finish}Editing() to cleanup m_editorCtrl
|
|
||||||
void DestroyEditControl();
|
|
||||||
|
|
||||||
// Return the alignment of this renderer if it's specified (i.e. has value
|
// 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
|
// different from the default wxDVR_DEFAULT_ALIGNMENT) or the alignment of
|
||||||
|
@ -176,6 +174,10 @@ protected:
|
||||||
// wxDVR_DEFAULT_ALIGNMENT.
|
// wxDVR_DEFAULT_ALIGNMENT.
|
||||||
int GetEffectiveAlignment() const;
|
int GetEffectiveAlignment() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Called from {Cancel,Finish}Editing() to cleanup m_editorCtrl
|
||||||
|
void DestroyEditControl();
|
||||||
|
|
||||||
wxString m_variantType;
|
wxString m_variantType;
|
||||||
wxDataViewColumn *m_owner;
|
wxDataViewColumn *m_owner;
|
||||||
wxWeakRef<wxWindow> m_editorCtrl;
|
wxWeakRef<wxWindow> m_editorCtrl;
|
||||||
|
|
|
@ -2275,19 +2275,36 @@ private:
|
||||||
class WXDLLIMPEXP_CORE wxActivateEvent : public wxEvent
|
class WXDLLIMPEXP_CORE wxActivateEvent : public wxEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true, int Id = 0)
|
// Type of activation. For now we can only detect if it was by mouse or by
|
||||||
: wxEvent(Id, type)
|
// some other method and even this is only available under wxMSW.
|
||||||
{ m_active = active; }
|
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)
|
wxActivateEvent(const wxActivateEvent& event)
|
||||||
: wxEvent(event)
|
: wxEvent(event)
|
||||||
{ m_active = event.m_active; }
|
{
|
||||||
|
m_active = event.m_active;
|
||||||
|
m_activationReason = event.m_activationReason;
|
||||||
|
}
|
||||||
|
|
||||||
bool GetActive() const { return m_active; }
|
bool GetActive() const { return m_active; }
|
||||||
|
Reason GetActivationReason() const { return m_activationReason;}
|
||||||
|
|
||||||
virtual wxEvent *Clone() const { return new wxActivateEvent(*this); }
|
virtual wxEvent *Clone() const { return new wxActivateEvent(*this); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_active;
|
bool m_active;
|
||||||
|
Reason m_activationReason;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxActivateEvent)
|
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxActivateEvent)
|
||||||
|
|
|
@ -116,7 +116,8 @@
|
||||||
*/
|
*/
|
||||||
#if wxCHECK_GCC_VERSION(3, 2) || wxCHECK_VISUALC_VERSION(7) \
|
#if wxCHECK_GCC_VERSION(3, 2) || wxCHECK_VISUALC_VERSION(7) \
|
||||||
|| (defined(__SUNCC__) && __SUNCC__ >= 0x5100) \
|
|| (defined(__SUNCC__) && __SUNCC__ >= 0x5100) \
|
||||||
|| (defined(__xlC__) && __xlC__ >= 0x700)
|
|| (defined(__xlC__) && __xlC__ >= 0x700) \
|
||||||
|
|| defined(__INTELC__)
|
||||||
#define wxHAS_EVENT_BIND
|
#define wxHAS_EVENT_BIND
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
// constants
|
// constants
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(__VISUALC__) || defined(__INTELC__) || defined(__DIGITALMARS__)
|
#if defined(__VISUALC__) || defined(__DIGITALMARS__)
|
||||||
typedef int mode_t;
|
typedef int mode_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ enum wxPosixPermissions
|
||||||
#if defined(__VISUALC__)
|
#if defined(__VISUALC__)
|
||||||
#define wxHAS_HUGE_FILES 1
|
#define wxHAS_HUGE_FILES 1
|
||||||
#elif defined(__MINGW32__) || defined(__MINGW64__)
|
#elif defined(__MINGW32__) || defined(__MINGW64__)
|
||||||
#define wxHAS_HUGE_FILES 1
|
#define wxHAS_HUGE_FILES 1f
|
||||||
#elif defined(_LARGE_FILES)
|
#elif defined(_LARGE_FILES)
|
||||||
#define wxHAS_HUGE_FILES 1
|
#define wxHAS_HUGE_FILES 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -476,7 +476,6 @@ enum wxPosixPermissions
|
||||||
#define wxSeek lseek
|
#define wxSeek lseek
|
||||||
#define wxFsync fsync
|
#define wxFsync fsync
|
||||||
#define wxEof eof
|
#define wxEof eof
|
||||||
|
|
||||||
#define wxCRT_MkDir mkdir
|
#define wxCRT_MkDir mkdir
|
||||||
#define wxCRT_RmDir rmdir
|
#define wxCRT_RmDir rmdir
|
||||||
|
|
||||||
|
|
|
@ -142,9 +142,7 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxOSX_USE_CORE_TEXT
|
|
||||||
void Init(CTFontDescriptorRef descr);
|
void Init(CTFontDescriptorRef descr);
|
||||||
#endif
|
|
||||||
void Init(const wxNativeFontInfo& info);
|
void Init(const wxNativeFontInfo& info);
|
||||||
void Init(int size,
|
void Init(int size,
|
||||||
wxFontFamily family,
|
wxFontFamily family,
|
||||||
|
|
|
@ -66,6 +66,13 @@ enum wxFSWPathType
|
||||||
wxFSWPath_Tree // Watch a directory and all its children recursively.
|
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.
|
* Event containing information about file system change.
|
||||||
|
@ -77,24 +84,36 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_FSWATCHER,
|
||||||
class WXDLLIMPEXP_BASE wxFileSystemWatcherEvent: public wxEvent
|
class WXDLLIMPEXP_BASE wxFileSystemWatcherEvent: public wxEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// Constructor for any kind of events, also used as default ctor.
|
||||||
wxFileSystemWatcherEvent(int changeType = 0, int watchid = wxID_ANY) :
|
wxFileSystemWatcherEvent(int changeType = 0, int watchid = wxID_ANY) :
|
||||||
wxEvent(watchid, wxEVT_FSWATCHER),
|
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) :
|
int watchid = wxID_ANY) :
|
||||||
wxEvent(watchid, wxEVT_FSWATCHER),
|
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,
|
wxFileSystemWatcherEvent(int changeType,
|
||||||
const wxFileName& path, const wxFileName& newPath,
|
const wxFileName& path, const wxFileName& newPath,
|
||||||
int watchid = wxID_ANY) :
|
int watchid = wxID_ANY) :
|
||||||
wxEvent(watchid, wxEVT_FSWATCHER),
|
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_errorMsg = m_errorMsg.Clone();
|
||||||
evt->m_path = wxFileName(m_path.GetFullPath().Clone());
|
evt->m_path = wxFileName(m_path.GetFullPath().Clone());
|
||||||
evt->m_newPath = wxFileName(m_newPath.GetFullPath().Clone());
|
evt->m_newPath = wxFileName(m_newPath.GetFullPath().Clone());
|
||||||
|
evt->m_warningType = m_warningType;
|
||||||
return evt;
|
return evt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,6 +188,11 @@ public:
|
||||||
return m_errorMsg;
|
return m_errorMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxFSWWarningType GetWarningType() const
|
||||||
|
{
|
||||||
|
return m_warningType;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a wxString describing an event useful for debugging or testing
|
* Returns a wxString describing an event useful for debugging or testing
|
||||||
*/
|
*/
|
||||||
|
@ -175,6 +200,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_changeType;
|
int m_changeType;
|
||||||
|
wxFSWWarningType m_warningType;
|
||||||
wxFileName m_path;
|
wxFileName m_path;
|
||||||
wxFileName m_newPath;
|
wxFileName m_newPath;
|
||||||
wxString m_errorMsg;
|
wxString m_errorMsg;
|
||||||
|
|
|
@ -227,6 +227,9 @@ public: // utility functions not part of the API
|
||||||
// return the index of the given column in m_cols
|
// return the index of the given column in m_cols
|
||||||
int GetColumnIndex(const wxDataViewColumn *column) const;
|
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
|
// return the column displayed at the given position in the control
|
||||||
wxDataViewColumn *GetColumnAt(unsigned int pos) const;
|
wxDataViewColumn *GetColumnAt(unsigned int pos) const;
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
#if wxUSE_GRID
|
#if wxUSE_GRID
|
||||||
|
|
||||||
|
#include "wx/scopedptr.h"
|
||||||
|
|
||||||
class wxGridCellEditorEvtHandler : public wxEvtHandler
|
class wxGridCellEditorEvtHandler : public wxEvtHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -79,6 +79,9 @@ public:
|
||||||
// (default font is a larger and bold version of the normal one)
|
// (default font is a larger and bold version of the normal one)
|
||||||
virtual bool SetFont(const wxFont& font);
|
virtual bool SetFont(const wxFont& font);
|
||||||
|
|
||||||
|
// same thing with the colour: this affects the text colour
|
||||||
|
virtual bool SetForegroundColour(const wxColor& colour);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// info bar shouldn't have any border by default, the colour difference
|
// info bar shouldn't have any border by default, the colour difference
|
||||||
// between it and the main window separates it well enough
|
// between it and the main window separates it well enough
|
||||||
|
|
|
@ -60,8 +60,8 @@ public:
|
||||||
private:
|
private:
|
||||||
wxSize GetBitmapSize()
|
wxSize GetBitmapSize()
|
||||||
{
|
{
|
||||||
return m_bitmap.IsOk() ? wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight())
|
return m_bitmap.IsOk() ? m_bitmap.GetScaledSize()
|
||||||
: wxSize(16, 16); // this is completely arbitrary
|
: wxSize(16, 16); // this is completely arbitrary
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnPaint(wxPaintEvent& event);
|
void OnPaint(wxPaintEvent& event);
|
||||||
|
|
|
@ -103,7 +103,6 @@ public:
|
||||||
|
|
||||||
wxMask *GetMask() const;
|
wxMask *GetMask() const;
|
||||||
void SetMask( wxMask *mask );
|
void SetMask( wxMask *mask );
|
||||||
wxBitmap GetMaskBitmap() const;
|
|
||||||
|
|
||||||
wxBitmap GetSubBitmap( const wxRect& rect ) const;
|
wxBitmap GetSubBitmap( const wxRect& rect ) const;
|
||||||
|
|
||||||
|
|
|
@ -39,15 +39,13 @@ public:
|
||||||
virtual void EndModal( int retCode );
|
virtual void EndModal( int retCode );
|
||||||
virtual bool IsModal() const;
|
virtual bool IsModal() const;
|
||||||
|
|
||||||
// implementation
|
|
||||||
// --------------
|
|
||||||
|
|
||||||
bool m_modalShowing;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
|
bool m_modalShowing;
|
||||||
wxGUIEventLoop *m_modalLoop;
|
wxGUIEventLoop *m_modalLoop;
|
||||||
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
|
@ -16,6 +16,11 @@
|
||||||
#include "wx/gtk/private/string.h"
|
#include "wx/gtk/private/string.h"
|
||||||
#include "wx/gtk/private/gtk2-compat.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
|
// pango_version_check symbol is quite recent ATM (4/2007)... so we
|
||||||
// use our own wrapper which implements a smart trick.
|
// use our own wrapper which implements a smart trick.
|
||||||
// Use this function as you'd use pango_version_check:
|
// Use this function as you'd use pango_version_check:
|
||||||
|
|
|
@ -47,8 +47,6 @@ public:
|
||||||
virtual bool Enable( bool enable = true );
|
virtual bool Enable( bool enable = true );
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
void OnSize( wxSizeEvent &event );
|
|
||||||
|
|
||||||
int m_pos;
|
int m_pos;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -61,9 +59,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
typedef wxSpinButtonBase base_type;
|
typedef wxSpinButtonBase base_type;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxSpinButton)
|
DECLARE_DYNAMIC_CLASS(wxSpinButton)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // _WX_GTK_SPINBUTT_H_
|
||||||
// _WX_GTK_SPINBUTT_H_
|
|
||||||
|
|
|
@ -48,6 +48,11 @@ public:
|
||||||
|
|
||||||
virtual void SetMaxLength(unsigned long len);
|
virtual void SetMaxLength(unsigned long len);
|
||||||
|
|
||||||
|
#ifdef __WXGTK3__
|
||||||
|
virtual bool SetHint(const wxString& hint);
|
||||||
|
virtual wxString GetHint() const;
|
||||||
|
#endif
|
||||||
|
|
||||||
// implementation only from now on
|
// implementation only from now on
|
||||||
void SendMaxLenEvent();
|
void SendMaxLenEvent();
|
||||||
bool GTKEntryOnInsertText(const char* text);
|
bool GTKEntryOnInsertText(const char* text);
|
||||||
|
|
|
@ -510,7 +510,7 @@ public:
|
||||||
const wxString& GetLabel() const { return m_item.m_text; }
|
const wxString& GetLabel() const { return m_item.m_text; }
|
||||||
const wxString& GetText() const { return m_item.m_text; }
|
const wxString& GetText() const { return m_item.m_text; }
|
||||||
int GetImage() const { return m_item.m_image; }
|
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; }
|
long GetMask() const { return m_item.m_mask; }
|
||||||
const wxListItem& GetItem() const { return m_item; }
|
const wxListItem& GetItem() const { return m_item; }
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
#elif defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
|
#elif defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#define wxFinite(x) _finite(x)
|
#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
|
add more compilers with C99 support here: using C99 isfinite() is
|
||||||
preferable to using BSD-ish finite()
|
preferable to using BSD-ish finite()
|
||||||
|
|
|
@ -133,6 +133,9 @@ protected:
|
||||||
|
|
||||||
virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const;
|
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
|
// this is the implementation of GetEditHWND() which can also be used when
|
||||||
// we don't have the edit control, it simply returns NULL then
|
// we don't have the edit control, it simply returns NULL then
|
||||||
//
|
//
|
||||||
|
|
|
@ -121,6 +121,9 @@ protected:
|
||||||
// one
|
// one
|
||||||
virtual WXHBRUSH DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd);
|
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
|
// for controls like radiobuttons which are really composite this array
|
||||||
// holds the ids (not HWNDs!) of the sub controls
|
// holds the ids (not HWNDs!) of the sub controls
|
||||||
wxArrayLong m_subControls;
|
wxArrayLong m_subControls;
|
||||||
|
|
|
@ -54,7 +54,9 @@ public:
|
||||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
#if wxUSE_INTL
|
||||||
virtual wxLocaleInfo MSWGetFormat() const;
|
virtual wxLocaleInfo MSWGetFormat() const;
|
||||||
|
#endif // wxUSE_INTL
|
||||||
virtual bool MSWAllowsNone() const { return HasFlag(wxDP_ALLOWNONE); }
|
virtual bool MSWAllowsNone() const { return HasFlag(wxDP_ALLOWNONE); }
|
||||||
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch);
|
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch);
|
||||||
|
|
||||||
|
|
|
@ -55,12 +55,14 @@ protected:
|
||||||
// override these methods anyhow, it does work -- but is definitely ugly
|
// override these methods anyhow, it does work -- but is definitely ugly
|
||||||
// and need to be changed (but how?) in the future.
|
// and need to be changed (but how?) in the future.
|
||||||
|
|
||||||
|
#if wxUSE_INTL
|
||||||
// Override to return the date/time format used by this control.
|
// Override to return the date/time format used by this control.
|
||||||
virtual wxLocaleInfo MSWGetFormat() const /* = 0 */
|
virtual wxLocaleInfo MSWGetFormat() const /* = 0 */
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( "Unreachable" );
|
wxFAIL_MSG( "Unreachable" );
|
||||||
return wxLOCALE_TIME_FMT;
|
return wxLOCALE_TIME_FMT;
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_INTL
|
||||||
|
|
||||||
// Override to indicate whether we can have no date at all.
|
// Override to indicate whether we can have no date at all.
|
||||||
virtual bool MSWAllowsNone() const /* = 0 */
|
virtual bool MSWAllowsNone() const /* = 0 */
|
||||||
|
|
|
@ -19,7 +19,7 @@ EMIT(#define wxUSE_RC_MANIFEST 1)
|
||||||
EMIT(#define wxUSE_RC_MANIFEST 1)
|
EMIT(#define wxUSE_RC_MANIFEST 1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _M_AMD64
|
#if defined _M_AMD64 || defined __x86_64__
|
||||||
EMIT(#define WX_CPU_AMD64)
|
EMIT(#define WX_CPU_AMD64)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ EMIT(#define WX_CPU_AMD64)
|
||||||
EMIT(#define WX_CPU_ARM)
|
EMIT(#define WX_CPU_ARM)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _M_IA64
|
#if defined _M_IA64 || defined __ia64__
|
||||||
EMIT(#define WX_CPU_IA64)
|
EMIT(#define WX_CPU_IA64)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -664,7 +664,7 @@ typedef struct
|
||||||
#include <_mingw.h>
|
#include <_mingw.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
|
#ifdef __MINGW32_TOOLCHAIN__
|
||||||
typedef enum CommandStateChangeConstants {
|
typedef enum CommandStateChangeConstants {
|
||||||
CSC_UPDATECOMMANDS = (int) 0xFFFFFFFF,
|
CSC_UPDATECOMMANDS = (int) 0xFFFFFFFF,
|
||||||
CSC_NAVIGATEFORWARD = 0x1,
|
CSC_NAVIGATEFORWARD = 0x1,
|
||||||
|
|
|
@ -37,7 +37,12 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#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
|
// Needed when building with pure MS SDK
|
||||||
#define _CRTBLD
|
#define _CRTBLD
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -115,11 +115,22 @@ public:
|
||||||
// this object. The default is LOCALE_SYSTEM_DEFAULT.
|
// this object. The default is LOCALE_SYSTEM_DEFAULT.
|
||||||
void SetLCID(WXLCID lcid);
|
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.
|
public: // public for compatibility only, don't use m_dispatchPtr directly.
|
||||||
WXIDISPATCH* m_dispatchPtr;
|
WXIDISPATCH* m_dispatchPtr;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WXLCID m_lcid;
|
WXLCID m_lcid;
|
||||||
|
long m_convertVariantFlags;
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(wxAutomationObject);
|
wxDECLARE_NO_COPY_CLASS(wxAutomationObject);
|
||||||
};
|
};
|
||||||
|
|
|
@ -39,14 +39,10 @@ public:
|
||||||
// default copy ctor/assignment operators ok
|
// default copy ctor/assignment operators ok
|
||||||
|
|
||||||
// comparison (must have both versions)
|
// comparison (must have both versions)
|
||||||
bool operator==(wxDataFormatId format) const
|
bool operator==(wxDataFormatId format) const;
|
||||||
{ return m_format == (NativeFormat)format; }
|
bool operator!=(wxDataFormatId format) const;
|
||||||
bool operator!=(wxDataFormatId format) const
|
bool operator==(const wxDataFormat& format) const;
|
||||||
{ return m_format != (NativeFormat)format; }
|
bool operator!=(const wxDataFormat& format) const;
|
||||||
bool operator==(const wxDataFormat& format) const
|
|
||||||
{ return m_format == format.m_format; }
|
|
||||||
bool operator!=(const wxDataFormat& format) const
|
|
||||||
{ return m_format != format.m_format; }
|
|
||||||
|
|
||||||
// explicit and implicit conversions to NativeFormat which is one of
|
// explicit and implicit conversions to NativeFormat which is one of
|
||||||
// standard data types (implicit conversion is useful for preserving the
|
// standard data types (implicit conversion is useful for preserving the
|
||||||
|
|
|
@ -316,9 +316,25 @@ private:
|
||||||
SAFEARRAY* m_value;
|
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
|
#endif // wxUSE_VARIANT
|
||||||
|
|
||||||
// Convert string to Unicode
|
// Convert string to Unicode
|
||||||
|
|
|
@ -50,7 +50,9 @@ public:
|
||||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
#if wxUSE_INTL
|
||||||
virtual wxLocaleInfo MSWGetFormat() const;
|
virtual wxLocaleInfo MSWGetFormat() const;
|
||||||
|
#endif // wxUSE_INTL
|
||||||
virtual bool MSWAllowsNone() const { return false; }
|
virtual bool MSWAllowsNone() const { return false; }
|
||||||
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch);
|
virtual bool MSWOnDateTimeChange(const tagNMDATETIMECHANGE& dtch);
|
||||||
|
|
||||||
|
|
|
@ -304,6 +304,9 @@ private:
|
||||||
// item visually spans the entire breadth of the window then
|
// item visually spans the entire breadth of the window then
|
||||||
bool MSWIsOnItem(unsigned flags) const;
|
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)
|
// the hash storing the items attributes (indexed by item ids)
|
||||||
wxMapTreeAttr m_attrs;
|
wxMapTreeAttr m_attrs;
|
||||||
|
|
|
@ -206,7 +206,7 @@ public:
|
||||||
// to understand why does it work, look at SubclassWin() code and comments
|
// to understand why does it work, look at SubclassWin() code and comments
|
||||||
bool IsOfStandardClass() const { return m_oldWndProc != NULL; }
|
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;
|
wxWindow *FindItemByHWND(WXHWND hWnd, bool controlOnly = false) const;
|
||||||
|
|
||||||
// MSW only: true if this control is part of the main control
|
// MSW only: true if this control is part of the main control
|
||||||
|
@ -663,6 +663,15 @@ protected:
|
||||||
|
|
||||||
bool MSWEnableHWND(WXHWND hWnd, bool enable);
|
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:
|
private:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init();
|
void Init();
|
||||||
|
|
|
@ -129,18 +129,24 @@ public:
|
||||||
virtual short MacHandleAERApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
virtual short MacHandleAERApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
|
||||||
#endif
|
#endif
|
||||||
// in response of an openFiles message with Cocoa and an
|
// 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) ;
|
virtual void MacOpenFiles(const wxArrayString &fileNames) ;
|
||||||
// called by MacOpenFiles for each file.
|
// called by MacOpenFiles for each file.
|
||||||
virtual void MacOpenFile(const wxString &fileName) ;
|
virtual void MacOpenFile(const wxString &fileName) ;
|
||||||
// in response of a get-url apple event
|
// in response of a get-url apple event
|
||||||
virtual void MacOpenURL(const wxString &url) ;
|
virtual void MacOpenURL(const wxString &url) ;
|
||||||
// in response of a print-document apple event
|
// 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) ;
|
virtual void MacPrintFile(const wxString &fileName) ;
|
||||||
// in response of a open-application apple event
|
// in response of a open-application apple event
|
||||||
virtual void MacNewFile() ;
|
virtual void MacNewFile() ;
|
||||||
// in response of a reopen-application apple event
|
// in response of a reopen-application apple event
|
||||||
virtual void MacReopenApp() ;
|
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
|
#if wxOSX_USE_COCOA_OR_IPHONE
|
||||||
// immediately before the native event loop launches
|
// immediately before the native event loop launches
|
||||||
virtual void OSXOnWillFinishLaunching();
|
virtual void OSXOnWillFinishLaunching();
|
||||||
|
@ -153,9 +159,16 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_onInitResult;
|
bool m_onInitResult;
|
||||||
|
bool m_inited;
|
||||||
|
wxArrayString m_openFiles;
|
||||||
|
wxArrayString m_printFiles;
|
||||||
|
wxString m_getURL;
|
||||||
|
|
||||||
public:
|
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
|
#endif
|
||||||
|
|
||||||
// Hide the application windows the same as the system hide command would do it.
|
// Hide the application windows the same as the system hide command would do it.
|
||||||
|
|
|
@ -30,22 +30,7 @@
|
||||||
* text rendering system
|
* text rendering system
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
#define wxOSX_USE_ATSU_TEXT 1
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Audio System
|
* Audio System
|
||||||
|
|
|
@ -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)
|
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);
|
OSStatus GetAttributes (OptionBits* attributes);
|
||||||
#endif
|
|
||||||
OSStatus GetColumnWidth (DataBrowserPropertyID column, UInt16 *width ) const; // returns the column width in pixels
|
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 GetDefaultColumnWidth(UInt16 *width ) const; // returns the default column width in pixels
|
||||||
OSStatus GetDefaultRowHeight (UInt16 * height ) const;
|
OSStatus GetDefaultRowHeight (UInt16 * height ) const;
|
||||||
|
@ -166,9 +164,7 @@ public:
|
||||||
OSStatus GetRowHeight (DataBrowserItemID item , UInt16 *height) const;
|
OSStatus GetRowHeight (DataBrowserItemID item , UInt16 *height) const;
|
||||||
OSStatus GetScrollPosition (UInt32* top, UInt32 *left) 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);
|
OSStatus SetAttributes (OptionBits attributes);
|
||||||
#endif
|
|
||||||
OSStatus SetColumnWidth(DataBrowserPropertyID column, UInt16 width); // sets the column width in pixels
|
OSStatus SetColumnWidth(DataBrowserPropertyID column, UInt16 width); // sets the column width in pixels
|
||||||
OSStatus SetDefaultColumnWidth( UInt16 width );
|
OSStatus SetDefaultColumnWidth( UInt16 width );
|
||||||
OSStatus SetDefaultRowHeight( UInt16 height );
|
OSStatus SetDefaultRowHeight( UInt16 height );
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
// near future
|
// near future
|
||||||
//
|
//
|
||||||
|
|
||||||
#if ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
|
|
||||||
|
|
||||||
class WXDLLIMPEXP_ADV wxDrawerWindow : public wxTopLevelWindow
|
class WXDLLIMPEXP_ADV wxDrawerWindow : public wxTopLevelWindow
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxDrawerWindow)
|
DECLARE_DYNAMIC_CLASS(wxDrawerWindow)
|
||||||
|
@ -64,7 +62,4 @@ public:
|
||||||
wxDirection GetCurrentEdge() const; // not necessarily the preferred, due to screen constraints
|
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_
|
|
||||||
|
|
|
@ -13,11 +13,6 @@
|
||||||
#ifndef _WX_PRIVATE_H_
|
#ifndef _WX_PRIVATE_H_
|
||||||
#define _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
|
#if wxUSE_GUI
|
||||||
|
|
||||||
#include "wx/osx/uma.h"
|
#include "wx/osx/uma.h"
|
||||||
|
@ -29,10 +24,6 @@ typedef SInt32 SRefCon;
|
||||||
|
|
||||||
// app.h
|
// 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
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
// filefn.h
|
// filefn.h
|
||||||
|
@ -269,12 +260,6 @@ ControlActionUPP GetwxMacLiveScrollbarActionProc();
|
||||||
|
|
||||||
// additional optional event defines
|
// 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
|
class WXDLLIMPEXP_CORE wxMacControl : public wxWidgetImpl
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
|
|
|
@ -41,33 +41,14 @@
|
||||||
* text rendering system
|
* text rendering system
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
#define wxOSX_USE_ATSU_TEXT 0
|
||||||
|
|
||||||
#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
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Audio System
|
* Audio System
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
#define wxOSX_USE_QUICKTIME 0
|
||||||
#define wxOSX_USE_QUICKTIME 0
|
#define wxOSX_USE_AUDIOTOOLBOX 1
|
||||||
#define wxOSX_USE_AUDIOTOOLBOX 1
|
|
||||||
#else // platform < 10.5
|
|
||||||
#define wxOSX_USE_QUICKTIME 1
|
|
||||||
#define wxOSX_USE_AUDIOTOOLBOX 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* turning off capabilities that don't work under cocoa yet
|
* turning off capabilities that don't work under cocoa yet
|
||||||
|
|
|
@ -19,12 +19,6 @@
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#endif
|
#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
|
// shared between Cocoa and Carbon
|
||||||
//
|
//
|
||||||
|
@ -160,6 +154,7 @@ public :
|
||||||
virtual void cursorUpdate(WX_NSEvent event, WXWidget slf, void* _cmd);
|
virtual void cursorUpdate(WX_NSEvent event, WXWidget slf, void* _cmd);
|
||||||
virtual void keyEvent(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 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 performKeyEquivalent(WX_NSEvent event, WXWidget slf, void* _cmd);
|
||||||
virtual bool acceptsFirstResponder(WXWidget slf, void* _cmd);
|
virtual bool acceptsFirstResponder(WXWidget slf, void* _cmd);
|
||||||
virtual bool becomeFirstResponder(WXWidget slf, void* _cmd);
|
virtual bool becomeFirstResponder(WXWidget slf, void* _cmd);
|
||||||
|
|
|
@ -45,11 +45,7 @@
|
||||||
#define WX_GMTOFF_IN_TM 1
|
#define WX_GMTOFF_IN_TM 1
|
||||||
#define HAVE_PW_GECOS 1
|
#define HAVE_PW_GECOS 1
|
||||||
#define HAVE_DLOPEN 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
|
#define HAVE_CXA_DEMANGLE 1
|
||||||
#endif
|
|
||||||
#define HAVE_GETTIMEOFDAY 1
|
#define HAVE_GETTIMEOFDAY 1
|
||||||
#define HAVE_FSYNC 1
|
#define HAVE_FSYNC 1
|
||||||
#define HAVE_ROUND 1
|
#define HAVE_ROUND 1
|
||||||
|
@ -108,11 +104,7 @@
|
||||||
#define HAVE_WCHAR_H 1
|
#define HAVE_WCHAR_H 1
|
||||||
/* better to use the built-in CF conversions, also avoid iconv versioning problems */
|
/* better to use the built-in CF conversions, also avoid iconv versioning problems */
|
||||||
/* #undef HAVE_ICONV */
|
/* #undef HAVE_ICONV */
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
|
|
||||||
#define ICONV_CONST const
|
|
||||||
#else
|
|
||||||
#define ICONV_CONST
|
#define ICONV_CONST
|
||||||
#endif
|
|
||||||
#define HAVE_LANGINFO_H 1
|
#define HAVE_LANGINFO_H 1
|
||||||
#define HAVE_WCSRTOMBS 1
|
#define HAVE_WCSRTOMBS 1
|
||||||
#define HAVE_FPUTWS 1
|
#define HAVE_FPUTWS 1
|
||||||
|
@ -131,9 +123,9 @@
|
||||||
#define WXWIN_OS_DESCRIPTION "Darwin 7.9.0 Power Macintosh"
|
#define WXWIN_OS_DESCRIPTION "Darwin 7.9.0 Power Macintosh"
|
||||||
#define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org"
|
#define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org"
|
||||||
#define PACKAGE_NAME "wxWidgets"
|
#define PACKAGE_NAME "wxWidgets"
|
||||||
#define PACKAGE_STRING "wxWidgets 3.0.0"
|
#define PACKAGE_STRING "wxWidgets 3.1.0"
|
||||||
#define PACKAGE_TARNAME "wxwidgets"
|
#define PACKAGE_TARNAME "wxwidgets"
|
||||||
#define PACKAGE_VERSION "3.0.0"
|
#define PACKAGE_VERSION "3.1.0"
|
||||||
|
|
||||||
// for regex
|
// for regex
|
||||||
#define WX_NO_REGEX_ADVANCED 1
|
#define WX_NO_REGEX_ADVANCED 1
|
||||||
|
|
|
@ -30,7 +30,9 @@ public:
|
||||||
|
|
||||||
#ifdef __WXOSX_COCOA__
|
#ifdef __WXOSX_COCOA__
|
||||||
// skip wxGUIEventLoop to avoid missing Enter/Exit notifications
|
// skip wxGUIEventLoop to avoid missing Enter/Exit notifications
|
||||||
int Run() { return wxCFEventLoop::Run(); }
|
virtual int Run() { return wxCFEventLoop::Run(); }
|
||||||
|
|
||||||
|
virtual bool ProcessIdle();
|
||||||
#endif
|
#endif
|
||||||
protected:
|
protected:
|
||||||
virtual void OSXDoRun();
|
virtual void OSXDoRun();
|
||||||
|
|
|
@ -152,9 +152,7 @@ public:
|
||||||
CGFontRef OSXGetCGFont() const;
|
CGFontRef OSXGetCGFont() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxOSX_USE_CORE_TEXT
|
|
||||||
CTFontRef OSXGetCTFont() const;
|
CTFontRef OSXGetCTFont() const;
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxOSX_USE_ATSU_TEXT
|
#if wxOSX_USE_ATSU_TEXT
|
||||||
// Returns an ATSUStyle not ATSUStyle*
|
// Returns an ATSUStyle not ATSUStyle*
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
* under a certain platform
|
* under a certain platform
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define wxOSX_USE_CORE_TEXT 1
|
|
||||||
#define wxOSX_USE_ATSU_TEXT 0
|
#define wxOSX_USE_ATSU_TEXT 0
|
||||||
#define wxHAS_OPENGL_ES
|
#define wxHAS_OPENGL_ES
|
||||||
|
|
||||||
|
@ -362,6 +361,11 @@
|
||||||
#define wxUSE_RICHTOOLTIP 0
|
#define wxUSE_RICHTOOLTIP 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_WEBVIEW
|
||||||
|
#undef wxUSE_WEBVIEW
|
||||||
|
#define wxUSE_WEBVIEW 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* _WX_OSX_IPHONE_CHKCONF_H_ */
|
/* _WX_OSX_IPHONE_CHKCONF_H_ */
|
||||||
|
|
||||||
|
|
|
@ -146,6 +146,10 @@ public:
|
||||||
// call this function to update it (m_menuBarFrame should be !NULL)
|
// call this function to update it (m_menuBarFrame should be !NULL)
|
||||||
void Refresh(bool eraseBackground = true, const wxRect *rect = 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 void SetAutoWindowMenu( bool enable ) { s_macAutoWindowMenu = enable ; }
|
||||||
static bool GetAutoWindowMenu() { return s_macAutoWindowMenu ; }
|
static bool GetAutoWindowMenu() { return s_macAutoWindowMenu ; }
|
||||||
|
|
||||||
|
|
|
@ -74,10 +74,6 @@ public:
|
||||||
virtual void MarkDirty();
|
virtual void MarkDirty();
|
||||||
virtual void DiscardEdits();
|
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
|
// text control under some platforms supports the text styles: these
|
||||||
// methods apply the given text style to the given selection or to
|
// methods apply the given text style to the given selection or to
|
||||||
// set/get the style which will be used for all appended text
|
// set/get the style which will be used for all appended text
|
||||||
|
@ -151,7 +147,6 @@ protected:
|
||||||
|
|
||||||
private :
|
private :
|
||||||
wxMenu *m_privateContextMenu;
|
wxMenu *m_privateContextMenu;
|
||||||
wxString m_hintString;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
|
@ -81,6 +81,10 @@ public:
|
||||||
|
|
||||||
virtual bool SendMaxLenEvent();
|
virtual bool SendMaxLenEvent();
|
||||||
|
|
||||||
|
// set the grayed out hint text
|
||||||
|
virtual bool SetHint(const wxString& hint);
|
||||||
|
virtual wxString GetHint() const;
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
|
@ -102,6 +106,8 @@ protected:
|
||||||
// need to make this public because of the current implementation via callbacks
|
// need to make this public because of the current implementation via callbacks
|
||||||
unsigned long m_maxLength;
|
unsigned long m_maxLength;
|
||||||
|
|
||||||
|
private:
|
||||||
|
wxString m_hintString;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _WX_OSX_TEXTENTRY_H_
|
#endif // _WX_OSX_TEXTENTRY_H_
|
||||||
|
|
|
@ -95,8 +95,13 @@
|
||||||
# endif
|
# endif
|
||||||
#endif /* __WINDOWS__ */
|
#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__
|
# ifdef __WXMSW__
|
||||||
# undef __WXMSW__
|
# undef __WXMSW__
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -156,7 +156,7 @@ protected:
|
||||||
wxDECLARE_NO_COPY_CLASS(wxTextMeasureBase);
|
wxDECLARE_NO_COPY_CLASS(wxTextMeasureBase);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Include the platform dependant class declaration, if any.
|
// Include the platform dependent class declaration, if any.
|
||||||
#if defined(__WXGTK20__)
|
#if defined(__WXGTK20__)
|
||||||
#include "wx/gtk/private/textmeasure.h"
|
#include "wx/gtk/private/textmeasure.h"
|
||||||
#elif defined(__WXMSW__)
|
#elif defined(__WXMSW__)
|
||||||
|
|
|
@ -80,7 +80,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// (re)init
|
// (re)init
|
||||||
void Init() { m_defaultState = false; }
|
void Init() { m_count = 0; m_defaultState = false; }
|
||||||
|
|
||||||
// the total number of items we handle
|
// the total number of items we handle
|
||||||
unsigned m_count;
|
unsigned m_count;
|
||||||
|
|
|
@ -79,8 +79,6 @@ struct WXDLLIMPEXP_BASE wxStringOperationsUtf8
|
||||||
template<typename Iterator>
|
template<typename Iterator>
|
||||||
static void DecIter(Iterator& i)
|
static void DecIter(Iterator& i)
|
||||||
{
|
{
|
||||||
wxASSERT( IsValidUtf8LeadByte(*i) );
|
|
||||||
|
|
||||||
// Non-lead bytes are all in the 0x80..0xBF range (i.e. 10xxxxxx in
|
// 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
|
// 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
|
// either < 0x80 (i.e. 0xxxxxxx in binary) or 0xC0..0xFF (11xxxxxx in
|
||||||
|
|
|
@ -748,7 +748,7 @@ struct wxArgNormalizer<const wxUniChar&> : public wxArgNormalizer<wchar_t>
|
||||||
{
|
{
|
||||||
wxArgNormalizer(const wxUniChar& s,
|
wxArgNormalizer(const wxUniChar& s,
|
||||||
const wxFormatString *fmt, unsigned index)
|
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
|
// for wchar_t, default handler does the right thing
|
||||||
|
|
|
@ -205,6 +205,9 @@ enum wxTextAttrFlags
|
||||||
wxTEXT_ATTR_EFFECTS = 0x00800000,
|
wxTEXT_ATTR_EFFECTS = 0x00800000,
|
||||||
wxTEXT_ATTR_OUTLINE_LEVEL = 0x01000000,
|
wxTEXT_ATTR_OUTLINE_LEVEL = 0x01000000,
|
||||||
|
|
||||||
|
wxTEXT_ATTR_AVOID_PAGE_BREAK_BEFORE = 0x20000000,
|
||||||
|
wxTEXT_ATTR_AVOID_PAGE_BREAK_AFTER = 0x40000000,
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Character and paragraph combined styles
|
* Character and paragraph combined styles
|
||||||
*/
|
*/
|
||||||
|
@ -216,7 +219,8 @@ enum wxTextAttrFlags
|
||||||
wxTEXT_ATTR_PARAGRAPH = \
|
wxTEXT_ATTR_PARAGRAPH = \
|
||||||
(wxTEXT_ATTR_ALIGNMENT|wxTEXT_ATTR_LEFT_INDENT|wxTEXT_ATTR_RIGHT_INDENT|wxTEXT_ATTR_TABS|\
|
(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_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)
|
wxTEXT_ATTR_ALL = (wxTEXT_ATTR_CHARACTER|wxTEXT_ATTR_PARAGRAPH)
|
||||||
};
|
};
|
||||||
|
@ -262,7 +266,9 @@ enum wxTextAttrEffects
|
||||||
wxTEXT_ATTR_EFFECT_OUTLINE = 0x00000040,
|
wxTEXT_ATTR_EFFECT_OUTLINE = 0x00000040,
|
||||||
wxTEXT_ATTR_EFFECT_ENGRAVE = 0x00000080,
|
wxTEXT_ATTR_EFFECT_ENGRAVE = 0x00000080,
|
||||||
wxTEXT_ATTR_EFFECT_SUPERSCRIPT = 0x00000100,
|
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
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -161,7 +161,7 @@ private:
|
||||||
|
|
||||||
return ToHi8bit(c);
|
return ToHi8bit(c);
|
||||||
#else
|
#else
|
||||||
return c;
|
return wx_truncate_cast(char, c);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ public:
|
||||||
if ( m_capacity + increment > n )
|
if ( m_capacity + increment > n )
|
||||||
n = m_capacity + increment;
|
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;
|
m_capacity = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,10 +26,10 @@
|
||||||
|
|
||||||
/* NB: this file is parsed by automatic tools so don't change its format! */
|
/* NB: this file is parsed by automatic tools so don't change its format! */
|
||||||
#define wxMAJOR_VERSION 3
|
#define wxMAJOR_VERSION 3
|
||||||
#define wxMINOR_VERSION 0
|
#define wxMINOR_VERSION 1
|
||||||
#define wxRELEASE_NUMBER 0
|
#define wxRELEASE_NUMBER 0
|
||||||
#define wxSUBRELEASE_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 */
|
/* nothing to update below this line when updating the version */
|
||||||
/* ---------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------- */
|
||||||
|
|
|
@ -565,24 +565,6 @@ WXDLLIMPEXP_BASE wchar_t * wxCRT_GetenvW(const wchar_t *name);
|
||||||
/* wcstoi doesn't exist */
|
/* wcstoi doesn't exist */
|
||||||
#endif
|
#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
|
time.h
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
|
@ -238,7 +238,17 @@
|
||||||
#define wxCRT_ScanfA scanf
|
#define wxCRT_ScanfA scanf
|
||||||
#define wxCRT_SscanfA sscanf
|
#define wxCRT_SscanfA sscanf
|
||||||
#define wxCRT_FscanfA fscanf
|
#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)
|
#if defined(wxNEED_WPRINTF)
|
||||||
int wxCRT_ScanfW(const wchar_t *format, ...);
|
int wxCRT_ScanfW(const wchar_t *format, ...);
|
||||||
|
|
|
@ -173,6 +173,10 @@ wxAppConsoleBase::~wxAppConsoleBase()
|
||||||
|
|
||||||
bool wxAppConsoleBase::Initialize(int& WXUNUSED(argc), wxChar **WXUNUSED(argv))
|
bool wxAppConsoleBase::Initialize(int& WXUNUSED(argc), wxChar **WXUNUSED(argv))
|
||||||
{
|
{
|
||||||
|
#if defined(__WINDOWS__) && !defined(__WXWINCE__)
|
||||||
|
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -329,16 +329,11 @@ void wxCommandProcessor::ClearCommands()
|
||||||
|
|
||||||
bool wxCommandProcessor::IsDirty() const
|
bool wxCommandProcessor::IsDirty() const
|
||||||
{
|
{
|
||||||
if ( m_commands.empty() )
|
|
||||||
{
|
|
||||||
// If we have never been modified, we can't be dirty.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !m_lastSavedCommand )
|
if ( !m_lastSavedCommand )
|
||||||
{
|
{
|
||||||
// If we have been modified but have never been saved, we're dirty.
|
// We have never been saved, so we are dirty if and only if we have any
|
||||||
return true;
|
// commands at all.
|
||||||
|
return m_currentCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !m_currentCommand )
|
if ( !m_currentCommand )
|
||||||
|
|
|
@ -584,7 +584,7 @@ wxSize wxStaticBitmapBase::DoGetBestSize() const
|
||||||
wxSize best;
|
wxSize best;
|
||||||
wxBitmap bmp = GetBitmap();
|
wxBitmap bmp = GetBitmap();
|
||||||
if ( bmp.IsOk() )
|
if ( bmp.IsOk() )
|
||||||
best = wxSize(bmp.GetWidth(), bmp.GetHeight());
|
best = bmp.GetScaledSize();
|
||||||
else
|
else
|
||||||
// this is completely arbitrary
|
// this is completely arbitrary
|
||||||
best = wxSize(16, 16);
|
best = wxSize(16, 16);
|
||||||
|
|
|
@ -330,28 +330,49 @@ int wxDataViewModel::Compare( const wxDataViewItem &item1, const wxDataViewItem
|
||||||
{
|
{
|
||||||
long l1 = value1.GetLong();
|
long l1 = value1.GetLong();
|
||||||
long l2 = value2.GetLong();
|
long l2 = value2.GetLong();
|
||||||
long res = l1-l2;
|
if (l1 < l2)
|
||||||
if (res)
|
return -1;
|
||||||
return res;
|
else if (l1 > l2)
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else if (value1.GetType() == wxT("double"))
|
else if (value1.GetType() == wxT("double"))
|
||||||
{
|
{
|
||||||
double d1 = value1.GetDouble();
|
double d1 = value1.GetDouble();
|
||||||
double d2 = value2.GetDouble();
|
double d2 = value2.GetDouble();
|
||||||
if (d1 < d2)
|
if (d1 < d2)
|
||||||
return 1;
|
|
||||||
if (d1 > d2)
|
|
||||||
return -1;
|
return -1;
|
||||||
|
else if (d1 > d2)
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else if (value1.GetType() == wxT("datetime"))
|
else if (value1.GetType() == wxT("datetime"))
|
||||||
{
|
{
|
||||||
wxDateTime dt1 = value1.GetDateTime();
|
wxDateTime dt1 = value1.GetDateTime();
|
||||||
wxDateTime dt2 = value2.GetDateTime();
|
wxDateTime dt2 = value2.GetDateTime();
|
||||||
if (dt1.IsEarlierThan(dt2))
|
if (dt1.IsEarlierThan(dt2))
|
||||||
return 1;
|
|
||||||
if (dt2.IsEarlierThan(dt1))
|
|
||||||
return -1;
|
return -1;
|
||||||
|
if (dt2.IsEarlierThan(dt1))
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
else if (value1.GetType() == wxT("bool"))
|
||||||
|
{
|
||||||
|
bool b1 = value1.GetBool();
|
||||||
|
bool b2 = value2.GetBool();
|
||||||
|
|
||||||
|
if (b1 != b2)
|
||||||
|
return b1 ? 1 : -1;
|
||||||
|
}
|
||||||
|
else if (value1.GetType() == wxT("wxDataViewIconText"))
|
||||||
|
{
|
||||||
|
wxDataViewIconText iconText1, iconText2;
|
||||||
|
|
||||||
|
iconText1 << value1;
|
||||||
|
iconText2 << value2;
|
||||||
|
|
||||||
|
int res = iconText1.GetText().Cmp(iconText2.GetText());
|
||||||
|
if (res != 0)
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// items must be different
|
// items must be different
|
||||||
wxUIntPtr id1 = wxPtrToUInt(item1.GetID()),
|
wxUIntPtr id1 = wxPtrToUInt(item1.GetID()),
|
||||||
|
@ -1769,6 +1790,11 @@ void wxDataViewListStore::DeleteAllItems()
|
||||||
Reset( 0 );
|
Reset( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxDataViewListStore::ClearColumns()
|
||||||
|
{
|
||||||
|
m_cols.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void wxDataViewListStore::SetItemData( const wxDataViewItem& item, wxUIntPtr data )
|
void wxDataViewListStore::SetItemData( const wxDataViewItem& item, wxUIntPtr data )
|
||||||
{
|
{
|
||||||
wxDataViewListStoreLine* line = m_data[GetRow(item)];
|
wxDataViewListStoreLine* line = m_data[GetRow(item)];
|
||||||
|
@ -1780,7 +1806,7 @@ void wxDataViewListStore::SetItemData( const wxDataViewItem& item, wxUIntPtr dat
|
||||||
wxUIntPtr wxDataViewListStore::GetItemData( const wxDataViewItem& item ) const
|
wxUIntPtr wxDataViewListStore::GetItemData( const wxDataViewItem& item ) const
|
||||||
{
|
{
|
||||||
wxDataViewListStoreLine* line = m_data[GetRow(item)];
|
wxDataViewListStoreLine* line = m_data[GetRow(item)];
|
||||||
if (!line) return static_cast<wxUIntPtr>(NULL);
|
if (!line) return 0;
|
||||||
|
|
||||||
return line->GetData();
|
return line->GetData();
|
||||||
}
|
}
|
||||||
|
@ -1872,6 +1898,12 @@ bool wxDataViewListCtrl::AppendColumn( wxDataViewColumn *col )
|
||||||
return AppendColumn( col, "string" );
|
return AppendColumn( col, "string" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxDataViewListCtrl::ClearColumns()
|
||||||
|
{
|
||||||
|
GetStore()->ClearColumns();
|
||||||
|
return wxDataViewCtrl::ClearColumns();
|
||||||
|
}
|
||||||
|
|
||||||
wxDataViewColumn *wxDataViewListCtrl::AppendTextColumn( const wxString &label,
|
wxDataViewColumn *wxDataViewListCtrl::AppendTextColumn( const wxString &label,
|
||||||
wxDataViewCellMode mode, int width, wxAlignment align, int flags )
|
wxDataViewCellMode mode, int width, wxAlignment align, int flags )
|
||||||
{
|
{
|
||||||
|
|
|
@ -148,7 +148,7 @@ void wxBufferedDC::UnMask()
|
||||||
int width = m_area.GetWidth(),
|
int width = m_area.GetWidth(),
|
||||||
height = m_area.GetHeight();
|
height = m_area.GetHeight();
|
||||||
|
|
||||||
if (! m_style & wxBUFFER_VIRTUAL_AREA)
|
if (!(m_style & wxBUFFER_VIRTUAL_AREA))
|
||||||
{
|
{
|
||||||
int widthDC,
|
int widthDC,
|
||||||
heightDC;
|
heightDC;
|
||||||
|
@ -157,7 +157,8 @@ void wxBufferedDC::UnMask()
|
||||||
height = wxMin(height, heightDC);
|
height = wxMin(height, heightDC);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_dc->Blit(0, 0, width, height, this, -x, -y);
|
const wxPoint origin = GetLogicalOrigin();
|
||||||
|
m_dc->Blit(-origin.x, -origin.y, width, height, this, -x, -y);
|
||||||
m_dc = NULL;
|
m_dc = NULL;
|
||||||
|
|
||||||
if ( m_style & wxBUFFER_USES_SHARED_BUFFER )
|
if ( m_style & wxBUFFER_USES_SHARED_BUFFER )
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#include "wx/wfstream.h"
|
#include "wx/wfstream.h"
|
||||||
#include "wx/filename.h"
|
#include "wx/filename.h"
|
||||||
|
|
||||||
|
#include "wx/private/markupparser.h"
|
||||||
|
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
// Global utilities
|
// Global utilities
|
||||||
// ----------------------------------------------------------
|
// ----------------------------------------------------------
|
||||||
|
@ -293,7 +295,7 @@ void wxSVGFileDCImpl::DoDrawRotatedText(const wxString& sText, wxCoord x, wxCoor
|
||||||
//text will be solid, unless alpha value isn't opaque in the foreground colour
|
//text will be solid, unless alpha value isn't opaque in the foreground colour
|
||||||
s += wxBrushString(m_textForegroundColour) + wxPenString(m_textForegroundColour);
|
s += wxBrushString(m_textForegroundColour) + wxPenString(m_textForegroundColour);
|
||||||
sTmp.Printf ( wxT("stroke-width:0;\" transform=\"rotate( %s %d %d ) \" >"), NumStr(-angle), x,y );
|
sTmp.Printf ( wxT("stroke-width:0;\" transform=\"rotate( %s %d %d ) \" >"), NumStr(-angle), x,y );
|
||||||
s += sTmp + sText + wxT("</text> ") + wxT("\n");
|
s += sTmp + wxMarkupParser::Quote(sText) + wxT("</text> ") + wxT("\n");
|
||||||
if (m_OK)
|
if (m_OK)
|
||||||
{
|
{
|
||||||
write(s);
|
write(s);
|
||||||
|
|
|
@ -517,7 +517,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxWindowModalDialogEvent, wxCommandEvent)
|
||||||
|
|
||||||
void wxDialogBase::ShowWindowModal ()
|
void wxDialogBase::ShowWindowModal ()
|
||||||
{
|
{
|
||||||
ShowModal();
|
int retval = ShowModal();
|
||||||
|
// wxWindowModalDialogEvent relies on GetReturnCode() returning correct
|
||||||
|
// code. Rather than doing it manually in all ShowModal() overrides for
|
||||||
|
// native dialogs (and getting accidentally broken again), set it here.
|
||||||
|
// The worst that can happen is that it will be set twice to the same
|
||||||
|
// value.
|
||||||
|
SetReturnCode(retval);
|
||||||
SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED );
|
SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2027,11 +2027,16 @@ bool wxDocChildFrameAnyBase::TryProcessEvent(wxEvent& event)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Store a (non-owning) pointer to the last processed event here to be able
|
||||||
|
// to recognize this event again if it bubbles up to the parent frame, see
|
||||||
|
// the code in wxDocParentFrameAnyBase::TryProcessEvent().
|
||||||
|
m_lastEvent = &event;
|
||||||
|
|
||||||
// Forward the event to the document manager which will, in turn, forward
|
// Forward the event to the document manager which will, in turn, forward
|
||||||
// it to its active view which must be our m_childView.
|
// it to its active view which must be our m_childView.
|
||||||
//
|
//
|
||||||
// Notice that we do things in this roundabout way to guarantee the correct
|
// Notice that we do things in this roundabout way to guarantee the correct
|
||||||
// event handlers call order: first the document, then the new and then the
|
// event handlers call order: first the document, then the view and then the
|
||||||
// document manager itself. And if we forwarded the event directly to the
|
// document manager itself. And if we forwarded the event directly to the
|
||||||
// view, then the document manager would do it once again when we forwarded
|
// view, then the document manager would do it once again when we forwarded
|
||||||
// it to it.
|
// it to it.
|
||||||
|
@ -2079,28 +2084,13 @@ bool wxDocParentFrameAnyBase::TryProcessEvent(wxEvent& event)
|
||||||
// already forwarded the event to wxDocManager, check for this:
|
// already forwarded the event to wxDocManager, check for this:
|
||||||
if ( wxView* const view = m_docManager->GetAnyUsableView() )
|
if ( wxView* const view = m_docManager->GetAnyUsableView() )
|
||||||
{
|
{
|
||||||
wxWindow* win = view->GetFrame();
|
wxDocChildFrameAnyBase* const childFrame = view->GetDocChildFrame();
|
||||||
if ( win && win != m_frame )
|
if ( childFrame && childFrame->HasAlreadyProcessed(event) )
|
||||||
{
|
return false;
|
||||||
// Notice that we intentionally don't use wxGetTopLevelParent()
|
|
||||||
// here because we want to check both for the case of a child
|
|
||||||
// "frame" (e.g. MDI child frame or notebook page) inside this TLW
|
|
||||||
// and a separate child TLW frame (as used in the SDI mode) here.
|
|
||||||
for ( win = win->GetParent(); win; win = win->GetParent() )
|
|
||||||
{
|
|
||||||
if ( win == m_frame )
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//else: This view is directly associated with the parent frame (which
|
|
||||||
// can happen in the so called "single" mode in which only one
|
|
||||||
// document can be opened and so is managed by the parent frame
|
|
||||||
// itself), there can be no child frame in play so we must forward
|
|
||||||
// the event to wxDocManager ourselves.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// But forward the event to wxDocManager ourselves if there are no views at
|
// But forward the event to wxDocManager ourselves if there are no views at
|
||||||
// all or if we are the frame's view ourselves.
|
// all or if this event hadn't been sent to the child frame previously.
|
||||||
return m_docManager->ProcessEventLocally(event);
|
return m_docManager->ProcessEventLocally(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -315,14 +315,20 @@ static bool IsUNCPath(const wxString& path, wxPathFormat format)
|
||||||
!IsDOSPathSep(path[2u]);
|
!IsDOSPathSep(path[2u]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __WIN32__
|
// Under Unix-ish systems (basically everything except Windows but we can't
|
||||||
|
// just test for non-__WIN32__ because Cygwin defines it, yet we want to use
|
||||||
|
// lstat() under it, so test for all the rest explicitly) we may work either
|
||||||
|
// with the file itself or its target if it's a symbolic link and we should
|
||||||
|
// dereference it, as determined by wxFileName::ShouldFollowLink() and the
|
||||||
|
// absence of the wxFILE_EXISTS_NO_FOLLOW flag. StatAny() can be used to stat
|
||||||
|
// the appropriate file with an extra twist that it also works when there is no
|
||||||
|
// wxFileName object at all, as is the case in static methods.
|
||||||
|
|
||||||
// Under Unix-ish systems (basically everything except Windows) we may work
|
#if defined(__UNIX_LIKE__) || defined(__WXMAC__) || defined(__OS2__) || (defined(__DOS__) && defined(__WATCOMC__))
|
||||||
// either with the file itself or its target if it's a symbolic link and we
|
#define wxHAVE_LSTAT
|
||||||
// should dereference it, as determined by wxFileName::ShouldFollowLink() and
|
#endif
|
||||||
// the absence of the wxFILE_EXISTS_NO_FOLLOW flag. StatAny() can be used to
|
|
||||||
// stat the appropriate file with an extra twist that it also works when there
|
#ifdef wxHAVE_LSTAT
|
||||||
// is no wxFileName object at all, as is the case in static methods.
|
|
||||||
|
|
||||||
// Private implementation, don't call directly, use one of the overloads below.
|
// Private implementation, don't call directly, use one of the overloads below.
|
||||||
bool DoStatAny(wxStructStat& st, wxString path, bool dereference)
|
bool DoStatAny(wxStructStat& st, wxString path, bool dereference)
|
||||||
|
@ -363,7 +369,7 @@ bool StatAny(wxStructStat& st, const wxFileName& fn)
|
||||||
return DoStatAny(st, fn.GetFullPath(), fn.ShouldFollowLink());
|
return DoStatAny(st, fn.GetFullPath(), fn.ShouldFollowLink());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !__WIN32__
|
#endif // wxHAVE_LSTAT
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// private constants
|
// private constants
|
||||||
|
@ -1851,7 +1857,7 @@ bool wxFileName::SameAs(const wxFileName& filepath, wxPathFormat format) const
|
||||||
if ( fn1.GetFullPath() == fn2.GetFullPath() )
|
if ( fn1.GetFullPath() == fn2.GetFullPath() )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
#if defined(__UNIX__)
|
#ifdef wxHAVE_LSTAT
|
||||||
wxStructStat st1, st2;
|
wxStructStat st1, st2;
|
||||||
if ( StatAny(st1, fn1) && StatAny(st2, fn2) )
|
if ( StatAny(st1, fn1) && StatAny(st2, fn2) )
|
||||||
{
|
{
|
||||||
|
@ -1859,7 +1865,7 @@ bool wxFileName::SameAs(const wxFileName& filepath, wxPathFormat format) const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//else: It's not an error if one or both files don't exist.
|
//else: It's not an error if one or both files don't exist.
|
||||||
#endif // defined __UNIX__
|
#endif // wxHAVE_LSTAT
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2752,7 +2758,7 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#elif defined(__UNIX_LIKE__) || defined(__WXMAC__) || defined(__OS2__) || (defined(__DOS__) && defined(__WATCOMC__))
|
#elif defined(wxHAVE_LSTAT)
|
||||||
// no need to test for IsDir() here
|
// no need to test for IsDir() here
|
||||||
wxStructStat stBuf;
|
wxStructStat stBuf;
|
||||||
if ( StatAny(stBuf, *this) )
|
if ( StatAny(stBuf, *this) )
|
||||||
|
|
|
@ -67,6 +67,24 @@ bool wxFileDialogBase::Create(wxWindow *parent,
|
||||||
m_wildCard = wildCard;
|
m_wildCard = wildCard;
|
||||||
|
|
||||||
m_parent = parent;
|
m_parent = parent;
|
||||||
|
|
||||||
|
#ifdef __WXOSX__
|
||||||
|
/*
|
||||||
|
[DS]
|
||||||
|
Remove the (for OS X unnecessary) wxFD_FILE_MUST_EXIST flag. Using it
|
||||||
|
causes problems when having an extra panel (either a custom one or
|
||||||
|
by showing the filetype filters through calling
|
||||||
|
wxSystemOptions::SetOption(wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES, 1) ).
|
||||||
|
Presumably the style flag conflicts with other style flags and an
|
||||||
|
assert in wxRegion::DoOffset is triggered later on.
|
||||||
|
Another solution was to override GetWindowStyleFlag() to not include
|
||||||
|
wxFD_FILE_MUST_EXIST in its return value, but as other wxFileDialog
|
||||||
|
style flags (that are actually used) dont't seem to cause problems
|
||||||
|
this seemed an easier solution.
|
||||||
|
*/
|
||||||
|
style &= ~wxFD_FILE_MUST_EXIST;
|
||||||
|
#endif
|
||||||
|
|
||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
m_filterIndex = 0;
|
m_filterIndex = 0;
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxFileSystemWatcherEvent, wxEvent);
|
||||||
|
|
||||||
wxString wxFileSystemWatcherEvent::ToString() const
|
wxString wxFileSystemWatcherEvent::ToString() const
|
||||||
{
|
{
|
||||||
|
if (IsError())
|
||||||
|
{
|
||||||
|
return wxString::Format("FSW_EVT type=%d (%s) message='%s'", m_changeType,
|
||||||
|
GetFSWEventChangeTypeName(m_changeType), GetErrorDescription());
|
||||||
|
}
|
||||||
return wxString::Format("FSW_EVT type=%d (%s) path='%s'", m_changeType,
|
return wxString::Format("FSW_EVT type=%d (%s) path='%s'", m_changeType,
|
||||||
GetFSWEventChangeTypeName(m_changeType), GetPath().GetFullPath());
|
GetFSWEventChangeTypeName(m_changeType), GetPath().GetFullPath());
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,7 +333,7 @@ void wxColourDatabase::Initialize()
|
||||||
{wxT("LIGHT GREY"), 192, 192, 192},
|
{wxT("LIGHT GREY"), 192, 192, 192},
|
||||||
{wxT("LIGHT STEEL BLUE"), 143, 143, 188},
|
{wxT("LIGHT STEEL BLUE"), 143, 143, 188},
|
||||||
{wxT("LIME GREEN"), 50, 204, 50},
|
{wxT("LIME GREEN"), 50, 204, 50},
|
||||||
{wxT("LIGHT MAGENTA"), 255, 0, 255},
|
{wxT("LIGHT MAGENTA"), 255, 119, 255},
|
||||||
{wxT("MAGENTA"), 255, 0, 255},
|
{wxT("MAGENTA"), 255, 0, 255},
|
||||||
{wxT("MAROON"), 142, 35, 107},
|
{wxT("MAROON"), 142, 35, 107},
|
||||||
{wxT("MEDIUM AQUAMARINE"), 50, 204, 153},
|
{wxT("MEDIUM AQUAMARINE"), 50, 204, 153},
|
||||||
|
|
|
@ -423,21 +423,25 @@ wxMenuItem *wxMenuBase::Remove(wxMenuItem *item)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( item, NULL, wxT("invalid item in wxMenu::Remove") );
|
wxCHECK_MSG( item, NULL, wxT("invalid item in wxMenu::Remove") );
|
||||||
|
|
||||||
return DoRemove(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxMenuItem *wxMenuBase::DoRemove(wxMenuItem *item)
|
|
||||||
{
|
|
||||||
wxMenuItemList::compatibility_iterator node = m_items.Find(item);
|
wxMenuItemList::compatibility_iterator node = m_items.Find(item);
|
||||||
|
|
||||||
// if we get here, the item is valid or one of Remove() functions is broken
|
// if we get here, the item is valid or one of Remove() functions is broken
|
||||||
wxCHECK_MSG( node, NULL, wxT("bug in wxMenu::Remove logic") );
|
wxCHECK_MSG( node, NULL, wxT("removing item not in the menu?") );
|
||||||
|
|
||||||
|
// call DoRemove() before removing the item from the list of items as the
|
||||||
|
// existing code in port-specific implementation may rely on the item still
|
||||||
|
// being there (this is the case for at least wxMSW)
|
||||||
|
wxMenuItem* const item2 = DoRemove(item);
|
||||||
|
|
||||||
// we detach the item, but we do delete the list node (i.e. don't call
|
// we detach the item, but we do delete the list node (i.e. don't call
|
||||||
// DetachNode() here!)
|
// DetachNode() here!)
|
||||||
m_items.Erase(node);
|
m_items.Erase(node);
|
||||||
|
|
||||||
// item isn't attached to anything any more
|
return item2;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxMenuItem *wxMenuBase::DoRemove(wxMenuItem *item)
|
||||||
|
{
|
||||||
item->SetMenu(NULL);
|
item->SetMenu(NULL);
|
||||||
wxMenu *submenu = item->GetSubMenu();
|
wxMenu *submenu = item->GetSubMenu();
|
||||||
if ( submenu )
|
if ( submenu )
|
||||||
|
@ -459,7 +463,7 @@ bool wxMenuBase::Delete(wxMenuItem *item)
|
||||||
|
|
||||||
bool wxMenuBase::DoDelete(wxMenuItem *item)
|
bool wxMenuBase::DoDelete(wxMenuItem *item)
|
||||||
{
|
{
|
||||||
wxMenuItem *item2 = DoRemove(item);
|
wxMenuItem *item2 = Remove(item);
|
||||||
wxCHECK_MSG( item2, false, wxT("failed to delete menu item") );
|
wxCHECK_MSG( item2, false, wxT("failed to delete menu item") );
|
||||||
|
|
||||||
// don't delete the submenu
|
// don't delete the submenu
|
||||||
|
@ -479,7 +483,7 @@ bool wxMenuBase::Destroy(wxMenuItem *item)
|
||||||
|
|
||||||
bool wxMenuBase::DoDestroy(wxMenuItem *item)
|
bool wxMenuBase::DoDestroy(wxMenuItem *item)
|
||||||
{
|
{
|
||||||
wxMenuItem *item2 = DoRemove(item);
|
wxMenuItem *item2 = Remove(item);
|
||||||
wxCHECK_MSG( item2, false, wxT("failed to delete menu item") );
|
wxCHECK_MSG( item2, false, wxT("failed to delete menu item") );
|
||||||
|
|
||||||
delete item2;
|
delete item2;
|
||||||
|
|
|
@ -1357,7 +1357,25 @@ wxSocketEventFlags wxSocketImpl::Select(wxSocketEventFlags flags,
|
||||||
|
|
||||||
wxSocketEventFlags detected = 0;
|
wxSocketEventFlags detected = 0;
|
||||||
if ( preadfds && wxFD_ISSET(m_fd, preadfds) )
|
if ( preadfds && wxFD_ISSET(m_fd, preadfds) )
|
||||||
detected |= wxSOCKET_INPUT_FLAG;
|
{
|
||||||
|
// check for the case of a server socket waiting for connection
|
||||||
|
if ( m_server && (flags & wxSOCKET_CONNECTION_FLAG) )
|
||||||
|
{
|
||||||
|
int error;
|
||||||
|
SOCKOPTLEN_T len = sizeof(error);
|
||||||
|
m_establishing = false;
|
||||||
|
getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (char*)&error, &len);
|
||||||
|
|
||||||
|
if ( error )
|
||||||
|
detected = wxSOCKET_LOST_FLAG;
|
||||||
|
else
|
||||||
|
detected |= wxSOCKET_CONNECTION_FLAG;
|
||||||
|
}
|
||||||
|
else // not called to get non-blocking accept() status
|
||||||
|
{
|
||||||
|
detected |= wxSOCKET_INPUT_FLAG;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( pwritefds && wxFD_ISSET(m_fd, pwritefds) )
|
if ( pwritefds && wxFD_ISSET(m_fd, pwritefds) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -227,42 +227,43 @@ bool wxTextAttr::operator== (const wxTextAttr& attr) const
|
||||||
{
|
{
|
||||||
return GetFlags() == attr.GetFlags() &&
|
return GetFlags() == attr.GetFlags() &&
|
||||||
|
|
||||||
GetTextColour() == attr.GetTextColour() &&
|
(!HasTextColour() || (GetTextColour() == attr.GetTextColour())) &&
|
||||||
GetBackgroundColour() == attr.GetBackgroundColour() &&
|
(!HasBackgroundColour() || (GetBackgroundColour() == attr.GetBackgroundColour())) &&
|
||||||
|
|
||||||
GetAlignment() == attr.GetAlignment() &&
|
(!HasAlignment() || (GetAlignment() == attr.GetAlignment())) &&
|
||||||
GetLeftIndent() == attr.GetLeftIndent() &&
|
(!HasLeftIndent() || (GetLeftIndent() == attr.GetLeftIndent() &&
|
||||||
GetLeftSubIndent() == attr.GetLeftSubIndent() &&
|
GetLeftSubIndent() == attr.GetLeftSubIndent())) &&
|
||||||
GetRightIndent() == attr.GetRightIndent() &&
|
(!HasRightIndent() || (GetRightIndent() == attr.GetRightIndent())) &&
|
||||||
TabsEq(GetTabs(), attr.GetTabs()) &&
|
(!HasTabs() || (TabsEq(GetTabs(), attr.GetTabs()))) &&
|
||||||
|
|
||||||
GetParagraphSpacingAfter() == attr.GetParagraphSpacingAfter() &&
|
(!HasParagraphSpacingAfter() || (GetParagraphSpacingAfter() == attr.GetParagraphSpacingAfter())) &&
|
||||||
GetParagraphSpacingBefore() == attr.GetParagraphSpacingBefore() &&
|
(!HasParagraphSpacingBefore() || (GetParagraphSpacingBefore() == attr.GetParagraphSpacingBefore())) &&
|
||||||
GetLineSpacing() == attr.GetLineSpacing() &&
|
(!HasLineSpacing() || (GetLineSpacing() == attr.GetLineSpacing())) &&
|
||||||
GetCharacterStyleName() == attr.GetCharacterStyleName() &&
|
(!HasCharacterStyleName() || (GetCharacterStyleName() == attr.GetCharacterStyleName())) &&
|
||||||
GetParagraphStyleName() == attr.GetParagraphStyleName() &&
|
(!HasParagraphStyleName() || (GetParagraphStyleName() == attr.GetParagraphStyleName())) &&
|
||||||
GetListStyleName() == attr.GetListStyleName() &&
|
(!HasListStyleName() || (GetListStyleName() == attr.GetListStyleName())) &&
|
||||||
|
|
||||||
GetBulletStyle() == attr.GetBulletStyle() &&
|
(!HasBulletStyle() || (GetBulletStyle() == attr.GetBulletStyle())) &&
|
||||||
GetBulletText() == attr.GetBulletText() &&
|
(!HasBulletText() || (GetBulletText() == attr.GetBulletText())) &&
|
||||||
GetBulletNumber() == attr.GetBulletNumber() &&
|
(!HasBulletNumber() || (GetBulletNumber() == attr.GetBulletNumber())) &&
|
||||||
GetBulletFont() == attr.GetBulletFont() &&
|
(GetBulletFont() == attr.GetBulletFont()) &&
|
||||||
GetBulletName() == attr.GetBulletName() &&
|
(!HasBulletName() || (GetBulletName() == attr.GetBulletName())) &&
|
||||||
|
|
||||||
GetTextEffects() == attr.GetTextEffects() &&
|
(!HasTextEffects() || (GetTextEffects() == attr.GetTextEffects() &&
|
||||||
GetTextEffectFlags() == attr.GetTextEffectFlags() &&
|
GetTextEffectFlags() == attr.GetTextEffectFlags())) &&
|
||||||
|
|
||||||
GetOutlineLevel() == attr.GetOutlineLevel() &&
|
(!HasOutlineLevel() || (GetOutlineLevel() == attr.GetOutlineLevel())) &&
|
||||||
|
|
||||||
GetFontSize() == attr.GetFontSize() &&
|
(!HasFontSize() || (GetFontSize() == attr.GetFontSize())) &&
|
||||||
GetFontStyle() == attr.GetFontStyle() &&
|
(!HasFontItalic() || (GetFontStyle() == attr.GetFontStyle())) &&
|
||||||
GetFontWeight() == attr.GetFontWeight() &&
|
(!HasFontWeight() || (GetFontWeight() == attr.GetFontWeight())) &&
|
||||||
GetFontUnderlined() == attr.GetFontUnderlined() &&
|
(!HasFontUnderlined() || (GetFontUnderlined() == attr.GetFontUnderlined())) &&
|
||||||
GetFontFaceName() == attr.GetFontFaceName() &&
|
(!HasFontStrikethrough() || (GetFontStrikethrough() == attr.GetFontStrikethrough())) &&
|
||||||
GetFontEncoding() == attr.GetFontEncoding() &&
|
(!HasFontFaceName() || (GetFontFaceName() == attr.GetFontFaceName())) &&
|
||||||
GetFontFamily() == attr.GetFontFamily() &&
|
(!HasFontEncoding() || (GetFontEncoding() == attr.GetFontEncoding())) &&
|
||||||
|
(!HasFontFamily() || (GetFontFamily() == attr.GetFontFamily())) &&
|
||||||
|
|
||||||
GetURL() == attr.GetURL();
|
(!HasURL() || (GetURL() == attr.GetURL()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Partial equality test. Only returns false if an attribute doesn't match.
|
// Partial equality test. Only returns false if an attribute doesn't match.
|
||||||
|
@ -393,7 +394,7 @@ bool wxTextAttr::EqPartial(const wxTextAttr& attr, bool weakTest) const
|
||||||
|
|
||||||
if (HasTextEffects() && attr.HasTextEffects())
|
if (HasTextEffects() && attr.HasTextEffects())
|
||||||
{
|
{
|
||||||
if (!BitlistsEqPartial(GetTextEffects(), attr.GetTextEffects(), attr.GetTextEffectFlags()))
|
if (!BitlistsEqPartial(GetTextEffects(), attr.GetTextEffects(), GetTextEffectFlags()))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,6 +818,19 @@ bool wxTextAttr::RemoveStyle(wxTextAttr& destStyle, const wxTextAttr& style)
|
||||||
int flags = style.GetFlags();
|
int flags = style.GetFlags();
|
||||||
int destFlags = destStyle.GetFlags();
|
int destFlags = destStyle.GetFlags();
|
||||||
|
|
||||||
|
// We must treat text effects specially, since we must remove only some.
|
||||||
|
if (style.HasTextEffects() && (style.GetTextEffectFlags() != 0))
|
||||||
|
{
|
||||||
|
int newTextEffectFlags = destStyle.GetTextEffectFlags() & ~style.GetTextEffectFlags();
|
||||||
|
int newTextEffects = destStyle.GetTextEffects() & ~style.GetTextEffectFlags();
|
||||||
|
destStyle.SetTextEffects(newTextEffects);
|
||||||
|
destStyle.SetTextEffectFlags(newTextEffectFlags);
|
||||||
|
|
||||||
|
// Don't remove wxTEXT_ATTR_EFFECTS unless the resulting flags are zero
|
||||||
|
if (newTextEffectFlags != 0)
|
||||||
|
flags &= ~wxTEXT_ATTR_EFFECTS;
|
||||||
|
}
|
||||||
|
|
||||||
destStyle.SetFlags(destFlags & ~flags);
|
destStyle.SetFlags(destFlags & ~flags);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -927,7 +941,7 @@ bool wxTextAreaBase::DoSaveFile(const wxString& filename, int WXUNUSED(fileType)
|
||||||
{
|
{
|
||||||
#if wxUSE_FFILE
|
#if wxUSE_FFILE
|
||||||
wxFFile file(filename, wxT("w"));
|
wxFFile file(filename, wxT("w"));
|
||||||
if ( file.IsOpened() && file.Write(GetValue(), *wxConvCurrent) )
|
if ( file.IsOpened() && file.Write(GetValue()) )
|
||||||
{
|
{
|
||||||
// if it worked, save for future calls
|
// if it worked, save for future calls
|
||||||
m_filename = filename;
|
m_filename = filename;
|
||||||
|
|
|
@ -208,8 +208,8 @@ bool wxTextFile::OnRead(const wxMBConv& conv)
|
||||||
|
|
||||||
// now break the buffer in lines
|
// now break the buffer in lines
|
||||||
|
|
||||||
// last processed character, we need to know if it was a CR or not
|
// was the last processed character a CR?
|
||||||
wxChar chLast = '\0';
|
bool lastWasCR = false;
|
||||||
|
|
||||||
// the beginning of the current line, changes inside the loop
|
// the beginning of the current line, changes inside the loop
|
||||||
wxString::const_iterator lineStart = str.begin();
|
wxString::const_iterator lineStart = str.begin();
|
||||||
|
@ -221,7 +221,7 @@ bool wxTextFile::OnRead(const wxMBConv& conv)
|
||||||
{
|
{
|
||||||
case '\n':
|
case '\n':
|
||||||
// could be a DOS or Unix EOL
|
// could be a DOS or Unix EOL
|
||||||
if ( chLast == '\r' )
|
if ( lastWasCR )
|
||||||
{
|
{
|
||||||
if ( p - 1 >= lineStart )
|
if ( p - 1 >= lineStart )
|
||||||
{
|
{
|
||||||
|
@ -239,10 +239,11 @@ bool wxTextFile::OnRead(const wxMBConv& conv)
|
||||||
}
|
}
|
||||||
|
|
||||||
lineStart = p + 1;
|
lineStart = p + 1;
|
||||||
|
lastWasCR = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '\r':
|
case '\r':
|
||||||
if ( chLast == '\r' )
|
if ( lastWasCR )
|
||||||
{
|
{
|
||||||
// Mac empty line
|
// Mac empty line
|
||||||
AddLine(wxEmptyString, wxTextFileType_Mac);
|
AddLine(wxEmptyString, wxTextFileType_Mac);
|
||||||
|
@ -250,10 +251,12 @@ bool wxTextFile::OnRead(const wxMBConv& conv)
|
||||||
}
|
}
|
||||||
//else: we don't know what this is yet -- could be a Mac EOL or
|
//else: we don't know what this is yet -- could be a Mac EOL or
|
||||||
// start of DOS EOL so wait for next char
|
// start of DOS EOL so wait for next char
|
||||||
|
|
||||||
|
lastWasCR = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if ( chLast == '\r' )
|
if ( lastWasCR )
|
||||||
{
|
{
|
||||||
// Mac line termination
|
// Mac line termination
|
||||||
if ( p - 1 >= lineStart )
|
if ( p - 1 >= lineStart )
|
||||||
|
@ -267,16 +270,31 @@ bool wxTextFile::OnRead(const wxMBConv& conv)
|
||||||
}
|
}
|
||||||
lineStart = p;
|
lineStart = p;
|
||||||
}
|
}
|
||||||
|
lastWasCR = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
chLast = ch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// anything in the last line?
|
// anything in the last line?
|
||||||
if ( lineStart != end )
|
if ( lineStart != end )
|
||||||
{
|
{
|
||||||
// add unterminated last line
|
// add the last line, notice that it may have been terminated with CR
|
||||||
AddLine(wxString(lineStart, end), wxTextFileType_None);
|
// as we don't end the line immediately when we see a CR, as it could
|
||||||
|
// be followed by a LF.
|
||||||
|
wxString lastLine(lineStart, end);
|
||||||
|
wxTextFileType lastType;
|
||||||
|
if ( lastWasCR )
|
||||||
|
{
|
||||||
|
// last line had Mac EOL, exclude it from the string
|
||||||
|
lastLine.RemoveLast();
|
||||||
|
lastType = wxTextFileType_Mac;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// last line wasn't terminated at all
|
||||||
|
lastType = wxTextFileType_None;
|
||||||
|
}
|
||||||
|
|
||||||
|
AddLine(lastLine, lastType);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -28,11 +28,26 @@ namespace
|
||||||
|
|
||||||
// All thread info objects are stored in a global list so that they are
|
// All thread info objects are stored in a global list so that they are
|
||||||
// freed when global objects are destroyed and no memory leaks are reported.
|
// freed when global objects are destroyed and no memory leaks are reported.
|
||||||
wxCriticalSection g_csAllThreadInfos;
|
|
||||||
typedef wxVector< wxSharedPtr<wxThreadSpecificInfo> > wxAllThreadInfos;
|
|
||||||
wxAllThreadInfos g_allThreadInfos;
|
|
||||||
|
|
||||||
// Pointer to currenct thread's instance
|
// Notice that we must be using accessor functions instead of simple global
|
||||||
|
// variables here as this code could be executed during global initialization
|
||||||
|
// time, i.e. before any globals in this module were initialzied.
|
||||||
|
inline wxCriticalSection& GetAllThreadInfosCS()
|
||||||
|
{
|
||||||
|
static wxCriticalSection s_csAllThreadInfos;
|
||||||
|
|
||||||
|
return s_csAllThreadInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef wxVector< wxSharedPtr<wxThreadSpecificInfo> > wxAllThreadInfos;
|
||||||
|
inline wxAllThreadInfos& GetAllThreadInfos()
|
||||||
|
{
|
||||||
|
static wxAllThreadInfos s_allThreadInfos;
|
||||||
|
|
||||||
|
return s_allThreadInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pointer to the current thread's instance
|
||||||
wxTLS_TYPE(wxThreadSpecificInfo*) g_thisThreadInfo;
|
wxTLS_TYPE(wxThreadSpecificInfo*) g_thisThreadInfo;
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
@ -43,8 +58,8 @@ wxThreadSpecificInfo& wxThreadSpecificInfo::Get()
|
||||||
if ( !wxTLS_VALUE(g_thisThreadInfo) )
|
if ( !wxTLS_VALUE(g_thisThreadInfo) )
|
||||||
{
|
{
|
||||||
wxTLS_VALUE(g_thisThreadInfo) = new wxThreadSpecificInfo;
|
wxTLS_VALUE(g_thisThreadInfo) = new wxThreadSpecificInfo;
|
||||||
wxCriticalSectionLocker lock(g_csAllThreadInfos);
|
wxCriticalSectionLocker lock(GetAllThreadInfosCS());
|
||||||
g_allThreadInfos.push_back(
|
GetAllThreadInfos().push_back(
|
||||||
wxSharedPtr<wxThreadSpecificInfo>(wxTLS_VALUE(g_thisThreadInfo)));
|
wxSharedPtr<wxThreadSpecificInfo>(wxTLS_VALUE(g_thisThreadInfo)));
|
||||||
}
|
}
|
||||||
return *wxTLS_VALUE(g_thisThreadInfo);
|
return *wxTLS_VALUE(g_thisThreadInfo);
|
||||||
|
@ -55,15 +70,15 @@ void wxThreadSpecificInfo::ThreadCleanUp()
|
||||||
if ( !wxTLS_VALUE(g_thisThreadInfo) )
|
if ( !wxTLS_VALUE(g_thisThreadInfo) )
|
||||||
return; // nothing to do, not used by this thread at all
|
return; // nothing to do, not used by this thread at all
|
||||||
|
|
||||||
// find this thread's instance in g_allThreadInfos and destroy it
|
// find this thread's instance in GetAllThreadInfos() and destroy it
|
||||||
wxCriticalSectionLocker lock(g_csAllThreadInfos);
|
wxCriticalSectionLocker lock(GetAllThreadInfosCS());
|
||||||
for ( wxAllThreadInfos::iterator i = g_allThreadInfos.begin();
|
for ( wxAllThreadInfos::iterator i = GetAllThreadInfos().begin();
|
||||||
i != g_allThreadInfos.end();
|
i != GetAllThreadInfos().end();
|
||||||
++i )
|
++i )
|
||||||
{
|
{
|
||||||
if ( i->get() == wxTLS_VALUE(g_thisThreadInfo) )
|
if ( i->get() == wxTLS_VALUE(g_thisThreadInfo) )
|
||||||
{
|
{
|
||||||
g_allThreadInfos.erase(i);
|
GetAllThreadInfos().erase(i);
|
||||||
wxTLS_VALUE(g_thisThreadInfo) = NULL;
|
wxTLS_VALUE(g_thisThreadInfo) = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ wxTopLevelWindowBase::~wxTopLevelWindowBase()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxWindow * const win = wxDynamicCast(*i, wxWindow);
|
wxWindow * const win = wxDynamicCast(*i, wxWindow);
|
||||||
if ( win && win->GetParent() == this )
|
if ( win && wxGetTopLevelParent(win->GetParent()) == this )
|
||||||
{
|
{
|
||||||
wxPendingDelete.erase(i);
|
wxPendingDelete.erase(i);
|
||||||
|
|
||||||
|
|
|
@ -630,7 +630,14 @@ static bool ReadAll(wxInputStream *is, wxArrayString& output)
|
||||||
// the stream could be already at EOF or in wxSTREAM_BROKEN_PIPE state
|
// the stream could be already at EOF or in wxSTREAM_BROKEN_PIPE state
|
||||||
is->Reset();
|
is->Reset();
|
||||||
|
|
||||||
wxTextInputStream tis(*is);
|
// Notice that wxTextInputStream doesn't work correctly with wxConvAuto
|
||||||
|
// currently, see #14720, so use the current locale conversion explicitly
|
||||||
|
// under assumption that any external program should be using it too.
|
||||||
|
wxTextInputStream tis(*is, " \t"
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
, wxConvLibc
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
|
@ -1198,6 +1205,7 @@ wxString wxStripMenuCodes(const wxString& in, int flags)
|
||||||
if ( ++it == in.end() )
|
if ( ++it == in.end() )
|
||||||
{
|
{
|
||||||
wxLogDebug(wxT("Invalid menu string '%s'"), in.c_str());
|
wxLogDebug(wxT("Invalid menu string '%s'"), in.c_str());
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1414,7 +1422,7 @@ wxVersionInfo wxGetLibraryVersionInfo()
|
||||||
wxMINOR_VERSION,
|
wxMINOR_VERSION,
|
||||||
wxRELEASE_NUMBER,
|
wxRELEASE_NUMBER,
|
||||||
msg,
|
msg,
|
||||||
wxS("Copyright (c) 1995-2011 wxWidgets team"));
|
wxS("Copyright (c) 1995-2013 wxWidgets team"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxInfoMessageBox(wxWindow* parent)
|
void wxInfoMessageBox(wxWindow* parent)
|
||||||
|
|
|
@ -89,7 +89,7 @@ WXDLLIMPEXP_BASE size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n)
|
||||||
#ifdef HAVE_WCSRTOMBS
|
#ifdef HAVE_WCSRTOMBS
|
||||||
return mbsrtowcs(buf, &psz, n, &mbstate);
|
return mbsrtowcs(buf, &psz, n, &mbstate);
|
||||||
#else
|
#else
|
||||||
return wxMbstowcs(buf, psz, n);
|
return mbstowcs(buf, psz, n);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ WXDLLIMPEXP_BASE size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n)
|
||||||
#ifdef HAVE_WCSRTOMBS
|
#ifdef HAVE_WCSRTOMBS
|
||||||
return mbsrtowcs(NULL, &psz, 0, &mbstate);
|
return mbsrtowcs(NULL, &psz, 0, &mbstate);
|
||||||
#else
|
#else
|
||||||
return wxMbstowcs(NULL, psz, 0);
|
return mbstowcs(NULL, psz, 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,14 +122,14 @@ WXDLLIMPEXP_BASE size_t wxWC2MB(char *buf, const wchar_t *pwz, size_t n)
|
||||||
#ifdef HAVE_WCSRTOMBS
|
#ifdef HAVE_WCSRTOMBS
|
||||||
return wcsrtombs(buf, &pwz, n, &mbstate);
|
return wcsrtombs(buf, &pwz, n, &mbstate);
|
||||||
#else
|
#else
|
||||||
return wxWcstombs(buf, pwz, n);
|
return wcstombs(buf, pwz, n);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_WCSRTOMBS
|
#ifdef HAVE_WCSRTOMBS
|
||||||
return wcsrtombs(NULL, &pwz, 0, &mbstate);
|
return wcsrtombs(NULL, &pwz, 0, &mbstate);
|
||||||
#else
|
#else
|
||||||
return wxWcstombs(NULL, pwz, 0);
|
return wcstombs(NULL, pwz, 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -737,54 +737,6 @@ int wxVsnprintf(wchar_t *str, size_t size, const wxString& format, va_list argpt
|
||||||
// ctype.h stuff (currently unused)
|
// ctype.h stuff (currently unused)
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifdef wxNEED_WX_MBSTOWCS
|
|
||||||
|
|
||||||
WXDLLIMPEXP_BASE size_t wxMbstowcs (wchar_t * out, const char * in, size_t outlen)
|
|
||||||
{
|
|
||||||
if (!out)
|
|
||||||
{
|
|
||||||
size_t outsize = 0;
|
|
||||||
while(*in++)
|
|
||||||
outsize++;
|
|
||||||
return outsize;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* origin = in;
|
|
||||||
|
|
||||||
while (outlen-- && *in)
|
|
||||||
{
|
|
||||||
*out++ = (wchar_t) *in++;
|
|
||||||
}
|
|
||||||
|
|
||||||
*out = '\0';
|
|
||||||
|
|
||||||
return in - origin;
|
|
||||||
}
|
|
||||||
|
|
||||||
WXDLLIMPEXP_BASE size_t wxWcstombs (char * out, const wchar_t * in, size_t outlen)
|
|
||||||
{
|
|
||||||
if (!out)
|
|
||||||
{
|
|
||||||
size_t outsize = 0;
|
|
||||||
while(*in++)
|
|
||||||
outsize++;
|
|
||||||
return outsize;
|
|
||||||
}
|
|
||||||
|
|
||||||
const wchar_t* origin = in;
|
|
||||||
|
|
||||||
while (outlen-- && *in)
|
|
||||||
{
|
|
||||||
*out++ = (char) *in++;
|
|
||||||
}
|
|
||||||
|
|
||||||
*out = '\0';
|
|
||||||
|
|
||||||
return in - origin;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // wxNEED_WX_MBSTOWCS
|
|
||||||
|
|
||||||
#ifndef wxCRT_StrdupA
|
#ifndef wxCRT_StrdupA
|
||||||
WXDLLIMPEXP_BASE char *wxCRT_StrdupA(const char *s)
|
WXDLLIMPEXP_BASE char *wxCRT_StrdupA(const char *s)
|
||||||
{
|
{
|
||||||
|
|
|
@ -76,9 +76,10 @@ wxXLocale& wxXLocale::GetCLocale()
|
||||||
{
|
{
|
||||||
if ( !gs_cLocale )
|
if ( !gs_cLocale )
|
||||||
{
|
{
|
||||||
// NOTE: bcc551 has trouble doing static_cast with incomplete
|
// Notice that we need a separate variable because clang 3.1 refuses to
|
||||||
// type definition. reinterpret_cast used as workaround
|
// cast nullptr (which is how NULL is defined in it) to anything.
|
||||||
gs_cLocale = new wxXLocale( reinterpret_cast<wxXLocaleCTag *>(NULL) );
|
static wxXLocaleCTag* const tag = NULL;
|
||||||
|
gs_cLocale = new wxXLocale(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
return *gs_cLocale;
|
return *gs_cLocale;
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
if exist ..\include\wx\msw\setup.h (
|
|
||||||
echo include\wx\msw\setup.h already exists
|
|
||||||
) else (
|
|
||||||
copy /y ..\include\wx\msw\setup0.h ..\include\wx\msw\setup.h
|
|
||||||
)
|
|
||||||
|
|
||||||
if exist ..\lib\cw7msw (
|
|
||||||
echo lib\cw7msw already exists
|
|
||||||
) else (
|
|
||||||
mkdir ..\lib\cw7msw
|
|
||||||
)
|
|
||||||
|
|
||||||
if exist ..\lib\cw7msw\include (
|
|
||||||
echo lib\cw7msw\include already exists
|
|
||||||
) else (
|
|
||||||
mkdir ..\lib\cw7msw\include
|
|
||||||
)
|
|
||||||
|
|
||||||
if exist ..\lib\cw7msw\include\wx (
|
|
||||||
echo lib\cw7msw\include\wx already exists
|
|
||||||
) else (
|
|
||||||
mkdir ..\lib\cw7msw\include\wx
|
|
||||||
)
|
|
||||||
|
|
||||||
if exist ..\lib\cw7msw\include\wx\setup.h (
|
|
||||||
echo lib\cw7msw\include\wx\setup.h already exists
|
|
||||||
) else (
|
|
||||||
copy /y ..\include\wx\msw\setup.h ..\lib\cw7msw\include\wx\setup.h
|
|
||||||
)
|
|
||||||
|
|
||||||
rem pause
|
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
if exist ..\include\wx\msw\setup.h (
|
|
||||||
echo include\wx\msw\setup.h already exists
|
|
||||||
) else (
|
|
||||||
copy /y ..\include\wx\msw\setup0.h ..\include\wx\msw\setup.h
|
|
||||||
)
|
|
||||||
|
|
||||||
if exist ..\lib\cw7mswd (
|
|
||||||
echo lib\cw7mswd already exists
|
|
||||||
) else (
|
|
||||||
mkdir ..\lib\cw7mswd
|
|
||||||
)
|
|
||||||
|
|
||||||
if exist ..\lib\cw7mswd\include (
|
|
||||||
echo lib\cw7mswd\include already exists
|
|
||||||
) else (
|
|
||||||
mkdir ..\lib\cw7mswd\include
|
|
||||||
)
|
|
||||||
|
|
||||||
if exist ..\lib\cw7mswd\include\wx (
|
|
||||||
echo lib\cw7mswd\include\wx already exists
|
|
||||||
) else (
|
|
||||||
mkdir ..\lib\cw7mswd\include\wx
|
|
||||||
)
|
|
||||||
|
|
||||||
if exist ..\lib\cw7mswd\include\wx\setup.h (
|
|
||||||
echo lib\cw7mswd\include\wx\setup.h already exists
|
|
||||||
) else (
|
|
||||||
copy /y ..\include\wx\msw\setup.h ..\lib\cw7mswd\include\wx\setup.h
|
|
||||||
)
|
|
||||||
|
|
||||||
rem pause
|
|
||||||
|
|
|
@ -277,16 +277,24 @@ void wxGenericAboutDialog::AddCollapsiblePane(const wxString& title,
|
||||||
|
|
||||||
void wxGenericAboutDialog::OnCloseWindow(wxCloseEvent& event)
|
void wxGenericAboutDialog::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
Destroy();
|
// safeguards in case the window is still shown using ShowModal
|
||||||
|
if ( !IsModal() )
|
||||||
|
Destroy();
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGenericAboutDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
void wxGenericAboutDialog::OnOK(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
// By default a modeless dialog would be just hidden, destroy this one
|
// safeguards in case the window is still shown using ShowModal
|
||||||
// instead.
|
if ( !IsModal() )
|
||||||
Destroy();
|
{
|
||||||
|
// By default a modeless dialog would be just hidden, destroy this one
|
||||||
|
// instead.
|
||||||
|
Destroy();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !wxUSE_MODAL_ABOUT_DIALOG
|
#endif // !wxUSE_MODAL_ABOUT_DIALOG
|
||||||
|
|
|
@ -119,6 +119,34 @@ wxDataViewColumn* GetExpanderColumnOrFirstOne(wxDataViewCtrl* dataview)
|
||||||
return expander;
|
return expander;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxTextCtrl *CreateEditorTextCtrl(wxWindow *parent, const wxRect& labelRect, const wxString& value)
|
||||||
|
{
|
||||||
|
wxTextCtrl* ctrl = new wxTextCtrl(parent, wxID_ANY, value,
|
||||||
|
wxPoint(labelRect.x,labelRect.y),
|
||||||
|
wxSize(labelRect.width,labelRect.height),
|
||||||
|
wxTE_PROCESS_ENTER);
|
||||||
|
|
||||||
|
// Adjust size of wxTextCtrl editor to fit text, even if it means being
|
||||||
|
// wider than the corresponding column (this is how Explorer behaves).
|
||||||
|
const int fitting = ctrl->GetSizeFromTextSize(ctrl->GetTextExtent(ctrl->GetValue())).x;
|
||||||
|
const int current = ctrl->GetSize().x;
|
||||||
|
const int maxwidth = ctrl->GetParent()->GetSize().x - ctrl->GetPosition().x;
|
||||||
|
|
||||||
|
// Adjust size so that it fits all content. Don't change anything if the
|
||||||
|
// allocated space is already larger than needed and don't extend wxDVC's
|
||||||
|
// boundaries.
|
||||||
|
int width = wxMin(wxMax(current, fitting), maxwidth);
|
||||||
|
|
||||||
|
if ( width != current )
|
||||||
|
ctrl->SetSize(wxSize(width, -1));
|
||||||
|
|
||||||
|
// select the text in the control an place the cursor at the end
|
||||||
|
ctrl->SetInsertionPointEnd();
|
||||||
|
ctrl->SelectAll();
|
||||||
|
|
||||||
|
return ctrl;
|
||||||
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -229,6 +257,8 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void FinishEditing();
|
||||||
|
|
||||||
bool SendEvent(wxEventType type, unsigned int n)
|
bool SendEvent(wxEventType type, unsigned int n)
|
||||||
{
|
{
|
||||||
wxDataViewCtrl * const owner = GetOwner();
|
wxDataViewCtrl * const owner = GetOwner();
|
||||||
|
@ -246,6 +276,8 @@ private:
|
||||||
|
|
||||||
void OnClick(wxHeaderCtrlEvent& event)
|
void OnClick(wxHeaderCtrlEvent& event)
|
||||||
{
|
{
|
||||||
|
FinishEditing();
|
||||||
|
|
||||||
const unsigned idx = event.GetColumn();
|
const unsigned idx = event.GetColumn();
|
||||||
|
|
||||||
if ( SendEvent(wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, idx) )
|
if ( SendEvent(wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, idx) )
|
||||||
|
@ -290,6 +322,8 @@ private:
|
||||||
|
|
||||||
void OnResize(wxHeaderCtrlEvent& event)
|
void OnResize(wxHeaderCtrlEvent& event)
|
||||||
{
|
{
|
||||||
|
FinishEditing();
|
||||||
|
|
||||||
wxDataViewCtrl * const owner = GetOwner();
|
wxDataViewCtrl * const owner = GetOwner();
|
||||||
|
|
||||||
const unsigned col = event.GetColumn();
|
const unsigned col = event.GetColumn();
|
||||||
|
@ -299,6 +333,8 @@ private:
|
||||||
|
|
||||||
void OnEndReorder(wxHeaderCtrlEvent& event)
|
void OnEndReorder(wxHeaderCtrlEvent& event)
|
||||||
{
|
{
|
||||||
|
FinishEditing();
|
||||||
|
|
||||||
wxDataViewCtrl * const owner = GetOwner();
|
wxDataViewCtrl * const owner = GetOwner();
|
||||||
owner->ColumnMoved(owner->GetColumn(event.GetColumn()),
|
owner->ColumnMoved(owner->GetColumn(event.GetColumn()),
|
||||||
event.GetNewOrder());
|
event.GetNewOrder());
|
||||||
|
@ -766,9 +802,13 @@ public:
|
||||||
|
|
||||||
void OnColumnsCountChanged();
|
void OnColumnsCountChanged();
|
||||||
|
|
||||||
|
// Adjust last column to window size
|
||||||
|
void UpdateColumnSizes();
|
||||||
|
|
||||||
// Called by wxDataViewCtrl and our own OnRenameTimer() to start edit the
|
// Called by wxDataViewCtrl and our own OnRenameTimer() to start edit the
|
||||||
// specified item in the given column.
|
// specified item in the given column.
|
||||||
void StartEditing(const wxDataViewItem& item, const wxDataViewColumn* col);
|
void StartEditing(const wxDataViewItem& item, const wxDataViewColumn* col);
|
||||||
|
void FinishEditing();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int RecalculateCount() const;
|
int RecalculateCount() const;
|
||||||
|
@ -958,16 +998,7 @@ bool wxDataViewTextRenderer::HasEditorCtrl() const
|
||||||
wxWindow* wxDataViewTextRenderer::CreateEditorCtrl( wxWindow *parent,
|
wxWindow* wxDataViewTextRenderer::CreateEditorCtrl( wxWindow *parent,
|
||||||
wxRect labelRect, const wxVariant &value )
|
wxRect labelRect, const wxVariant &value )
|
||||||
{
|
{
|
||||||
wxTextCtrl* ctrl = new wxTextCtrl( parent, wxID_ANY, value,
|
return CreateEditorTextCtrl(parent, labelRect, value);
|
||||||
wxPoint(labelRect.x,labelRect.y),
|
|
||||||
wxSize(labelRect.width,labelRect.height),
|
|
||||||
wxTE_PROCESS_ENTER );
|
|
||||||
|
|
||||||
// select the text in the control an place the cursor at the end
|
|
||||||
ctrl->SetInsertionPointEnd();
|
|
||||||
ctrl->SelectAll();
|
|
||||||
|
|
||||||
return ctrl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxDataViewTextRenderer::GetValueFromEditorCtrl( wxWindow *editor, wxVariant &value )
|
bool wxDataViewTextRenderer::GetValueFromEditorCtrl( wxWindow *editor, wxVariant &value )
|
||||||
|
@ -1167,7 +1198,11 @@ wxDataViewProgressRenderer::Render(wxRect rect, wxDC *dc, int WXUNUSED(state))
|
||||||
|
|
||||||
wxSize wxDataViewProgressRenderer::GetSize() const
|
wxSize wxDataViewProgressRenderer::GetSize() const
|
||||||
{
|
{
|
||||||
return wxSize(40,12);
|
// Return -1 width because a progress bar fits any width; unlike most
|
||||||
|
// renderers, it doesn't have a "good" width for the content. This makes it
|
||||||
|
// grow to the whole column, which is pretty much always the desired
|
||||||
|
// behaviour. Keep the height fixed so that the progress bar isn't too fat.
|
||||||
|
return wxSize(-1, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------
|
// ---------------------------------------------------------
|
||||||
|
@ -1239,16 +1274,7 @@ wxWindow* wxDataViewIconTextRenderer::CreateEditorCtrl(wxWindow *parent, wxRect
|
||||||
labelRect.width -= w;
|
labelRect.width -= w;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTextCtrl* ctrl = new wxTextCtrl( parent, wxID_ANY, text,
|
return CreateEditorTextCtrl(parent, labelRect, text);
|
||||||
wxPoint(labelRect.x,labelRect.y),
|
|
||||||
wxSize(labelRect.width,labelRect.height),
|
|
||||||
wxTE_PROCESS_ENTER );
|
|
||||||
|
|
||||||
// select the text in the control an place the cursor at the end
|
|
||||||
ctrl->SetInsertionPointEnd();
|
|
||||||
ctrl->SelectAll();
|
|
||||||
|
|
||||||
return ctrl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxDataViewIconTextRenderer::GetValueFromEditorCtrl( wxWindow *editor, wxVariant& value )
|
bool wxDataViewIconTextRenderer::GetValueFromEditorCtrl( wxWindow *editor, wxVariant& value )
|
||||||
|
@ -2194,6 +2220,20 @@ wxDataViewMainWindow::StartEditing(const wxDataViewItem& item,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxDataViewMainWindow::FinishEditing()
|
||||||
|
{
|
||||||
|
if ( m_editorCtrl )
|
||||||
|
{
|
||||||
|
m_editorRenderer->FinishEditing();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxDataViewHeaderWindow::FinishEditing()
|
||||||
|
{
|
||||||
|
wxDataViewMainWindow *win = static_cast<wxDataViewMainWindow*>(GetOwner()->GetMainWindow());
|
||||||
|
win->FinishEditing();
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Helper class for do operation on the tree node
|
// Helper class for do operation on the tree node
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -2489,18 +2529,8 @@ bool wxDataViewMainWindow::ItemChanged(const wxDataViewItem & item)
|
||||||
|
|
||||||
bool wxDataViewMainWindow::ValueChanged( const wxDataViewItem & item, unsigned int model_column )
|
bool wxDataViewMainWindow::ValueChanged( const wxDataViewItem & item, unsigned int model_column )
|
||||||
{
|
{
|
||||||
int view_column = -1;
|
int view_column = m_owner->GetModelColumnIndex(model_column);
|
||||||
unsigned int n_col = m_owner->GetColumnCount();
|
if ( view_column == wxNOT_FOUND )
|
||||||
for (unsigned i = 0; i < n_col; i++)
|
|
||||||
{
|
|
||||||
wxDataViewColumn *column = m_owner->GetColumn( i );
|
|
||||||
if (column->GetModelColumn() == model_column)
|
|
||||||
{
|
|
||||||
view_column = (int) i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (view_column == -1)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// NOTE: to be valid, we cannot use e.g. INT_MAX - 1
|
// NOTE: to be valid, we cannot use e.g. INT_MAX - 1
|
||||||
|
@ -2564,6 +2594,7 @@ void wxDataViewMainWindow::OnInternalIdle()
|
||||||
|
|
||||||
if (m_dirty)
|
if (m_dirty)
|
||||||
{
|
{
|
||||||
|
UpdateColumnSizes();
|
||||||
RecalculateDisplay();
|
RecalculateDisplay();
|
||||||
m_dirty = false;
|
m_dirty = false;
|
||||||
}
|
}
|
||||||
|
@ -4389,9 +4420,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
||||||
// see #12270.
|
// see #12270.
|
||||||
|
|
||||||
// adjust the rectangle ourselves to account for the alignment
|
// adjust the rectangle ourselves to account for the alignment
|
||||||
int align = cell->GetAlignment();
|
const int align = cell->GetEffectiveAlignment();
|
||||||
if ( align == wxDVR_DEFAULT_ALIGNMENT )
|
|
||||||
align = wxALIGN_CENTRE;
|
|
||||||
|
|
||||||
wxRect rectItem = cell_rect;
|
wxRect rectItem = cell_rect;
|
||||||
const wxSize size = cell->GetSize();
|
const wxSize size = cell->GetSize();
|
||||||
|
@ -4464,11 +4493,44 @@ void wxDataViewMainWindow::OnColumnsCountChanged()
|
||||||
editableCount++;
|
editableCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_useCellFocus = (editableCount > 1);
|
m_useCellFocus = (editableCount > 0);
|
||||||
|
|
||||||
UpdateDisplay();
|
UpdateDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxDataViewMainWindow::UpdateColumnSizes()
|
||||||
|
{
|
||||||
|
int colsCount = GetOwner()->GetColumnCount();
|
||||||
|
if ( !colsCount )
|
||||||
|
return;
|
||||||
|
|
||||||
|
wxDataViewCtrl *owner = GetOwner();
|
||||||
|
|
||||||
|
int fullWinWidth = GetSize().x;
|
||||||
|
|
||||||
|
wxDataViewColumn *lastCol = owner->GetColumn(colsCount - 1);
|
||||||
|
int colswidth = GetEndOfLastCol();
|
||||||
|
int lastColX = colswidth - lastCol->GetWidth();
|
||||||
|
if ( lastColX < fullWinWidth )
|
||||||
|
{
|
||||||
|
int desiredWidth = wxMax(fullWinWidth - lastColX, lastCol->GetMinWidth());
|
||||||
|
lastCol->SetWidth(desiredWidth);
|
||||||
|
|
||||||
|
// All columns fit on screen, so we don't need horizontal scrolling.
|
||||||
|
// To prevent flickering scrollbar when resizing the window to be
|
||||||
|
// narrower, force-set the virtual width to 0 here. It will eventually
|
||||||
|
// be corrected at idle time.
|
||||||
|
SetVirtualSize(0, m_virtualSize.y);
|
||||||
|
|
||||||
|
RefreshRect(wxRect(lastColX, 0, fullWinWidth - lastColX, GetSize().y));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// else: don't bother, the columns won't fit anyway
|
||||||
|
SetVirtualSize(colswidth, m_virtualSize.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxDataViewCtrl
|
// wxDataViewCtrl
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -4584,6 +4646,9 @@ wxSize wxDataViewCtrl::GetSizeAvailableForScrollTarget(const wxSize& size)
|
||||||
|
|
||||||
void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) )
|
void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
|
if ( m_clientArea && GetColumnCount() )
|
||||||
|
m_clientArea->UpdateColumnSizes();
|
||||||
|
|
||||||
// We need to override OnSize so that our scrolled
|
// We need to override OnSize so that our scrolled
|
||||||
// window a) does call Layout() to use sizers for
|
// window a) does call Layout() to use sizers for
|
||||||
// positioning the controls but b) does not query
|
// positioning the controls but b) does not query
|
||||||
|
@ -4730,6 +4795,14 @@ void wxDataViewCtrl::OnColumnsCountChanged()
|
||||||
|
|
||||||
void wxDataViewCtrl::DoSetExpanderColumn()
|
void wxDataViewCtrl::DoSetExpanderColumn()
|
||||||
{
|
{
|
||||||
|
wxDataViewColumn* column = GetExpanderColumn();
|
||||||
|
if ( column )
|
||||||
|
{
|
||||||
|
int index = GetColumnIndex(column);
|
||||||
|
if ( index != wxNOT_FOUND )
|
||||||
|
InvalidateColBestWidth(index);
|
||||||
|
}
|
||||||
|
|
||||||
m_clientArea->UpdateDisplay();
|
m_clientArea->UpdateDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4780,6 +4853,18 @@ int wxDataViewCtrl::GetColumnIndex(const wxDataViewColumn *column) const
|
||||||
return wxNOT_FOUND;
|
return wxNOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int wxDataViewCtrl::GetModelColumnIndex( unsigned int model_column ) const
|
||||||
|
{
|
||||||
|
const int count = GetColumnCount();
|
||||||
|
for ( int index = 0; index < count; index++ )
|
||||||
|
{
|
||||||
|
wxDataViewColumn* column = GetColumn(index);
|
||||||
|
if ( column->GetModelColumn() == model_column )
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
return wxNOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int wxDataViewCtrl::GetBestColumnWidth(int idx) const
|
unsigned int wxDataViewCtrl::GetBestColumnWidth(int idx) const
|
||||||
{
|
{
|
||||||
if ( m_colsBestWidths[idx].width != 0 )
|
if ( m_colsBestWidths[idx].width != 0 )
|
||||||
|
@ -4797,21 +4882,23 @@ unsigned int wxDataViewCtrl::GetBestColumnWidth(int idx) const
|
||||||
wxDataViewMainWindow *clientArea,
|
wxDataViewMainWindow *clientArea,
|
||||||
wxDataViewRenderer *renderer,
|
wxDataViewRenderer *renderer,
|
||||||
const wxDataViewModel *model,
|
const wxDataViewModel *model,
|
||||||
unsigned column,
|
unsigned int model_column,
|
||||||
int expanderSize)
|
int expanderSize)
|
||||||
: m_width(0),
|
: m_width(0),
|
||||||
m_dvc(dvc),
|
m_dvc(dvc),
|
||||||
m_clientArea(clientArea),
|
m_clientArea(clientArea),
|
||||||
m_renderer(renderer),
|
m_renderer(renderer),
|
||||||
m_model(model),
|
m_model(model),
|
||||||
m_column(column),
|
m_model_column(model_column),
|
||||||
m_expanderSize(expanderSize)
|
m_expanderSize(expanderSize)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
int index = dvc->GetModelColumnIndex( model_column );
|
||||||
|
wxDataViewColumn* column = index == wxNOT_FOUND ? NULL : dvc->GetColumn(index);
|
||||||
m_isExpanderCol =
|
m_isExpanderCol =
|
||||||
!clientArea->IsList() &&
|
!clientArea->IsList() &&
|
||||||
(column == 0 ||
|
(column == 0 ||
|
||||||
GetExpanderColumnOrFirstOne(const_cast<wxDataViewCtrl*>(dvc)) == dvc->GetColumnAt(column));
|
GetExpanderColumnOrFirstOne(const_cast<wxDataViewCtrl*>(dvc)) == column );
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateWithWidth(int width)
|
void UpdateWithWidth(int width)
|
||||||
|
@ -4835,7 +4922,7 @@ unsigned int wxDataViewCtrl::GetBestColumnWidth(int idx) const
|
||||||
item = m_clientArea->GetItemByRow(row);
|
item = m_clientArea->GetItemByRow(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_renderer->PrepareForItem(m_model, item, m_column);
|
m_renderer->PrepareForItem(m_model, item, m_model_column);
|
||||||
m_width = wxMax(m_width, m_renderer->GetSize().x + indent);
|
m_width = wxMax(m_width, m_renderer->GetSize().x + indent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4847,7 +4934,7 @@ unsigned int wxDataViewCtrl::GetBestColumnWidth(int idx) const
|
||||||
wxDataViewMainWindow *m_clientArea;
|
wxDataViewMainWindow *m_clientArea;
|
||||||
wxDataViewRenderer *m_renderer;
|
wxDataViewRenderer *m_renderer;
|
||||||
const wxDataViewModel *m_model;
|
const wxDataViewModel *m_model;
|
||||||
unsigned m_column;
|
unsigned m_model_column;
|
||||||
bool m_isExpanderCol;
|
bool m_isExpanderCol;
|
||||||
int m_expanderSize;
|
int m_expanderSize;
|
||||||
};
|
};
|
||||||
|
|
|
@ -378,10 +378,10 @@ void wxEditableListBox::SwapItems(long i1, long i2)
|
||||||
m_listCtrl->SetItemText(i2, t1);
|
m_listCtrl->SetItemText(i2, t1);
|
||||||
|
|
||||||
// swap the item data
|
// swap the item data
|
||||||
long d1 = m_listCtrl->GetItemData(i1);
|
wxUIntPtr d1 = m_listCtrl->GetItemData(i1);
|
||||||
long d2 = m_listCtrl->GetItemData(i2);
|
wxUIntPtr d2 = m_listCtrl->GetItemData(i2);
|
||||||
m_listCtrl->SetItemData(i1, d2);
|
m_listCtrl->SetItemPtrData(i1, d2);
|
||||||
m_listCtrl->SetItemData(i2, d1);
|
m_listCtrl->SetItemPtrData(i2, d1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -69,9 +69,7 @@ bool wxInfoBarGeneric::Create(wxWindow *parent, wxWindowID winid)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// use special, easy to notice, colours
|
// use special, easy to notice, colours
|
||||||
const wxColour colBg = wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK);
|
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK));
|
||||||
SetBackgroundColour(colBg);
|
|
||||||
SetOwnForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
|
|
||||||
|
|
||||||
// create the controls: icon, text and the button to dismiss the
|
// create the controls: icon, text and the button to dismiss the
|
||||||
// message.
|
// message.
|
||||||
|
@ -80,6 +78,7 @@ bool wxInfoBarGeneric::Create(wxWindow *parent, wxWindowID winid)
|
||||||
m_icon = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap);
|
m_icon = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap);
|
||||||
|
|
||||||
m_text = new wxStaticText(this, wxID_ANY, "");
|
m_text = new wxStaticText(this, wxID_ANY, "");
|
||||||
|
m_text->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT));
|
||||||
|
|
||||||
m_button = wxBitmapButton::NewCloseButton(this, wxID_ANY);
|
m_button = wxBitmapButton::NewCloseButton(this, wxID_ANY);
|
||||||
m_button->SetToolTip(_("Hide this notification message."));
|
m_button->SetToolTip(_("Hide this notification message."));
|
||||||
|
@ -111,6 +110,17 @@ bool wxInfoBarGeneric::SetFont(const wxFont& font)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxInfoBarGeneric::SetForegroundColour(const wxColor& colour)
|
||||||
|
{
|
||||||
|
if ( !wxInfoBarBase::SetForegroundColour(colour) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ( m_text )
|
||||||
|
m_text->SetForegroundColour(colour);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
wxInfoBarGeneric::BarPlacement wxInfoBarGeneric::GetBarPlacement() const
|
wxInfoBarGeneric::BarPlacement wxInfoBarGeneric::GetBarPlacement() const
|
||||||
{
|
{
|
||||||
wxSizer * const sizer = GetContainingSizer();
|
wxSizer * const sizer = GetContainingSizer();
|
||||||
|
|
|
@ -3496,6 +3496,12 @@ size_t wxListMainWindow::GetItemCount() const
|
||||||
|
|
||||||
void wxListMainWindow::SetItemCount(long count)
|
void wxListMainWindow::SetItemCount(long count)
|
||||||
{
|
{
|
||||||
|
// Update the current item if it's not valid any longer (notice that this
|
||||||
|
// invalidates it completely if the control is becoming empty, which is the
|
||||||
|
// right thing to do).
|
||||||
|
if ( HasCurrent() && m_current >= (size_t)count )
|
||||||
|
ChangeCurrent(count - 1);
|
||||||
|
|
||||||
m_selStore.SetItemCount(count);
|
m_selStore.SetItemCount(count);
|
||||||
m_countVirt = count;
|
m_countVirt = count;
|
||||||
|
|
||||||
|
@ -5191,6 +5197,9 @@ void wxGenericListCtrl::OnInternalIdle()
|
||||||
|
|
||||||
bool wxGenericListCtrl::SetBackgroundColour( const wxColour &colour )
|
bool wxGenericListCtrl::SetBackgroundColour( const wxColour &colour )
|
||||||
{
|
{
|
||||||
|
if ( !wxWindow::SetBackgroundColour( colour ) )
|
||||||
|
return false;
|
||||||
|
|
||||||
if (m_mainWin)
|
if (m_mainWin)
|
||||||
{
|
{
|
||||||
m_mainWin->SetBackgroundColour( colour );
|
m_mainWin->SetBackgroundColour( colour );
|
||||||
|
@ -5211,9 +5220,6 @@ bool wxGenericListCtrl::SetForegroundColour( const wxColour &colour )
|
||||||
m_mainWin->m_dirty = true;
|
m_mainWin->m_dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_headerWin)
|
|
||||||
m_headerWin->SetForegroundColour( colour );
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,11 +63,6 @@
|
||||||
|
|
||||||
#ifndef __WXUNIVERSAL__
|
#ifndef __WXUNIVERSAL__
|
||||||
|
|
||||||
#if wxUSE_LIBGNOMEPRINT
|
|
||||||
#include "wx/link.h"
|
|
||||||
wxFORCE_LINK_MODULE(gnome_print)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_GTKPRINT
|
#if wxUSE_GTKPRINT
|
||||||
#include "wx/link.h"
|
#include "wx/link.h"
|
||||||
wxFORCE_LINK_MODULE(gtk_print)
|
wxFORCE_LINK_MODULE(gtk_print)
|
||||||
|
|
|
@ -214,9 +214,6 @@ bool wxScrollHelperEvtHandler::ProcessEvent(wxEvent& event)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( processed && event.IsCommandEvent())
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// For wxEVT_PAINT the user code can either handle this event as usual or
|
// For wxEVT_PAINT the user code can either handle this event as usual or
|
||||||
// override virtual OnDraw(), so if the event hasn't been handled we need
|
// override virtual OnDraw(), so if the event hasn't been handled we need
|
||||||
// to call this virtual function ourselves.
|
// to call this virtual function ourselves.
|
||||||
|
@ -235,6 +232,11 @@ bool wxScrollHelperEvtHandler::ProcessEvent(wxEvent& event)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the user code handled this event, it should prevent the default
|
||||||
|
// handling from taking place, so don't do anything else in this case.
|
||||||
|
if ( processed )
|
||||||
|
return true;
|
||||||
|
|
||||||
if ( evType == wxEVT_CHILD_FOCUS )
|
if ( evType == wxEVT_CHILD_FOCUS )
|
||||||
{
|
{
|
||||||
m_scrollHelper->HandleOnChildFocus((wxChildFocusEvent &)event);
|
m_scrollHelper->HandleOnChildFocus((wxChildFocusEvent &)event);
|
||||||
|
|
|
@ -716,8 +716,6 @@ void wxTreeListModel::DeleteItem(Node* item)
|
||||||
|
|
||||||
Node* const parent = item->GetParent();
|
Node* const parent = item->GetParent();
|
||||||
|
|
||||||
ItemDeleted(ToDVI(parent), ToDVI(item));
|
|
||||||
|
|
||||||
Node* previous = parent->GetChild();
|
Node* previous = parent->GetChild();
|
||||||
if ( previous == item )
|
if ( previous == item )
|
||||||
{
|
{
|
||||||
|
@ -739,6 +737,8 @@ void wxTreeListModel::DeleteItem(Node* item)
|
||||||
|
|
||||||
previous->DeleteNext();
|
previous->DeleteNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ItemDeleted(ToDVI(parent), ToDVI(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTreeListModel::DeleteAllItems()
|
void wxTreeListModel::DeleteAllItems()
|
||||||
|
|
|
@ -89,9 +89,6 @@ bool wxVarScrollHelperEvtHandler::ProcessEvent(wxEvent& event)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( processed && event.IsCommandEvent())
|
|
||||||
return true;
|
|
||||||
|
|
||||||
// For wxEVT_PAINT the user code can either handle this event as usual or
|
// For wxEVT_PAINT the user code can either handle this event as usual or
|
||||||
// override virtual OnDraw(), so if the event hasn't been handled we need
|
// override virtual OnDraw(), so if the event hasn't been handled we need
|
||||||
// to call this virtual function ourselves.
|
// to call this virtual function ourselves.
|
||||||
|
@ -110,6 +107,11 @@ bool wxVarScrollHelperEvtHandler::ProcessEvent(wxEvent& event)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the user code handled this event, it should prevent the default
|
||||||
|
// handling from taking place, so don't do anything else in this case.
|
||||||
|
if ( processed )
|
||||||
|
return true;
|
||||||
|
|
||||||
// reset the skipped flag (which might have been set to true in
|
// reset the skipped flag (which might have been set to true in
|
||||||
// ProcessEvent() above) to be able to test it below
|
// ProcessEvent() above) to be able to test it below
|
||||||
bool wasSkipped = event.GetSkipped();
|
bool wasSkipped = event.GetSkipped();
|
||||||
|
@ -142,6 +144,7 @@ bool wxVarScrollHelperEvtHandler::ProcessEvent(wxEvent& event)
|
||||||
else if ( evType == wxEVT_MOUSEWHEEL )
|
else if ( evType == wxEVT_MOUSEWHEEL )
|
||||||
{
|
{
|
||||||
m_scrollHelper->HandleOnMouseWheel((wxMouseEvent &)event);
|
m_scrollHelper->HandleOnMouseWheel((wxMouseEvent &)event);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif // wxUSE_MOUSEWHEEL
|
#endif // wxUSE_MOUSEWHEEL
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue