]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/dnd.h
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: declaration of the wxDropTarget class
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling
7 // Licence: wxWindows license
8 ///////////////////////////////////////////////////////////////////////////////
19 #include "wx/object.h"
20 #include "wx/string.h"
21 #include "wx/cursor.h"
23 //-------------------------------------------------------------------------
25 //-------------------------------------------------------------------------
30 class wxTextDropTarget
;
32 class wxTextDragSource
;
34 //-------------------------------------------------------------------------
36 //-------------------------------------------------------------------------
38 class wxDropTarget
: wxObject
44 virtual void OnEnter() { }
45 virtual void OnLeave() { }
46 virtual bool OnDrop( long x
, long y
, const void *pData
) = 0;
50 void Drop( GdkEvent
*event
, int x
, int y
);
51 virtual void RegisterWidget( GtkWidget
*widget
) = 0;
52 void UnregisterWidget( GtkWidget
*widget
);
55 //-------------------------------------------------------------------------
57 //-------------------------------------------------------------------------
59 class wxTextDropTarget
: public wxDropTarget
63 wxTextDropTarget() {};
64 virtual bool OnDrop( long x
, long y
, const void *pData
);
65 virtual bool OnDropText( long x
, long y
, const char *psz
);
66 virtual void RegisterWidget( GtkWidget
*widget
);
69 //-------------------------------------------------------------------------
71 //-------------------------------------------------------------------------
73 class wxDragSource
: public wxObject
77 wxDragSource( wxWindow
*win
);
79 void SetData( char *data
, const long size
);
80 void Start( int x
, int y
);
84 void ConnectWindow(void);
85 void UnconnectWindow(void);
86 virtual void RegisterWindow(void) = 0;
87 void UnregisterWindow(void);
93 wxCursor m_defaultCursor
;
94 wxCursor m_goaheadCursor
;
97 //-------------------------------------------------------------------------
99 //-------------------------------------------------------------------------
101 class wxTextDragSource
: public wxDragSource
105 wxTextDragSource( wxWindow
*win
) : wxDragSource(win
) {};
106 void SetTextData( const wxString
&text
);
107 void RegisterWindow(void);