]>
Commit | Line | Data |
---|---|---|
32b8ec41 | 1 | ///////////////////////////////////////////////////////////////////////////// |
9005f2ed | 2 | // Name: wx/mgl/clipboard.h |
32b8ec41 VZ |
3 | // Purpose: |
4 | // Author: Vaclav Slavik | |
5 | // Id: $Id$ | |
52750c2e | 6 | // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) |
65571936 | 7 | // Licence: wxWindows licence |
32b8ec41 VZ |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
32b8ec41 VZ |
10 | #ifndef __WX_CLIPBOARD_H__ |
11 | #define __WX_CLIPBOARD_H__ | |
12 | ||
32b8ec41 VZ |
13 | #if wxUSE_CLIPBOARD |
14 | ||
15 | #include "wx/object.h" | |
16 | #include "wx/list.h" | |
17 | #include "wx/dataobj.h" | |
18 | #include "wx/control.h" | |
19 | #include "wx/module.h" | |
20 | ||
21 | // ---------------------------------------------------------------------------- | |
22 | // wxClipboard | |
23 | // ---------------------------------------------------------------------------- | |
24 | ||
53a2db12 | 25 | class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase |
32b8ec41 VZ |
26 | { |
27 | public: | |
28 | wxClipboard() {} | |
d3c7fc99 | 29 | virtual ~wxClipboard() {} |
32b8ec41 VZ |
30 | |
31 | // open the clipboard before SetData() and GetData() | |
32 | virtual bool Open() {} | |
33 | ||
34 | // close the clipboard after SetData() and GetData() | |
35 | virtual void Close() {} | |
36 | ||
37 | // query whether the clipboard is opened | |
38 | virtual bool IsOpened() const {} | |
39 | ||
40 | // set the clipboard data. all other formats will be deleted. | |
41 | virtual bool SetData( wxDataObject *data ) {} | |
42 | ||
43 | // add to the clipboard data. | |
44 | virtual bool AddData( wxDataObject *data ) {} | |
45 | ||
46 | // ask if data in correct format is available | |
47 | virtual bool IsSupported( const wxDataFormat& format ) {} | |
48 | ||
49 | // fill data with data on the clipboard (if available) | |
50 | virtual bool GetData( wxDataObject& data ) {} | |
51 | ||
52 | // clears wxTheClipboard and the system's clipboard if possible | |
53 | virtual void Clear() {} | |
54 | ||
32b8ec41 VZ |
55 | // implementation from now on |
56 | bool m_open; | |
57 | bool m_ownsClipboard; | |
58 | bool m_ownsPrimarySelection; | |
59 | wxDataObject *m_data; | |
60 | ||
61 | GtkWidget *m_clipboardWidget; /* for getting and offering data */ | |
62 | GtkWidget *m_targetsWidget; /* for getting list of supported formats */ | |
63 | bool m_waiting; /* querying data or formats is asynchronous */ | |
64 | ||
65 | bool m_formatSupported; | |
66 | GdkAtom m_targetRequested; | |
32b8ec41 VZ |
67 | wxDataObject *m_receivedData; |
68 | ||
69 | private: | |
70 | DECLARE_DYNAMIC_CLASS(wxClipboard) | |
71 | }; | |
72 | ||
73 | #endif | |
74 | // wxUSE_CLIPBOARD | |
75 | ||
76 | #endif | |
77 | // __WX_CLIPBOARD_H__ |