1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Clipboard functionality.
4 // Note: this functionality is under review, and
5 // is derived from wxWidgets 1.xx code. Please contact
6 // the wxWidgets developers for further information.
7 // Author: Stefan Csomor
11 // Copyright: (c) Stefan Csomor
12 // Licence: wxWindows licence
13 /////////////////////////////////////////////////////////////////////////////
15 #ifndef _WX_CLIPBRD_H_
16 #define _WX_CLIPBRD_H_
21 #include "wx/module.h"
22 #include "wx/dataobj.h" // for wxDataFormat
24 #include "wx/osx/core/cfref.h"
26 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
30 class WXDLLIMPEXP_FWD_CORE wxDataObject
;
31 class WXDLLIMPEXP_CORE wxClipboard
: public wxClipboardBase
33 DECLARE_DYNAMIC_CLASS(wxClipboard
)
37 virtual ~wxClipboard();
39 // open the clipboard before SetData() and GetData()
42 // close the clipboard after SetData() and GetData()
45 // query whether the clipboard is opened
46 virtual bool IsOpened() const;
48 // set the clipboard data. all other formats will be deleted.
49 virtual bool SetData( wxDataObject
*data
);
51 // add to the clipboard data.
52 virtual bool AddData( wxDataObject
*data
);
54 // ask if data in correct format is available
55 virtual bool IsSupported( const wxDataFormat
& format
);
57 // fill data with data on the clipboard (if available)
58 virtual bool GetData( wxDataObject
& data
);
60 // clears wxTheClipboard and the system's clipboard if possible
63 // flushes the clipboard: this means that the data which is currently on
64 // clipboard will stay available even after the application exits (possibly
65 // eating memory), otherwise the clipboard will be emptied on exit
71 wxCFRef
<PasteboardRef
> m_pasteboard
;
74 #endif // wxUSE_CLIPBOARD
76 #endif // _WX_CLIPBRD_H_