]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/clipbrd.h
removed wxUSE_IMAGE_LOADING_IN_MSW and wxUSE_RESOURCE_LOADING_IN_MSW settings, they...
[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
26f86486 7// Licence: wxWindows licence
dc86cb34
RR
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKCLIPBOARDH__
12#define __GTKCLIPBOARDH__
13
ab7ce33c 14#if defined(__GNUG__) && !defined(__APPLE__)
dc86cb34
RR
15#pragma interface
16#endif
17
06cfab17 18#if wxUSE_CLIPBOARD
ac57418f 19
dc86cb34
RR
20#include "wx/object.h"
21#include "wx/list.h"
8b53e5a2 22#include "wx/dataobj.h"
dc86cb34 23#include "wx/control.h"
b527aac5 24#include "wx/module.h"
dc86cb34 25
e1ee679c 26// ----------------------------------------------------------------------------
dc86cb34 27// wxClipboard
e1ee679c 28// ----------------------------------------------------------------------------
dc86cb34 29
e1ee679c 30class wxClipboard : public wxClipboardBase
dc86cb34 31{
dc86cb34 32public:
26f86486
VZ
33 wxClipboard();
34 ~wxClipboard();
35
36 // open the clipboard before SetData() and GetData()
37 virtual bool Open();
38
39 // close the clipboard after SetData() and GetData()
40 virtual void Close();
41
f536e0f2
VZ
42 // query whether the clipboard is opened
43 virtual bool IsOpened() const;
44
26f86486
VZ
45 // set the clipboard data. all other formats will be deleted.
46 virtual bool SetData( wxDataObject *data );
47
48 // add to the clipboard data.
49 virtual bool AddData( wxDataObject *data );
50
51 // ask if data in correct format is available
e1ee679c 52 virtual bool IsSupported( const wxDataFormat& format );
26f86486
VZ
53
54 // fill data with data on the clipboard (if available)
e1ee679c 55 virtual bool GetData( wxDataObject& data );
26f86486
VZ
56
57 // clears wxTheClipboard and the system's clipboard if possible
58 virtual void Clear();
59
e1ee679c
VZ
60 // If primary == TRUE, use primary selection in all further ops,
61 // primary == FALSE resets it.
62 virtual void UsePrimarySelection(bool primary = TRUE)
63 { m_usePrimary = primary; }
e839ce8d 64
e1ee679c 65 // implementation from now on
26f86486 66 bool m_open;
26f86486
VZ
67 bool m_ownsClipboard;
68 bool m_ownsPrimarySelection;
1dd989e1 69 wxDataObject *m_data;
26f86486 70
034be888
RR
71 GtkWidget *m_clipboardWidget; /* for getting and offering data */
72 GtkWidget *m_targetsWidget; /* for getting list of supported formats */
73 bool m_waiting; /* querying data or formats is asynchronous */
26f86486
VZ
74
75 bool m_formatSupported;
76 GdkAtom m_targetRequested;
e839ce8d 77 bool m_usePrimary;
e1ee679c 78 wxDataObject *m_receivedData;
b527aac5 79
738f9e5a 80private:
e1ee679c 81 DECLARE_DYNAMIC_CLASS(wxClipboard)
dc86cb34
RR
82};
83
ac57418f 84#endif
ac57418f 85 // wxUSE_CLIPBOARD
b527aac5 86
dc86cb34
RR
87#endif
88 // __GTKCLIPBOARDH__