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