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