X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b5d569973c2bf329a666c38e1612ca836695576..40bd6154f1476dbe598c60b4760bbf2fe0d9ab0f:/include/wx/gtk1/dnd.h diff --git a/include/wx/gtk1/dnd.h b/include/wx/gtk1/dnd.h index c437f0b3b1..e6e45f03a8 100644 --- a/include/wx/gtk1/dnd.h +++ b/include/wx/gtk1/dnd.h @@ -44,10 +44,10 @@ class wxDropTarget: public wxDropTargetBase { public: wxDropTarget(wxDataObject *dataObject = (wxDataObject*) NULL ); - + virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def); virtual bool OnDrop(wxCoord x, wxCoord y); - virtual bool OnData(wxCoord x, wxCoord y); + virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def); virtual bool GetData(); // implementation @@ -69,37 +69,6 @@ public: void SetDragTime( guint time ) { m_dragTime = time; } }; -// ---------------------------------------------------------------------------- -// A simple wxDropTarget derived class for text data: you only need to -// override OnDropText() to get something working -// ---------------------------------------------------------------------------- - -class wxTextDropTarget : public wxDropTarget -{ -public: - wxTextDropTarget(); - - virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& text) = 0; - - virtual bool OnData(wxCoord x, wxCoord y); -}; - -// ---------------------------------------------------------------------------- -// A drop target which accepts files (dragged from File Manager or Explorer) -// ---------------------------------------------------------------------------- - -class wxFileDropTarget : public wxDropTarget -{ -public: - wxFileDropTarget(); - - // parameters are the number of files and the array of file names - virtual bool OnDropFiles(wxCoord x, wxCoord y, - const wxArrayString& filenames) = 0; - - virtual bool OnData(wxCoord x, wxCoord y); -}; - //------------------------------------------------------------------------- // wxDropSource //------------------------------------------------------------------------- @@ -108,7 +77,7 @@ class wxDropSource: public wxDropSourceBase { public: /* constructor. set data later with SetData() */ - wxDropSource( wxWindow *win, + wxDropSource( wxWindow *win = (wxWindow *)NULL, const wxIcon &go = wxNullIcon ); /* constructor for setting one data object */ @@ -126,15 +95,15 @@ public: void UnregisterWindow(); void PrepareIcon( int hot_x, int hot_y, GdkDragContext *context ); - + GtkWidget *m_widget; GtkWidget *m_iconWindow; GdkDragContext *m_dragContext; wxWindow *m_window; - + wxDragResult m_retValue; wxIcon m_icon; - + bool m_waiting; };