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