Merge in from trunk r67662 to r64801

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-07-25 16:54:53 +00:00
727 changed files with 42813 additions and 46104 deletions

View File

@@ -0,0 +1,59 @@
/////////////////////////////////////////////////////////////////////////////
// Name: anybutton.h
// Purpose: wxAnyButton class
// Author: Stefan Csomor
// Created: 1998-01-01 (extracted from button.h)
// RCS-ID: $Id: anybutton.h 67069 2011-02-27 12:48:46Z VZ $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_ANYBUTTON_H_
#define _WX_OSX_ANYBUTTON_H_
// Any button
class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase
{
public:
wxAnyButton() {}
static wxSize GetDefaultSize();
virtual void SetLabel(const wxString& label);
protected:
virtual wxSize DoGetBestSize() const ;
void OnEnterWindow( wxMouseEvent& event);
void OnLeaveWindow( wxMouseEvent& event);
virtual wxBitmap DoGetBitmap(State which) const;
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
virtual void DoSetBitmapPosition(wxDirection dir);
virtual void DoSetBitmapMargins(int x, int y)
{
m_marginX = x;
m_marginY = y;
InvalidateBestSize();
}
#if wxUSE_MARKUP && wxOSX_USE_COCOA
virtual bool DoSetLabelMarkup(const wxString& markup);
#endif // wxUSE_MARKUP && wxOSX_USE_COCOA
// the margins around the bitmap
int m_marginX;
int m_marginY;
// the bitmaps for the different state of the buttons, all of them may be
// invalid and the button only shows a bitmap at all if State_Normal bitmap
// is valid
wxBitmap m_bitmaps[State_Max];
wxDECLARE_NO_COPY_CLASS(wxAnyButton);
DECLARE_EVENT_TABLE()
};
#endif // _WX_OSX_ANYBUTTON_H_

View File

@@ -41,8 +41,6 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
static wxSize GetDefaultSize();
virtual void SetLabel(const wxString& label);
virtual wxWindow *SetDefault();
virtual void Command(wxCommandEvent& event);
@@ -52,38 +50,7 @@ public:
virtual bool OSXHandleClicked( double timestampsec );
protected:
virtual wxSize DoGetBestSize() const ;
void OnEnterWindow( wxMouseEvent& event);
void OnLeaveWindow( wxMouseEvent& event);
virtual wxBitmap DoGetBitmap(State which) const;
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
virtual void DoSetBitmapPosition(wxDirection dir);
virtual void DoSetBitmapMargins(int x, int y)
{
m_marginX = x;
m_marginY = y;
InvalidateBestSize();
}
#if wxUSE_MARKUP && wxOSX_USE_COCOA
virtual bool DoSetLabelMarkup(const wxString& markup);
#endif // wxUSE_MARKUP && wxOSX_USE_COCOA
// the margins around the bitmap
int m_marginX;
int m_marginY;
// the bitmaps for the different state of the buttons, all of them may be
// invalid and the button only shows a bitmap at all if State_Normal bitmap
// is valid
wxBitmap m_bitmaps[State_Max];
DECLARE_DYNAMIC_CLASS(wxButton)
DECLARE_EVENT_TABLE()
};
// OS X specific class, not part of public wx API

View File

@@ -427,6 +427,8 @@ public:
virtual void SetRowHeight(wxDataViewItem const& item, unsigned int height);
virtual void OnSize ();
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
//
// other methods
//

View File

@@ -20,6 +20,8 @@ class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxCFEventLoop
public:
wxGUIEventLoop();
virtual void WakeUp();
protected:
virtual int DoDispatchTimeout(unsigned long timeout);

View File

@@ -23,6 +23,7 @@ public:
wxRegion( WXHRGN hRegion );
wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE );
wxRegion();
#if wxUSE_IMAGE
wxRegion(const wxBitmap& bmp)
{
Union(bmp);
@@ -32,6 +33,7 @@ public:
{
Union(bmp, transColour, tolerance);
}
#endif
virtual ~wxRegion();

View File

@@ -496,6 +496,8 @@ public:
wxDataViewColumn*& columnPtr) const;
virtual void SetRowHeight(const wxDataViewItem& item, unsigned int height);
virtual void OnSize();
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
// drag & drop helper methods
wxDataFormat GetDnDDataFormat(wxDataObjectComposite* dataObjects);

