]>
git.saurik.com Git - wxWidgets.git/blob - src/osx/dnd_osx.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/dnd_osx.cpp
3 // Purpose: Mac common wxDropTarget, wxDropSource implementations
4 // Author: Stefan Csomor
7 // RCS-ID: $Id: dnd.cpp 61724 2009-08-21 10:41:26Z VZ $
8 // Copyright: (c) 1998 Stefan Csomor
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
14 #if wxUSE_DRAG_AND_DROP
20 #include "wx/toplevel.h"
21 #include "wx/gdicmn.h"
24 #include "wx/osx/private.h"
26 //----------------------------------------------------------------------------
28 //----------------------------------------------------------------------------
30 wxDragResult
wxDropTarget::OnDragOver(
31 wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
),
34 return CurrentDragHasSupportedFormat() ? def
: wxDragNone
;
37 wxDataFormat
wxDropTarget::GetMatchingPair()
39 wxFAIL_MSG("wxDropTarget::GetMatchingPair() not implemented in src/osx/carbon/dnd.cpp");
43 bool wxDropTarget::OnDrop( wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
) )
45 if (m_dataObject
== NULL
)
48 return CurrentDragHasSupportedFormat();
51 wxDragResult
wxDropTarget::OnData(
52 wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
),
55 if (m_dataObject
== NULL
)
58 if (!CurrentDragHasSupportedFormat())
61 return GetData() ? def
: wxDragNone
;
64 //-------------------------------------------------------------------------
66 //-------------------------------------------------------------------------
68 //-----------------------------------------------------------------------------
71 wxDropSource::~wxDropSource()
75 bool wxDropSource::MacInstallDefaultCursor(wxDragResult effect
)
77 const wxCursor
& cursor
= GetCursor(effect
);
78 bool result
= cursor
.Ok();
86 #endif // wxUSE_DRAG_AND_DROP