- bool ret = OnDropFiles( x, y, number, files );
-
- free( files );
-
- return ret;
-}
-
-//-------------------------------------------------------------------------
-// wxDropSource
-//-------------------------------------------------------------------------
-
-
-wxDropSource::wxDropSource( wxWindow *win, const wxIcon &go, const wxIcon &stop )
-{
- g_blockEventsOnDrag = TRUE;
-
- m_window = win;
- m_widget = win->m_widget;
- if (win->m_wxwindow) m_widget = win->m_wxwindow;
-
- m_data = (wxDataBroker*) NULL;
- m_retValue = wxDragCancel;
-
- m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
- m_goaheadCursor = wxCursor( wxCURSOR_HAND );
-
- m_goIcon = go;
- if (wxNullIcon == go) m_goIcon = wxIcon( page_xpm );
- m_stopIcon = stop;
- if (wxNullIcon == stop) m_stopIcon = wxIcon( gv_xpm );
-}
-
-wxDropSource::wxDropSource( wxDataObject *data, wxWindow *win, const wxIcon &go, const wxIcon &stop )
-{
- g_blockEventsOnDrag = TRUE;
-
- m_window = win;
- m_widget = win->m_widget;
- if (win->m_wxwindow) m_widget = win->m_wxwindow;
- m_retValue = wxDragCancel;
-
- if (data)
- {
- m_data = new wxDataBroker();
- m_data->Add( data );
- }
- else
- {
- m_data = (wxDataBroker*) NULL;
- }
-
- m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
- m_goaheadCursor = wxCursor( wxCURSOR_HAND );
-
- m_goIcon = go;
- if (wxNullIcon == go) m_goIcon = wxIcon( page_xpm );
- m_stopIcon = stop;
- if (wxNullIcon == stop) m_stopIcon = wxIcon( gv_xpm );
-}
-
-wxDropSource::wxDropSource( wxDataBroker *data, wxWindow *win )
-{
- g_blockEventsOnDrag = TRUE;
-
- m_window = win;
- m_widget = win->m_widget;
- if (win->m_wxwindow) m_widget = win->m_wxwindow;
- m_retValue = wxDragCancel;
-
- m_data = data;
-
- m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
- m_goaheadCursor = wxCursor( wxCURSOR_HAND );
-}
-
-void wxDropSource::SetData( wxDataObject *data )
-{
- if (m_data) delete m_data;
-
- if (data)
- {
- m_data = new wxDataBroker();
- m_data->Add( data );
- }
- else
- {
- m_data = (wxDataBroker*) NULL;
- }
-}
-
-void wxDropSource::SetData( wxDataBroker *data )
-{
- if (m_data) delete m_data;
-
- m_data = data;
-}
-
-wxDropSource::~wxDropSource(void)
-{
- if (m_data) delete m_data;
-
- g_blockEventsOnDrag = FALSE;
-}
-
-wxDragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
-{
- wxASSERT_MSG( m_data, "wxDragSource: no data" );
-
- if (!m_data) return (wxDragResult) wxDragNone;
-
- static GtkWidget *drag_icon = (GtkWidget*) NULL;
- static GtkWidget *drop_icon = (GtkWidget*) NULL;
-
- GdkPoint hotspot_1 = {0,-5 };
-
- if (!drag_icon)
- {
-/*
- drag_icon = shape_create_icon ( m_stopIcon,
- 440, 140, 0,0, GTK_WINDOW_POPUP);
-
- gtk_signal_connect (GTK_OBJECT (drag_icon), "destroy",
- GTK_SIGNAL_FUNC(gtk_widget_destroyed),
- &drag_icon);
-
- gtk_widget_hide (drag_icon);
-*/
- }
-
- GdkPoint hotspot_2 = {-5,-5};
-
- if (!drop_icon)
- {
-/*
- drop_icon = shape_create_icon ( m_goIcon,
- 440, 140, 0,0, GTK_WINDOW_POPUP);
-
- gtk_signal_connect (GTK_OBJECT (drop_icon), "destroy",
- GTK_SIGNAL_FUNC(gtk_widget_destroyed),
- &drop_icon);
-
- gtk_widget_hide (drop_icon);
-*/
- }
-