-
- /* constructor. set data later with SetData() */
- wxDropSource( wxWindow *win, const wxIcon &go = wxNullIcon, const wxIcon &stop = wxNullIcon );
-
- wxDropSource( wxDataObject& data, wxWindow *win, const wxIcon &go = wxNullIcon, const wxIcon &stop = wxNullIcon );
- ~wxDropSource();
-
- 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();
-
- GtkWidget *m_widget;
- wxWindow *m_window;
- wxDragResult m_retValue;
- wxDataObject *m_data;
-
- wxCursor m_defaultCursor;
- wxCursor m_goaheadCursor;
-
- wxIcon m_goIcon;
- wxIcon m_stopIcon;
-
- bool m_waiting;
+ // constructor. set data later with SetData()
+ wxDropSource( wxWindow *win = (wxWindow *)NULL,
+ const wxIcon © = wxNullIcon,
+ const wxIcon &move = wxNullIcon,
+ const wxIcon &none = wxNullIcon);
+
+ // constructor for setting one data object
+ wxDropSource( wxDataObject& data,
+ wxWindow *win,
+ const wxIcon © = wxNullIcon,
+ const wxIcon &move = wxNullIcon,
+ const wxIcon &none = wxNullIcon);
+
+ virtual ~wxDropSource();
+
+ // start drag action
+ virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
+
+ // GTK implementation
+ void RegisterWindow();
+ void UnregisterWindow();
+
+ void PrepareIcon( int action, GdkDragContext *context );
+
+ GtkWidget *m_widget;
+ GtkWidget *m_iconWindow;
+ GdkDragContext *m_dragContext;
+ wxWindow *m_window;
+
+ wxDragResult m_retValue;
+ wxIcon m_iconCopy,
+ m_iconMove,
+ m_iconNone;
+
+ bool m_waiting;
+
+private:
+ // common part of both ctors
+ void SetIcons(const wxIcon& copy,
+ const wxIcon& move,
+ const wxIcon& none);