]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/clipbrd.h
no changes, just remove #if'd out code
[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
KB
16
17#include "wx/list.h"
4ce81a75 18#include "wx/module.h"
3f480da3 19#include "wx/dataobj.h" // for wxDataFormat
2bda0e17 20
26f86486 21// These functions superceded by wxClipboard, but retained in order to
9d701f0e 22// implement wxClipboard, and for compatibility.
26f86486
VZ
23
24// open/close the clipboard
53a2db12
FM
25WXDLLIMPEXP_CORE bool wxOpenClipboard();
26WXDLLIMPEXP_CORE bool wxIsClipboardOpened();
26f86486 27#define wxClipboardOpen wxIsClipboardOpened
53a2db12 28WXDLLIMPEXP_CORE bool wxCloseClipboard();
26f86486
VZ
29
30// get/set data
53a2db12
FM
31WXDLLIMPEXP_CORE bool wxEmptyClipboard();
32WXDLLIMPEXP_CORE bool wxSetClipboardData(wxDataFormat dataFormat,
26f86486
VZ
33 const void *data,
34 int width = 0, int height = 0);
53a2db12 35WXDLLIMPEXP_CORE void* wxGetClipboardData(wxDataFormat dataFormat,
26f86486
VZ
36 long *len = NULL);
37
38// clipboard formats
53a2db12
FM
39WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
40WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
41WXDLLIMPEXP_CORE int wxRegisterClipboardFormat(wxChar *formatName);
42WXDLLIMPEXP_CORE bool wxGetClipboardFormatName(wxDataFormat dataFormat,
32c1cda2 43 wxChar *formatName,
26f86486 44 int maxCount);
2bda0e17 45
06e43511
JS
46//-----------------------------------------------------------------------------
47// wxClipboard
48//-----------------------------------------------------------------------------
2bda0e17 49
b5dbe15d 50class WXDLLIMPEXP_FWD_CORE wxDataObject;
53a2db12 51class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
2bda0e17 52{
26f86486 53 DECLARE_DYNAMIC_CLASS(wxClipboard)
2bda0e17 54
06e43511 55public:
26f86486 56 wxClipboard();
d3c7fc99 57 virtual ~wxClipboard();
26f86486
VZ
58
59 // open the clipboard before SetData() and GetData()
60 virtual bool Open();
61
62 // close the clipboard after SetData() and GetData()
63 virtual void Close();
64
f536e0f2
VZ
65 // query whether the clipboard is opened
66 virtual bool IsOpened() const;
67
26f86486
VZ
68 // set the clipboard data. all other formats will be deleted.
69 virtual bool SetData( wxDataObject *data );
70
71 // add to the clipboard data.
72 virtual bool AddData( wxDataObject *data );
73
74 // ask if data in correct format is available
2af18715 75 virtual bool IsSupported( const wxDataFormat& format );
26f86486
VZ
76
77 // fill data with data on the clipboard (if available)
1e8335b0 78 virtual bool GetData( wxDataObject& data );
26f86486
VZ
79
80 // clears wxTheClipboard and the system's clipboard if possible
81 virtual void Clear();
d59ceba5
VZ
82
83 // flushes the clipboard: this means that the data which is currently on
84 // clipboard will stay available even after the application exits (possibly
85 // eating memory), otherwise the clipboard will be emptied on exit
86 virtual bool Flush();
87
d59ceba5 88private:
c039fef5 89 IDataObject *m_lastDataObject;
a36d790a 90 bool m_isOpened;
2bda0e17
KB
91};
92
47d67540 93#endif // wxUSE_CLIPBOARD
9005f2ed
VZ
94
95#endif // _WX_CLIPBRD_H_