1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDropTarget class
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
17 #if wxUSE_DRAG_AND_DROP
19 #include "wx/window.h"
21 #include "wx/gdicmn.h"
25 #include "wx/gtk/private.h"
27 #include <gdk/gdkprivate.h>
29 #include <gtk/gtkdnd.h>
30 #include <gtk/gtkselection.h>
32 //-----------------------------------------------------------------------------
34 //-----------------------------------------------------------------------------
36 extern void wxapp_install_idle_handler();
39 //----------------------------------------------------------------------------
41 //----------------------------------------------------------------------------
43 extern bool g_blockEventsOnDrag
;
45 // the flags used for the last DoDragDrop()
46 static long gs_flagsForDrag
= 0;
48 // the trace mask we use with wxLogTrace() - call
49 // wxLog::AddTraceMask(TRACE_DND) to enable the trace messages from here
50 // (there are quite a few of them, so don't enable this by default)
51 static const wxChar
*TRACE_DND
= _T("dnd");
53 //----------------------------------------------------------------------------
55 //----------------------------------------------------------------------------
57 /* Copyright (c) Julian Smart */
58 static const char * page_xpm
[] = {
59 /* columns rows colors chars-per-pixel */
108 " 56477<<<<8<<9&:X ",
109 " 59642%&*=-;<09&:5 ",
110 " 5q9642%&*=-<<<<<# ",
111 " 5qqw777<<<<<88:>+ ",
112 " erqq9642%&*=t;::+ ",
113 " eyrqq9642%&*=t;:O ",
114 " eyywwww777<<<<t;O ",
115 " e0yyrqq9642%&*=to ",
116 " e00yyrqq9642%&*=o ",
117 " eu0wwwwwww777<&*X ",
118 " euu00yyrqq9642%&X ",
119 " eiuu00yyrqq9642%X ",
120 " eiiwwwwwwwwww742$ ",
121 " eiiiuu00yyrqq964$ ",
122 " eiiiiuu00yyrqq96$ ",
123 " eiiiiiuu00yyrqq95 ",
124 " eiiiiiiuu00yyrqq5 ",
125 " eeeeeeeeeeeeee55e ",
134 // ============================================================================
136 // ============================================================================
138 // ----------------------------------------------------------------------------
139 // convert between GTK+ and wxWidgets DND constants
140 // ----------------------------------------------------------------------------
142 static wxDragResult
ConvertFromGTK(long action
)
146 case GDK_ACTION_COPY
:
149 case GDK_ACTION_LINK
:
152 case GDK_ACTION_MOVE
:
159 // ----------------------------------------------------------------------------
161 // ----------------------------------------------------------------------------
164 static void target_drag_leave( GtkWidget
*WXUNUSED(widget
),
165 GdkDragContext
*context
,
166 guint
WXUNUSED(time
),
167 wxDropTarget
*drop_target
)
169 if (g_isIdle
) wxapp_install_idle_handler();
171 /* inform the wxDropTarget about the current GdkDragContext.
172 this is only valid for the duration of this call */
173 drop_target
->SetDragContext( context
);
175 /* we don't need return values. this event is just for
177 drop_target
->OnLeave();
179 /* this has to be done because GDK has no "drag_enter" event */
180 drop_target
->m_firstMotion
= true;
182 /* after this, invalidate the drop_target's GdkDragContext */
183 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
187 // ----------------------------------------------------------------------------
189 // ----------------------------------------------------------------------------
192 static gboolean
target_drag_motion( GtkWidget
*WXUNUSED(widget
),
193 GdkDragContext
*context
,
197 wxDropTarget
*drop_target
)
199 if (g_isIdle
) wxapp_install_idle_handler();
201 /* Owen Taylor: "if the coordinates not in a drop zone,
202 return FALSE, otherwise call gtk_drag_status() and
205 /* inform the wxDropTarget about the current GdkDragContext.
206 this is only valid for the duration of this call */
207 drop_target
->SetDragContext( context
);
209 // GTK+ always supposes that we want to copy the data by default while we
210 // might want to move it, so examine not only suggested_action - which is
211 // only good if we don't have our own preferences - but also the actions
214 if (drop_target
->GetDefaultAction() == wxDragNone
)
216 // use default action set by wxDropSource::DoDragDrop()
217 if ( (gs_flagsForDrag
& wxDrag_DefaultMove
) == wxDrag_DefaultMove
&&
218 (context
->actions
& GDK_ACTION_MOVE
) )
220 // move is requested by the program and allowed by GTK+ - do it, even
221 // though suggested_action may be currently wxDragCopy
224 else // use whatever GTK+ says we should
226 result
= ConvertFromGTK(context
->suggested_action
);
228 if ( (result
== wxDragMove
) && !(gs_flagsForDrag
& wxDrag_AllowMove
) )
230 // we're requested to move but we can't
235 else if (drop_target
->GetDefaultAction() == wxDragMove
&&
236 (context
->actions
& GDK_ACTION_MOVE
))
242 if (context
->actions
& GDK_ACTION_COPY
)
244 else if (context
->actions
& GDK_ACTION_MOVE
)
250 if (drop_target
->m_firstMotion
)
252 /* the first "drag_motion" event substitutes a "drag_enter" event */
253 result
= drop_target
->OnEnter( x
, y
, result
);
257 /* give program a chance to react (i.e. to say no by returning FALSE) */
258 result
= drop_target
->OnDragOver( x
, y
, result
);
261 bool ret
= wxIsDragResultOk( result
);
264 GdkDragAction action
;
265 if (result
== wxDragCopy
)
266 action
= GDK_ACTION_COPY
;
267 else if (result
== wxDragLink
)
268 action
= GDK_ACTION_LINK
;
270 action
= GDK_ACTION_MOVE
;
272 gdk_drag_status( context
, action
, time
);
275 /* after this, invalidate the drop_target's GdkDragContext */
276 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
278 /* this has to be done because GDK has no "drag_enter" event */
279 drop_target
->m_firstMotion
= false;
285 // ----------------------------------------------------------------------------
287 // ----------------------------------------------------------------------------
290 static gboolean
target_drag_drop( GtkWidget
*widget
,
291 GdkDragContext
*context
,
295 wxDropTarget
*drop_target
)
297 if (g_isIdle
) wxapp_install_idle_handler();
299 /* Owen Taylor: "if the drop is not in a drop zone,
300 return FALSE, otherwise, if you aren't accepting
301 the drop, call gtk_drag_finish() with success == FALSE
302 otherwise call gtk_drag_data_get()" */
304 // printf( "drop.\n" );
306 /* this seems to make a difference between not accepting
307 due to wrong target area and due to wrong format. let
308 us hope that this is not required.. */
310 /* inform the wxDropTarget about the current GdkDragContext.
311 this is only valid for the duration of this call */
312 drop_target
->SetDragContext( context
);
314 /* inform the wxDropTarget about the current drag widget.
315 this is only valid for the duration of this call */
316 drop_target
->SetDragWidget( widget
);
318 /* inform the wxDropTarget about the current drag time.
319 this is only valid for the duration of this call */
320 drop_target
->SetDragTime( time
);
323 wxDragResult result = wxDragMove;
324 if (context->suggested_action == GDK_ACTION_COPY) result = wxDragCopy;
327 /* reset the block here as someone might very well
328 show a dialog as a reaction to a drop and this
329 wouldn't work without events */
330 g_blockEventsOnDrag
= false;
332 bool ret
= drop_target
->OnDrop( x
, y
);
336 wxLogTrace(TRACE_DND
, wxT( "Drop target: OnDrop returned FALSE") );
338 /* cancel the whole thing */
339 gtk_drag_finish( context
,
340 FALSE
, /* no success */
341 FALSE
, /* don't delete data on dropping side */
346 wxLogTrace(TRACE_DND
, wxT( "Drop target: OnDrop returned TRUE") );
349 /* disable GUI threads */
352 GdkAtom format
= drop_target
->GetMatchingPair();
354 // this does happen somehow, see bug 555111
355 wxCHECK_MSG( format
, FALSE
, _T("no matching GdkAtom for format?") )
358 GdkDragAction action = GDK_ACTION_MOVE;
359 if (result == wxDragCopy) action == GDK_ACTION_COPY;
360 context->action = action;
362 /* this should trigger an "drag_data_received" event */
363 gtk_drag_get_data( widget
,
369 /* re-enable GUI threads */
373 /* after this, invalidate the drop_target's GdkDragContext */
374 drop_target
->SetDragContext( (GdkDragContext
*) NULL
);
376 /* after this, invalidate the drop_target's drag widget */
377 drop_target
->SetDragWidget( (GtkWidget
*) NULL
);
379 /* this has to be done because GDK has no "drag_enter" event */
380 drop_target
->m_firstMotion
= true;
386 // ----------------------------------------------------------------------------
387 // "drag_data_received"
388 // ----------------------------------------------------------------------------
391 static void target_drag_data_received( GtkWidget
*WXUNUSED(widget
),
392 GdkDragContext
*context
,
395 GtkSelectionData
*data
,
396 guint
WXUNUSED(info
),
398 wxDropTarget
*drop_target
)
400 if (g_isIdle
) wxapp_install_idle_handler();
402 /* Owen Taylor: "call gtk_drag_finish() with
405 if ((data
->length
<= 0) || (data
->format
!= 8))
407 /* negative data length and non 8-bit data format
408 qualifies for junk */
409 gtk_drag_finish (context
, FALSE
, FALSE
, time
);
414 wxLogTrace(TRACE_DND
, wxT( "Drop target: data received event") );
416 /* inform the wxDropTarget about the current GtkSelectionData.
417 this is only valid for the duration of this call */
418 drop_target
->SetDragData( data
);
420 wxDragResult result
= ConvertFromGTK(context
->action
);
422 if ( wxIsDragResultOk( drop_target
->OnData( x
, y
, result
) ) )
424 wxLogTrace(TRACE_DND
, wxT( "Drop target: OnData returned TRUE") );
426 /* tell GTK that data transfer was successful */
427 gtk_drag_finish( context
, TRUE
, FALSE
, time
);
431 wxLogTrace(TRACE_DND
, wxT( "Drop target: OnData returned FALSE") );
433 /* tell GTK that data transfer was not successful */
434 gtk_drag_finish( context
, FALSE
, FALSE
, time
);
437 /* after this, invalidate the drop_target's drag data */
438 drop_target
->SetDragData( (GtkSelectionData
*) NULL
);
442 //----------------------------------------------------------------------------
444 //----------------------------------------------------------------------------
446 wxDropTarget
::wxDropTarget( wxDataObject
*data
)
447 : wxDropTargetBase( data
)
449 m_firstMotion
= true;
450 m_dragContext
= (GdkDragContext
*) NULL
;
451 m_dragWidget
= (GtkWidget
*) NULL
;
452 m_dragData
= (GtkSelectionData
*) NULL
;
456 wxDragResult wxDropTarget
::OnDragOver( wxCoord
WXUNUSED(x
),
460 // GetMatchingPair() checks for m_dataObject too, no need to do it here
462 // disable the debug message from GetMatchingPair() - there are too many
468 return (GetMatchingPair() != (GdkAtom
) 0) ? def
: wxDragNone
;
471 bool wxDropTarget
::OnDrop( wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
) )
476 return (GetMatchingPair() != (GdkAtom
) 0);
479 wxDragResult wxDropTarget
::OnData( wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
),
485 if (GetMatchingPair() == (GdkAtom
) 0)
488 return GetData() ? def
: wxDragNone
;
491 GdkAtom wxDropTarget
::GetMatchingPair()
499 GList
*child
= m_dragContext
->targets
;
502 GdkAtom formatAtom
= (GdkAtom
)(child
->data
);
503 wxDataFormat
format( formatAtom
);
506 wxLogTrace(TRACE_DND
, wxT("Drop target: drag has format: %s"),
507 format
.GetId().c_str());
510 if (m_dataObject
->IsSupportedFormat( format
))
519 bool wxDropTarget
::GetData()
527 wxDataFormat
dragFormat( m_dragData
->target
);
529 if (!m_dataObject
->IsSupportedFormat( dragFormat
))
532 m_dataObject
->SetData( dragFormat
, (size_t)m_dragData
->length
, (const void*)m_dragData
->data
);
537 void wxDropTarget
::UnregisterWidget( GtkWidget
*widget
)
539 wxCHECK_RET( widget
!= NULL
, wxT("unregister widget is NULL") );
541 gtk_drag_dest_unset( widget
);
543 g_signal_handlers_disconnect_by_func (widget
,
544 (gpointer
) target_drag_leave
, this);
545 g_signal_handlers_disconnect_by_func (widget
,
546 (gpointer
) target_drag_motion
, this);
547 g_signal_handlers_disconnect_by_func (widget
,
548 (gpointer
) target_drag_drop
, this);
549 g_signal_handlers_disconnect_by_func (widget
,
550 (gpointer
) target_drag_data_received
, this);
553 void wxDropTarget
::RegisterWidget( GtkWidget
*widget
)
555 wxCHECK_RET( widget
!= NULL
, wxT("register widget is NULL") );
557 /* gtk_drag_dest_set() determines what default behaviour we'd like
558 GTK to supply. we don't want to specify out targets (=formats)
559 or actions in advance (i.e. not GTK_DEST_DEFAULT_MOTION and
560 not GTK_DEST_DEFAULT_DROP). instead we react individually to
561 "drag_motion" and "drag_drop" events. this makes it possible
562 to allow dropping on only a small area. we should set
563 GTK_DEST_DEFAULT_HIGHLIGHT as this will switch on the nice
564 highlighting if dragging over standard controls, but this
565 seems to be broken without the other two. */
567 gtk_drag_dest_set( widget
,
568 (GtkDestDefaults
) 0, /* no default behaviour */
569 (GtkTargetEntry
*) NULL
, /* we don't supply any formats here */
570 0, /* number of targets = 0 */
571 (GdkDragAction
) 0 ); /* we don't supply any actions here */
573 g_signal_connect (widget
, "drag_leave",
574 G_CALLBACK (target_drag_leave
), this);
576 g_signal_connect (widget
, "drag_motion",
577 G_CALLBACK (target_drag_motion
), this);
579 g_signal_connect (widget
, "drag_drop",
580 G_CALLBACK (target_drag_drop
), this);
582 g_signal_connect (widget
, "drag_data_received",
583 G_CALLBACK (target_drag_data_received
), this);
586 //----------------------------------------------------------------------------
588 //----------------------------------------------------------------------------
592 source_drag_data_get (GtkWidget
*WXUNUSED(widget
),
593 GdkDragContext
*WXUNUSED(context
),
594 GtkSelectionData
*selection_data
,
595 guint
WXUNUSED(info
),
596 guint
WXUNUSED(time
),
597 wxDropSource
*drop_source
)
599 if (g_isIdle
) wxapp_install_idle_handler();
601 wxDataFormat
format( selection_data
->target
);
603 wxLogTrace(TRACE_DND
, wxT("Drop source: format requested: %s"),
604 format
.GetId().c_str());
606 drop_source
->m_retValue
= wxDragCancel
;
608 wxDataObject
*data
= drop_source
->GetDataObject();
612 wxLogTrace(TRACE_DND
, wxT("Drop source: no data object") );
616 if (!data
->IsSupportedFormat(format
))
618 wxLogTrace(TRACE_DND
, wxT("Drop source: unsupported format") );
622 if (data
->GetDataSize(format
) == 0)
624 wxLogTrace(TRACE_DND
, wxT("Drop source: empty data") );
628 size_t size
= data
->GetDataSize(format
);
630 // printf( "data size: %d.\n", (int)data_size );
632 guchar
*d
= new guchar
[size
];
634 if (!data
->GetDataHere( format
, (void*)d
))
641 /* disable GUI threads */
644 gtk_selection_data_set( selection_data
,
645 selection_data
->target
,
651 /* enable GUI threads */
658 //----------------------------------------------------------------------------
659 // "drag_data_delete"
660 //----------------------------------------------------------------------------
663 static void source_drag_data_delete( GtkWidget
*WXUNUSED(widget
),
664 GdkDragContext
*context
,
665 wxDropSource
*WXUNUSED(drop_source
) )
668 wxapp_install_idle_handler();
670 // printf( "Drag source: drag_data_delete\n" );
674 //----------------------------------------------------------------------------
676 //----------------------------------------------------------------------------
679 static void source_drag_begin( GtkWidget
*WXUNUSED(widget
),
680 GdkDragContext
*WXUNUSED(context
),
681 wxDropSource
*WXUNUSED(drop_source
) )
684 wxapp_install_idle_handler();
686 // printf( "Drag source: drag_begin.\n" );
690 //----------------------------------------------------------------------------
692 //----------------------------------------------------------------------------
695 static void source_drag_end( GtkWidget
*WXUNUSED(widget
),
696 GdkDragContext
*WXUNUSED(context
),
697 wxDropSource
*drop_source
)
699 if (g_isIdle
) wxapp_install_idle_handler();
701 // printf( "Drag source: drag_end.\n" );
703 drop_source
->m_waiting
= false;
707 //-----------------------------------------------------------------------------
708 // "configure_event" from m_iconWindow
709 //-----------------------------------------------------------------------------
713 gtk_dnd_window_configure_callback( GtkWidget
*WXUNUSED(widget
), GdkEventConfigure
*WXUNUSED(event
), wxDropSource
*source
)
716 wxapp_install_idle_handler();
718 source
->GiveFeedback( ConvertFromGTK(source
->m_dragContext
->action
) );
724 //---------------------------------------------------------------------------
726 //---------------------------------------------------------------------------
728 wxDropSource
::wxDropSource(wxWindow
*win
,
729 const wxIcon
&iconCopy
,
730 const wxIcon
&iconMove
,
731 const wxIcon
&iconNone
)
735 m_iconWindow
= (GtkWidget
*) NULL
;
738 m_widget
= win
->m_widget
;
739 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
741 m_retValue
= wxDragCancel
;
743 SetIcons(iconCopy
, iconMove
, iconNone
);
746 wxDropSource
::wxDropSource(wxDataObject
& data
,
748 const wxIcon
&iconCopy
,
749 const wxIcon
&iconMove
,
750 const wxIcon
&iconNone
)
756 m_iconWindow
= (GtkWidget
*) NULL
;
759 m_widget
= win
->m_widget
;
760 if (win
->m_wxwindow
) m_widget
= win
->m_wxwindow
;
762 m_retValue
= wxDragCancel
;
764 SetIcons(iconCopy
, iconMove
, iconNone
);
767 void wxDropSource
::SetIcons(const wxIcon
&iconCopy
,
768 const wxIcon
&iconMove
,
769 const wxIcon
&iconNone
)
771 m_iconCopy
= iconCopy
;
772 m_iconMove
= iconMove
;
773 m_iconNone
= iconNone
;
775 if ( !m_iconCopy
.Ok() )
776 m_iconCopy
= wxIcon(page_xpm
);
777 if ( !m_iconMove
.Ok() )
778 m_iconMove
= m_iconCopy
;
779 if ( !m_iconNone
.Ok() )
780 m_iconNone
= m_iconCopy
;
783 wxDropSource
::~wxDropSource()
787 void wxDropSource
::PrepareIcon( int action
, GdkDragContext
*context
)
789 // get the right icon to display
791 if ( action
& GDK_ACTION_MOVE
)
793 else if ( action
& GDK_ACTION_COPY
)
799 if ( icon
->GetMask() )
800 mask
= icon
->GetMask()->GetBitmap();
802 mask
= (GdkBitmap
*)NULL
;
804 GdkPixmap
*pixmap
= icon
->GetPixmap();
807 gdk_window_get_size (pixmap
, &width
, &height
);
809 GdkColormap
*colormap
= gtk_widget_get_colormap( m_widget
);
810 gtk_widget_push_colormap (colormap
);
812 m_iconWindow
= gtk_window_new (GTK_WINDOW_POPUP
);
813 gtk_widget_set_events (m_iconWindow
, GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
);
814 gtk_widget_set_app_paintable (GTK_WIDGET (m_iconWindow
), TRUE
);
816 gtk_widget_pop_colormap ();
818 gtk_widget_set_size_request (m_iconWindow
, width
, height
);
819 gtk_widget_realize (m_iconWindow
);
821 g_signal_connect (m_iconWindow
, "configure_event",
822 G_CALLBACK (gtk_dnd_window_configure_callback
), this);
824 gdk_window_set_back_pixmap (m_iconWindow
->window
, pixmap
, FALSE
);
827 gtk_widget_shape_combine_mask (m_iconWindow
, mask
, 0, 0);
829 gtk_drag_set_icon_widget( context
, m_iconWindow
, 0, 0 );
832 wxDragResult wxDropSource
::DoDragDrop(int flags
)
834 wxCHECK_MSG( m_data
&& m_data
->GetFormatCount(), wxDragNone
,
835 wxT("Drop source: no data") );
838 if (g_blockEventsOnDrag
)
842 g_blockEventsOnDrag
= true;
848 GtkTargetList
*target_list
= gtk_target_list_new( (GtkTargetEntry
*) NULL
, 0 );
850 wxDataFormat
*array
= new wxDataFormat
[ m_data
->GetFormatCount() ];
851 m_data
->GetAllFormats( array
);
852 size_t count
= m_data
->GetFormatCount();
853 for (size_t i
= 0; i
< count
; i
++)
855 GdkAtom atom
= array
[i
];
856 wxLogTrace(TRACE_DND
, wxT("Drop source: Supported atom %s"), gdk_atom_name( atom
));
857 gtk_target_list_add( target_list
, atom
, 0, 0 );
861 GdkEventMotion event
;
862 event
.window
= m_widget
->window
;
865 GdkModifierType state
;
866 gdk_window_get_pointer( event
.window
, &x
, &y
, &state
);
870 event
.time
= (guint32
)GDK_CURRENT_TIME
;
872 /* GTK wants to know which button was pressed which caused the dragging */
873 int button_number
= 0;
874 if (event
.state
& GDK_BUTTON1_MASK
) button_number
= 1;
875 else if (event
.state
& GDK_BUTTON2_MASK
) button_number
= 2;
876 else if (event
.state
& GDK_BUTTON3_MASK
) button_number
= 3;
879 /* disable GUI threads */
882 /* don't start dragging if no button is down */
885 int action
= GDK_ACTION_COPY
;
886 if ( flags
& wxDrag_AllowMove
)
887 action
|= GDK_ACTION_MOVE
;
889 // VZ: as we already use g_blockEventsOnDrag it shouldn't be that bad
890 // to use a global to pass the flags to the drop target but I'd
891 // surely prefer a better way to do it
892 gs_flagsForDrag
= flags
;
894 GdkDragContext
*context
= gtk_drag_begin( m_widget
,
896 (GdkDragAction
)action
,
897 button_number
, /* number of mouse button which started drag */
898 (GdkEvent
*) &event
);
900 m_dragContext
= context
;
902 PrepareIcon( action
, context
);
905 gtk_main_iteration();
907 m_retValue
= ConvertFromGTK(context
->action
);
908 if ( m_retValue
== wxDragNone
)
909 m_retValue
= wxDragCancel
;
913 /* re-enable GUI threads */
916 g_blockEventsOnDrag
= false;
923 void wxDropSource
::RegisterWindow()
925 if (!m_widget
) return;
927 g_signal_connect (m_widget
, "drag_data_get",
928 G_CALLBACK (source_drag_data_get
), this);
929 g_signal_connect (m_widget
, "drag_data_delete",
930 G_CALLBACK (source_drag_data_delete
), this);
931 g_signal_connect (m_widget
, "drag_begin",
932 G_CALLBACK (source_drag_begin
), this);
933 g_signal_connect (m_widget
, "drag_end",
934 G_CALLBACK (source_drag_end
), this);
938 void wxDropSource
::UnregisterWindow()
943 g_signal_handlers_disconnect_by_func (m_widget
,
944 (gpointer
) source_drag_data_get
,
946 g_signal_handlers_disconnect_by_func (m_widget
,
947 (gpointer
) source_drag_data_delete
,
949 g_signal_handlers_disconnect_by_func (m_widget
,
950 (gpointer
) source_drag_begin
,
952 g_signal_handlers_disconnect_by_func (m_widget
,
953 (gpointer
) source_drag_end
,
958 // wxUSE_DRAG_AND_DROP