Use the new wxUSE_ABI_INCOMPATIBLE_FEATURES to enable enhancements for wxCocoa builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -37,7 +37,7 @@ public:
|
||||
virtual wxWindow* GetWxWindow() const
|
||||
{ return NULL; }
|
||||
virtual void Cocoa_FrameChanged(void) = 0;
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
virtual void Cocoa_synthesizeMouseMoved(void) = 0;
|
||||
#endif
|
||||
virtual bool Cocoa_acceptsFirstMouse(bool &acceptsFirstMouse, WX_NSEvent theEvent)
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
{ return false; }
|
||||
virtual bool Cocoa_resetCursorRects()
|
||||
{ return false; }
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
virtual bool Cocoa_viewDidMoveToWindow()
|
||||
{ return false; }
|
||||
virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow newWindow)
|
||||
|
@@ -47,7 +47,7 @@ public:
|
||||
// Cocoa specifics
|
||||
// ------------------------------------------------------------------------
|
||||
WX_NSImageView GetNSImageView() { return (WX_NSImageView)m_cocoaNSView; }
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
wxBitmap m_bitmap;
|
||||
#endif
|
||||
|
||||
|
@@ -111,7 +111,7 @@ protected:
|
||||
void InitMouseEvent(wxMouseEvent &event, WX_NSEvent cocoaEvent);
|
||||
virtual wxWindow* GetWxWindow() const;
|
||||
virtual void Cocoa_FrameChanged(void);
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
virtual void Cocoa_synthesizeMouseMoved(void);
|
||||
#else
|
||||
void Cocoa_synthesizeMouseMoved(void);
|
||||
@@ -130,7 +130,7 @@ protected:
|
||||
virtual bool Cocoa_otherMouseDragged(WX_NSEvent theEvent);
|
||||
virtual bool Cocoa_otherMouseUp(WX_NSEvent theEvent);
|
||||
virtual bool Cocoa_resetCursorRects();
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
virtual bool Cocoa_viewDidMoveToWindow();
|
||||
virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow newWindow);
|
||||
#endif
|
||||
@@ -139,7 +139,7 @@ protected:
|
||||
wxWindowCocoaHider *m_cocoaHider;
|
||||
wxWindowCocoaScrollView *m_wxCocoaScrollView;
|
||||
bool m_isInPaint;
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
wxCocoaTrackingRectManager *m_visibleTrackingRectManager;
|
||||
#endif
|
||||
static wxWindow *sm_capturedWindow;
|
||||
|
@@ -168,7 +168,7 @@ void wxCocoaNSView::DisassociateNSView(WX_NSView cocoaNSView)
|
||||
|
||||
- (void)viewDidMoveToWindow
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_viewDidMoveToWindow() )
|
||||
#endif
|
||||
@@ -177,7 +177,7 @@ void wxCocoaNSView::DisassociateNSView(WX_NSView cocoaNSView)
|
||||
|
||||
- (void)viewWillMoveToWindow:(NSWindow *)newWindow
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_viewWillMoveToWindow(newWindow) )
|
||||
#endif
|
||||
@@ -211,7 +211,7 @@ WX_DECLARE_GET_OBJC_CLASS(wxNSViewNotificationObserver,NSObject)
|
||||
|
||||
- (void)synthesizeMouseMovedForView: (NSView *)theView
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(theView);
|
||||
wxCHECK_RET(win,wxT("synthesizeMouseMovedForView received but no wxWindow exists"));
|
||||
win->Cocoa_synthesizeMouseMoved();
|
||||
|
@@ -177,7 +177,7 @@ WX_DECLARE_GET_OBJC_CLASS(wxNonControlNSControl,NSControl)
|
||||
|
||||
- (void)viewDidMoveToWindow
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_viewDidMoveToWindow() )
|
||||
#endif
|
||||
@@ -186,7 +186,7 @@ WX_DECLARE_GET_OBJC_CLASS(wxNonControlNSControl,NSControl)
|
||||
|
||||
- (void)viewWillMoveToWindow:(NSWindow *)newWindow
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
wxCocoaNSView *win = wxCocoaNSView::GetFromCocoa(self);
|
||||
if( !win || !win->Cocoa_viewWillMoveToWindow(newWindow) )
|
||||
#endif
|
||||
@@ -221,7 +221,7 @@ bool wxControl::Create(wxWindow *parent, wxWindowID winid,
|
||||
m_parent->CocoaAddChild(this);
|
||||
SetInitialFrameRect(pos,size);
|
||||
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
// Controls should have a viewable-area tracking rect by default
|
||||
m_visibleTrackingRectManager = new wxCocoaTrackingRectManager(this);
|
||||
#endif
|
||||
|
@@ -41,7 +41,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID winid,
|
||||
[m_cocoaNSView release];
|
||||
|
||||
[GetNSImageView() setImage:bitmap.GetNSImage(true)];
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
m_bitmap = bitmap;
|
||||
#endif
|
||||
|
||||
@@ -63,14 +63,14 @@ void wxStaticBitmap::SetIcon(const wxIcon& icon)
|
||||
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
|
||||
{
|
||||
[GetNSImageView() setImage:bitmap.GetNSImage(true)];
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
m_bitmap = bitmap;
|
||||
#endif
|
||||
}
|
||||
|
||||
wxBitmap wxStaticBitmap::GetBitmap() const
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
return m_bitmap;
|
||||
#else
|
||||
// TODO: We can try to fake it and make a wxBitmap from the NSImage the control has.
|
||||
|
@@ -273,7 +273,9 @@ protected:
|
||||
wxWindowCocoa *m_owner;
|
||||
WX_NSView m_dummyNSView;
|
||||
virtual void Cocoa_FrameChanged(void);
|
||||
// virtual void Cocoa_synthesizeMouseMoved(void) {}
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
virtual void Cocoa_synthesizeMouseMoved(void) {}
|
||||
#endif
|
||||
#ifdef WXCOCOA_FILL_DUMMY_VIEW
|
||||
virtual bool Cocoa_drawRect(const NSRect& rect);
|
||||
#endif //def WXCOCOA_FILL_DUMMY_VIEW
|
||||
@@ -299,7 +301,9 @@ protected:
|
||||
wxWindowCocoa *m_owner;
|
||||
WX_NSScrollView m_cocoaNSScrollView;
|
||||
virtual void Cocoa_FrameChanged(void);
|
||||
// virtual void Cocoa_synthesizeMouseMoved(void) {}
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
virtual void Cocoa_synthesizeMouseMoved(void) {}
|
||||
#endif
|
||||
private:
|
||||
wxWindowCocoaScrollView();
|
||||
};
|
||||
@@ -483,7 +487,7 @@ void wxWindowCocoa::Init()
|
||||
m_isBeingDeleted = false;
|
||||
m_isInPaint = false;
|
||||
m_shouldBeEnabled = true;
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
m_visibleTrackingRectManager = NULL;
|
||||
#endif
|
||||
}
|
||||
@@ -549,7 +553,7 @@ void wxWindowCocoa::CocoaRemoveFromParent(void)
|
||||
|
||||
void wxWindowCocoa::SetNSView(WX_NSView cocoaNSView)
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
// Clear the visible area tracking rect if we have one.
|
||||
delete m_visibleTrackingRectManager;
|
||||
m_visibleTrackingRectManager = NULL;
|
||||
@@ -700,7 +704,7 @@ void wxWindowCocoa::Cocoa_synthesizeMouseMoved()
|
||||
|
||||
bool wxWindowCocoa::Cocoa_mouseEntered(WX_NSEvent theEvent)
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
if(m_visibleTrackingRectManager != NULL && m_visibleTrackingRectManager->IsOwnerOfEvent(theEvent))
|
||||
{
|
||||
m_visibleTrackingRectManager->BeginSynthesizingEvents();
|
||||
@@ -723,7 +727,7 @@ bool wxWindowCocoa::Cocoa_mouseEntered(WX_NSEvent theEvent)
|
||||
|
||||
bool wxWindowCocoa::Cocoa_mouseExited(WX_NSEvent theEvent)
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
if(m_visibleTrackingRectManager != NULL && m_visibleTrackingRectManager->IsOwnerOfEvent(theEvent))
|
||||
{
|
||||
m_visibleTrackingRectManager->StopSynthesizingEvents();
|
||||
@@ -806,7 +810,7 @@ bool wxWindowCocoa::Cocoa_otherMouseUp(WX_NSEvent theEvent)
|
||||
void wxWindowCocoa::Cocoa_FrameChanged(void)
|
||||
{
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("wxWindow=%p::Cocoa_FrameChanged"),this);
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
if(m_visibleTrackingRectManager != NULL)
|
||||
m_visibleTrackingRectManager->RebuildTrackingRect();
|
||||
#endif
|
||||
@@ -827,7 +831,7 @@ bool wxWindowCocoa::SetCursor(const wxCursor &cursor)
|
||||
bool wxWindowCocoa::Cocoa_resetCursorRects()
|
||||
{
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("wxWindow=%p::Cocoa_resetCursorRects"),this);
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
if(m_visibleTrackingRectManager != NULL)
|
||||
m_visibleTrackingRectManager->RebuildTrackingRect();
|
||||
#endif
|
||||
@@ -840,7 +844,7 @@ bool wxWindowCocoa::Cocoa_resetCursorRects()
|
||||
return true;
|
||||
}
|
||||
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
bool wxWindowCocoa::Cocoa_viewDidMoveToWindow()
|
||||
{
|
||||
wxLogTrace(wxTRACE_COCOA,wxT("wxWindow=%p::viewDidMoveToWindow"),this);
|
||||
@@ -1497,7 +1501,7 @@ static NSPoint s_lastScreenMouseLocation = NSZeroPoint;
|
||||
|
||||
static void SynthesizeMouseMovedEvent(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info)
|
||||
{
|
||||
#if 0 // ABI incompatibility
|
||||
#if wxUSE_ABI_INCOMPATIBLE_FEATURES
|
||||
NSPoint screenMouseLocation = [NSEvent mouseLocation];
|
||||
if(screenMouseLocation.x != s_lastScreenMouseLocation.x || screenMouseLocation.y != s_lastScreenMouseLocation.y)
|
||||
{
|
||||
|
Reference in New Issue
Block a user