]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/clipbrd.h
Add wxCairoLibrary (not yet built)
[wxWidgets.git] / include / wx / x11 / clipbrd.h
CommitLineData
83df96d6 1/////////////////////////////////////////////////////////////////////////////
9005f2ed 2// Name: wx/x11/clipbrd.h
83df96d6 3// Purpose: Clipboard functionality.
9691c806 4// Author: Robert Roebling
83df96d6
JS
5// Created: 17/09/98
6// RCS-ID: $Id$
9691c806 7// Copyright: (c) Robert Roebling
65571936 8// Licence: wxWindows licence
83df96d6
JS
9/////////////////////////////////////////////////////////////////////////////
10
9005f2ed
VZ
11#ifndef _WX_X11_CLIPBRD_H_
12#define _WX_X11_CLIPBRD_H_
83df96d6 13
83df96d6
JS
14#if wxUSE_CLIPBOARD
15
9691c806 16#include "wx/object.h"
83df96d6 17#include "wx/list.h"
9691c806
RR
18#include "wx/dataobj.h"
19#include "wx/control.h"
20#include "wx/module.h"
83df96d6 21
9691c806 22// ----------------------------------------------------------------------------
83df96d6 23// wxClipboard
9691c806 24// ----------------------------------------------------------------------------
83df96d6 25
968eb2ef 26class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
83df96d6
JS
27{
28public:
29 wxClipboard();
d3c7fc99 30 virtual ~wxClipboard();
9691c806 31
83df96d6
JS
32 // open the clipboard before SetData() and GetData()
33 virtual bool Open();
9691c806 34
83df96d6
JS
35 // close the clipboard after SetData() and GetData()
36 virtual void Close();
9691c806
RR
37
38 // query whether the clipboard is opened
39 virtual bool IsOpened() const;
40
41 // set the clipboard data. all other formats will be deleted.
83df96d6 42 virtual bool SetData( wxDataObject *data );
9691c806
RR
43
44 // add to the clipboard data.
83df96d6 45 virtual bool AddData( wxDataObject *data );
9691c806
RR
46
47 // ask if data in correct format is available
83df96d6 48 virtual bool IsSupported( const wxDataFormat& format );
9691c806 49
83df96d6
JS
50 // fill data with data on the clipboard (if available)
51 virtual bool GetData( wxDataObject& data );
9691c806 52
83df96d6
JS
53 // clears wxTheClipboard and the system's clipboard if possible
54 virtual void Clear();
9691c806 55
83df96d6 56 // implementation from now on
83df96d6 57 bool m_open;
9691c806
RR
58 bool m_ownsClipboard;
59 bool m_ownsPrimarySelection;
60 wxDataObject *m_data;
61
62 WXWindow m_clipboardWidget; /* for getting and offering data */
63 WXWindow m_targetsWidget; /* for getting list of supported formats */
64 bool m_waiting; /* querying data or formats is asynchronous */
65
66 bool m_formatSupported;
67 Atom m_targetRequested;
9691c806
RR
68 wxDataObject *m_receivedData;
69
83df96d6
JS
70private:
71 DECLARE_DYNAMIC_CLASS(wxClipboard)
72};
73
9005f2ed 74#endif // wxUSE_CLIPBOARD
83df96d6 75
9005f2ed 76#endif // _WX_X11_CLIPBRD_H_