1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDropTarget class
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
11 #pragma implementation "dnd.h"
16 #if wxUSE_DRAG_AND_DROP
18 #include "wx/window.h"
20 #include "wx/gdicmn.h"
26 #include "gdk/gdkprivate.h"
28 #include "gtk/gtkdnd.h"
29 #include "gtk/gtkselection.h"
31 //----------------------------------------------------------------------------
33 //----------------------------------------------------------------------------
35 extern bool g_blockEventsOnDrag
;
37 //----------------------------------------------------------------------------
39 //----------------------------------------------------------------------------
42 static char * gv_xpm
[] = {
56 " ....XX....XX....XX. ",
57 " .XXX.XXX..XXXX..XXX.... ",
58 " .XXXXXXXXXXXXXXXXXXX.XXX. ",
59 " .XXXXXXXXXXXXXXXXXXXXXXXX. ",
60 " .XXXXXXXXXXXXXXXXXXXXXXXX. ",
61 " ..XXXXXXXXXXXXXXXXXXXXXX. ",
62 " .XXXXXXXXXXXXXXXXXX... ",
63 " ..XXXXXXXXXXXXXXXX. ",
64 " .XXXXXXXXXXXXXXXX. ",
65 " .XXXXXXXXXXXXXXXX. ",
66 " .XXXXXXXXXXXXXXXXX. ",
67 " .XXXXXXXXXXXXXXXXX. ",
68 " .XXXXXXXXXXXXXXXXXX. ",
69 " .XXXXXXXXXXXXXXXXXXX. ",
70 " .XXXXXXXXXXXXXXXXXXXXX. ",
71 " .XXXXXXXXXXXXXX.XXXXXXX. ",
72 " .XXXXXXX.XXXXXXX.XXXXXXX. ",
73 " .XXXXXXXX.XXXXXXX.XXXXXXX. ",
74 " .XXXXXXX...XXXXX...XXXXX. ",
75 " .XXXXXXX. ..... ..... ",
83 static char * page_xpm
[] = {
84 /* width height ncolors chars_per_pixel */
93 " ................... ",
94 " .XXXXXXXXXXXXXXXXX.. ",
95 " .XXXXXXXXXXXXXXXXX.o. ",
96 " .XXXXXXXXXXXXXXXXX.oo. ",
97 " .XXXXXXXXXXXXXXXXX.ooo. ",
98 " .XXXXXXXXXXXXXXXXX.oooo. ",
99 " .XXXXXXXXXXXXXXXXX....... ",
100 " .XXXXXOOOOOOOOOOXXXooooo. ",
101 " .XXXXXXXXXXXXXXXXXXooooo. ",
102 " .XXXXXOOOOOOOOOOXXXXXXXX. ",
103 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
104 " .XXXXXXXOOOOOOOOOXXXXXXX. ",
105 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
106 " .XXXXXXOOOOOOOOOOXXXXXXX. ",
107 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
108 " .XXXXXOOOOOOOOOOXXXXXXXX. ",
109 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
110 " .XXXXXXXOOOOOOOOOXXXXXXX. ",
111 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
112 " .XXXXXXOOOOOOOOOOXXXXXXX. ",
113 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
114 " .XXXXXOOOOOOOOOOXXXXXXXX. ",
115 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
116 " .XXXXXXOOOOOOOOOOXXXXXXX. ",
117 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
118 " .XXXXXOOOOOOOXXXXXXXXXXX. ",
119 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
120 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
121 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
122 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
123 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
124 " ......................... "};
128 // ----------------------------------------------------------------------------
130 // ----------------------------------------------------------------------------
132 static void target_drag_leave( GtkWidget
*WXUNUSED(widget
),
133 GdkDragContext
*context
,
134 guint
WXUNUSED(time
),
135 wxDropTarget
*drop_target
)
137 /* inform the wxDropTarget about the current GdkDragContext.
138 this is only valid for the duration of this call */
139 drop_target
->SetDragContext( context
);
141 /* we don't need return values. this event is just for
143 drop_target
->OnLeave();
145 /* this has to be done because GDK has no "drag_enter" event */
146 drop_target
->m_firstMotion
= TRUE
;
148 /* after this, invalidate the drop_target's GdkDragContext */
149 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
152 // ----------------------------------------------------------------------------
154 // ----------------------------------------------------------------------------
156 static gboolean
target_drag_motion( GtkWidget
*WXUNUSED(widget
),
157 GdkDragContext
*context
,
161 wxDropTarget
*drop_target
)
163 /* Owen Taylor: "if the coordinates not in a drop zone,
164 return FALSE, otherwise call gtk_drag_status() and
167 /* inform the wxDropTarget about the current GdkDragContext.
168 this is only valid for the duration of this call */
169 drop_target
->SetDragContext( context
);
171 if (drop_target
->m_firstMotion
)
173 /* the first "drag_motion" event substitutes a "drag_enter" event */
174 drop_target
->OnEnter();
177 /* give program a chance to react (i.e. to say no by returning FALSE) */
178 bool ret
= drop_target
->OnMove( x
, y
);
180 /* we don't yet handle which "actions" (i.e. copy or move)
181 the target accepts. so far we simply accept the
182 suggested action. TODO. */
184 gdk_drag_status( context
, context
->suggested_action
, time
);
186 /* after this, invalidate the drop_target's GdkDragContext */
187 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
189 /* this has to be done because GDK has no "drag_enter" event */
190 drop_target
->m_firstMotion
= FALSE
;
195 // ----------------------------------------------------------------------------
197 // ----------------------------------------------------------------------------
199 static gboolean
target_drag_drop( GtkWidget
*widget
,
200 GdkDragContext
*context
,
204 wxDropTarget
*drop_target
)
206 /* Owen Taylor: "if the drop is not in a drop zone,
207 return FALSE, otherwise, if you aren't accepting
208 the drop, call gtk_drag_finish() with success == FALSE
209 otherwise call gtk_drag_data_get()" */
211 // printf( "drop.\n" );
213 /* this seems to make a difference between not accepting
214 due to wrong target area and due to wrong format. let
215 us hope that this is not required.. */
217 /* inform the wxDropTarget about the current GdkDragContext.
218 this is only valid for the duration of this call */
219 drop_target
->SetDragContext( context
);
221 /* inform the wxDropTarget about the current drag widget.
222 this is only valid for the duration of this call */
223 drop_target
->SetDragWidget( widget
);
225 /* inform the wxDropTarget about the current drag time.
226 this is only valid for the duration of this call */
227 drop_target
->SetDragTime( time
);
229 bool ret
= drop_target
->OnDrop( x
, y
);
233 /* cancel the whole thing */
234 gtk_drag_finish( context
,
235 FALSE
, /* no success */
236 FALSE
, /* don't delete data on dropping side */
240 /* after this, invalidate the drop_target's GdkDragContext */
241 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
243 /* after this, invalidate the drop_target's drag widget */
244 drop_target
->SetDragWidget( (GtkWidget
*) NULL
);
246 /* this has to be done because GDK has no "drag_enter" event */
247 drop_target
->m_firstMotion
= TRUE
;
252 // ----------------------------------------------------------------------------
253 // "drag_data_received"
254 // ----------------------------------------------------------------------------
256 static void target_drag_data_received( GtkWidget
*WXUNUSED(widget
),
257 GdkDragContext
*context
,
260 GtkSelectionData
*data
,
261 guint
WXUNUSED(info
),
263 wxDropTarget
*drop_target
)
265 /* Owen Taylor: "call gtk_drag_finish() with
268 // printf( "data received.\n" );
270 if ((data
->length
<= 0) || (data
->format
!= 8))
272 /* negative data length and non 8-bit data format
273 qualifies for junk */
274 gtk_drag_finish (context
, FALSE
, FALSE
, time
);
279 /* inform the wxDropTarget about the current GtkSelectionData.
280 this is only valid for the duration of this call */
281 drop_target
->SetDragData( data
);
283 if (drop_target
->OnData( x
, y
))
285 /* tell GTK that data transfer was successfull */
286 gtk_drag_finish( context
, TRUE
, FALSE
, time
);
290 /* tell GTK that data transfer was not successfull */
291 gtk_drag_finish( context
, FALSE
, FALSE
, time
);
294 /* after this, invalidate the drop_target's drag data */
295 drop_target
->SetDragData( (GtkSelectionData
*) NULL
);
298 //----------------------------------------------------------------------------
300 //----------------------------------------------------------------------------
302 wxDropTarget::wxDropTarget()
304 m_firstMotion
= TRUE
;
305 m_dragContext
= (GdkDragContext
*) NULL
;
306 m_dragWidget
= (GtkWidget
*) NULL
;
307 m_dragData
= (GtkSelectionData
*) NULL
;
311 wxDropTarget::~wxDropTarget()
315 void wxDropTarget::OnEnter()
319 void wxDropTarget::OnLeave()
323 bool wxDropTarget::OnMove( int WXUNUSED(x
), int WXUNUSED(y
) )
328 bool wxDropTarget::OnDrop( int WXUNUSED(x
), int WXUNUSED(y
) )
333 bool wxDropTarget::OnData( int WXUNUSED(x
), int WXUNUSED(y
) )
338 bool wxDropTarget::RequestData( wxDataFormat format
)
340 if (!m_dragContext
) return FALSE
;
341 if (!m_dragWidget
) return FALSE
;
343 /* this should trigger an "drag_data_received" event */
344 gtk_drag_get_data( m_dragWidget
,
352 bool wxDropTarget::IsSupported( wxDataFormat format
)
354 if (!m_dragContext
) return FALSE
;
356 GList
*child
= m_dragContext
->targets
;
359 GdkAtom formatAtom
= (GdkAtom
) GPOINTER_TO_INT(child
->data
);
361 // char *name = gdk_atom_name( formatAtom );
362 // if (name) printf( "Format available: %s.\n", name );
364 if (formatAtom
== format
.GetAtom()) return TRUE
;
371 bool wxDropTarget::GetData( wxDataObject
*data_object
)
373 if (!m_dragData
) return FALSE
;
375 if (m_dragData
->target
!= data_object
->GetFormat().GetAtom()) return FALSE
;
377 if (data_object
->GetFormat().GetType() == wxDF_TEXT
)
379 wxTextDataObject
*text_object
= (wxTextDataObject
*)data_object
;
380 text_object
->SetText( (const char*)m_dragData
->data
);
383 if (data_object
->GetFormat().GetType() == wxDF_FILENAME
)
387 if (data_object
->GetFormat().GetType() == wxDF_PRIVATE
)
389 wxPrivateDataObject
*priv_object
= (wxPrivateDataObject
*)data_object
;
390 priv_object
->SetData( (const char*)m_dragData
->data
, (size_t)m_dragData
->length
);
396 void wxDropTarget::UnregisterWidget( GtkWidget
*widget
)
398 wxCHECK_RET( widget
!= NULL
, _T("unregister widget is NULL") );
400 gtk_drag_dest_unset( widget
);
402 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
403 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
405 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
406 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
408 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
409 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
411 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
412 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
415 void wxDropTarget::RegisterWidget( GtkWidget
*widget
)
417 wxCHECK_RET( widget
!= NULL
, _T("register widget is NULL") );
419 /* gtk_drag_dest_set() determines what default behaviour we'd like
420 GTK to supply. we don't want to specify out targets (=formats)
421 or actions in advance (i.e. not GTK_DEST_DEFAULT_MOTION and
422 not GTK_DEST_DEFAULT_DROP). instead we react individually to
423 "drag_motion" and "drag_drop" events. this makes it possible
424 to allow dropping on only a small area. we should set
425 GTK_DEST_DEFAULT_HIGHLIGHT as this will switch on the nice
426 highlighting if dragging over standard controls, but this
427 seems to be broken without the other two. */
429 gtk_drag_dest_set( widget
,
430 (GtkDestDefaults
) 0, /* no default behaviour */
431 (GtkTargetEntry
*) NULL
, /* we don't supply any formats here */
432 0, /* number of targets = 0 */
433 (GdkDragAction
) 0 ); /* we don't supply any actions here */
435 gtk_signal_connect( GTK_OBJECT(widget
), "drag_leave",
436 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
438 gtk_signal_connect( GTK_OBJECT(widget
), "drag_motion",
439 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
441 gtk_signal_connect( GTK_OBJECT(widget
), "drag_drop",
442 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
444 gtk_signal_connect( GTK_OBJECT(widget
), "drag_data_received",
445 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
448 //-------------------------------------------------------------------------
450 //-------------------------------------------------------------------------
452 bool wxTextDropTarget::OnMove( int WXUNUSED(x
), int WXUNUSED(y
) )
454 return IsSupported( wxDF_TEXT
);
457 bool wxTextDropTarget::OnDrop( int WXUNUSED(x
), int WXUNUSED(y
) )
459 if (IsSupported( wxDF_TEXT
))
461 RequestData( wxDF_TEXT
);
468 bool wxTextDropTarget::OnData( int x
, int y
)
470 wxTextDataObject data
;
471 if (!GetData( &data
)) return FALSE
;
473 OnDropText( x
, y
, data
.GetText() );
478 //-------------------------------------------------------------------------
479 // wxPrivateDropTarget
480 //-------------------------------------------------------------------------
482 wxPrivateDropTarget::wxPrivateDropTarget()
484 m_id
= wxTheApp
->GetAppName();
487 wxPrivateDropTarget::wxPrivateDropTarget( const wxString
&id
)
492 bool wxPrivateDropTarget::OnMove( int WXUNUSED(x
), int WXUNUSED(y
) )
494 return IsSupported( m_id
);
497 bool wxPrivateDropTarget::OnDrop( int WXUNUSED(x
), int WXUNUSED(y
) )
499 if (!IsSupported( m_id
))
508 bool wxPrivateDropTarget::OnData( int x
, int y
)
510 if (!IsSupported( m_id
)) return FALSE
;
512 wxPrivateDataObject data
;
513 if (!GetData( &data
)) return FALSE
;
515 OnDropData( x
, y
, data
.GetData(), data
.GetSize() );
520 //----------------------------------------------------------------------------
521 // A drop target which accepts files (dragged from File Manager or Explorer)
522 //----------------------------------------------------------------------------
524 bool wxFileDropTarget::OnMove( int WXUNUSED(x
), int WXUNUSED(y
) )
526 return IsSupported( wxDF_FILENAME
);
529 bool wxFileDropTarget::OnDrop( int x
, int y
)
531 if (IsSupported( wxDF_FILENAME
))
533 RequestData( wxDF_FILENAME
);
540 bool wxFileDropTarget::OnData( int x
, int y
)
542 wxFileDataObject data
;
543 if (!GetData( &data
)) return FALSE
;
545 /* get number of substrings /root/mytext.txt/0/root/myothertext.txt/0/0 */
548 size_t size
= data
.GetFiles().Length();
549 wxChar
*text
= WXSTRINGCAST data
.GetFiles();
550 for ( i
= 0; i
< size
; i
++)
551 if (text
[i
] == 0) number
++;
553 if (number
== 0) return FALSE
;
555 wxChar
**files
= new wxChar
*[number
];
557 text
= WXSTRINGCAST data
.GetFiles();
558 for (i
= 0; i
< number
; i
++)
561 int len
= wxStrlen( text
);
565 OnDropFiles( x
, y
, number
, files
);
572 //----------------------------------------------------------------------------
574 //----------------------------------------------------------------------------
577 source_drag_data_get (GtkWidget
*WXUNUSED(widget
),
578 GdkDragContext
*context
,
579 GtkSelectionData
*selection_data
,
580 guint
WXUNUSED(info
),
581 guint
WXUNUSED(time
),
582 wxDropSource
*drop_source
)
584 // char *name = gdk_atom_name( selection_data->target );
585 // if (name) printf( "Format requested: %s.\n", name );
587 wxNode
*node
= drop_source
->m_data
->m_dataObjects
.First();
590 wxDataObject
*data_object
= (wxDataObject
*) node
->Data();
591 if (data_object
->GetFormat().GetAtom() == selection_data
->target
)
593 size_t data_size
= data_object
->GetSize();
597 guchar
*buffer
= new guchar
[data_size
];
598 data_object
->WriteData( buffer
);
600 gtk_selection_data_set( selection_data
,
601 selection_data
->target
,
608 /* so far only copy, no moves. TODO. */
609 drop_source
->m_retValue
= wxDragCopy
;
618 drop_source
->m_retValue
= wxDragCancel
;
621 //----------------------------------------------------------------------------
622 // "drag_data_delete"
623 //----------------------------------------------------------------------------
625 static void source_drag_data_delete( GtkWidget
*WXUNUSED(widget
),
626 GdkDragContext
*WXUNUSED(context
),
627 wxDropSource
*drop_source
)
629 // printf( "Delete the data!\n" );
631 drop_source
->m_retValue
= wxDragMove
;
634 //----------------------------------------------------------------------------
636 //----------------------------------------------------------------------------
638 static void source_drag_begin( GtkWidget
*WXUNUSED(widget
),
639 GdkDragContext
*WXUNUSED(context
),
640 wxDropSource
*WXUNUSED(drop_source
) )
642 // printf( "drag_begin.\n" );
645 //----------------------------------------------------------------------------
647 //----------------------------------------------------------------------------
649 static void source_drag_end( GtkWidget
*WXUNUSED(widget
),
650 GdkDragContext
*WXUNUSED(context
),
651 wxDropSource
*drop_source
)
653 // printf( "drag_end.\n" );
655 drop_source
->m_waiting
= FALSE
;
658 //---------------------------------------------------------------------------
660 //---------------------------------------------------------------------------
662 wxDropSource::wxDropSource( wxWindow
*win
, const wxIcon
&go
, const wxIcon
&stop
)
664 g_blockEventsOnDrag
= TRUE
;
668 m_widget
= win
->m_widget
;
669 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
671 m_data
= (wxDataBroker
*) NULL
;
672 m_retValue
= wxDragCancel
;
674 m_defaultCursor
= wxCursor( wxCURSOR_NO_ENTRY
);
675 m_goaheadCursor
= wxCursor( wxCURSOR_HAND
);
678 if (wxNullIcon
== go
) m_goIcon
= wxIcon( page_xpm
);
680 if (wxNullIcon
== stop
) m_stopIcon
= wxIcon( gv_xpm
);
683 wxDropSource::wxDropSource( wxDataObject
*data
, wxWindow
*win
, const wxIcon
&go
, const wxIcon
&stop
)
688 m_widget
= win
->m_widget
;
689 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
690 m_retValue
= wxDragCancel
;
694 m_data
= new wxDataBroker();
699 m_data
= (wxDataBroker
*) NULL
;
702 m_defaultCursor
= wxCursor( wxCURSOR_NO_ENTRY
);
703 m_goaheadCursor
= wxCursor( wxCURSOR_HAND
);
706 if (wxNullIcon
== go
) m_goIcon
= wxIcon( page_xpm
);
708 if (wxNullIcon
== stop
) m_stopIcon
= wxIcon( gv_xpm
);
711 wxDropSource::wxDropSource( wxDataBroker
*data
, wxWindow
*win
)
714 m_widget
= win
->m_widget
;
715 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
716 m_retValue
= wxDragCancel
;
720 m_defaultCursor
= wxCursor( wxCURSOR_NO_ENTRY
);
721 m_goaheadCursor
= wxCursor( wxCURSOR_HAND
);
724 void wxDropSource::SetData( wxDataObject
*data
)
726 if (m_data
) delete m_data
;
730 m_data
= new wxDataBroker();
735 m_data
= (wxDataBroker
*) NULL
;
739 void wxDropSource::SetData( wxDataBroker
*data
)
741 if (m_data
) delete m_data
;
746 wxDropSource::~wxDropSource(void)
748 if (m_data
) delete m_data
;
750 g_blockEventsOnDrag
= FALSE
;
753 wxDragResult
wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove
) )
755 wxASSERT_MSG( m_data
, _T("wxDragSource: no data") );
757 if (!m_data
) return (wxDragResult
) wxDragNone
;
759 g_blockEventsOnDrag
= TRUE
;
765 GtkTargetList
*target_list
= gtk_target_list_new( (GtkTargetEntry
*) NULL
, 0 );
766 gtk_target_list_add( target_list
, gdk_atom_intern( "STRING", FALSE
), 0, 0 );
768 GdkEventMotion event
;
769 event
.window
= m_widget
->window
;
772 GdkModifierType state
;
773 gdk_window_get_pointer( event
.window
, &x
, &y
, &state
);
778 /* GTK wants to know which button was pressed which caused the dragging */
779 int button_number
= 0;
780 if (event
.state
& GDK_BUTTON1_MASK
) button_number
= 1;
781 else if (event
.state
& GDK_BUTTON2_MASK
) button_number
= 2;
782 else if (event
.state
& GDK_BUTTON3_MASK
) button_number
= 3;
784 /* don't start dragging if no button is down */
787 GdkDragContext
*context
= gtk_drag_begin( m_widget
,
790 button_number
, /* number of mouse button which started drag */
791 (GdkEvent
*) &event
);
793 wxMask
*mask
= m_goIcon
.GetMask();
794 GdkBitmap
*bm
= (GdkBitmap
*) NULL
;
795 if (mask
) bm
= mask
->GetBitmap();
796 GdkPixmap
*pm
= m_goIcon
.GetPixmap();
798 gtk_drag_set_icon_pixmap( context
,
799 gtk_widget_get_colormap( m_widget
),
807 while (m_waiting
) wxYield();
810 g_blockEventsOnDrag
= FALSE
;
817 void wxDropSource::RegisterWindow()
819 if (!m_widget
) return;
821 gtk_signal_connect( GTK_OBJECT(m_widget
), "drag_data_get",
822 GTK_SIGNAL_FUNC (source_drag_data_get
), (gpointer
) this);
823 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_data_delete",
824 GTK_SIGNAL_FUNC (source_drag_data_delete
), (gpointer
) this );
825 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_begin",
826 GTK_SIGNAL_FUNC (source_drag_begin
), (gpointer
) this );
827 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_end",
828 GTK_SIGNAL_FUNC (source_drag_end
), (gpointer
) this );
832 void wxDropSource::UnregisterWindow()
834 if (!m_widget
) return;
836 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
837 GTK_SIGNAL_FUNC(source_drag_data_get
), (gpointer
) this );
838 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
839 GTK_SIGNAL_FUNC(source_drag_data_delete
), (gpointer
) this );
840 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
841 GTK_SIGNAL_FUNC(source_drag_begin
), (gpointer
) this );
842 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
843 GTK_SIGNAL_FUNC(source_drag_end
), (gpointer
) this );
848 // wxUSE_DRAG_AND_DROP