]> git.saurik.com Git - wxWidgets.git/blob - interface/clipboard.h
revised base64.h;bitmap.h
[wxWidgets.git] / interface / clipboard.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: clipboard.h
3 // Purpose: interface of global functions
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 Gets the name of a registered clipboard format, and puts it into the buffer @a
11 formatName which is of maximum
12 length @e maxCount. @a dataFormat must not specify a predefined clipboard
13 format.
14 */
15 bool wxGetClipboardFormatName(int dataFormat,
16 const wxString& formatName,
17 int maxCount);
18
19
20 /**
21 Gets data from the clipboard.
22 @a dataFormat may be one of:
23 wxCF_TEXT or wxCF_OEMTEXT: returns a pointer to new memory containing a
24 null-terminated text string.
25 wxCF_BITMAP: returns a new wxBitmap.
26 The clipboard must have previously been opened for this call to succeed.
27 */
28 wxObject* wxGetClipboardData(int dataFormat);
29
30 /**
31 Returns @true if the given data format is available on the clipboard.
32 */
33 bool wxIsClipboardFormatAvailable(int dataFormat);
34
35 /**
36 Opens the clipboard for passing data to it or getting data from it.
37 */
38 bool wxOpenClipboard();
39
40 /**
41 Empties the clipboard.
42 */
43 bool wxEmptyClipboard();
44
45 /**
46 Returns @true if this application has already opened the clipboard.
47 */
48 bool wxClipboardOpen();
49
50 /**
51 Registers the clipboard data format name and returns an identifier.
52 */
53 int wxRegisterClipboardFormat(const wxString& formatName);
54
55 /**
56 Closes the clipboard to allow other applications to use it.
57 */
58 bool wxCloseClipboard();
59
60 /**
61 Enumerates the formats found in a list of available formats that belong
62 to the clipboard. Each call to this function specifies a known
63 available format; the function returns the format that appears next in
64 the list.
65 @a dataFormat specifies a known format. If this parameter is zero,
66 the function returns the first format in the list.
67 The return value specifies the next known clipboard data format if the
68 function is successful. It is zero if the @a dataFormat parameter specifies
69 the last format in the list of available formats, or if the clipboard
70 is not open.
71 Before it enumerates the formats function, an application must open the
72 clipboard by using the
73 wxOpenClipboard function.
74 */
75 int wxEnumClipboardFormats(int dataFormat);
76