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
),
376 // GetMatchingPair() checks for m_dataObject too, no need to do it here
378 // disable the debug message from GetMatchingPair() - there are too many
384 return (GetMatchingPair() != (GdkAtom
) 0) ? def
: wxDragNone
;
387 bool wxDropTarget::OnDrop( wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
) )
392 return (GetMatchingPair() != (GdkAtom
) 0);
395 bool wxDropTarget::OnData( wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
) )
400 if (GetMatchingPair() == (GdkAtom
) 0)
406 GdkAtom
wxDropTarget::GetMatchingPair()
414 GList
*child
= m_dragContext
->targets
;
417 GdkAtom formatAtom
= (GdkAtom
) GPOINTER_TO_INT(child
->data
);
418 wxDataFormat
format( formatAtom
);
421 char *name
= gdk_atom_name( formatAtom
);
422 wxLogDebug("Drop target: drag has format: %s", name
? name
: "unnamed");
425 if (m_dataObject
->IsSupportedFormat( format
))
434 bool wxDropTarget::GetData()
442 wxDataFormat
dragFormat( m_dragData
->target
);
444 if (!m_dataObject
->IsSupportedFormat( dragFormat
))
447 if (dragFormat
.GetType() == wxDF_TEXT
)
449 wxTextDataObject
*text_object
= (wxTextDataObject
*)m_dataObject
;
450 text_object
->SetText( (const char*)m_dragData
->data
);
454 if (dragFormat
.GetType() == wxDF_FILENAME
)
456 wxFileDataObject
*file_object
= (wxFileDataObject
*)m_dataObject
;
457 file_object
->SetData( 0, (const char*)m_dragData
->data
);
461 m_dataObject
->SetData( dragFormat
, (size_t)m_dragData
->length
, (const void*)m_dragData
->data
);
466 void wxDropTarget::UnregisterWidget( GtkWidget
*widget
)
468 wxCHECK_RET( widget
!= NULL
, wxT("unregister widget is NULL") );
470 gtk_drag_dest_unset( widget
);
472 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
473 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
475 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
476 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
478 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
479 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
481 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
482 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
485 void wxDropTarget::RegisterWidget( GtkWidget
*widget
)
487 wxCHECK_RET( widget
!= NULL
, wxT("register widget is NULL") );
489 /* gtk_drag_dest_set() determines what default behaviour we'd like
490 GTK to supply. we don't want to specify out targets (=formats)
491 or actions in advance (i.e. not GTK_DEST_DEFAULT_MOTION and
492 not GTK_DEST_DEFAULT_DROP). instead we react individually to
493 "drag_motion" and "drag_drop" events. this makes it possible
494 to allow dropping on only a small area. we should set
495 GTK_DEST_DEFAULT_HIGHLIGHT as this will switch on the nice
496 highlighting if dragging over standard controls, but this
497 seems to be broken without the other two. */
499 gtk_drag_dest_set( widget
,
500 (GtkDestDefaults
) 0, /* no default behaviour */
501 (GtkTargetEntry
*) NULL
, /* we don't supply any formats here */
502 0, /* number of targets = 0 */
503 (GdkDragAction
) 0 ); /* we don't supply any actions here */
505 gtk_signal_connect( GTK_OBJECT(widget
), "drag_leave",
506 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
508 gtk_signal_connect( GTK_OBJECT(widget
), "drag_motion",
509 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
511 gtk_signal_connect( GTK_OBJECT(widget
), "drag_drop",
512 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
514 gtk_signal_connect( GTK_OBJECT(widget
), "drag_data_received",
515 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
518 // ----------------------------------------------------------------------------
520 // ----------------------------------------------------------------------------
522 wxTextDropTarget::wxTextDropTarget()
523 : wxDropTarget(new wxTextDataObject
)
527 bool wxTextDropTarget::OnData(wxCoord x
, wxCoord y
)
532 return OnDropText(x
, y
, ((wxTextDataObject
*)m_dataObject
)->GetText());
535 // ----------------------------------------------------------------------------
537 // ----------------------------------------------------------------------------
539 wxFileDropTarget::wxFileDropTarget()
540 : wxDropTarget(new wxFileDataObject
)
544 bool wxFileDropTarget::OnData(wxCoord x
, wxCoord y
)
549 return OnDropFiles(x
, y
,
550 ((wxFileDataObject
*)m_dataObject
)->GetFilenames());
553 //----------------------------------------------------------------------------
555 //----------------------------------------------------------------------------
558 source_drag_data_get (GtkWidget
*WXUNUSED(widget
),
559 GdkDragContext
*context
,
560 GtkSelectionData
*selection_data
,
561 guint
WXUNUSED(info
),
562 guint
WXUNUSED(time
),
563 wxDropSource
*drop_source
)
565 if (g_isIdle
) wxapp_install_idle_handler();
567 wxDataFormat
format( selection_data
->target
);
569 wxLogDebug( wxT("Drop source: format requested: %s"), format
.GetId().c_str() );
571 drop_source
->m_retValue
= wxDragCancel
;
573 wxDataObject
*data
= drop_source
->GetDataObject();
577 wxLogDebug( wxT("Drop source: no data object") );
581 if (!data
->IsSupportedFormat(format
))
583 wxLogDebug( wxT("Drop source: unsupported format") );
587 if (data
->GetDataSize(format
) == 0)
589 wxLogDebug( wxT("Drop source: empty data") );
593 size_t size
= data
->GetDataSize(format
);
595 // printf( "data size: %d.\n", (int)data_size );
597 guchar
*d
= new guchar
[size
];
599 if (!data
->GetDataHere( format
, (void*)d
))
606 /* disable GUI threads */
607 wxapp_uninstall_thread_wakeup();
610 gtk_selection_data_set( selection_data
,
611 selection_data
->target
,
617 /* enable GUI threads */
618 wxapp_install_thread_wakeup();
623 /* so far only copy, no moves. TODO. */
624 drop_source
->m_retValue
= wxDragCopy
;
627 //----------------------------------------------------------------------------
628 // "drag_data_delete"
629 //----------------------------------------------------------------------------
631 static void source_drag_data_delete( GtkWidget
*WXUNUSED(widget
),
632 GdkDragContext
*WXUNUSED(context
),
633 wxDropSource
*drop_source
)
635 if (g_isIdle
) wxapp_install_idle_handler();
637 // printf( "Delete the data!\n" );
639 drop_source
->m_retValue
= wxDragMove
;
642 //----------------------------------------------------------------------------
644 //----------------------------------------------------------------------------
646 static void source_drag_begin( GtkWidget
*WXUNUSED(widget
),
647 GdkDragContext
*WXUNUSED(context
),
648 wxDropSource
*WXUNUSED(drop_source
) )
650 if (g_isIdle
) wxapp_install_idle_handler();
652 // printf( "drag_begin.\n" );
655 //----------------------------------------------------------------------------
657 //----------------------------------------------------------------------------
659 static void source_drag_end( GtkWidget
*WXUNUSED(widget
),
660 GdkDragContext
*WXUNUSED(context
),
661 wxDropSource
*drop_source
)
663 if (g_isIdle
) wxapp_install_idle_handler();
665 // printf( "drag_end.\n" );
667 drop_source
->m_waiting
= FALSE
;
670 //---------------------------------------------------------------------------
672 //---------------------------------------------------------------------------
674 wxDropSource::wxDropSource( wxWindow
*win
, const wxIcon
&go
, const wxIcon
&stop
)
676 g_blockEventsOnDrag
= TRUE
;
680 m_widget
= win
->m_widget
;
681 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
683 m_retValue
= wxDragCancel
;
685 m_defaultCursor
= wxCursor( wxCURSOR_NO_ENTRY
);
686 m_goaheadCursor
= wxCursor( wxCURSOR_HAND
);
689 if (wxNullIcon
== go
) m_goIcon
= wxIcon( page_xpm
);
691 if (wxNullIcon
== stop
) m_stopIcon
= wxIcon( gv_xpm
);
694 wxDropSource::wxDropSource( wxDataObject
& data
, wxWindow
*win
,
695 const wxIcon
&go
, const wxIcon
&stop
)
702 m_widget
= win
->m_widget
;
703 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
704 m_retValue
= wxDragCancel
;
706 m_defaultCursor
= wxCursor( wxCURSOR_NO_ENTRY
);
707 m_goaheadCursor
= wxCursor( wxCURSOR_HAND
);
710 if (wxNullIcon
== go
) m_goIcon
= wxIcon( page_xpm
);
712 if (wxNullIcon
== stop
) m_stopIcon
= wxIcon( gv_xpm
);
715 wxDropSource::~wxDropSource()
717 g_blockEventsOnDrag
= FALSE
;
720 wxDragResult
wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove
) )
722 wxASSERT_MSG( m_data
, wxT("wxDragSource: no data") );
725 return (wxDragResult
) wxDragNone
;
727 if (m_data
->GetFormatCount() == 0)
728 return (wxDragResult
) wxDragNone
;
730 g_blockEventsOnDrag
= TRUE
;
736 GtkTargetList
*target_list
= gtk_target_list_new( (GtkTargetEntry
*) NULL
, 0 );
738 wxDataFormat
*array
= new wxDataFormat
[ m_data
->GetFormatCount() ];
739 m_data
->GetAllFormats( array
);
740 for (size_t i
= 0; i
< m_data
->GetFormatCount(); i
++)
742 GdkAtom atom
= array
[i
];
743 wxLogDebug( wxT("Supported atom %s"), gdk_atom_name( atom
) );
744 gtk_target_list_add( target_list
, atom
, 0, 0 );
748 GdkEventMotion event
;
749 event
.window
= m_widget
->window
;
752 GdkModifierType state
;
753 gdk_window_get_pointer( event
.window
, &x
, &y
, &state
);
757 event
.time
= GDK_CURRENT_TIME
;
759 /* GTK wants to know which button was pressed which caused the dragging */
760 int button_number
= 0;
761 if (event
.state
& GDK_BUTTON1_MASK
) button_number
= 1;
762 else if (event
.state
& GDK_BUTTON2_MASK
) button_number
= 2;
763 else if (event
.state
& GDK_BUTTON3_MASK
) button_number
= 3;
766 /* disable GUI threads */
767 wxapp_uninstall_thread_wakeup();
770 /* don't start dragging if no button is down */
773 GdkDragContext
*context
= gtk_drag_begin( m_widget
,
776 button_number
, /* number of mouse button which started drag */
777 (GdkEvent
*) &event
);
779 wxMask
*mask
= m_goIcon
.GetMask();
780 GdkBitmap
*bm
= (GdkBitmap
*) NULL
;
781 if (mask
) bm
= mask
->GetBitmap();
782 GdkPixmap
*pm
= m_goIcon
.GetPixmap();
784 gtk_drag_set_icon_pixmap( context
,
785 gtk_widget_get_colormap( m_widget
),
791 while (m_waiting
) gtk_main_iteration();;
795 /* re-enable GUI threads */
796 wxapp_install_thread_wakeup();
799 g_blockEventsOnDrag
= FALSE
;
806 void wxDropSource::RegisterWindow()
808 if (!m_widget
) return;
810 gtk_signal_connect( GTK_OBJECT(m_widget
), "drag_data_get",
811 GTK_SIGNAL_FUNC (source_drag_data_get
), (gpointer
) this);
812 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_data_delete",
813 GTK_SIGNAL_FUNC (source_drag_data_delete
), (gpointer
) this );
814 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_begin",
815 GTK_SIGNAL_FUNC (source_drag_begin
), (gpointer
) this );
816 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_end",
817 GTK_SIGNAL_FUNC (source_drag_end
), (gpointer
) this );
821 void wxDropSource::UnregisterWindow()
823 if (!m_widget
) return;
825 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
826 GTK_SIGNAL_FUNC(source_drag_data_get
), (gpointer
) this );
827 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
828 GTK_SIGNAL_FUNC(source_drag_data_delete
), (gpointer
) this );
829 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
830 GTK_SIGNAL_FUNC(source_drag_begin
), (gpointer
) this );
831 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
832 GTK_SIGNAL_FUNC(source_drag_end
), (gpointer
) this );
837 // wxUSE_DRAG_AND_DROP