]>
Commit | Line | Data |
---|---|---|
6762286d | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/osx/clipbrd.h |
6762286d | 3 | // Purpose: Clipboard functionality. |
6762286d SC |
4 | // Author: Stefan Csomor |
5 | // Modified by: | |
6 | // Created: 1998-01-01 | |
6762286d SC |
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 | ||
6762286d SC |
16 | #include "wx/osx/core/cfref.h" |
17 | ||
18 | //----------------------------------------------------------------------------- | |
19 | // wxClipboard | |
20 | //----------------------------------------------------------------------------- | |
21 | ||
6762286d SC |
22 | class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase |
23 | { | |
6762286d SC |
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; | |
81f0d3ca VZ |
61 | |
62 | DECLARE_DYNAMIC_CLASS(wxClipboard) | |
6762286d SC |
63 | }; |
64 | ||
65 | #endif // wxUSE_CLIPBOARD | |
66 | ||
67 | #endif // _WX_CLIPBRD_H_ |