]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/clipbrd.h
Commited region iterator fix.
[wxWidgets.git] / include / wx / gtk / clipbrd.h
CommitLineData
dc86cb34
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: clipboard.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
dc86cb34
RR
8/////////////////////////////////////////////////////////////////////////////
9
0416c418
PC
10#ifndef _WX_GTK_CLIPBOARD_H_
11#define _WX_GTK_CLIPBOARD_H_
dc86cb34 12
e1ee679c 13// ----------------------------------------------------------------------------
dc86cb34 14// wxClipboard
e1ee679c 15// ----------------------------------------------------------------------------
dc86cb34 16
20123d49 17class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
dc86cb34 18{
dc86cb34 19public:
26f86486 20 wxClipboard();
d3c7fc99 21 virtual ~wxClipboard();
26f86486
VZ
22
23 // open the clipboard before SetData() and GetData()
24 virtual bool Open();
25
26 // close the clipboard after SetData() and GetData()
27 virtual void Close();
28
f536e0f2
VZ
29 // query whether the clipboard is opened
30 virtual bool IsOpened() const;
31
26f86486
VZ
32 // set the clipboard data. all other formats will be deleted.
33 virtual bool SetData( wxDataObject *data );
34
35 // add to the clipboard data.
36 virtual bool AddData( wxDataObject *data );
37
38 // ask if data in correct format is available
e1ee679c 39 virtual bool IsSupported( const wxDataFormat& format );
26f86486
VZ
40
41 // fill data with data on the clipboard (if available)
e1ee679c 42 virtual bool GetData( wxDataObject& data );
26f86486
VZ
43
44 // clears wxTheClipboard and the system's clipboard if possible
45 virtual void Clear();
46
e1ee679c
VZ
47 // If primary == TRUE, use primary selection in all further ops,
48 // primary == FALSE resets it.
49 virtual void UsePrimarySelection(bool primary = TRUE)
50 { m_usePrimary = primary; }
e839ce8d 51
e1ee679c 52 // implementation from now on
26f86486 53 bool m_open;
26f86486
VZ
54 bool m_ownsClipboard;
55 bool m_ownsPrimarySelection;
1dd989e1 56 wxDataObject *m_data;
26f86486 57
034be888
RR
58 GtkWidget *m_clipboardWidget; /* for getting and offering data */
59 GtkWidget *m_targetsWidget; /* for getting list of supported formats */
60 bool m_waiting; /* querying data or formats is asynchronous */
26f86486
VZ
61
62 bool m_formatSupported;
63 GdkAtom m_targetRequested;
e839ce8d 64 bool m_usePrimary;
e1ee679c 65 wxDataObject *m_receivedData;
b527aac5 66
738f9e5a 67private:
e1ee679c 68 DECLARE_DYNAMIC_CLASS(wxClipboard)
dc86cb34
RR
69};
70
0416c418 71#endif // _WX_GTK_CLIPBOARD_H_