]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/clipbrd.h
addind nonowned window implementation
[wxWidgets.git] / include / wx / mac / carbon / clipbrd.h
CommitLineData
8cf73271
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: clipbrd.h
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.
8cf73271
SC
7// Author: Stefan Csomor
8// Modified by:
9// Created: 1998-01-01
10// RCS-ID: $Id$
11// Copyright: (c) Stefan Csomor
65571936 12// Licence: wxWindows licence
8cf73271
SC
13/////////////////////////////////////////////////////////////////////////////
14
15#ifndef _WX_CLIPBRD_H_
16#define _WX_CLIPBRD_H_
17
8cf73271
SC
18#if wxUSE_CLIPBOARD
19
20#include "wx/list.h"
21#include "wx/module.h"
22#include "wx/dataobj.h" // for wxDataFormat
23
50f8c98e
SC
24#include "wx/mac/corefoundation/cfref.h"
25
8cf73271
SC
26//-----------------------------------------------------------------------------
27// wxClipboard
28//-----------------------------------------------------------------------------
29
b5dbe15d 30class WXDLLIMPEXP_FWD_CORE wxDataObject;
8cf73271
SC
31class WXDLLEXPORT wxClipboard : public wxClipboardBase
32{
33 DECLARE_DYNAMIC_CLASS(wxClipboard)
34
35public:
36 wxClipboard();
d3c7fc99 37 virtual ~wxClipboard();
8cf73271
SC
38
39 // open the clipboard before SetData() and GetData()
40 virtual bool Open();
41
42 // close the clipboard after SetData() and GetData()
43 virtual void Close();
44
45 // query whether the clipboard is opened
46 virtual bool IsOpened() const;
47
48 // set the clipboard data. all other formats will be deleted.
49 virtual bool SetData( wxDataObject *data );
50
51 // add to the clipboard data.
52 virtual bool AddData( wxDataObject *data );
53
54 // ask if data in correct format is available
55 virtual bool IsSupported( const wxDataFormat& format );
56
57 // fill data with data on the clipboard (if available)
58 virtual bool GetData( wxDataObject& data );
59
60 // clears wxTheClipboard and the system's clipboard if possible
61 virtual void Clear();
62
63 // flushes the clipboard: this means that the data which is currently on
64 // clipboard will stay available even after the application exits (possibly
65 // eating memory), otherwise the clipboard will be emptied on exit
66 virtual bool Flush();
67
8cf73271
SC
68private:
69 wxDataObject *m_data;
70 bool m_open;
50f8c98e 71 wxCFRef<PasteboardRef> m_pasteboard;
8cf73271
SC
72};
73
74#endif // wxUSE_CLIPBOARD
75
9005f2ed 76#endif // _WX_CLIPBRD_H_