X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..87f351de6c8d4cf2af78e36b3ceccf21bc8ec937:/include/wx/motif/dnd.h diff --git a/include/wx/motif/dnd.h b/include/wx/motif/dnd.h index ee5709d1e4..614096f548 100644 --- a/include/wx/motif/dnd.h +++ b/include/wx/motif/dnd.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: dnd.h +// Name: wx/motif/dnd.h // Purpose: declaration of wxDropTarget, wxDropSource classes // Author: Julian Smart // RCS-ID: $Id$ @@ -39,19 +39,19 @@ class WXDLLEXPORT wxDropSource; class WXDLLEXPORT wxDropTarget: public wxObject { public: - + wxDropTarget(); - ~wxDropTarget(); - + virtual ~wxDropTarget(); + virtual void OnEnter() { } virtual void OnLeave() { } virtual bool OnDrop( long x, long y, const void *data, size_t size ) = 0; - - // Override these to indicate what kind of data you support: - + + // Override these to indicate what kind of data you support: + virtual size_t GetFormatCount() const = 0; virtual wxDataFormat GetFormat(size_t n) const = 0; - + // implementation }; @@ -62,13 +62,13 @@ public: class WXDLLEXPORT wxTextDropTarget: public wxDropTarget { public: - + wxTextDropTarget() {}; virtual bool OnDrop( long x, long y, const void *data, size_t size ); virtual bool OnDropText( long x, long y, const char *psz ); - + protected: - + virtual size_t GetFormatCount() const; virtual wxDataFormat GetFormat(size_t n) const; }; @@ -80,26 +80,26 @@ protected: class WXDLLEXPORT wxPrivateDropTarget: public wxDropTarget { public: - + wxPrivateDropTarget(); - + // you have to override OnDrop to get at the data - + // the string ID identifies the format of clipboard or DnD data. a word // processor would e.g. add a wxTextDataObject and a wxPrivateDataObject // to the clipboard - the latter with the Id "WXWORD_FORMAT". - + void SetId( const wxString& id ) { m_id = id; } - + wxString GetId() { return m_id; } - + private: - + virtual size_t GetFormatCount() const; virtual wxDataFormat GetFormat(size_t n) const; - + wxString m_id; }; @@ -110,15 +110,15 @@ private: class WXDLLEXPORT wxFileDropTarget: public wxDropTarget { public: - + wxFileDropTarget() {}; - + virtual bool OnDrop( long x, long y, const void *data, size_t size ); - virtual bool OnDropFiles( long x, long y, + 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; }; @@ -139,26 +139,26 @@ enum wxDragResult class WXDLLEXPORT wxDropSource: public wxObject { public: - + wxDropSource( wxWindow *win ); wxDropSource( wxDataObject &data, wxWindow *win ); - - ~wxDropSource(void); - + + virtual ~wxDropSource(void); + void SetData( wxDataObject &data ); wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); - + virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return true; }; - + // implementation #if 0 void RegisterWindow(void); void UnregisterWindow(void); - + wxWindow *m_window; wxDragResult m_retValue; wxDataObject *m_data; - + wxCursor m_defaultCursor; wxCursor m_goaheadCursor; #endif @@ -168,6 +168,5 @@ public: // wxUSE_DRAG_AND_DROP -#endif +#endif //_WX_DND_H_ -