]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/os2/clipbrd.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / os2 / clipbrd.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/os2/clipbrd.h
3// Purpose: Clipboard functionality.
4// Note: this functionality is under review, and
5// is derived from wxWidgets 1.xx code. Please contact
6// the wxWidgets developers for further information.
7// Author: David Webster
8// Modified by:
9// Created: 10/13/99
10// Copyright: (c) David Webster
11// Licence: wxWindows licence
12/////////////////////////////////////////////////////////////////////////////
13
14#ifndef _WX_CLIPBRD_H_
15#define _WX_CLIPBRD_H_
16
17#if wxUSE_CLIPBOARD
18
19#include "wx/list.h"
20#include "wx/module.h"
21#include "wx/dataobj.h" // for wxDataFormat
22
23// These functions superceded by wxClipboard, but retained in order to
24// implement wxClipboard, and for compatibility.
25
26// open/close the clipboard
27WXDLLIMPEXP_CORE bool wxOpenClipboard();
28WXDLLIMPEXP_CORE bool wxIsClipboardOpened();
29#define wxClipboardOpen wxIsClipboardOpened
30WXDLLIMPEXP_CORE bool wxCloseClipboard();
31
32// get/set data
33WXDLLIMPEXP_CORE bool wxEmptyClipboard();
34WXDLLIMPEXP_CORE bool wxSetClipboardData(wxDataFormat dataFormat,
35 const void *data,
36 int width = 0, int height = 0);
37WXDLLIMPEXP_CORE void* wxGetClipboardData(wxDataFormat dataFormat,
38 long *len = NULL);
39
40// clipboard formats
41WXDLLIMPEXP_CORE bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
42WXDLLIMPEXP_CORE wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
43WXDLLIMPEXP_CORE int wxRegisterClipboardFormat(wxChar *formatName);
44WXDLLIMPEXP_CORE bool wxGetClipboardFormatName(wxDataFormat dataFormat,
45 wxChar *formatName,
46 int maxCount);
47
48//-----------------------------------------------------------------------------
49// wxClipboard
50//-----------------------------------------------------------------------------
51
52class WXDLLIMPEXP_FWD_CORE wxDataObject;
53class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
54{
55 DECLARE_DYNAMIC_CLASS(wxClipboard)
56
57public:
58 wxClipboard();
59 virtual ~wxClipboard();
60
61 // open the clipboard before SetData() and GetData()
62 virtual bool Open();
63
64 // close the clipboard after SetData() and GetData()
65 virtual void Close();
66
67 // query whether the clipboard is opened
68 virtual bool IsOpened() const;
69
70 // set the clipboard data. all other formats will be deleted.
71 virtual bool SetData( wxDataObject *data );
72
73 // add to the clipboard data.
74 virtual bool AddData( wxDataObject *data );
75
76 // ask if data in correct format is available
77 virtual bool IsSupported( const wxDataFormat& format );
78
79 // fill data with data on the clipboard (if available)
80 virtual bool GetData( wxDataObject& data );
81
82 // clears wxTheClipboard and the system's clipboard if possible
83 virtual void Clear();
84
85 // flushes the clipboard: this means that the data which is currently on
86 // clipboard will stay available even after the application exits (possibly
87 // eating memory), otherwise the clipboard will be emptied on exit
88 virtual bool Flush();
89
90private:
91 bool m_clearOnExit;
92};
93
94#endif // wxUSE_CLIPBOARD
95#endif // _WX_CLIPBRD_H_