]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/clipbrd.h
wxColour -> NSColor conversion.
[wxWidgets.git] / include / wx / msw / clipbrd.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/clipbrd.h
3// Purpose: wxClipboad class and clipboard functions for MSW
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
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
17// These functions superceded by wxClipboard, but retained in order to
18// implement wxClipboard, and for compatibility.
19
20// open/close the clipboard
21WXDLLIMPEXP_CORE bool wxOpenClipboard();
22WXDLLIMPEXP_CORE bool wxIsClipboardOpened();
23#define wxClipboardOpen wxIsClipboardOpened
24WXDLLIMPEXP_CORE bool wxCloseClipboard();
25
26// get/set data
27WXDLLIMPEXP_CORE bool wxEmptyClipboard();
28WXDLLIMPEXP_CORE bool wxSetClipboardData(wxDataFormat dataFormat,
29 const void *data,
30 int width = 0, int height = 0);
31WXDLLIMPEXP_CORE void* wxGetClipboardData(wxDataFormat dataFormat,
32 long *len = NULL);
33
34// clipboard formats
35WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
36WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
37WXDLLIMPEXP_CORE int wxRegisterClipboardFormat(wxChar *formatName);
38WXDLLIMPEXP_CORE bool wxGetClipboardFormatName(wxDataFormat dataFormat,
39 wxChar *formatName,
40 int maxCount);
41
42//-----------------------------------------------------------------------------
43// wxClipboard
44//-----------------------------------------------------------------------------
45
46class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
47{
48public:
49 wxClipboard();
50 virtual ~wxClipboard();
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
58 // query whether the clipboard is opened
59 virtual bool IsOpened() const;
60
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
68 virtual bool IsSupported( const wxDataFormat& format );
69
70 // fill data with data on the clipboard (if available)
71 virtual bool GetData( wxDataObject& data );
72
73 // clears wxTheClipboard and the system's clipboard if possible
74 virtual void Clear();
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
81private:
82 IDataObject *m_lastDataObject;
83 bool m_isOpened;
84
85 DECLARE_DYNAMIC_CLASS(wxClipboard)
86};
87
88#endif // wxUSE_CLIPBOARD
89
90#endif // _WX_CLIPBRD_H_