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 void wxapp_install_idle_handler();
38 //-----------------------------------------------------------------------------
40 //-----------------------------------------------------------------------------
43 extern void wxapp_install_thread_wakeup();
44 extern void wxapp_uninstall_thread_wakeup();
47 //----------------------------------------------------------------------------
49 //----------------------------------------------------------------------------
51 extern bool g_blockEventsOnDrag
;
53 //----------------------------------------------------------------------------
55 //----------------------------------------------------------------------------
58 static char * gv_xpm
[] = {
72 " ....XX....XX....XX. ",
73 " .XXX.XXX..XXXX..XXX.... ",
74 " .XXXXXXXXXXXXXXXXXXX.XXX. ",
75 " .XXXXXXXXXXXXXXXXXXXXXXXX. ",
76 " .XXXXXXXXXXXXXXXXXXXXXXXX. ",
77 " ..XXXXXXXXXXXXXXXXXXXXXX. ",
78 " .XXXXXXXXXXXXXXXXXX... ",
79 " ..XXXXXXXXXXXXXXXX. ",
80 " .XXXXXXXXXXXXXXXX. ",
81 " .XXXXXXXXXXXXXXXX. ",
82 " .XXXXXXXXXXXXXXXXX. ",
83 " .XXXXXXXXXXXXXXXXX. ",
84 " .XXXXXXXXXXXXXXXXXX. ",
85 " .XXXXXXXXXXXXXXXXXXX. ",
86 " .XXXXXXXXXXXXXXXXXXXXX. ",
87 " .XXXXXXXXXXXXXX.XXXXXXX. ",
88 " .XXXXXXX.XXXXXXX.XXXXXXX. ",
89 " .XXXXXXXX.XXXXXXX.XXXXXXX. ",
90 " .XXXXXXX...XXXXX...XXXXX. ",
91 " .XXXXXXX. ..... ..... ",
99 static char * page_xpm
[] = {
100 /* width height ncolors chars_per_pixel */
109 " ................... ",
110 " .XXXXXXXXXXXXXXXXX.. ",
111 " .XXXXXXXXXXXXXXXXX.o. ",
112 " .XXXXXXXXXXXXXXXXX.oo. ",
113 " .XXXXXXXXXXXXXXXXX.ooo. ",
114 " .XXXXXXXXXXXXXXXXX.oooo. ",
115 " .XXXXXXXXXXXXXXXXX....... ",
116 " .XXXXXOOOOOOOOOOXXXooooo. ",
117 " .XXXXXXXXXXXXXXXXXXooooo. ",
118 " .XXXXXOOOOOOOOOOXXXXXXXX. ",
119 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
120 " .XXXXXXXOOOOOOOOOXXXXXXX. ",
121 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
122 " .XXXXXXOOOOOOOOOOXXXXXXX. ",
123 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
124 " .XXXXXOOOOOOOOOOXXXXXXXX. ",
125 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
126 " .XXXXXXXOOOOOOOOOXXXXXXX. ",
127 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
128 " .XXXXXXOOOOOOOOOOXXXXXXX. ",
129 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
130 " .XXXXXOOOOOOOOOOXXXXXXXX. ",
131 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
132 " .XXXXXXOOOOOOOOOOXXXXXXX. ",
133 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
134 " .XXXXXOOOOOOOXXXXXXXXXXX. ",
135 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
136 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
137 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
138 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
139 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
140 " ......................... "};
144 // ----------------------------------------------------------------------------
146 // ----------------------------------------------------------------------------
148 static void target_drag_leave( GtkWidget
*WXUNUSED(widget
),
149 GdkDragContext
*context
,
150 guint
WXUNUSED(time
),
151 wxDropTarget
*drop_target
)
153 if (g_isIdle
) wxapp_install_idle_handler();
155 /* inform the wxDropTarget about the current GdkDragContext.
156 this is only valid for the duration of this call */
157 drop_target
->SetDragContext( context
);
159 /* we don't need return values. this event is just for
161 drop_target
->OnLeave();
163 /* this has to be done because GDK has no "drag_enter" event */
164 drop_target
->m_firstMotion
= TRUE
;
166 /* after this, invalidate the drop_target's GdkDragContext */
167 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
170 // ----------------------------------------------------------------------------
172 // ----------------------------------------------------------------------------
174 static gboolean
target_drag_motion( GtkWidget
*WXUNUSED(widget
),
175 GdkDragContext
*context
,
179 wxDropTarget
*drop_target
)
181 if (g_isIdle
) wxapp_install_idle_handler();
183 /* Owen Taylor: "if the coordinates not in a drop zone,
184 return FALSE, otherwise call gtk_drag_status() and
187 /* inform the wxDropTarget about the current GdkDragContext.
188 this is only valid for the duration of this call */
189 drop_target
->SetDragContext( context
);
193 if (drop_target
->m_firstMotion
)
195 /* the first "drag_motion" event substitutes a "drag_enter" event */
196 ret
= drop_target
->OnEnter( x
, y
);
200 /* give program a chance to react (i.e. to say no by returning FALSE) */
201 ret
= drop_target
->OnMove( x
, y
);
204 /* we don't yet handle which "actions" (i.e. copy or move)
205 the target accepts. so far we simply accept the
206 suggested action. TODO. */
208 gdk_drag_status( context
, context
->suggested_action
, time
);
210 /* after this, invalidate the drop_target's GdkDragContext */
211 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
213 /* this has to be done because GDK has no "drag_enter" event */
214 drop_target
->m_firstMotion
= FALSE
;
219 // ----------------------------------------------------------------------------
221 // ----------------------------------------------------------------------------
223 static gboolean
target_drag_drop( GtkWidget
*widget
,
224 GdkDragContext
*context
,
228 wxDropTarget
*drop_target
)
230 if (g_isIdle
) wxapp_install_idle_handler();
232 /* Owen Taylor: "if the drop is not in a drop zone,
233 return FALSE, otherwise, if you aren't accepting
234 the drop, call gtk_drag_finish() with success == FALSE
235 otherwise call gtk_drag_data_get()" */
237 // printf( "drop.\n" );
239 /* this seems to make a difference between not accepting
240 due to wrong target area and due to wrong format. let
241 us hope that this is not required.. */
243 /* inform the wxDropTarget about the current GdkDragContext.
244 this is only valid for the duration of this call */
245 drop_target
->SetDragContext( context
);
247 /* inform the wxDropTarget about the current drag widget.
248 this is only valid for the duration of this call */
249 drop_target
->SetDragWidget( widget
);
251 /* inform the wxDropTarget about the current drag time.
252 this is only valid for the duration of this call */
253 drop_target
->SetDragTime( time
);
255 bool ret
= drop_target
->OnDrop( x
, y
);
259 wxLogDebug( wxT( "Drop target: OnDrop returned TRUE") );
261 /* cancel the whole thing */
262 gtk_drag_finish( context
,
263 FALSE
, /* no success */
264 FALSE
, /* don't delete data on dropping side */
269 wxLogDebug( wxT( "Drop target: OnDrop returned TRUE") );
272 /* disable GUI threads */
273 wxapp_uninstall_thread_wakeup();
276 GdkAtom format
= drop_target
->GetMatchingPair();
279 /* this should trigger an "drag_data_received" event */
280 gtk_drag_get_data( widget
,
286 /* re-enable GUI threads */
287 wxapp_install_thread_wakeup();
291 /* after this, invalidate the drop_target's GdkDragContext */
292 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
294 /* after this, invalidate the drop_target's drag widget */
295 drop_target
->SetDragWidget( (GtkWidget
*) NULL
);
297 /* this has to be done because GDK has no "drag_enter" event */
298 drop_target
->m_firstMotion
= TRUE
;
303 // ----------------------------------------------------------------------------
304 // "drag_data_received"
305 // ----------------------------------------------------------------------------
307 static void target_drag_data_received( GtkWidget
*WXUNUSED(widget
),
308 GdkDragContext
*context
,
311 GtkSelectionData
*data
,
312 guint
WXUNUSED(info
),
314 wxDropTarget
*drop_target
)
316 if (g_isIdle
) wxapp_install_idle_handler();
318 /* Owen Taylor: "call gtk_drag_finish() with
322 if ((data
->length
<= 0) || (data
->format
!= 8))
324 /* negative data length and non 8-bit data format
325 qualifies for junk */
326 gtk_drag_finish (context
, FALSE
, FALSE
, time
);
331 wxLogDebug( wxT( "Drop target: data received event") );
333 /* inform the wxDropTarget about the current GtkSelectionData.
334 this is only valid for the duration of this call */
335 drop_target
->SetDragData( data
);
337 if (drop_target
->OnData( x
, y
))
339 wxLogDebug( wxT( "Drop target: OnData returned TRUE") );
341 /* tell GTK that data transfer was successfull */
342 gtk_drag_finish( context
, TRUE
, FALSE
, time
);
346 wxLogDebug( wxT( "Drop target: OnData returned FALSE") );
348 /* tell GTK that data transfer was not successfull */
349 gtk_drag_finish( context
, FALSE
, FALSE
, time
);
352 /* after this, invalidate the drop_target's drag data */
353 drop_target
->SetDragData( (GtkSelectionData
*) NULL
);
356 //----------------------------------------------------------------------------
358 //----------------------------------------------------------------------------
360 wxDropTarget::wxDropTarget( wxDataObject
*data
)
361 : wxDropTargetBase( data
)
363 m_firstMotion
= TRUE
;
364 m_dragContext
= (GdkDragContext
*) NULL
;
365 m_dragWidget
= (GtkWidget
*) NULL
;
366 m_dragData
= (GtkSelectionData
*) NULL
;
370 bool wxDropTarget::OnEnter( int WXUNUSED(x
), int WXUNUSED(y
) )
375 return (GetMatchingPair() != (GdkAtom
) 0);
378 bool wxDropTarget::OnMove( int WXUNUSED(x
), int WXUNUSED(y
) )
383 return (GetMatchingPair() != (GdkAtom
) 0);
386 bool wxDropTarget::OnDrop( int WXUNUSED(x
), int WXUNUSED(y
) )
391 return (GetMatchingPair() != (GdkAtom
) 0);
394 bool wxDropTarget::OnData( int WXUNUSED(x
), int WXUNUSED(y
) )
399 if (GetMatchingPair() == (GdkAtom
) 0)
405 GdkAtom
wxDropTarget::GetMatchingPair()
413 GList
*child
= m_dragContext
->targets
;
416 GdkAtom formatAtom
= (GdkAtom
) GPOINTER_TO_INT(child
->data
);
417 wxDataFormat
format( formatAtom
);
420 char *name
= gdk_atom_name( formatAtom
);
421 if (name
) wxLogDebug( "Drop target: drag has format: %s", name
);
423 if (m_dataObject
->IsSupportedFormat( format
))
432 bool wxDropTarget::GetData()
440 wxDataFormat
dragFormat( m_dragData
->target
);
442 if (!m_dataObject
->IsSupportedFormat( dragFormat
))
445 if (dragFormat
.GetType() == wxDF_TEXT
)
447 wxTextDataObject
*text_object
= (wxTextDataObject
*)m_dataObject
;
448 text_object
->SetText( (const char*)m_dragData
->data
);
452 if (dragFormat
.GetType() == wxDF_FILENAME
)
454 wxFileDataObject
*file_object
= (wxFileDataObject
*)m_dataObject
;
455 file_object
->SetData( 0, (const char*)m_dragData
->data
);
459 m_dataObject
->SetData( dragFormat
, (size_t)m_dragData
->length
, (const void*)m_dragData
->data
);
464 void wxDropTarget::UnregisterWidget( GtkWidget
*widget
)
466 wxCHECK_RET( widget
!= NULL
, wxT("unregister widget is NULL") );
468 gtk_drag_dest_unset( widget
);
470 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
471 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
473 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
474 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
476 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
477 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
479 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
480 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
483 void wxDropTarget::RegisterWidget( GtkWidget
*widget
)
485 wxCHECK_RET( widget
!= NULL
, wxT("register widget is NULL") );
487 /* gtk_drag_dest_set() determines what default behaviour we'd like
488 GTK to supply. we don't want to specify out targets (=formats)
489 or actions in advance (i.e. not GTK_DEST_DEFAULT_MOTION and
490 not GTK_DEST_DEFAULT_DROP). instead we react individually to
491 "drag_motion" and "drag_drop" events. this makes it possible
492 to allow dropping on only a small area. we should set
493 GTK_DEST_DEFAULT_HIGHLIGHT as this will switch on the nice
494 highlighting if dragging over standard controls, but this
495 seems to be broken without the other two. */
497 gtk_drag_dest_set( widget
,
498 (GtkDestDefaults
) 0, /* no default behaviour */
499 (GtkTargetEntry
*) NULL
, /* we don't supply any formats here */
500 0, /* number of targets = 0 */
501 (GdkDragAction
) 0 ); /* we don't supply any actions here */
503 gtk_signal_connect( GTK_OBJECT(widget
), "drag_leave",
504 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
506 gtk_signal_connect( GTK_OBJECT(widget
), "drag_motion",
507 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
509 gtk_signal_connect( GTK_OBJECT(widget
), "drag_drop",
510 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
512 gtk_signal_connect( GTK_OBJECT(widget
), "drag_data_received",
513 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
516 // ----------------------------------------------------------------------------
518 // ----------------------------------------------------------------------------
520 wxTextDropTarget::wxTextDropTarget()
521 : wxDropTarget(new wxTextDataObject
)
525 bool wxTextDropTarget::OnData(wxCoord x
, wxCoord y
)
530 return OnDropText(x
, y
, ((wxTextDataObject
*)m_dataObject
)->GetText());
533 // ----------------------------------------------------------------------------
535 // ----------------------------------------------------------------------------
537 wxFileDropTarget::wxFileDropTarget()
538 : wxDropTarget(new wxFileDataObject
)
542 bool wxFileDropTarget::OnData(wxCoord x
, wxCoord y
)
547 return OnDropFiles(x
, y
,
548 ((wxFileDataObject
*)m_dataObject
)->GetFilenames());
551 //----------------------------------------------------------------------------
553 //----------------------------------------------------------------------------
556 source_drag_data_get (GtkWidget
*WXUNUSED(widget
),
557 GdkDragContext
*context
,
558 GtkSelectionData
*selection_data
,
559 guint
WXUNUSED(info
),
560 guint
WXUNUSED(time
),
561 wxDropSource
*drop_source
)
563 if (g_isIdle
) wxapp_install_idle_handler();
565 wxDataFormat
format( selection_data
->target
);
567 wxLogDebug( wxT("Drop source: format requested: %s"), format
.GetId().c_str() );
569 drop_source
->m_retValue
= wxDragCancel
;
571 wxDataObject
*data
= drop_source
->GetDataObject();
575 wxLogDebug( wxT("Drop source: no data object") );
579 if (!data
->IsSupportedFormat(format
))
581 wxLogDebug( wxT("Drop source: unsupported format") );
585 if (data
->GetDataSize(format
) == 0)
587 wxLogDebug( wxT("Drop source: empty data") );
591 size_t size
= data
->GetDataSize(format
);
593 // printf( "data size: %d.\n", (int)data_size );
595 guchar
*d
= new guchar
[size
];
597 if (!data
->GetDataHere( format
, (void*)d
))
604 /* disable GUI threads */
605 wxapp_uninstall_thread_wakeup();
608 gtk_selection_data_set( selection_data
,
609 selection_data
->target
,
615 /* enable GUI threads */
616 wxapp_install_thread_wakeup();
621 /* so far only copy, no moves. TODO. */
622 drop_source
->m_retValue
= wxDragCopy
;
625 //----------------------------------------------------------------------------
626 // "drag_data_delete"
627 //----------------------------------------------------------------------------
629 static void source_drag_data_delete( GtkWidget
*WXUNUSED(widget
),
630 GdkDragContext
*WXUNUSED(context
),
631 wxDropSource
*drop_source
)
633 if (g_isIdle
) wxapp_install_idle_handler();
635 // printf( "Delete the data!\n" );
637 drop_source
->m_retValue
= wxDragMove
;
640 //----------------------------------------------------------------------------
642 //----------------------------------------------------------------------------
644 static void source_drag_begin( GtkWidget
*WXUNUSED(widget
),
645 GdkDragContext
*WXUNUSED(context
),
646 wxDropSource
*WXUNUSED(drop_source
) )
648 if (g_isIdle
) wxapp_install_idle_handler();
650 // printf( "drag_begin.\n" );
653 //----------------------------------------------------------------------------
655 //----------------------------------------------------------------------------
657 static void source_drag_end( GtkWidget
*WXUNUSED(widget
),
658 GdkDragContext
*WXUNUSED(context
),
659 wxDropSource
*drop_source
)
661 if (g_isIdle
) wxapp_install_idle_handler();
663 // printf( "drag_end.\n" );
665 drop_source
->m_waiting
= FALSE
;
668 //---------------------------------------------------------------------------
670 //---------------------------------------------------------------------------
672 wxDropSource::wxDropSource( wxWindow
*win
, const wxIcon
&go
, const wxIcon
&stop
)
674 g_blockEventsOnDrag
= TRUE
;
678 m_widget
= win
->m_widget
;
679 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
681 m_retValue
= wxDragCancel
;
683 m_defaultCursor
= wxCursor( wxCURSOR_NO_ENTRY
);
684 m_goaheadCursor
= wxCursor( wxCURSOR_HAND
);
687 if (wxNullIcon
== go
) m_goIcon
= wxIcon( page_xpm
);
689 if (wxNullIcon
== stop
) m_stopIcon
= wxIcon( gv_xpm
);
692 wxDropSource::wxDropSource( wxDataObject
& data
, wxWindow
*win
,
693 const wxIcon
&go
, const wxIcon
&stop
)
700 m_widget
= win
->m_widget
;
701 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
702 m_retValue
= wxDragCancel
;
704 m_defaultCursor
= wxCursor( wxCURSOR_NO_ENTRY
);
705 m_goaheadCursor
= wxCursor( wxCURSOR_HAND
);
708 if (wxNullIcon
== go
) m_goIcon
= wxIcon( page_xpm
);
710 if (wxNullIcon
== stop
) m_stopIcon
= wxIcon( gv_xpm
);
713 wxDropSource::~wxDropSource()
715 g_blockEventsOnDrag
= FALSE
;
718 wxDragResult
wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove
) )
720 wxASSERT_MSG( m_data
, wxT("wxDragSource: no data") );
723 return (wxDragResult
) wxDragNone
;
725 if (m_data
->GetFormatCount() == 0)
726 return (wxDragResult
) wxDragNone
;
728 g_blockEventsOnDrag
= TRUE
;
734 GtkTargetList
*target_list
= gtk_target_list_new( (GtkTargetEntry
*) NULL
, 0 );
736 wxDataFormat
*array
= new wxDataFormat
[ m_data
->GetFormatCount() ];
737 m_data
->GetAllFormats( array
);
738 for (size_t i
= 0; i
< m_data
->GetFormatCount(); i
++)
740 GdkAtom atom
= array
[i
];
741 wxLogDebug( wxT("Supported atom %s"), gdk_atom_name( atom
) );
742 gtk_target_list_add( target_list
, atom
, 0, 0 );
746 GdkEventMotion event
;
747 event
.window
= m_widget
->window
;
750 GdkModifierType state
;
751 gdk_window_get_pointer( event
.window
, &x
, &y
, &state
);
755 event
.time
= GDK_CURRENT_TIME
;
757 /* GTK wants to know which button was pressed which caused the dragging */
758 int button_number
= 0;
759 if (event
.state
& GDK_BUTTON1_MASK
) button_number
= 1;
760 else if (event
.state
& GDK_BUTTON2_MASK
) button_number
= 2;
761 else if (event
.state
& GDK_BUTTON3_MASK
) button_number
= 3;
764 /* disable GUI threads */
765 wxapp_uninstall_thread_wakeup();
768 /* don't start dragging if no button is down */
771 GdkDragContext
*context
= gtk_drag_begin( m_widget
,
774 button_number
, /* number of mouse button which started drag */
775 (GdkEvent
*) &event
);
777 wxMask
*mask
= m_goIcon
.GetMask();
778 GdkBitmap
*bm
= (GdkBitmap
*) NULL
;
779 if (mask
) bm
= mask
->GetBitmap();
780 GdkPixmap
*pm
= m_goIcon
.GetPixmap();
782 gtk_drag_set_icon_pixmap( context
,
783 gtk_widget_get_colormap( m_widget
),
789 while (m_waiting
) gtk_main_iteration();;
793 /* re-enable GUI threads */
794 wxapp_install_thread_wakeup();
797 g_blockEventsOnDrag
= FALSE
;
804 void wxDropSource::RegisterWindow()
806 if (!m_widget
) return;
808 gtk_signal_connect( GTK_OBJECT(m_widget
), "drag_data_get",
809 GTK_SIGNAL_FUNC (source_drag_data_get
), (gpointer
) this);
810 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_data_delete",
811 GTK_SIGNAL_FUNC (source_drag_data_delete
), (gpointer
) this );
812 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_begin",
813 GTK_SIGNAL_FUNC (source_drag_begin
), (gpointer
) this );
814 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_end",
815 GTK_SIGNAL_FUNC (source_drag_end
), (gpointer
) this );
819 void wxDropSource::UnregisterWindow()
821 if (!m_widget
) return;
823 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
824 GTK_SIGNAL_FUNC(source_drag_data_get
), (gpointer
) this );
825 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
826 GTK_SIGNAL_FUNC(source_drag_data_delete
), (gpointer
) this );
827 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
828 GTK_SIGNAL_FUNC(source_drag_begin
), (gpointer
) this );
829 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
830 GTK_SIGNAL_FUNC(source_drag_end
), (gpointer
) this );
835 // wxUSE_DRAG_AND_DROP