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
);
191 /* TODO: what should be the default behaviour? Copy or move? */
192 wxDragResult result
= wxDragMove
;
194 if (drop_target
->m_firstMotion
)
196 /* the first "drag_motion" event substitutes a "drag_enter" event */
197 result
= drop_target
->OnEnter( x
, y
, result
);
201 /* give program a chance to react (i.e. to say no by returning FALSE) */
202 result
= drop_target
->OnDragOver( x
, y
, result
);
205 /* we don't yet handle which "actions" (i.e. copy or move)
206 the target accepts. so far we simply accept the
207 suggested action. TODO. */
208 bool ret
= result
!= wxDragNone
;
210 gdk_drag_status( context
, context
->suggested_action
, time
);
212 /* after this, invalidate the drop_target's GdkDragContext */
213 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
215 /* this has to be done because GDK has no "drag_enter" event */
216 drop_target
->m_firstMotion
= FALSE
;
221 // ----------------------------------------------------------------------------
223 // ----------------------------------------------------------------------------
225 static gboolean
target_drag_drop( GtkWidget
*widget
,
226 GdkDragContext
*context
,
230 wxDropTarget
*drop_target
)
232 if (g_isIdle
) wxapp_install_idle_handler();
234 /* Owen Taylor: "if the drop is not in a drop zone,
235 return FALSE, otherwise, if you aren't accepting
236 the drop, call gtk_drag_finish() with success == FALSE
237 otherwise call gtk_drag_data_get()" */
239 // printf( "drop.\n" );
241 /* this seems to make a difference between not accepting
242 due to wrong target area and due to wrong format. let
243 us hope that this is not required.. */
245 /* inform the wxDropTarget about the current GdkDragContext.
246 this is only valid for the duration of this call */
247 drop_target
->SetDragContext( context
);
249 /* inform the wxDropTarget about the current drag widget.
250 this is only valid for the duration of this call */
251 drop_target
->SetDragWidget( widget
);
253 /* inform the wxDropTarget about the current drag time.
254 this is only valid for the duration of this call */
255 drop_target
->SetDragTime( time
);
257 bool ret
= drop_target
->OnDrop( x
, y
);
261 wxLogDebug( wxT( "Drop target: OnDrop returned TRUE") );
263 /* cancel the whole thing */
264 gtk_drag_finish( context
,
265 FALSE
, /* no success */
266 FALSE
, /* don't delete data on dropping side */
271 wxLogDebug( wxT( "Drop target: OnDrop returned TRUE") );
274 /* disable GUI threads */
275 wxapp_uninstall_thread_wakeup();
278 GdkAtom format
= drop_target
->GetMatchingPair();
281 /* this should trigger an "drag_data_received" event */
282 gtk_drag_get_data( widget
,
288 /* re-enable GUI threads */
289 wxapp_install_thread_wakeup();
293 /* after this, invalidate the drop_target's GdkDragContext */
294 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
296 /* after this, invalidate the drop_target's drag widget */
297 drop_target
->SetDragWidget( (GtkWidget
*) NULL
);
299 /* this has to be done because GDK has no "drag_enter" event */
300 drop_target
->m_firstMotion
= TRUE
;
305 // ----------------------------------------------------------------------------
306 // "drag_data_received"
307 // ----------------------------------------------------------------------------
309 static void target_drag_data_received( GtkWidget
*WXUNUSED(widget
),
310 GdkDragContext
*context
,
313 GtkSelectionData
*data
,
314 guint
WXUNUSED(info
),
316 wxDropTarget
*drop_target
)
318 if (g_isIdle
) wxapp_install_idle_handler();
320 /* Owen Taylor: "call gtk_drag_finish() with
324 if ((data
->length
<= 0) || (data
->format
!= 8))
326 /* negative data length and non 8-bit data format
327 qualifies for junk */
328 gtk_drag_finish (context
, FALSE
, FALSE
, time
);
333 wxLogDebug( wxT( "Drop target: data received event") );
335 /* inform the wxDropTarget about the current GtkSelectionData.
336 this is only valid for the duration of this call */
337 drop_target
->SetDragData( data
);
339 if (drop_target
->OnData( x
, y
))
341 wxLogDebug( wxT( "Drop target: OnData returned TRUE") );
343 /* tell GTK that data transfer was successfull */
344 gtk_drag_finish( context
, TRUE
, FALSE
, time
);
348 wxLogDebug( wxT( "Drop target: OnData returned FALSE") );
350 /* tell GTK that data transfer was not successfull */
351 gtk_drag_finish( context
, FALSE
, FALSE
, time
);
354 /* after this, invalidate the drop_target's drag data */
355 drop_target
->SetDragData( (GtkSelectionData
*) NULL
);
358 //----------------------------------------------------------------------------
360 //----------------------------------------------------------------------------
362 wxDropTarget::wxDropTarget( wxDataObject
*data
)
363 : wxDropTargetBase( data
)
365 m_firstMotion
= TRUE
;
366 m_dragContext
= (GdkDragContext
*) NULL
;
367 m_dragWidget
= (GtkWidget
*) NULL
;
368 m_dragData
= (GtkSelectionData
*) NULL
;
372 wxDragResult
wxDropTarget::OnDragOver( wxCoord
WXUNUSED(x
),
379 return (GetMatchingPair() != (GdkAtom
) 0) ? def
: wxDragNone
;
382 bool wxDropTarget::OnDrop( wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
) )
387 return (GetMatchingPair() != (GdkAtom
) 0);
390 bool wxDropTarget::OnData( wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
) )
395 if (GetMatchingPair() == (GdkAtom
) 0)
401 GdkAtom
wxDropTarget::GetMatchingPair()
409 GList
*child
= m_dragContext
->targets
;
412 GdkAtom formatAtom
= (GdkAtom
) GPOINTER_TO_INT(child
->data
);
413 wxDataFormat
format( formatAtom
);
416 char *name
= gdk_atom_name( formatAtom
);
417 if (name
) wxLogDebug( "Drop target: drag has format: %s", name
);
419 if (m_dataObject
->IsSupportedFormat( format
))
428 bool wxDropTarget::GetData()
436 wxDataFormat
dragFormat( m_dragData
->target
);
438 if (!m_dataObject
->IsSupportedFormat( dragFormat
))
441 if (dragFormat
.GetType() == wxDF_TEXT
)
443 wxTextDataObject
*text_object
= (wxTextDataObject
*)m_dataObject
;
444 text_object
->SetText( (const char*)m_dragData
->data
);
448 if (dragFormat
.GetType() == wxDF_FILENAME
)
450 wxFileDataObject
*file_object
= (wxFileDataObject
*)m_dataObject
;
451 file_object
->SetData( 0, (const char*)m_dragData
->data
);
455 m_dataObject
->SetData( dragFormat
, (size_t)m_dragData
->length
, (const void*)m_dragData
->data
);
460 void wxDropTarget::UnregisterWidget( GtkWidget
*widget
)
462 wxCHECK_RET( widget
!= NULL
, wxT("unregister widget is NULL") );
464 gtk_drag_dest_unset( widget
);
466 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
467 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
469 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
470 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
472 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
473 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
475 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
476 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
479 void wxDropTarget::RegisterWidget( GtkWidget
*widget
)
481 wxCHECK_RET( widget
!= NULL
, wxT("register widget is NULL") );
483 /* gtk_drag_dest_set() determines what default behaviour we'd like
484 GTK to supply. we don't want to specify out targets (=formats)
485 or actions in advance (i.e. not GTK_DEST_DEFAULT_MOTION and
486 not GTK_DEST_DEFAULT_DROP). instead we react individually to
487 "drag_motion" and "drag_drop" events. this makes it possible
488 to allow dropping on only a small area. we should set
489 GTK_DEST_DEFAULT_HIGHLIGHT as this will switch on the nice
490 highlighting if dragging over standard controls, but this
491 seems to be broken without the other two. */
493 gtk_drag_dest_set( widget
,
494 (GtkDestDefaults
) 0, /* no default behaviour */
495 (GtkTargetEntry
*) NULL
, /* we don't supply any formats here */
496 0, /* number of targets = 0 */
497 (GdkDragAction
) 0 ); /* we don't supply any actions here */
499 gtk_signal_connect( GTK_OBJECT(widget
), "drag_leave",
500 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
502 gtk_signal_connect( GTK_OBJECT(widget
), "drag_motion",
503 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
505 gtk_signal_connect( GTK_OBJECT(widget
), "drag_drop",
506 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
508 gtk_signal_connect( GTK_OBJECT(widget
), "drag_data_received",
509 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
512 // ----------------------------------------------------------------------------
514 // ----------------------------------------------------------------------------
516 wxTextDropTarget::wxTextDropTarget()
517 : wxDropTarget(new wxTextDataObject
)
521 bool wxTextDropTarget::OnData(wxCoord x
, wxCoord y
)
526 return OnDropText(x
, y
, ((wxTextDataObject
*)m_dataObject
)->GetText());
529 // ----------------------------------------------------------------------------
531 // ----------------------------------------------------------------------------
533 wxFileDropTarget::wxFileDropTarget()
534 : wxDropTarget(new wxFileDataObject
)
538 bool wxFileDropTarget::OnData(wxCoord x
, wxCoord y
)
543 return OnDropFiles(x
, y
,
544 ((wxFileDataObject
*)m_dataObject
)->GetFilenames());
547 //----------------------------------------------------------------------------
549 //----------------------------------------------------------------------------
552 source_drag_data_get (GtkWidget
*WXUNUSED(widget
),
553 GdkDragContext
*context
,
554 GtkSelectionData
*selection_data
,
555 guint
WXUNUSED(info
),
556 guint
WXUNUSED(time
),
557 wxDropSource
*drop_source
)
559 if (g_isIdle
) wxapp_install_idle_handler();
561 wxDataFormat
format( selection_data
->target
);
563 wxLogDebug( wxT("Drop source: format requested: %s"), format
.GetId().c_str() );
565 drop_source
->m_retValue
= wxDragCancel
;
567 wxDataObject
*data
= drop_source
->GetDataObject();
571 wxLogDebug( wxT("Drop source: no data object") );
575 if (!data
->IsSupportedFormat(format
))
577 wxLogDebug( wxT("Drop source: unsupported format") );
581 if (data
->GetDataSize(format
) == 0)
583 wxLogDebug( wxT("Drop source: empty data") );
587 size_t size
= data
->GetDataSize(format
);
589 // printf( "data size: %d.\n", (int)data_size );
591 guchar
*d
= new guchar
[size
];
593 if (!data
->GetDataHere( format
, (void*)d
))
600 /* disable GUI threads */
601 wxapp_uninstall_thread_wakeup();
604 gtk_selection_data_set( selection_data
,
605 selection_data
->target
,
611 /* enable GUI threads */
612 wxapp_install_thread_wakeup();
617 /* so far only copy, no moves. TODO. */
618 drop_source
->m_retValue
= wxDragCopy
;
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 if (g_isIdle
) wxapp_install_idle_handler();
631 // printf( "Delete the data!\n" );
633 drop_source
->m_retValue
= wxDragMove
;
636 //----------------------------------------------------------------------------
638 //----------------------------------------------------------------------------
640 static void source_drag_begin( GtkWidget
*WXUNUSED(widget
),
641 GdkDragContext
*WXUNUSED(context
),
642 wxDropSource
*WXUNUSED(drop_source
) )
644 if (g_isIdle
) wxapp_install_idle_handler();
646 // printf( "drag_begin.\n" );
649 //----------------------------------------------------------------------------
651 //----------------------------------------------------------------------------
653 static void source_drag_end( GtkWidget
*WXUNUSED(widget
),
654 GdkDragContext
*WXUNUSED(context
),
655 wxDropSource
*drop_source
)
657 if (g_isIdle
) wxapp_install_idle_handler();
659 // printf( "drag_end.\n" );
661 drop_source
->m_waiting
= FALSE
;
664 //---------------------------------------------------------------------------
666 //---------------------------------------------------------------------------
668 wxDropSource::wxDropSource( wxWindow
*win
, const wxIcon
&go
, const wxIcon
&stop
)
670 g_blockEventsOnDrag
= TRUE
;
674 m_widget
= win
->m_widget
;
675 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
677 m_retValue
= wxDragCancel
;
679 m_defaultCursor
= wxCursor( wxCURSOR_NO_ENTRY
);
680 m_goaheadCursor
= wxCursor( wxCURSOR_HAND
);
683 if (wxNullIcon
== go
) m_goIcon
= wxIcon( page_xpm
);
685 if (wxNullIcon
== stop
) m_stopIcon
= wxIcon( gv_xpm
);
688 wxDropSource::wxDropSource( wxDataObject
& data
, wxWindow
*win
,
689 const wxIcon
&go
, const wxIcon
&stop
)
696 m_widget
= win
->m_widget
;
697 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
698 m_retValue
= wxDragCancel
;
700 m_defaultCursor
= wxCursor( wxCURSOR_NO_ENTRY
);
701 m_goaheadCursor
= wxCursor( wxCURSOR_HAND
);
704 if (wxNullIcon
== go
) m_goIcon
= wxIcon( page_xpm
);
706 if (wxNullIcon
== stop
) m_stopIcon
= wxIcon( gv_xpm
);
709 wxDropSource::~wxDropSource()
711 g_blockEventsOnDrag
= FALSE
;
714 wxDragResult
wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove
) )
716 wxASSERT_MSG( m_data
, wxT("wxDragSource: no data") );
719 return (wxDragResult
) wxDragNone
;
721 if (m_data
->GetFormatCount() == 0)
722 return (wxDragResult
) wxDragNone
;
724 g_blockEventsOnDrag
= TRUE
;
730 GtkTargetList
*target_list
= gtk_target_list_new( (GtkTargetEntry
*) NULL
, 0 );
732 wxDataFormat
*array
= new wxDataFormat
[ m_data
->GetFormatCount() ];
733 m_data
->GetAllFormats( array
);
734 for (size_t i
= 0; i
< m_data
->GetFormatCount(); i
++)
736 GdkAtom atom
= array
[i
];
737 wxLogDebug( wxT("Supported atom %s"), gdk_atom_name( atom
) );
738 gtk_target_list_add( target_list
, atom
, 0, 0 );
742 GdkEventMotion event
;
743 event
.window
= m_widget
->window
;
746 GdkModifierType state
;
747 gdk_window_get_pointer( event
.window
, &x
, &y
, &state
);
751 event
.time
= GDK_CURRENT_TIME
;
753 /* GTK wants to know which button was pressed which caused the dragging */
754 int button_number
= 0;
755 if (event
.state
& GDK_BUTTON1_MASK
) button_number
= 1;
756 else if (event
.state
& GDK_BUTTON2_MASK
) button_number
= 2;
757 else if (event
.state
& GDK_BUTTON3_MASK
) button_number
= 3;
760 /* disable GUI threads */
761 wxapp_uninstall_thread_wakeup();
764 /* don't start dragging if no button is down */
767 GdkDragContext
*context
= gtk_drag_begin( m_widget
,
770 button_number
, /* number of mouse button which started drag */
771 (GdkEvent
*) &event
);
773 wxMask
*mask
= m_goIcon
.GetMask();
774 GdkBitmap
*bm
= (GdkBitmap
*) NULL
;
775 if (mask
) bm
= mask
->GetBitmap();
776 GdkPixmap
*pm
= m_goIcon
.GetPixmap();
778 gtk_drag_set_icon_pixmap( context
,
779 gtk_widget_get_colormap( m_widget
),
785 while (m_waiting
) gtk_main_iteration();;
789 /* re-enable GUI threads */
790 wxapp_install_thread_wakeup();
793 g_blockEventsOnDrag
= FALSE
;
800 void wxDropSource::RegisterWindow()
802 if (!m_widget
) return;
804 gtk_signal_connect( GTK_OBJECT(m_widget
), "drag_data_get",
805 GTK_SIGNAL_FUNC (source_drag_data_get
), (gpointer
) this);
806 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_data_delete",
807 GTK_SIGNAL_FUNC (source_drag_data_delete
), (gpointer
) this );
808 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_begin",
809 GTK_SIGNAL_FUNC (source_drag_begin
), (gpointer
) this );
810 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_end",
811 GTK_SIGNAL_FUNC (source_drag_end
), (gpointer
) this );
815 void wxDropSource::UnregisterWindow()
817 if (!m_widget
) return;
819 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
820 GTK_SIGNAL_FUNC(source_drag_data_get
), (gpointer
) this );
821 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
822 GTK_SIGNAL_FUNC(source_drag_data_delete
), (gpointer
) this );
823 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
824 GTK_SIGNAL_FUNC(source_drag_begin
), (gpointer
) this );
825 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
826 GTK_SIGNAL_FUNC(source_drag_end
), (gpointer
) this );
831 // wxUSE_DRAG_AND_DROP