- wxDropTarget();
- ~wxDropTarget();
-
- virtual void OnEnter() { }
- virtual void OnLeave() { }
- virtual bool OnDrop( long x, long y, const void *pData ) = 0;
-
-// protected:
-
- friend wxWindow;
-
- // Override these to indicate what kind of data you support:
-
- virtual size_t GetFormatCount() const = 0;
- virtual wxDataFormat GetFormat(size_t n) const = 0;
-};
-
-//-------------------------------------------------------------------------
-// wxTextDropTarget
-//-------------------------------------------------------------------------
-
-class WXDLLEXPORT wxTextDropTarget: public wxDropTarget
-{
- public:
-
- wxTextDropTarget() {};
- virtual bool OnDrop( long x, long y, const void *pData );
- virtual bool OnDropText( long x, long y, const char *psz );
-
- protected:
-
- virtual size_t GetFormatCount() const;
- virtual wxDataFormat GetFormat(size_t n) const;
-};
-
-// ----------------------------------------------------------------------------
-// A drop target which accepts files (dragged from File Manager or Explorer)
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxFileDropTarget: public wxDropTarget
-{
- public:
-
- wxFileDropTarget() {};
-
- virtual bool OnDrop(long x, long y, const void *pData);
- virtual bool OnDropFiles( long x, long y,
- size_t nFiles, const char * const aszFiles[]);
-
- protected:
-
- virtual size_t GetFormatCount() const;
- virtual wxDataFormat GetFormat(size_t n) const;
-};
-
-//-------------------------------------------------------------------------
-// wxDropSource
-//-------------------------------------------------------------------------
-
-enum wxDragResult
- {
- wxDragError, // error prevented the d&d operation from completing
- wxDragNone, // drag target didn't accept the data
- wxDragCopy, // the data was successfully copied
- wxDragMove, // the data was successfully moved
- wxDragCancel // the operation was cancelled by user (not an error)
- };
-
-class WXDLLEXPORT wxDropSource: public wxObject
-{
- public:
-
- wxDropSource( wxWindow *win );
- wxDropSource( wxDataObject &data, wxWindow *win );
-
- ~wxDropSource(void);
-
- void SetData( wxDataObject &data );
- wxDragResult DoDragDrop( bool bAllowMove = FALSE );
-
- virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; };
-
- protected:
-
- wxDataObject *m_data;
-};
-
-#endif
- //_WX_DND_H_