]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/clipbrd.h
Added wxPrivateDropTarget
[wxWidgets.git] / include / wx / msw / clipbrd.h
CommitLineData
2bda0e17
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: clipbrd.h
3// Purpose: Clipboard functionality
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc
JS
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_CLIPBRD_H_
13#define _WX_CLIPBRD_H_
2bda0e17
KB
14
15#ifdef __GNUG__
16#pragma interface "clipbrd.h"
17#endif
18
19#include "wx/defs.h"
20#include "wx/setup.h"
21
47d67540 22#if wxUSE_CLIPBOARD
2bda0e17
KB
23
24#include "wx/list.h"
25
06e43511
JS
26// These functions superceded by wxClipboard, but retained in order to implement
27// wxClipboard, and for compatibility.
184b5d99
JS
28WXDLLEXPORT bool wxOpenClipboard(void);
29WXDLLEXPORT bool wxClipboardOpen(void);
30WXDLLEXPORT bool wxCloseClipboard(void);
31WXDLLEXPORT bool wxEmptyClipboard(void);
06e43511
JS
32WXDLLEXPORT bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
33WXDLLEXPORT bool wxSetClipboardData(wxDataFormat dataFormat, wxObject *obj, int width = 0, int height = 0);
34WXDLLEXPORT wxObject* wxGetClipboardData(wxDataFormat dataFormat, long *len = NULL);
35WXDLLEXPORT wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
184b5d99 36WXDLLEXPORT int wxRegisterClipboardFormat(char *formatName);
06e43511 37WXDLLEXPORT bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int maxCount);
2bda0e17 38
06e43511
JS
39//-----------------------------------------------------------------------------
40// wxClipboard
41//-----------------------------------------------------------------------------
2bda0e17 42
06e43511
JS
43class WXDLLEXPORT wxDataObject;
44class WXDLLEXPORT wxClipboard: public wxObject
2bda0e17
KB
45{
46 DECLARE_DYNAMIC_CLASS(wxClipboard)
47
06e43511
JS
48public:
49
2bda0e17
KB
50 wxClipboard();
51 ~wxClipboard();
52
06e43511
JS
53 // open the clipboard before SetData() and GetData()
54 virtual bool Open();
55
56 // close the clipboard after SetData() and GetData()
57 virtual void Close();
58
59 // can be called several times
60 virtual bool SetData( wxDataObject *data );
61
62 // format available on the clipboard ?
63 // supply ID if private format, the same as wxPrivateDataObject::SetId()
64 virtual bool IsSupportedFormat( wxDataFormat format, const wxString &id = wxEmptyString );
65
66 // fill data with data on the clipboard (if available)
67 virtual bool GetData( wxDataObject *data );
68
69 // clears wxTheClipboard and the system's clipboard if possible
70 virtual void Clear();
71
72 // implementation
73
74 bool m_open;
2bda0e17
KB
75};
76
2bda0e17 77/* The clipboard */
06e43511 78// WXDLLEXPORT_DATA(extern wxClipboard*) wxTheClipboard;
2bda0e17 79
47d67540 80#endif // wxUSE_CLIPBOARD
2bda0e17 81#endif
bbcdf8bc 82 // _WX_CLIPBRD_H_