View File

@@ -21,6 +21,8 @@ public:
void EndModalSession();
virtual void WakeUp();
protected:
virtual int DoDispatchTimeout(unsigned long timeout);
@@ -31,7 +33,12 @@ protected:
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
void* m_modalSession;
wxWindow* m_modalWindow;
WXWindow m_dummyWindow;
int m_modalNestedLevel;
};
#endif // _WX_OSX_COCOA_EVTLOOP_H_

View File

@@ -25,7 +25,13 @@ class wxComboBoxChoice;
class wxComboWidgetImpl;
// Combobox item
class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
class WXDLLIMPEXP_CORE wxComboBox :
#if wxOSX_USE_CARBON
public wxNavigationEnabled<wxControl>,
#else
public wxControl,
#endif
public wxComboBoxBase
{
DECLARE_DYNAMIC_CLASS(wxComboBox)
@@ -42,7 +48,7 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
virtual void DelegateTextChanged( const wxString& value );
virtual void DelegateChoice( const wxString& value );
wxComboBox() { Init(); }
wxComboBox() { }
wxComboBox(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
@@ -53,7 +59,6 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Init();
Create(parent, id, value, pos, size, n, choices, style, validator, name);
}
@@ -66,7 +71,6 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Init();
Create(parent, id, value, pos, size, choices, style, validator, name);
}
@@ -142,17 +146,12 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
#if wxOSX_USE_CARBON
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
WX_DECLARE_CONTROL_CONTAINER();
#endif
#if wxOSX_USE_COCOA
wxComboWidgetImpl* GetComboPeer() const;
#endif
protected:
// common part of all ctors
void Init();
// List functions
virtual void DoDeleteOneItem(unsigned int n);
virtual void DoClear();
@@ -187,10 +186,6 @@ protected:
wxComboBoxChoice* m_choice;
wxComboBoxDataArray m_datas;
#if wxOSX_USE_CARBON
DECLARE_EVENT_TABLE()
#endif
};
#endif // _WX_COMBOBOX_H_

View File

@@ -133,9 +133,9 @@
#define WXWIN_OS_DESCRIPTION "Darwin 7.9.0 Power Macintosh"
#define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org"
#define PACKAGE_NAME "wxWidgets"
#define PACKAGE_STRING "wxWidgets 2.9.2"
#define PACKAGE_STRING "wxWidgets 2.9.3"
#define PACKAGE_TARNAME "wxwidgets"
#define PACKAGE_VERSION "2.9.2"
#define PACKAGE_VERSION "2.9.3"
// for regex
#define WX_NO_REGEX_ADVANCED 1

View File

@@ -109,6 +109,7 @@ public:
virtual void HitTest (wxPoint const& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const = 0; // return the item and column pointer that contains with the passed point
virtual void SetRowHeight(wxDataViewItem const& item, unsigned int height) = 0; // sets the height of the row containg the passed item in the native control
virtual void OnSize (void) = 0; // updates the layout of the native control after a size event
virtual void StartEditor( const wxDataViewItem & item, unsigned int column ) = 0; // starts editing the passed in item and column
};
#endif // _WX_DATAVIEWCTRL_CORE_H_

View File

@@ -201,6 +201,8 @@ public:
// finishes editing of custom items; if no custom item is currently edited the method does nothing
void FinishCustomItemEditing();
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
// returns the n-th pointer to a column;
// this method is different from GetColumn(unsigned int pos) because here 'n' is not a position in the control but the n-th

View File

@@ -23,6 +23,10 @@ public:
const wxSize& size = wxDefaultSize,
const wxString& name = wxDirDialogNameStr);
#if wxOSX_USE_COCOA
~wxDirDialog();
#endif
virtual int ShowModal();
#if wxOSX_USE_COCOA
@@ -33,6 +37,10 @@ public:
protected:
DECLARE_DYNAMIC_CLASS(wxDirDialog)
#if wxOSX_USE_COCOA
WX_NSObject m_sheetDelegate;
#endif
};
#endif

View File

