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 * page_xpm
[] = {
59 /* width height ncolors chars_per_pixel */
68 " ................... ",
69 " .XXXXXXXXXXXXXXXXX.. ",
70 " .XXXXXXXXXXXXXXXXX.o. ",
71 " .XXXXXXXXXXXXXXXXX.oo. ",
72 " .XXXXXXXXXXXXXXXXX.ooo. ",
73 " .XXXXXXXXXXXXXXXXX.oooo. ",
74 " .XXXXXXXXXXXXXXXXX....... ",
75 " .XXXXXOOOOOOOOOOXXXooooo. ",
76 " .XXXXXXXXXXXXXXXXXXooooo. ",
77 " .XXXXXOOOOOOOOOOXXXXXXXX. ",
78 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
79 " .XXXXXXXOOOOOOOOOXXXXXXX. ",
80 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
81 " .XXXXXXOOOOOOOOOOXXXXXXX. ",
82 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
83 " .XXXXXOOOOOOOOOOXXXXXXXX. ",
84 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
85 " .XXXXXXXOOOOOOOOOXXXXXXX. ",
86 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
87 " .XXXXXXOOOOOOOOOOXXXXXXX. ",
88 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
89 " .XXXXXOOOOOOOOOOXXXXXXXX. ",
90 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
91 " .XXXXXXOOOOOOOOOOXXXXXXX. ",
92 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
93 " .XXXXXOOOOOOOXXXXXXXXXXX. ",
94 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
95 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
96 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
97 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
98 " .XXXXXXXXXXXXXXXXXXXXXXX. ",
99 " ......................... "};
103 // ----------------------------------------------------------------------------
105 // ----------------------------------------------------------------------------
107 static void target_drag_leave( GtkWidget
*WXUNUSED(widget
),
108 GdkDragContext
*context
,
109 guint
WXUNUSED(time
),
110 wxDropTarget
*drop_target
)
112 if (g_isIdle
) wxapp_install_idle_handler();
114 /* inform the wxDropTarget about the current GdkDragContext.
115 this is only valid for the duration of this call */
116 drop_target
->SetDragContext( context
);
118 /* we don't need return values. this event is just for
120 drop_target
->OnLeave();
122 /* this has to be done because GDK has no "drag_enter" event */
123 drop_target
->m_firstMotion
= TRUE
;
125 /* after this, invalidate the drop_target's GdkDragContext */
126 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
129 // ----------------------------------------------------------------------------
131 // ----------------------------------------------------------------------------
133 static gboolean
target_drag_motion( GtkWidget
*WXUNUSED(widget
),
134 GdkDragContext
*context
,
138 wxDropTarget
*drop_target
)
140 if (g_isIdle
) wxapp_install_idle_handler();
142 /* Owen Taylor: "if the coordinates not in a drop zone,
143 return FALSE, otherwise call gtk_drag_status() and
146 /* inform the wxDropTarget about the current GdkDragContext.
147 this is only valid for the duration of this call */
148 drop_target
->SetDragContext( context
);
151 if ( context
->suggested_action
== GDK_ACTION_COPY
)
156 if (drop_target
->m_firstMotion
)
158 /* the first "drag_motion" event substitutes a "drag_enter" event */
159 result
= drop_target
->OnEnter( x
, y
, result
);
163 /* give program a chance to react (i.e. to say no by returning FALSE) */
164 result
= drop_target
->OnDragOver( x
, y
, result
);
167 bool ret
= wxIsDragResultOk( result
);
170 GdkDragAction action
;
171 if (result
== wxDragCopy
)
172 action
= GDK_ACTION_COPY
;
174 action
= GDK_ACTION_MOVE
;
176 gdk_drag_status( context
, action
, time
);
179 /* after this, invalidate the drop_target's GdkDragContext */
180 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
182 /* this has to be done because GDK has no "drag_enter" event */
183 drop_target
->m_firstMotion
= FALSE
;
188 // ----------------------------------------------------------------------------
190 // ----------------------------------------------------------------------------
192 static gboolean
target_drag_drop( GtkWidget
*widget
,
193 GdkDragContext
*context
,
197 wxDropTarget
*drop_target
)
199 if (g_isIdle
) wxapp_install_idle_handler();
201 /* Owen Taylor: "if the drop is not in a drop zone,
202 return FALSE, otherwise, if you aren't accepting
203 the drop, call gtk_drag_finish() with success == FALSE
204 otherwise call gtk_drag_data_get()" */
206 // printf( "drop.\n" );
208 /* this seems to make a difference between not accepting
209 due to wrong target area and due to wrong format. let
210 us hope that this is not required.. */
212 /* inform the wxDropTarget about the current GdkDragContext.
213 this is only valid for the duration of this call */
214 drop_target
->SetDragContext( context
);
216 /* inform the wxDropTarget about the current drag widget.
217 this is only valid for the duration of this call */
218 drop_target
->SetDragWidget( widget
);
220 /* inform the wxDropTarget about the current drag time.
221 this is only valid for the duration of this call */
222 drop_target
->SetDragTime( time
);
225 wxDragResult result = wxDragMove;
226 if (context->suggested_action == GDK_ACTION_COPY) result = wxDragCopy;
229 bool ret
= drop_target
->OnDrop( x
, y
);
233 wxLogDebug( wxT( "Drop target: OnDrop returned FALSE") );
235 /* cancel the whole thing */
236 gtk_drag_finish( context
,
237 FALSE
, /* no success */
238 FALSE
, /* don't delete data on dropping side */
243 wxLogDebug( wxT( "Drop target: OnDrop returned TRUE") );
246 /* disable GUI threads */
247 wxapp_uninstall_thread_wakeup();
250 GdkAtom format
= drop_target
->GetMatchingPair();
254 GdkDragAction action = GDK_ACTION_MOVE;
255 if (result == wxDragCopy) action == GDK_ACTION_COPY;
256 context->action = action;
258 /* this should trigger an "drag_data_received" event */
259 gtk_drag_get_data( widget
,
265 /* re-enable GUI threads */
266 wxapp_install_thread_wakeup();
270 /* after this, invalidate the drop_target's GdkDragContext */
271 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
273 /* after this, invalidate the drop_target's drag widget */
274 drop_target
->SetDragWidget( (GtkWidget
*) NULL
);
276 /* this has to be done because GDK has no "drag_enter" event */
277 drop_target
->m_firstMotion
= TRUE
;
282 // ----------------------------------------------------------------------------
283 // "drag_data_received"
284 // ----------------------------------------------------------------------------
286 static void target_drag_data_received( GtkWidget
*WXUNUSED(widget
),
287 GdkDragContext
*context
,
290 GtkSelectionData
*data
,
291 guint
WXUNUSED(info
),
293 wxDropTarget
*drop_target
)
295 if (g_isIdle
) wxapp_install_idle_handler();
297 /* Owen Taylor: "call gtk_drag_finish() with
300 if ((data
->length
<= 0) || (data
->format
!= 8))
302 /* negative data length and non 8-bit data format
303 qualifies for junk */
304 gtk_drag_finish (context
, FALSE
, FALSE
, time
);
309 wxLogDebug( wxT( "Drop target: data received event") );
311 /* inform the wxDropTarget about the current GtkSelectionData.
312 this is only valid for the duration of this call */
313 drop_target
->SetDragData( data
);
316 if ( context
->suggested_action
== GDK_ACTION_COPY
)
321 if ( wxIsDragResultOk( drop_target
->OnData( x
, y
, result
) ) )
323 wxLogDebug( wxT( "Drop target: OnData returned TRUE") );
325 /* tell GTK that data transfer was successfull */
326 gtk_drag_finish( context
, TRUE
, FALSE
, time
);
330 wxLogDebug( wxT( "Drop target: OnData returned FALSE") );
332 /* tell GTK that data transfer was not successfull */
333 gtk_drag_finish( context
, FALSE
, FALSE
, time
);
336 /* after this, invalidate the drop_target's drag data */
337 drop_target
->SetDragData( (GtkSelectionData
*) NULL
);
340 //----------------------------------------------------------------------------
342 //----------------------------------------------------------------------------
344 wxDropTarget::wxDropTarget( wxDataObject
*data
)
345 : wxDropTargetBase( data
)
347 m_firstMotion
= TRUE
;
348 m_dragContext
= (GdkDragContext
*) NULL
;
349 m_dragWidget
= (GtkWidget
*) NULL
;
350 m_dragData
= (GtkSelectionData
*) NULL
;
354 wxDragResult
wxDropTarget::OnDragOver( wxCoord
WXUNUSED(x
),
358 // GetMatchingPair() checks for m_dataObject too, no need to do it here
360 // disable the debug message from GetMatchingPair() - there are too many
366 return (GetMatchingPair() != (GdkAtom
) 0) ? def
: wxDragNone
;
369 bool wxDropTarget::OnDrop( wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
) )
374 return (GetMatchingPair() != (GdkAtom
) 0);
377 wxDragResult
wxDropTarget::OnData( wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
),
383 if (GetMatchingPair() == (GdkAtom
) 0)
386 return GetData() ? def
: wxDragNone
;
389 GdkAtom
wxDropTarget::GetMatchingPair()
397 GList
*child
= m_dragContext
->targets
;
400 GdkAtom formatAtom
= (GdkAtom
) GPOINTER_TO_INT(child
->data
);
401 wxDataFormat
format( formatAtom
);
404 wxLogDebug( wxT("Drop target: drag has format: %s"), format
.GetId().c_str() );
407 if (m_dataObject
->IsSupportedFormat( format
))
416 bool wxDropTarget::GetData()
424 wxDataFormat
dragFormat( m_dragData
->target
);
426 if (!m_dataObject
->IsSupportedFormat( dragFormat
))
429 m_dataObject
->SetData( dragFormat
, (size_t)m_dragData
->length
, (const void*)m_dragData
->data
);
434 void wxDropTarget::UnregisterWidget( GtkWidget
*widget
)
436 wxCHECK_RET( widget
!= NULL
, wxT("unregister widget is NULL") );
438 gtk_drag_dest_unset( widget
);
440 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
441 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
443 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
444 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
446 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
447 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
449 gtk_signal_disconnect_by_func( GTK_OBJECT(widget
),
450 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
453 void wxDropTarget::RegisterWidget( GtkWidget
*widget
)
455 wxCHECK_RET( widget
!= NULL
, wxT("register widget is NULL") );
457 /* gtk_drag_dest_set() determines what default behaviour we'd like
458 GTK to supply. we don't want to specify out targets (=formats)
459 or actions in advance (i.e. not GTK_DEST_DEFAULT_MOTION and
460 not GTK_DEST_DEFAULT_DROP). instead we react individually to
461 "drag_motion" and "drag_drop" events. this makes it possible
462 to allow dropping on only a small area. we should set
463 GTK_DEST_DEFAULT_HIGHLIGHT as this will switch on the nice
464 highlighting if dragging over standard controls, but this
465 seems to be broken without the other two. */
467 gtk_drag_dest_set( widget
,
468 (GtkDestDefaults
) 0, /* no default behaviour */
469 (GtkTargetEntry
*) NULL
, /* we don't supply any formats here */
470 0, /* number of targets = 0 */
471 (GdkDragAction
) 0 ); /* we don't supply any actions here */
473 gtk_signal_connect( GTK_OBJECT(widget
), "drag_leave",
474 GTK_SIGNAL_FUNC(target_drag_leave
), (gpointer
) this );
476 gtk_signal_connect( GTK_OBJECT(widget
), "drag_motion",
477 GTK_SIGNAL_FUNC(target_drag_motion
), (gpointer
) this );
479 gtk_signal_connect( GTK_OBJECT(widget
), "drag_drop",
480 GTK_SIGNAL_FUNC(target_drag_drop
), (gpointer
) this );
482 gtk_signal_connect( GTK_OBJECT(widget
), "drag_data_received",
483 GTK_SIGNAL_FUNC(target_drag_data_received
), (gpointer
) this );
486 //----------------------------------------------------------------------------
488 //----------------------------------------------------------------------------
491 source_drag_data_get (GtkWidget
*WXUNUSED(widget
),
492 GdkDragContext
*WXUNUSED(context
),
493 GtkSelectionData
*selection_data
,
494 guint
WXUNUSED(info
),
495 guint
WXUNUSED(time
),
496 wxDropSource
*drop_source
)
498 if (g_isIdle
) wxapp_install_idle_handler();
500 wxDataFormat
format( selection_data
->target
);
502 wxLogDebug( wxT("Drop source: format requested: %s"), format
.GetId().c_str() );
504 drop_source
->m_retValue
= wxDragCancel
;
506 wxDataObject
*data
= drop_source
->GetDataObject();
510 wxLogDebug( wxT("Drop source: no data object") );
514 if (!data
->IsSupportedFormat(format
))
516 wxLogDebug( wxT("Drop source: unsupported format") );
520 if (data
->GetDataSize(format
) == 0)
522 wxLogDebug( wxT("Drop source: empty data") );
526 size_t size
= data
->GetDataSize(format
);
528 // printf( "data size: %d.\n", (int)data_size );
530 guchar
*d
= new guchar
[size
];
532 if (!data
->GetDataHere( format
, (void*)d
))
539 /* disable GUI threads */
540 wxapp_uninstall_thread_wakeup();
543 gtk_selection_data_set( selection_data
,
544 selection_data
->target
,
550 /* enable GUI threads */
551 wxapp_install_thread_wakeup();
557 //----------------------------------------------------------------------------
558 // "drag_data_delete"
559 //----------------------------------------------------------------------------
561 static void source_drag_data_delete( GtkWidget
*WXUNUSED(widget
),
562 GdkDragContext
*WXUNUSED(context
),
563 wxDropSource
*WXUNUSED(drop_source
) )
566 wxapp_install_idle_handler();
568 // printf( "Drag source: drag_data_delete\n" );
571 //----------------------------------------------------------------------------
573 //----------------------------------------------------------------------------
575 static void source_drag_begin( GtkWidget
*WXUNUSED(widget
),
576 GdkDragContext
*WXUNUSED(context
),
577 wxDropSource
*WXUNUSED(drop_source
) )
580 wxapp_install_idle_handler();
582 // printf( "Drag source: drag_begin.\n" );
585 //----------------------------------------------------------------------------
587 //----------------------------------------------------------------------------
589 static void source_drag_end( GtkWidget
*WXUNUSED(widget
),
590 GdkDragContext
*WXUNUSED(context
),
591 wxDropSource
*drop_source
)
593 if (g_isIdle
) wxapp_install_idle_handler();
595 // printf( "Drag source: drag_end.\n" );
597 drop_source
->m_waiting
= FALSE
;
600 //-----------------------------------------------------------------------------
601 // "configure_event" from m_iconWindow
602 //-----------------------------------------------------------------------------
605 gtk_dnd_window_configure_callback( GtkWidget
*WXUNUSED(widget
), GdkEventConfigure
*WXUNUSED(event
), wxDropSource
*source
)
608 wxapp_install_idle_handler();
610 wxDragResult action
= wxDragNone
;
611 if (source
->m_dragContext
->action
== GDK_ACTION_COPY
) action
= wxDragCopy
;
612 if (source
->m_dragContext
->action
== GDK_ACTION_MOVE
) action
= wxDragMove
;
614 source
->GiveFeedback( action
);
619 //---------------------------------------------------------------------------
621 //---------------------------------------------------------------------------
623 wxDropSource::wxDropSource(wxWindow
*win
,
624 const wxIcon
&iconCopy
,
625 const wxIcon
&iconMove
,
626 const wxIcon
&iconNone
)
630 m_iconWindow
= (GtkWidget
*) NULL
;
633 m_widget
= win
->m_widget
;
634 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
636 m_retValue
= wxDragCancel
;
638 SetIcons(iconCopy
, iconMove
, iconNone
);
641 wxDropSource::wxDropSource(wxDataObject
& data
,
643 const wxIcon
&iconCopy
,
644 const wxIcon
&iconMove
,
645 const wxIcon
&iconNone
)
651 m_iconWindow
= (GtkWidget
*) NULL
;
654 m_widget
= win
->m_widget
;
655 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
657 m_retValue
= wxDragCancel
;
659 SetIcons(iconCopy
, iconMove
, iconNone
);
662 void wxDropSource::SetIcons(const wxIcon
&iconCopy
,
663 const wxIcon
&iconMove
,
664 const wxIcon
&iconNone
)
666 m_iconCopy
= iconCopy
;
667 m_iconMove
= iconMove
;
668 m_iconNone
= iconNone
;
670 if ( !m_iconCopy
.Ok() )
671 m_iconCopy
= wxIcon(page_xpm
);
672 if ( !m_iconMove
.Ok() )
673 m_iconMove
= m_iconCopy
;
674 if ( !m_iconNone
.Ok() )
675 m_iconNone
= m_iconCopy
;
678 wxDropSource::~wxDropSource()
682 void wxDropSource::PrepareIcon( int action
, GdkDragContext
*context
)
684 // get the right icon to display
686 if ( action
& GDK_ACTION_MOVE
)
688 else if ( action
& GDK_ACTION_COPY
)
694 if ( icon
->GetMask() )
695 mask
= icon
->GetMask()->GetBitmap();
697 mask
= (GdkBitmap
*)NULL
;
699 GdkPixmap
*pixmap
= icon
->GetPixmap();
702 gdk_window_get_size (pixmap
, &width
, &height
);
704 GdkColormap
*colormap
= gtk_widget_get_colormap( m_widget
);
706 gtk_widget_push_visual (gdk_colormap_get_visual (colormap
));
708 gtk_widget_push_colormap (colormap
);
710 m_iconWindow
= gtk_window_new (GTK_WINDOW_POPUP
);
711 gtk_widget_set_events (m_iconWindow
, GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
);
712 gtk_widget_set_app_paintable (GTK_WIDGET (m_iconWindow
), TRUE
);
715 gtk_widget_pop_visual ();
717 gtk_widget_pop_colormap ();
719 gtk_widget_set_usize (m_iconWindow
, width
, height
);
720 gtk_widget_realize (m_iconWindow
);
722 gtk_signal_connect( GTK_OBJECT(m_iconWindow
), "configure_event",
723 GTK_SIGNAL_FUNC(gtk_dnd_window_configure_callback
), (gpointer
)this );
725 gdk_window_set_back_pixmap (m_iconWindow
->window
, pixmap
, FALSE
);
728 gtk_widget_shape_combine_mask (m_iconWindow
, mask
, 0, 0);
730 gtk_drag_set_icon_widget( context
, m_iconWindow
, 0, 0 );
733 wxDragResult
wxDropSource::DoDragDrop( bool allowMove
)
735 wxASSERT_MSG( m_data
, wxT("Drop source: no data") );
738 return (wxDragResult
) wxDragNone
;
740 if (m_data
->GetFormatCount() == 0)
741 return (wxDragResult
) wxDragNone
;
744 g_blockEventsOnDrag
= FALSE
;
750 GtkTargetList
*target_list
= gtk_target_list_new( (GtkTargetEntry
*) NULL
, 0 );
752 wxDataFormat
*array
= new wxDataFormat
[ m_data
->GetFormatCount() ];
753 m_data
->GetAllFormats( array
);
754 for (size_t i
= 0; i
< m_data
->GetFormatCount(); i
++)
756 GdkAtom atom
= array
[i
];
757 wxLogDebug( wxT("Drop source: Supported atom %s"), gdk_atom_name( atom
) );
758 gtk_target_list_add( target_list
, atom
, 0, 0 );
762 GdkEventMotion event
;
763 event
.window
= m_widget
->window
;
766 GdkModifierType state
;
767 gdk_window_get_pointer( event
.window
, &x
, &y
, &state
);
771 event
.time
= (guint32
)GDK_CURRENT_TIME
;
773 /* GTK wants to know which button was pressed which caused the dragging */
774 int button_number
= 0;
775 if (event
.state
& GDK_BUTTON1_MASK
) button_number
= 1;
776 else if (event
.state
& GDK_BUTTON2_MASK
) button_number
= 2;
777 else if (event
.state
& GDK_BUTTON3_MASK
) button_number
= 3;
780 /* disable GUI threads */
781 wxapp_uninstall_thread_wakeup();
784 /* don't start dragging if no button is down */
787 GdkDragAction action
= GDK_ACTION_COPY
;
788 if (allowMove
) action
= (GdkDragAction
)(GDK_ACTION_MOVE
|GDK_ACTION_COPY
);
789 GdkDragContext
*context
= gtk_drag_begin( m_widget
,
792 button_number
, /* number of mouse button which started drag */
793 (GdkEvent
*) &event
);
795 m_dragContext
= context
;
797 PrepareIcon( action
, context
);
799 while (m_waiting
) gtk_main_iteration();
801 if (context
->action
== GDK_ACTION_COPY
)
802 m_retValue
= wxDragCopy
;
803 if (context
->action
== GDK_ACTION_MOVE
)
804 m_retValue
= wxDragMove
;
808 /* re-enable GUI threads */
809 wxapp_install_thread_wakeup();
812 g_blockEventsOnDrag
= FALSE
;
819 void wxDropSource::RegisterWindow()
821 if (!m_widget
) return;
823 gtk_signal_connect( GTK_OBJECT(m_widget
), "drag_data_get",
824 GTK_SIGNAL_FUNC (source_drag_data_get
), (gpointer
) this);
825 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_data_delete",
826 GTK_SIGNAL_FUNC (source_drag_data_delete
), (gpointer
) this );
827 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_begin",
828 GTK_SIGNAL_FUNC (source_drag_begin
), (gpointer
) this );
829 gtk_signal_connect (GTK_OBJECT(m_widget
), "drag_end",
830 GTK_SIGNAL_FUNC (source_drag_end
), (gpointer
) this );
834 void wxDropSource::UnregisterWindow()
836 if (!m_widget
) return;
838 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
839 GTK_SIGNAL_FUNC(source_drag_data_get
), (gpointer
) this );
840 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
841 GTK_SIGNAL_FUNC(source_drag_data_delete
), (gpointer
) this );
842 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
843 GTK_SIGNAL_FUNC(source_drag_begin
), (gpointer
) this );
844 gtk_signal_disconnect_by_func( GTK_OBJECT(m_widget
),
845 GTK_SIGNAL_FUNC(source_drag_end
), (gpointer
) this );
849 // wxUSE_DRAG_AND_DROP