]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/clipbrd.h
No real changes, just make wxWindow::CanScroll() virtual.
[wxWidgets.git] / include / wx / gtk1 / clipbrd.h
CommitLineData
dc86cb34 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/gtk1/clipbrd.h
dc86cb34
RR
3// Purpose:
4// Author: Robert Roebling
dc86cb34 5// Copyright: (c) 1998 Robert Roebling
65571936 6// Licence: wxWindows licence
dc86cb34
RR
7/////////////////////////////////////////////////////////////////////////////
8
9
10#ifndef __GTKCLIPBOARDH__
11#define __GTKCLIPBOARDH__
12
06cfab17 13#if wxUSE_CLIPBOARD
ac57418f 14
dc86cb34
RR
15#include "wx/object.h"
16#include "wx/list.h"
8b53e5a2 17#include "wx/dataobj.h"
dc86cb34 18#include "wx/control.h"
b527aac5 19#include "wx/module.h"
dc86cb34 20
e1ee679c 21// ----------------------------------------------------------------------------
dc86cb34 22// wxClipboard
e1ee679c 23// ----------------------------------------------------------------------------
dc86cb34 24
20123d49 25class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
dc86cb34 26{
dc86cb34 27public:
26f86486 28 wxClipboard();
d3c7fc99 29 virtual ~wxClipboard();
26f86486
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
f536e0f2
VZ
37 // query whether the clipboard is opened
38 virtual bool IsOpened() const;
39
26f86486
VZ
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
e1ee679c 47 virtual bool IsSupported( const wxDataFormat& format );
26f86486
VZ
48
49 // fill data with data on the clipboard (if available)
e1ee679c 50 virtual bool GetData( wxDataObject& data );
26f86486
VZ
51
52 // clears wxTheClipboard and the system's clipboard if possible
53 virtual void Clear();
54
e1ee679c 55 // implementation from now on
26f86486 56 bool m_open;
26f86486
VZ
57 bool m_ownsClipboard;
58 bool m_ownsPrimarySelection;
1dd989e1 59 wxDataObject *m_data;
26f86486 60
034be888
RR
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 */
26f86486
VZ
64
65 bool m_formatSupported;
66 GdkAtom m_targetRequested;
e1ee679c 67 wxDataObject *m_receivedData;
b527aac5 68
738f9e5a 69private:
e1ee679c 70 DECLARE_DYNAMIC_CLASS(wxClipboard)
dc86cb34
RR
71};
72
ac57418f 73#endif
ac57418f 74 // wxUSE_CLIPBOARD
b527aac5 75
dc86cb34
RR
76#endif
77 // __GTKCLIPBOARDH__