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