]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/clipbrd.h
return NULL (and not invalid) iterator from compatibility_iterator::GetPrevious(...
[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
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CLIPBRD_H_
13#define _WX_CLIPBRD_H_
14
dfe1eee3 15#if wxUSE_CLIPBOARD
9b6dbb09 16
94c7b088 17class WXDLLIMPEXP_CORE wxDataObject;
47be989f 18struct wxDataIdToDataObject;
fd304d98 19
12db77ca 20#include "wx/list.h"
47be989f 21
fd304d98 22WX_DECLARE_LIST(wxDataObject, wxDataObjectList);
47be989f 23WX_DECLARE_LIST(wxDataIdToDataObject, wxDataIdToDataObjectList);
9b6dbb09
JS
24
25bool WXDLLEXPORT wxOpenClipboard();
26bool WXDLLEXPORT wxClipboardOpen();
27bool WXDLLEXPORT wxCloseClipboard();
28bool WXDLLEXPORT wxEmptyClipboard();
2d120f83
JS
29bool WXDLLEXPORT wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
30bool WXDLLEXPORT wxSetClipboardData(wxDataFormat dataFormat, wxObject *obj, int width = 0, int height = 0);
31wxObject* WXDLLEXPORT wxGetClipboardData(wxDataFormat dataFormat, long *len = NULL);
32wxDataFormat WXDLLEXPORT wxEnumClipboardFormats(wxDataFormat dataFormat);
33wxDataFormat WXDLLEXPORT wxRegisterClipboardFormat(char *formatName);
34bool WXDLLEXPORT wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int maxCount);
35
36//-----------------------------------------------------------------------------
37// wxClipboard
38//-----------------------------------------------------------------------------
39
94c7b088 40class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
2d120f83 41{
2d120f83 42public:
e1ee679c
VZ
43 wxClipboard();
44 ~wxClipboard();
83df96d6 45
e1ee679c
VZ
46 // open the clipboard before SetData() and GetData()
47 virtual bool Open();
83df96d6 48
e1ee679c
VZ
49 // close the clipboard after SetData() and GetData()
50 virtual void Close();
83df96d6 51
12db77ca
VZ
52 // opened?
53 virtual bool IsOpened() const { return m_open; }
83df96d6 54
12db77ca 55 // replaces the data on the clipboard with data
e1ee679c 56 virtual bool SetData( wxDataObject *data );
83df96d6 57
12db77ca
VZ
58 // adds data to the clipboard
59 virtual bool AddData( wxDataObject *data );
83df96d6 60
e1ee679c 61 // format available on the clipboard ?
12db77ca 62 virtual bool IsSupported( const wxDataFormat& format );
83df96d6 63
e1ee679c 64 // fill data with data on the clipboard (if available)
12db77ca 65 virtual bool GetData( wxDataObject& data );
83df96d6 66
e1ee679c
VZ
67 // clears wxTheClipboard and the system's clipboard if possible
68 virtual void Clear();
83df96d6 69
dd38c875 70 virtual void UsePrimarySelection(bool primary = true)
83df96d6
JS
71 { m_usePrimary = primary; }
72
e1ee679c 73 // implementation from now on
e1ee679c 74 bool m_open;
fd304d98 75 wxDataObjectList m_data;
e1ee679c 76 bool m_usePrimary;
47be989f
MB
77 wxDataIdToDataObjectList m_idToObject;
78
e1ee679c
VZ
79private:
80 DECLARE_DYNAMIC_CLASS(wxClipboard)
2d120f83
JS
81};
82
dfe1eee3
VZ
83#endif // wxUSE_CLIPBOARD
84
9b6dbb09 85#endif
83df96d6 86// _WX_CLIPBRD_H_