]>
Commit | Line | Data |
---|---|---|
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 | //----------------------------------------------------------------------------- | |
25 | // wxClipboard | |
26 | //----------------------------------------------------------------------------- | |
27 | ||
28 | class WXDLLIMPEXP_FWD_CORE wxDataObject; | |
29 | class WXDLLEXPORT wxClipboard : public wxClipboardBase | |
30 | { | |
31 | DECLARE_DYNAMIC_CLASS(wxClipboard) | |
32 | ||
33 | public: | |
34 | wxClipboard(); | |
35 | virtual ~wxClipboard(); | |
36 | ||
37 | // open the clipboard before SetData() and GetData() | |
38 | virtual bool Open(); | |
39 | ||
40 | // close the clipboard after SetData() and GetData() | |
41 | virtual void Close(); | |
42 | ||
43 | // query whether the clipboard is opened | |
44 | virtual bool IsOpened() const; | |
45 | ||
46 | // set the clipboard data. all other formats will be deleted. | |
47 | virtual bool SetData( wxDataObject *data ); | |
48 | ||
49 | // add to the clipboard data. | |
50 | virtual bool AddData( wxDataObject *data ); | |
51 | ||
52 | // ask if data in correct format is available | |
53 | virtual bool IsSupported( const wxDataFormat& format ); | |
54 | ||
55 | // fill data with data on the clipboard (if available) | |
56 | virtual bool GetData( wxDataObject& data ); | |
57 | ||
58 | // clears wxTheClipboard and the system's clipboard if possible | |
59 | virtual void Clear(); | |
60 | ||
61 | // flushes the clipboard: this means that the data which is currently on | |
62 | // clipboard will stay available even after the application exits (possibly | |
63 | // eating memory), otherwise the clipboard will be emptied on exit | |
64 | virtual bool Flush(); | |
65 | ||
66 | private: | |
67 | wxDataObject *m_data; | |
68 | bool m_open; | |
69 | }; | |
70 | ||
71 | #endif // wxUSE_CLIPBOARD | |
72 | ||
73 | #endif // _WX_CLIPBRD_H_ |