]>
Commit | Line | Data |
---|---|---|
23324ae1 | 1 | ///////////////////////////////////////////////////////////////////////////// |
7c913512 | 2 | // Name: clipboard.h |
e54c96f1 | 3 | // Purpose: interface of global functions |
7c913512 FM |
4 | // Author: wxWidgets team |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /** | |
4cc4bfaf | 10 | Gets the name of a registered clipboard format, and puts it into the buffer @a |
7c913512 | 11 | formatName which is of maximum |
4cc4bfaf | 12 | length @e maxCount. @a dataFormat must not specify a predefined clipboard |
7c913512 | 13 | format. |
23324ae1 FM |
14 | */ |
15 | bool wxGetClipboardFormatName(int dataFormat, | |
16 | const wxString& formatName, | |
17 | int maxCount); | |
18 | ||
19 | ||
7c913512 FM |
20 | /** |
21 | Gets data from the clipboard. | |
4cc4bfaf | 22 | @a dataFormat may be one of: |
7c913512 FM |
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. | |
7c913512 | 26 | The clipboard must have previously been opened for this call to succeed. |
23324ae1 | 27 | */ |
4cc4bfaf | 28 | wxObject* wxGetClipboardData(int dataFormat); |
23324ae1 FM |
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. | |
4cc4bfaf | 65 | @a dataFormat specifies a known format. If this parameter is zero, |
23324ae1 | 66 | the function returns the first format in the list. |
23324ae1 | 67 | The return value specifies the next known clipboard data format if the |
4cc4bfaf | 68 | function is successful. It is zero if the @a dataFormat parameter specifies |
23324ae1 FM |
69 | the last format in the list of available formats, or if the clipboard |
70 | is not open. | |
23324ae1 FM |
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 |