]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/motif/clipbrd.h
trying to get wxUSE_NATIVE_STATUSBAR setting correctly: define it to 1 by default...
[wxWidgets.git] / include / wx / motif / clipbrd.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: 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 defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16#pragma interface "clipbrd.h"
17#endif
18
19#if wxUSE_CLIPBOARD
20
21class wxDataObject;
22struct wxDataIdToDataObject;
23
24#include "wx/list.h"
25
26WX_DECLARE_LIST(wxDataObject, wxDataObjectList);
27WX_DECLARE_LIST(wxDataIdToDataObject, wxDataIdToDataObjectList);
28
29bool WXDLLEXPORT wxOpenClipboard();
30bool WXDLLEXPORT wxClipboardOpen();
31bool WXDLLEXPORT wxCloseClipboard();
32bool WXDLLEXPORT wxEmptyClipboard();
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
44class wxClipboard : public wxClipboardBase
45{
46public:
47 wxClipboard();
48 ~wxClipboard();
49
50 // open the clipboard before SetData() and GetData()
51 virtual bool Open();
52
53 // close the clipboard after SetData() and GetData()
54 virtual void Close();
55
56 // opened?
57 virtual bool IsOpened() const { return m_open; }
58
59 // replaces the data on the clipboard with data
60 virtual bool SetData( wxDataObject *data );
61
62 // adds data to the clipboard
63 virtual bool AddData( wxDataObject *data );
64
65 // format available on the clipboard ?
66 virtual bool IsSupported( const wxDataFormat& format );
67
68 // fill data with data on the clipboard (if available)
69 virtual bool GetData( wxDataObject& data );
70
71 // clears wxTheClipboard and the system's clipboard if possible
72 virtual void Clear();
73
74 virtual void UsePrimarySelection(bool primary = true)
75 { m_usePrimary = primary; }
76
77 // implementation from now on
78 bool m_open;
79 wxDataObjectList m_data;
80 bool m_usePrimary;
81 wxDataIdToDataObjectList m_idToObject;
82
83private:
84 DECLARE_DYNAMIC_CLASS(wxClipboard)
85};
86
87#endif // wxUSE_CLIPBOARD
88
89#endif
90// _WX_CLIPBRD_H_