]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/clipbrd.h
gtkfeatures.h does not exist under gtk+ 1.3.1, #ifndef it out
[wxWidgets.git] / include / wx / motif / clipbrd.h
CommitLineData
9b6dbb09
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: clipbrd.h
3// Purpose: Clipboard functionality.
9b6dbb09
JS
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
dfe1eee3 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CLIPBRD_H_
13#define _WX_CLIPBRD_H_
14
15#ifdef __GNUG__
12db77ca 16 #pragma interface "clipbrd.h"
9b6dbb09
JS
17#endif
18
dfe1eee3 19#if wxUSE_CLIPBOARD
9b6dbb09 20
12db77ca 21#include "wx/list.h"
9b6dbb09
JS
22
23bool WXDLLEXPORT wxOpenClipboard();
24bool WXDLLEXPORT wxClipboardOpen();
25bool WXDLLEXPORT wxCloseClipboard();
26bool WXDLLEXPORT wxEmptyClipboard();
2d120f83
JS
27bool WXDLLEXPORT wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
28bool WXDLLEXPORT wxSetClipboardData(wxDataFormat dataFormat, wxObject *obj, int width = 0, int height = 0);
29wxObject* WXDLLEXPORT wxGetClipboardData(wxDataFormat dataFormat, long *len = NULL);
30wxDataFormat WXDLLEXPORT wxEnumClipboardFormats(wxDataFormat dataFormat);
31wxDataFormat WXDLLEXPORT wxRegisterClipboardFormat(char *formatName);
32bool WXDLLEXPORT wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int maxCount);
33
34//-----------------------------------------------------------------------------
35// wxClipboard
36//-----------------------------------------------------------------------------
37
e1ee679c 38class wxClipboard : public wxClipboardBase
2d120f83 39{
2d120f83 40public:
e1ee679c
VZ
41 wxClipboard();
42 ~wxClipboard();
dfe1eee3 43
e1ee679c
VZ
44 // open the clipboard before SetData() and GetData()
45 virtual bool Open();
2d120f83 46
e1ee679c
VZ
47 // close the clipboard after SetData() and GetData()
48 virtual void Close();
dfe1eee3 49
12db77ca
VZ
50 // opened?
51 virtual bool IsOpened() const { return m_open; }
52
53 // replaces the data on the clipboard with data
e1ee679c 54 virtual bool SetData( wxDataObject *data );
dfe1eee3 55
12db77ca
VZ
56 // adds data to the clipboard
57 virtual bool AddData( wxDataObject *data );
58
e1ee679c 59 // format available on the clipboard ?
12db77ca 60 virtual bool IsSupported( const wxDataFormat& format );
2d120f83 61
e1ee679c 62 // fill data with data on the clipboard (if available)
12db77ca 63 virtual bool GetData( wxDataObject& data );
dfe1eee3 64
e1ee679c
VZ
65 // clears wxTheClipboard and the system's clipboard if possible
66 virtual void Clear();
dfe1eee3 67
12db77ca
VZ
68 virtual void UsePrimarySelection(bool primary = TRUE)
69 { m_usePrimary = primary; }
70
e1ee679c 71 // implementation from now on
2d120f83 72
e1ee679c
VZ
73 bool m_open;
74 wxList m_data;
75 bool m_usePrimary;
dfe1eee3 76
e1ee679c
VZ
77private:
78 DECLARE_DYNAMIC_CLASS(wxClipboard)
2d120f83
JS
79};
80
dfe1eee3
VZ
81#endif // wxUSE_CLIPBOARD
82
9b6dbb09
JS
83#endif
84 // _WX_CLIPBRD_H_