- gtk_signal_connect( GTK_OBJECT(widget), "drag_leave",
- GTK_SIGNAL_FUNC(target_drag_leave), (gpointer) this );
-
- gtk_signal_connect( GTK_OBJECT(widget), "drag_motion",
- GTK_SIGNAL_FUNC(target_drag_motion), (gpointer) this );
-
- gtk_signal_connect( GTK_OBJECT(widget), "drag_drop",
- GTK_SIGNAL_FUNC(target_drag_drop), (gpointer) this );
-
- gtk_signal_connect( GTK_OBJECT(widget), "drag_data_received",
- GTK_SIGNAL_FUNC(target_drag_data_received), (gpointer) this );
-}
-
-//-------------------------------------------------------------------------
-// wxTextDropTarget
-//-------------------------------------------------------------------------
-
-bool wxTextDropTarget::OnMove( long WXUNUSED(x), long WXUNUSED(y) )
-{
- return IsSupported( wxDF_TEXT );
-}
-
-bool wxTextDropTarget::OnDrop( long WXUNUSED(x), long WXUNUSED(y) )
-{
- if (IsSupported( wxDF_TEXT ))
- {
- RequestData( wxDF_TEXT );
- return TRUE;
- }
-
- return FALSE;
-}
-
-bool wxTextDropTarget::OnData( long x, long y )
-{
- wxTextDataObject data;
- if (!GetData( &data )) return FALSE;
-
- OnDropText( x, y, data.GetText() );
-
- return TRUE;
-}
-
-//-------------------------------------------------------------------------
-// wxPrivateDropTarget
-//-------------------------------------------------------------------------
-
-wxPrivateDropTarget::wxPrivateDropTarget()
-{
- m_id = wxTheApp->GetAppName();
-}
-
-wxPrivateDropTarget::wxPrivateDropTarget( const wxString &id )
-{
- m_id = id;
-}
-
-bool wxPrivateDropTarget::OnMove( long WXUNUSED(x), long WXUNUSED(y) )
-{
- return IsSupported( m_id );
-}
-
-bool wxPrivateDropTarget::OnDrop( long WXUNUSED(x), long WXUNUSED(y) )
-{
- if (!IsSupported( m_id ))
- {
- RequestData( m_id );
- return FALSE;
- }
-
- return FALSE;
-}
-
-bool wxPrivateDropTarget::OnData( long x, long y )
-{
- if (!IsSupported( m_id )) return FALSE;
-
- wxPrivateDataObject data;
- if (!GetData( &data )) return FALSE;
-
- OnDropData( x, y, data.GetData(), data.GetSize() );
-
- return TRUE;
-}
-
-//----------------------------------------------------------------------------
-// A drop target which accepts files (dragged from File Manager or Explorer)
-//----------------------------------------------------------------------------
-
-bool wxFileDropTarget::OnMove( long WXUNUSED(x), long WXUNUSED(y) )
-{
- return IsSupported( wxDF_FILENAME );
-}
-
-bool wxFileDropTarget::OnDrop( long x, long y )
-{
- if (IsSupported( wxDF_FILENAME ))
- {
- RequestData( wxDF_FILENAME );
- return TRUE;
- }
-
- return FALSE;
-}
-
-bool wxFileDropTarget::OnData( long x, long y )
-{
- wxFileDataObject data;
- if (!GetData( &data )) return FALSE;