]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/clipbrd.h
changed make_int, make_exp .. to wxmake_int..
[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"
4ce81a75 25#include "wx/module.h"
2bda0e17 26
06e43511
JS
27// These functions superceded by wxClipboard, but retained in order to implement
28// wxClipboard, and for compatibility.
184b5d99
JS
29WXDLLEXPORT bool wxOpenClipboard(void);
30WXDLLEXPORT bool wxClipboardOpen(void);
31WXDLLEXPORT bool wxCloseClipboard(void);
32WXDLLEXPORT bool wxEmptyClipboard(void);
06e43511
JS
33WXDLLEXPORT bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat);
34WXDLLEXPORT bool wxSetClipboardData(wxDataFormat dataFormat, wxObject *obj, int width = 0, int height = 0);
35WXDLLEXPORT wxObject* wxGetClipboardData(wxDataFormat dataFormat, long *len = NULL);
36WXDLLEXPORT wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat);
184b5d99 37WXDLLEXPORT int wxRegisterClipboardFormat(char *formatName);
06e43511 38WXDLLEXPORT bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int maxCount);
2bda0e17 39
06e43511
JS
40//-----------------------------------------------------------------------------
41// wxClipboard
42//-----------------------------------------------------------------------------
2bda0e17 43
06e43511
JS
44class WXDLLEXPORT wxDataObject;
45class WXDLLEXPORT wxClipboard: public wxObject
2bda0e17
KB
46{
47 DECLARE_DYNAMIC_CLASS(wxClipboard)
48
06e43511
JS
49public:
50
2bda0e17
KB
51 wxClipboard();
52 ~wxClipboard();
53
06e43511
JS
54 // open the clipboard before SetData() and GetData()
55 virtual bool Open();
56
57 // close the clipboard after SetData() and GetData()
58 virtual void Close();
59
60 // can be called several times
61 virtual bool SetData( wxDataObject *data );
62
63 // format available on the clipboard ?
64 // supply ID if private format, the same as wxPrivateDataObject::SetId()
65 virtual bool IsSupportedFormat( wxDataFormat format, const wxString &id = wxEmptyString );
66
67 // fill data with data on the clipboard (if available)
68 virtual bool GetData( wxDataObject *data );
69
70 // clears wxTheClipboard and the system's clipboard if possible
71 virtual void Clear();
72
73 // implementation
74
75 bool m_open;
4ce81a75 76 wxList m_data;
2bda0e17
KB
77};
78
2bda0e17 79/* The clipboard */
4ce81a75
JS
80WXDLLEXPORT_DATA(extern wxClipboard*) wxTheClipboard;
81
82//-----------------------------------------------------------------------------
83// wxClipboardModule
84//-----------------------------------------------------------------------------
85
86class wxClipboardModule: public wxModule
87{
88 DECLARE_DYNAMIC_CLASS(wxClipboardModule)
89
90public:
91 wxClipboardModule() {}
92 bool OnInit();
93 void OnExit();
94};
2bda0e17 95
47d67540 96#endif // wxUSE_CLIPBOARD
2bda0e17 97#endif
bbcdf8bc 98 // _WX_CLIPBRD_H_