X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c7fc996a73e9f6a83067bc28a3c5581a3fee65..992ea4068c9cd01151483e8a152d4824c5d3a18a:/include/wx/x11/dnd.h?ds=sidebyside diff --git a/include/wx/x11/dnd.h b/include/wx/x11/dnd.h index 1643f0d7e7..02cae89adb 100644 --- a/include/wx/x11/dnd.h +++ b/include/wx/x11/dnd.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: dnd.h +// Name: wx/x11/dnd.h // Purpose: declaration of wxDropTarget, wxDropSource classes // Author: Julian Smart // RCS-ID: $Id$ @@ -23,35 +23,35 @@ // classes //------------------------------------------------------------------------- -class WXDLLEXPORT wxWindow; +class WXDLLIMPEXP_FWD_CORE wxWindow; -class WXDLLEXPORT wxDropTarget; -class WXDLLEXPORT wxTextDropTarget; -class WXDLLEXPORT wxFileDropTarget; -class WXDLLEXPORT wxPrivateDropTarget; +class WXDLLIMPEXP_FWD_CORE wxDropTarget; +class WXDLLIMPEXP_FWD_CORE wxTextDropTarget; +class WXDLLIMPEXP_FWD_CORE wxFileDropTarget; +class WXDLLIMPEXP_FWD_CORE wxPrivateDropTarget; -class WXDLLEXPORT wxDropSource; +class WXDLLIMPEXP_FWD_CORE wxDropSource; //------------------------------------------------------------------------- // wxDropTarget //------------------------------------------------------------------------- -class WXDLLEXPORT wxDropTarget: public wxObject +class WXDLLIMPEXP_CORE wxDropTarget: public wxObject { public: - + 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 }; @@ -59,16 +59,16 @@ public: // wxTextDropTarget //------------------------------------------------------------------------- -class WXDLLEXPORT wxTextDropTarget: public wxDropTarget +class WXDLLIMPEXP_CORE wxTextDropTarget: public wxDropTarget { public: - - wxTextDropTarget() {}; + + 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; }; @@ -77,29 +77,29 @@ protected: // wxPrivateDropTarget //------------------------------------------------------------------------- -class WXDLLEXPORT wxPrivateDropTarget: public wxDropTarget +class WXDLLIMPEXP_CORE 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; }; @@ -107,18 +107,18 @@ private: // A drop target which accepts files (dragged from File Manager or Explorer) // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFileDropTarget: public wxDropTarget +class WXDLLIMPEXP_CORE wxFileDropTarget: public wxDropTarget { public: - - wxFileDropTarget() {}; - + + 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; }; @@ -136,29 +136,29 @@ enum wxDragResult wxDragCancel // the operation was cancelled by user (not an error) }; -class WXDLLEXPORT wxDropSource: public wxObject +class WXDLLIMPEXP_CORE wxDropSource: public wxObject { public: - + wxDropSource( wxWindow *win ); wxDropSource( wxDataObject &data, wxWindow *win ); - + virtual ~wxDropSource(void); - + void SetData( wxDataObject &data ); wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); - - virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; }; - + + 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,6 @@ public: // wxUSE_DRAG_AND_DROP -#endif +#endif //_WX_DND_H_