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