@@ -53,9 +53,14 @@ public:
AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags);
#endif // wxUSE_EVENTLOOP_SOURCE
void ObserverCallBack(CFRunLoopObserverRef observer, int activity);
protected:
void CommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity);
void DefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity);
static void OSXCommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info);
static void OSXDefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info);
// get the currently executing CFRunLoop
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
@@ -74,8 +79,11 @@ protected:
// cfrunloop
CFRunLoopRef m_runLoop;
// runloop observer
CFRunLoopObserverRef m_runLoopObserver;
// common modes runloop observer
CFRunLoopObserverRef m_commonModeRunLoopObserver;
// default mode runloop observer
CFRunLoopObserverRef m_defaultModeRunLoopObserver;
private:
// process all already pending events and dispatch a new one (blocking

View File

@@ -41,6 +41,10 @@ public:
const wxSize& sz = wxDefaultSize,
const wxString& name = wxFileDialogNameStr);
#if wxOSX_USE_COCOA
~wxFileDialog();
#endif
virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
@@ -81,6 +85,7 @@ protected:
int m_firstFileTypeFilter;
wxArrayString m_currentExtensions;
WX_NSObject m_delegate;
WX_NSObject m_sheetDelegate;
#endif
};

View File

@@ -22,6 +22,10 @@ public:
long style = wxOK|wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
#if wxOSX_USE_COCOA
~wxMessageDialog();
#endif
virtual int ShowModal();
#if wxOSX_USE_COCOA
@@ -42,6 +46,9 @@ protected:
int m_buttonId[3];
int m_buttonCount;
#if wxOSX_USE_COCOA
WX_NSObject m_sheetDelegate;
#endif
DECLARE_DYNAMIC_CLASS(wxMessageDialog)
};

View File

@@ -304,20 +304,18 @@
// usually more limited) implementations are used which allows to avoid the
// dependency on the C++ run-time library.
//
// Default is 1 if compiler supports it. Currently this means not one of the
// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it
// needs non-default options for such build to avoid getting "fatal error
// C1076: compiler limit : internal heap limit reached; use /Zm to specify a
// higher limit" in its own standard headers, so you need to ensure you do
// increase the heap size before enabling this option for this compiler.
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
// support using standard containers and that VC6 needs non-default options for
// such build to avoid getting "fatal error C1076: compiler limit : internal
// heap limit reached; use /Zm to specify a higher limit" in its own standard
// headers, so you need to ensure you do increase the heap size before enabling
// this option for this compiler.
//
// Recommended setting: 1 unless you use a system without good implementation
// of STL.
#if defined(_MSC_VER) && _MSC_VER < 1300
#define wxUSE_STD_CONTAINERS 0
#else
#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT
#endif
// Default is 0 for compatibility reasons.
//
// Recommended setting: 1 unless compatibility with the official wxWidgets
// build and/or the existing code is a concern.
#define wxUSE_STD_CONTAINERS 0
// Use standard C++ streams if 1 instead of wx streams in some places. If
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the

View File

@@ -33,7 +33,7 @@ class WXDLLIMPEXP_FWD_CORE wxSpinCtrlButton;
// wxSpinCtrl is a combination of wxTextCtrl and wxSpinButton
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxSpinCtrl : public wxControl
class WXDLLIMPEXP_CORE wxSpinCtrl : public wxNavigationEnabled<wxControl>
{
public:
wxSpinCtrl() { Init(); }
@@ -93,8 +93,6 @@ public:
// number is out of range
bool GetTextValue(int *val) const;
WX_DECLARE_CONTROL_CONTAINER();
protected:
// override the base class virtuals involved into geometry calculations
virtual wxSize DoGetBestSize() const;
@@ -113,7 +111,6 @@ private:
int m_oldValue;
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
};

View File

@@ -13,53 +13,6 @@
#ifndef _WX_TOGGLEBUTTON_H_
#define _WX_TOGGLEBUTTON_H_
class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButtonBase
{
public:
wxBitmapToggleButton() {}
wxBitmapToggleButton(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool value);
virtual bool GetValue() const ;
virtual bool OSXHandleClicked( double timestampsec );
virtual void Command(wxCommandEvent& event);
private:
wxBitmap m_bitmap;
int m_marginX,
m_marginY;
protected:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual wxSize DoGetBestSize() const;
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton)
};
class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
{
public:
@@ -94,11 +47,40 @@ public:
protected:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual wxSize DoGetBestSize() const;
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)
};
class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButton
{
public:
wxBitmapToggleButton() {}
wxBitmapToggleButton(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton)
};
#endif // _WX_TOGGLEBUTTON_H_