-class wxDropSource: public wxObject
-{
- 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:
-
- void RegisterWindow(void);
- void UnregisterWindow(void);
-
- GtkWidget *m_widget;
- wxWindow *m_window;
-
- wxDataObject *m_data;
-
- wxCursor m_defaultCursor;
- wxCursor m_goaheadCursor;
+ // 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);