]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/clipbrd.h
don't define wxHAS_BUTTON_BITMAP for wxUniv (closes #10907)
[wxWidgets.git] / include / wx / osx / clipbrd.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: clipbrd.h
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
8 // Modified by:
9 // Created: 1998-01-01
10 // RCS-ID: $Id$
11 // Copyright: (c) Stefan Csomor
12 // Licence: wxWindows licence
13 /////////////////////////////////////////////////////////////////////////////
14
15 #ifndef _WX_CLIPBRD_H_
16 #define _WX_CLIPBRD_H_
17
18 #if wxUSE_CLIPBOARD
19
20 #include "wx/list.h"
21 #include "wx/module.h"
22 #include "wx/dataobj.h" // for wxDataFormat
23
24 #include "wx/osx/core/cfref.h"
25
26 //-----------------------------------------------------------------------------
27 // wxClipboard
28 //-----------------------------------------------------------------------------
29
30 class WXDLLIMPEXP_FWD_CORE wxDataObject;
31 class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
32 {
33 DECLARE_DYNAMIC_CLASS(wxClipboard)
34
35 public:
36 wxClipboard();
37 virtual ~wxClipboard();
38
39 // open the clipboard before SetData() and GetData()
40 virtual bool Open();
41
42 // close the clipboard after SetData() and GetData()
43 virtual void Close();
44
45 // query whether the clipboard is opened
46 virtual bool IsOpened() const;
47
48 // set the clipboard data. all other formats will be deleted.
49 virtual bool SetData( wxDataObject *data );
50
51 // add to the clipboard data.
52 virtual bool AddData( wxDataObject *data );
53
54 // ask if data in correct format is available
55 virtual bool IsSupported( const wxDataFormat& format );
56
57 // fill data with data on the clipboard (if available)
58 virtual bool GetData( wxDataObject& data );
59
60 // clears wxTheClipboard and the system's clipboard if possible
61 virtual void Clear();
62
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
66 virtual bool Flush();
67
68 private:
69 wxDataObject *m_data;
70 bool m_open;
71 wxCFRef<PasteboardRef> m_pasteboard;
72 };
73
74 #endif // wxUSE_CLIPBOARD
75
76 #endif // _WX_CLIPBRD_H_