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 wxDragResult result
= wxDragMove
;
192 if (context
->suggested_action
== GDK_ACTION_COPY
) result
= wxDragCopy
;
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 bool ret
= result
!= wxDragNone
;
208 GdkDragAction action
= GDK_ACTION_MOVE
;
209 if (result
== wxDragCopy
) action
== GDK_ACTION_COPY
;
210 gdk_drag_status( context
, context
->suggested_action
, time
);
213 /* after this, invalidate the drop_target's GdkDragContext */
214 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
216 /* this has to be done because GDK has no "drag_enter" event */
217 drop_target
->m_firstMotion
= FALSE
;
222 // ----------------------------------------------------------------------------
224 // ----------------------------------------------------------------------------
226 static gboolean
target_drag_drop( GtkWidget
*widget
,
227 GdkDragContext
*context
,
231 wxDropTarget
*drop_target
)
233 if (g_isIdle
) wxapp_install_idle_handler();
235 /* Owen Taylor: "if the drop is not in a drop zone,
236 return FALSE, otherwise, if you aren't accepting
237 the drop, call gtk_drag_finish() with success == FALSE
238 otherwise call gtk_drag_data_get()" */
240 // printf( "drop.\n" );
242 /* this seems to make a difference between not accepting
243 due to wrong target area and due to wrong format. let
244 us hope that this is not required.. */
246 /* inform the wxDropTarget about the current GdkDragContext.
247 this is only valid for the duration of this call */
248 drop_target
->SetDragContext( context
);
250 /* inform the wxDropTarget about the current drag widget.
251 this is only valid for the duration of this call */
252 drop_target
->SetDragWidget( widget
);
254 /* inform the wxDropTarget about the current drag time.
255 this is only valid for the duration of this call */
256 drop_target
->SetDragTime( time
);
259 wxDragResult result = wxDragMove;
260 if (context->suggested_action == GDK_ACTION_COPY) result = wxDragCopy;
263 bool ret
= drop_target
->OnDrop( x
, y
);
267 wxLogDebug( wxT( "Drop target: OnDrop returned TRUE") );
269 /* cancel the whole thing */
270 gtk_drag_finish( context
,
271 FALSE
, /* no success */
272 FALSE
, /* don't delete data on dropping side */
277 wxLogDebug( wxT( "Drop target: OnDrop returned TRUE") );
280 /* disable GUI threads */
281 wxapp_uninstall_thread_wakeup();
284 GdkAtom format
= drop_target
->GetMatchingPair();
288 GdkDragAction action = GDK_ACTION_MOVE;
289 if (result == wxDragCopy) action == GDK_ACTION_COPY;
290 context->action = action;
292 /* this should trigger an "drag_data_received" event */
293 gtk_drag_get_data( widget
,
299 /* re-enable GUI threads */
300 wxapp_install_thread_wakeup();
304 /* after this, invalidate the drop_target's GdkDragContext */
305 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
307 /* after this, invalidate the drop_target's drag widget */
308 drop_target
->SetDragWidget( (GtkWidget
*) NULL
);
310 /* this has to be done because GDK has no "drag_enter" event */
311 drop_target
->m_firstMotion
= TRUE
;
316 // ----------------------------------------------------------------------------
317 // "drag_data_received"
318 // ----------------------------------------------------------------------------
320 static void target_drag_data_received( GtkWidget
*WXUNUSED(widget
),
321 GdkDragContext
*context
,
324 GtkSelectionData
*data
,
325 guint
WXUNUSED(info
),
327 wxDropTarget
*drop_target
)
329 if (g_isIdle
) wxapp_install_idle_handler();
331 /* Owen Taylor: "call gtk_drag_finish() with
335 if ((data
->length
<= 0) || (data
->format
!= 8))
337 /* negative data length and non 8-bit data format
338 qualifies for junk */
339 gtk_drag_finish (context
, FALSE
, FALSE
, time
);
344 wxLogDebug( wxT( "Drop target: data received event") );
346 /* inform the wxDropTarget about the current GtkSelectionData.
347 this is only valid for the duration of this call */
348 drop_target
->SetDragData( data
);
350 if (drop_target
->OnData( x
, y
))
352 wxLogDebug( wxT( "Drop target: OnData returned TRUE") );
354 /* tell GTK that data transfer was successfull */
355 gtk_drag_finish( context
, TRUE
, FALSE
, time
);
359 wxLogDebug( wxT( "Drop target: OnData returned FALSE") );
361 /* tell GTK that data transfer was not successfull */
362 gtk_drag_finish( context
, FALSE
, FALSE
, time
);
365 /* after this, invalidate the drop_target's drag data */
366 drop_target
->SetDragData( (GtkSelectionData
*) NULL
);
369 //----------------------------------------------------------------------------
371 //----------------------------------------------------------------------------
373 wxDropTarget::wxDropTarget( wxDataObject
*data
)
374 : wxDropTargetBase( data
)
376 m_firstMotion
= TRUE
;
377 m_dragContext
= (GdkDragContext
*) NULL
;
378 m_dragWidget
= (GtkWidget
*) NULL
;
379 m_dragData
= (GtkSelectionData
*) NULL
;
383 wxDragResult
wxDropTarget::OnDragOver( wxCoord
WXUNUSED(x
),
387 // GetMatchingPair() checks for m_dataObject too, no need to do it here
389 // disable the debug message from GetMatchingPair() - there are too many
395 return (GetMatchingPair() != (GdkAtom
) 0) ? def
: wxDragNone
;
398 bool wxDropTarget::OnDrop( wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
) )
403 return (GetMatchingPair() != (GdkAtom
) 0);
406 bool wxDropTarget::OnData( wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
) )
411 if (GetMatchingPair() == (GdkAtom
) 0)
417 GdkAtom
wxDropTarget::GetMatchingPair()
425 GList
*child
= m_dragContext
->targets
;
428 GdkAtom formatAtom
= (GdkAtom
) GPOINTER_TO_INT(child
->data
);
429 wxDataFormat
format( formatAtom
);
432 char *name
= gdk_atom_name( formatAtom
);
433 wxLogDebug("Drop target: drag has format: %s", name
? name
: "unnamed");
436 if (m_dataObject
->IsSupportedFormat( format
))
445 bool wxDropTarget::GetData()
453 wxDataFormat
dragFormat( m_dragData
->target
);
455 if (!m_dataObject
->IsSupportedFormat( dragFormat
))
458 if (dragFormat
.GetType() == wxDF_TEXT
)
460 wxTextDataObject
*text_object
= (wxTextDataObject
*)m_dataObject
;
461 text_object
->SetText( (const char*)m_dragData
->data
);
465 if (dragFormat
.GetType() == wxDF_FILENAME
)
467 wxFileDataObject
*file_object
= (wxFileDataObject
*)m_dataObject
;
468 file_object
->SetData( 0, (const char*)m_dragData
->data
);
472 m_dataObject
->SetData( dragFormat
, (size_t)m_dragData
->length
, (const void*)m_dragData
->data
);
477 void wxDropTarget::UnregisterWidget( GtkWidget
*widget
)
479 wxCHECK_RET( widget
!= NULL
, wxT("unregister widget is NULL") );
481 gtk_drag_dest_unset( widget
);
483 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
484 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
486 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
487 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
489 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
490 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
492 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
493 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
496 void wxDropTarget::RegisterWidget( GtkWidget
*widget
)
498 wxCHECK_RET( widget
!= NULL
, wxT("register widget is NULL") );
500 /* gtk_drag_dest_set() determines what default behaviour we'd like
501 GTK to supply. we don't want to specify out targets (=formats)
502 or actions in advance (i.e. not GTK_DEST_DEFAULT_MOTION and
503 not GTK_DEST_DEFAULT_DROP). instead we react individually to
504 "drag_motion" and "drag_drop" events. this makes it possible
505 to allow dropping on only a small area. we should set
506 GTK_DEST_DEFAULT_HIGHLIGHT as this will switch on the nice
507 highlighting if dragging over standard controls, but this
508 seems to be broken without the other two. */
510 gtk_drag_dest_set( widget
,
511 (GtkDestDefaults
) 0, /* no default behaviour */
512 (GtkTargetEntry
*) NULL
, /* we don't supply any formats here */
513 0, /* number of targets = 0 */
514 (GdkDragAction
) 0 ); /* we don't supply any actions here */
516 gtk_signal_connect( GTK_OBJECT(widget
), "drag_leave",
517 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
519 gtk_signal_connect( GTK_OBJECT(widget
), "drag_motion",
520 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
522 gtk_signal_connect( GTK_OBJECT(widget
), "drag_drop",
523 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
525 gtk_signal_connect( GTK_OBJECT(widget
), "drag_data_received",
526 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
529 // ----------------------------------------------------------------------------
531 // ----------------------------------------------------------------------------
533 wxTextDropTarget::wxTextDropTarget()
534 : wxDropTarget(new wxTextDataObject
)
538 bool wxTextDropTarget::OnData(wxCoord x
, wxCoord y
)
543 return OnDropText(x
, y
, ((wxTextDataObject
*)m_dataObject
)->GetText());
546 // ----------------------------------------------------------------------------
548 // ----------------------------------------------------------------------------
550 wxFileDropTarget::wxFileDropTarget()
551 : wxDropTarget(new wxFileDataObject
)
555 bool wxFileDropTarget::OnData(wxCoord x
, wxCoord y
)
560 return OnDropFiles(x
, y
,
561 ((wxFileDataObject
*)m_dataObject
)->GetFilenames());
564 //----------------------------------------------------------------------------
566 //----------------------------------------------------------------------------
569 source_drag_data_get (GtkWidget
*WXUNUSED(widget
),
570 GdkDragContext
*context
,
571 GtkSelectionData
*selection_data
,
572 guint
WXUNUSED(info
),
573 guint
WXUNUSED(time
),
574 wxDropSource
*drop_source
)
576 if (g_isIdle
) wxapp_install_idle_handler();
578 wxDataFormat
format( selection_data
->target
);
580 wxLogDebug( wxT("Drop source: format requested: %s"), format
.GetId().c_str() );
582 drop_source
->m_retValue
= wxDragCancel
;
584 wxDataObject
*data
= drop_source
->GetDataObject();
588 wxLogDebug( wxT("Drop source: no data object") );
592 if (!data
->IsSupportedFormat(format
))
594 wxLogDebug( wxT("Drop source: unsupported format") );
598 if (data
->GetDataSize(format
) == 0)
600 wxLogDebug( wxT("Drop source: empty data") );
604 size_t size
= data
->GetDataSize(format
);
606 // printf( "data size: %d.\n", (int)data_size );
608 guchar
*d
= new guchar
[size
];
610 if (!data
->GetDataHere( format
, (void*)d
))
617 /* disable GUI threads */
618 wxapp_uninstall_thread_wakeup();
621 gtk_selection_data_set( selection_data
,
622 selection_data
->target
,
628 /* enable GUI threads */
629 wxapp_install_thread_wakeup();
634 /* so far only copy, no moves. TODO. */
635 drop_source
->m_retValue
= wxDragCopy
;
638 //----------------------------------------------------------------------------
639 // "drag_data_delete"
640 //----------------------------------------------------------------------------
642 static void source_drag_data_delete( GtkWidget
*WXUNUSED(widget
),
643 GdkDragContext
*WXUNUSED(context
),
644 wxDropSource
*drop_source
)
646 if (g_isIdle
) wxapp_install_idle_handler();
648 // printf( "Delete the data!\n" );
650 drop_source
->m_retValue
= wxDragMove
;
653 //----------------------------------------------------------------------------
655 //----------------------------------------------------------------------------
657 static void source_drag_begin( GtkWidget
*WXUNUSED(widget
),
658 GdkDragContext
*WXUNUSED(context
),
659 wxDropSource
*WXUNUSED(drop_source
) )
661 if (g_isIdle
) wxapp_install_idle_handler();
663 // printf( "drag_begin.\n" );
666 //----------------------------------------------------------------------------
668 //----------------------------------------------------------------------------
670 static void source_drag_end( GtkWidget
*WXUNUSED(widget
),
671 GdkDragContext
*WXUNUSED(context
),
672 wxDropSource
*drop_source
)
674 if (g_isIdle
) wxapp_install_idle_handler();
676 // printf( "drag_end.\n" );
678 drop_source
->m_waiting
= FALSE
;
681 //---------------------------------------------------------------------------
683 //---------------------------------------------------------------------------
685 wxDropSource::wxDropSource( wxWindow
*win
, const wxIcon
&go
, const wxIcon
&stop
)
687 g_blockEventsOnDrag
= TRUE
;
691 m_widget
= win
->m_widget
;
692 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
694 m_retValue
= wxDragCancel
;
696 m_defaultCursor
= wxCursor( wxCURSOR_NO_ENTRY
);
697 m_goaheadCursor
= wxCursor( wxCURSOR_HAND
);
700 if (wxNullIcon
== go
) m_goIcon
= wxIcon( page_xpm
);
702 if (wxNullIcon
== stop
) m_stopIcon
= wxIcon( gv_xpm
);
705 wxDropSource::wxDropSource( wxDataObject
& data
, wxWindow
*win
,
706 const wxIcon
&go
, const wxIcon
&stop
)
713 m_widget
= win
->m_widget
;
714 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
715 m_retValue
= wxDragCancel
;
717 m_defaultCursor
= wxCursor( wxCURSOR_NO_ENTRY
);
718 m_goaheadCursor
= wxCursor( wxCURSOR_HAND
);
721 if (wxNullIcon
== go
) m_goIcon
= wxIcon( page_xpm
);
723 if (wxNullIcon
== stop
) m_stopIcon
= wxIcon( gv_xpm
);
726 wxDropSource::~wxDropSource()
728 g_blockEventsOnDrag
= FALSE
;
731 wxDragResult
wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove
) )
733 wxASSERT_MSG( m_data
, wxT("wxDragSource: no data") );
736 return (wxDragResult
) wxDragNone
;
738 if (m_data
->GetFormatCount() == 0)
739 return (wxDragResult
) wxDragNone
;
741 g_blockEventsOnDrag
= TRUE
;
747 GtkTargetList
*target_list
= gtk_target_list_new( (GtkTargetEntry
*) NULL
, 0 );
749 wxDataFormat
*array
= new wxDataFormat
[ m_data
->GetFormatCount() ];
750 m_data
->GetAllFormats( array
);
751 for (size_t i
= 0; i
< m_data
->GetFormatCount(); i
++)
753 GdkAtom atom
= array
[i
];
754 wxLogDebug( wxT("Supported atom %s"), gdk_atom_name( atom
) );
755 gtk_target_list_add( target_list
, atom
, 0, 0 );
759 GdkEventMotion event
;
760 event
.window
= m_widget
->window
;
763 GdkModifierType state
;
764 gdk_window_get_pointer( event
.window
, &x
, &y
, &state
);
768 event
.time
= GDK_CURRENT_TIME
;
770 /* GTK wants to know which button was pressed which caused the dragging */
771 int button_number
= 0;
772 if (event
.state
& GDK_BUTTON1_MASK
) button_number
= 1;
773 else if (event
.state
& GDK_BUTTON2_MASK
) button_number
= 2;
774 else if (event
.state
& GDK_BUTTON3_MASK
) button_number
= 3;
777 /* disable GUI threads */
778 wxapp_uninstall_thread_wakeup();
781 /* don't start dragging if no button is down */
784 GdkDragContext
*context
= gtk_drag_begin( m_widget
,
787 button_number
, /* number of mouse button which started drag */
788 (GdkEvent
*) &event
);
790 wxMask
*mask
= m_goIcon
.GetMask();
791 GdkBitmap
*bm
= (GdkBitmap
*) NULL
;
792 if (mask
) bm
= mask
->GetBitmap();
793 GdkPixmap
*pm
= m_goIcon
.GetPixmap();
795 gtk_drag_set_icon_pixmap( context
,
796 gtk_widget_get_colormap( m_widget
),
802 while (m_waiting
) gtk_main_iteration();;
806 /* re-enable GUI threads */
807 wxapp_install_thread_wakeup();
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