- public:
-
- enum DragResult
- {
- Error, // error prevented the d&d operation from completing
- None, // drag target didn't accept the data
- Copy, // the data was successfully copied
- Move, // the data was successfully moved
- Cancel // the operation was cancelled by user (not an error)
- };
-
- wxDropSource( wxWindow *win );
- wxDropSource( wxDataObject &data, wxWindow *win );
-
- ~wxDropSource(void);
-
- void SetData( wxDataObject &data );
- DragResult DoDragDrop( bool bAllowMove = FALSE );
-
- virtual bool GiveFeedback( DragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; };
-
- protected:
-
- friend void gtk_drag_callback( GtkWidget *widget, GdkEvent *event, wxDropSource *source );
-
- void RegisterWindow(void);
- void UnregisterWindow(void);
-
+public:
+
+ /* constructor. set data later with SetData() */
+ wxDropSource( wxWindow *win, const wxIcon &go = wxNullIcon, const wxIcon &stop = wxNullIcon );
+
+ /* constructor for setting one data object */
+ wxDropSource( wxDataObject& data, wxWindow *win, const wxIcon &go = wxNullIcon, const wxIcon &stop = wxNullIcon );
+
+ /* constructor for setting several data objects via wxDataBroker */
+ wxDropSource( wxDataBroker *data, wxWindow *win );
+
+ ~wxDropSource();
+
+ /* set several dataobjects via wxDataBroker */
+ void SetData( wxDataBroker *data );
+
+ /* set one dataobject */
+ void SetData( wxDataObject& data );
+
+ // this one isn't portable to wxMSW -- deprecated
+ void SetData( wxDataObject *data );
+
+ /* start drag action */
+ wxDragResult DoDragDrop( bool bAllowMove = FALSE );
+
+ /* override to give feedback */
+ virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; }
+
+ /* GTK implementation */
+
+ void RegisterWindow();
+ void UnregisterWindow();
+