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