]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/clipbrd.h
Add wxIcon::GetSize() to wxIcon in wxOSX.
[wxWidgets.git] / include / wx / osx / clipbrd.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: clipbrd.h
3 // Purpose: Clipboard functionality.
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // RCS-ID: $Id$
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CLIPBRD_H_
13 #define _WX_CLIPBRD_H_
14
15 #if wxUSE_CLIPBOARD
16
17 #include "wx/osx/core/cfref.h"
18
19 //-----------------------------------------------------------------------------
20 // wxClipboard
21 //-----------------------------------------------------------------------------
22
23 class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
24 {
25 public:
26 wxClipboard();
27 virtual ~wxClipboard();
28
29 // open the clipboard before SetData() and GetData()
30 virtual bool Open();
31
32 // close the clipboard after SetData() and GetData()
33 virtual void Close();
34
35 // query whether the clipboard is opened
36 virtual bool IsOpened() const;
37
38 // set the clipboard data. all other formats will be deleted.
39 virtual bool SetData( wxDataObject *data );
40
41 // add to the clipboard data.
42 virtual bool AddData( wxDataObject *data );
43
44 // ask if data in correct format is available
45 virtual bool IsSupported( const wxDataFormat& format );
46
47 // fill data with data on the clipboard (if available)
48 virtual bool GetData( wxDataObject& data );
49
50 // clears wxTheClipboard and the system's clipboard if possible
51 virtual void Clear();
52
53 // flushes the clipboard: this means that the data which is currently on
54 // clipboard will stay available even after the application exits (possibly
55 // eating memory), otherwise the clipboard will be emptied on exit
56 virtual bool Flush();
57
58 private:
59 wxDataObject *m_data;
60 bool m_open;
61 wxCFRef<PasteboardRef> m_pasteboard;
62
63 DECLARE_DYNAMIC_CLASS(wxClipboard)
64 };
65
66 #endif // wxUSE_CLIPBOARD
67
68 #endif // _WX_CLIPBRD_H_