]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/clipbrd.h
wxColour -> NSColor conversion.
[wxWidgets.git] / include / wx / msw / clipbrd.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
e1ee679c
VZ
2// Name: wx/msw/clipbrd.h
3// Purpose: wxClipboad class and clipboard functions for MSW
2bda0e17
KB
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_CLIPBRD_H_
13#define _WX_CLIPBRD_H_
2bda0e17 14
47d67540 15#if wxUSE_CLIPBOARD
2bda0e17 16
26f86486 17// These functions superceded by wxClipboard, but retained in order to
9d701f0e 18// implement wxClipboard, and for compatibility.
26f86486
VZ
19
20// open/close the clipboard
53a2db12
FM
21WXDLLIMPEXP_CORE bool wxOpenClipboard();
22WXDLLIMPEXP_CORE bool wxIsClipboardOpened();
26f86486 23#define wxClipboardOpen wxIsClipboardOpened
53a2db12 24WXDLLIMPEXP_CORE bool wxCloseClipboard();
26f86486
VZ
25
26// get/set data
53a2db12
FM
27WXDLLIMPEXP_CORE bool wxEmptyClipboard();
28WXDLLIMPEXP_CORE bool wxSetClipboardData(wxDataFormat dataFormat,
26f86486
VZ
29 const void *data,
30 int width = 0, int height = 0);
53a2db12 31WXDLLIMPEXP_CORE void* wxGetClipboardData(wxDataFormat dataFormat,
26f86486
VZ
32 long *len = NULL);
33
34// clipboard formats
53a2db12
FM
35WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
36WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
37WXDLLIMPEXP_CORE int wxRegisterClipboardFormat(wxChar *formatName);
38WXDLLIMPEXP_CORE bool wxGetClipboardFormatName(wxDataFormat dataFormat,
32c1cda2 39 wxChar *formatName,
26f86486 40 int maxCount);
2bda0e17 41
06e43511
JS
42//-----------------------------------------------------------------------------
43// wxClipboard
44//-----------------------------------------------------------------------------
2bda0e17 45
53a2db12 46class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
2bda0e17 47{
06e43511 48public:
26f86486 49 wxClipboard();
d3c7fc99 50 virtual ~wxClipboard();
26f86486
VZ
51
52 // open the clipboard before SetData() and GetData()
53 virtual bool Open();
54
55 // close the clipboard after SetData() and GetData()
56 virtual void Close();
57
f536e0f2
VZ
58 // query whether the clipboard is opened
59 virtual bool IsOpened() const;
60
26f86486
VZ
61 // set the clipboard data. all other formats will be deleted.
62 virtual bool SetData( wxDataObject *data );
63
64 // add to the clipboard data.
65 virtual bool AddData( wxDataObject *data );
66
67 // ask if data in correct format is available
2af18715 68 virtual bool IsSupported( const wxDataFormat& format );
26f86486
VZ
69
70 // fill data with data on the clipboard (if available)
1e8335b0 71 virtual bool GetData( wxDataObject& data );
26f86486
VZ
72
73 // clears wxTheClipboard and the system's clipboard if possible
74 virtual void Clear();
d59ceba5
VZ
75
76 // flushes the clipboard: this means that the data which is currently on
77 // clipboard will stay available even after the application exits (possibly
78 // eating memory), otherwise the clipboard will be emptied on exit
79 virtual bool Flush();
80
d59ceba5 81private:
c039fef5 82 IDataObject *m_lastDataObject;
a36d790a 83 bool m_isOpened;
81f0d3ca
VZ
84
85 DECLARE_DYNAMIC_CLASS(wxClipboard)
2bda0e17
KB
86};
87
47d67540 88#endif // wxUSE_CLIPBOARD
9005f2ed
VZ
89
90#endif // _WX_CLIPBRD_H_