bool wxDropTarget::OnDrop( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y) ) { if (!m_dataObject) return false; return (GetMatchingPair() != (GdkAtom) 0); }
wxDragResult wxDropTarget::OnDragOver( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxDragResult def ) { // GetMatchingPair() checks for m_dataObject too, no need to do it here // disable the debug message from GetMatchingPair() by passing true to it return (GetMatchingPair(true) != (GdkAtom) 0) ? def : wxDragNone; }
wxDragResult wxDropTarget::OnData( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxDragResult def ) { if (!m_dataObject) return wxDragNone; if (GetMatchingPair() == (GdkAtom) 0) return wxDragNone; return GetData() ? def : wxDragNone; }
wxDragResult wxDropTarget::OnDragOver( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), wxDragResult def ) { // GetMatchingPair() checks for m_dataObject too, no need to do it here // disable the debug message from GetMatchingPair() - there are too many // of them otherwise #ifdef __WXDEBUG__ wxLogNull noLog; #endif // Debug return (GetMatchingPair() != (GdkAtom) 0) ? def : wxDragNone; }