]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/clipbrd.tex
more files I forgot to commit (wxFile/wxTempFile/wxTextFile docs)
[wxWidgets.git] / docs / latex / wx / clipbrd.tex
1 \section{\class{wxClipboard}}\label{wxclipboard}
2
3 There is one wxClipboard object referenced by the pointer
4 wxTheClipboard, initialized by calling \helpref{wxInitClipboard}{wxinitclipboard}.
5 Under X, clipboard manipulation must be done by using this class, and
6 such code will work under MS Windows also. Under MS Windows, you have the
7 alternative of using the normal clipboard functions.
8
9 The documentation for this class will be expanded in due course. At present,
10 wxClipboard is only used in the wxMediaWindow add-on library.
11
12 \wxheading{Derived from}
13
14 \helpref{wxObject}{wxobject}
15
16 \wxheading{See also}
17
18 \helpref{wxClipboardClient}{wxclipboardclient}, \helpref{wxInitClipboard}{wxinitclipboard}.
19
20 \latexignore{\rtfignore{\wxheading{Members}}}
21
22 \membersection{wxClipboard::GetClipboardClient}
23
24 \func{wxClipboardClient *}{GetClipboardClient}{\void}
25
26 Get the clipboard client directly. Will be NULL if clipboard data
27 is a string, or if some other application owns the clipboard.
28 This can be useful for shortcutting data translation, if the
29 clipboard user can check for a specific client.
30
31 \membersection{wxClipboard::GetClipboardData}
32
33 \func{char*}{GetClipboardData}{\param{const wxString\& }{format}, \param{long *}{length}, \param{long}{ time}}
34
35 Get data from the clipboard.
36
37 \membersection{wxClipboard::GetClipboardString}
38
39 \func{wxString}{GetClipboardString}{\param{long}{ time}}
40
41 Get the data from the clipboard in the format ``TEXT".
42
43 \membersection{wxClipboard::SetClipboardClient}
44
45 \func{void}{SetClipboardClient}{\param{wxClipboardClient *}{client}, \param{long}{ time}}
46
47 Set the clipboard data owner.
48
49 \membersection{wxClipboard::SetClipboardString}
50
51 \func{void}{SetClipboardString}{\param{const wxString\& }{data}, \param{long}{ time}}
52
53 Set the clipboard string; does not require a client.
54
55 \section{\class{wxClipboardClient}}\label{wxclipboardclient}
56
57 Implemented under X and MS Windows, a clipboard client holds data
58 belonging to the clipboard. For plain text, a client is not necessary.
59
60 wxClipboardClient is an abstract class for which the virtual functions
61 BeingReplaced and GetData must be overridden.
62
63 \wxheading{Derived from}
64
65 \helpref{wxObject}{wxobject}
66
67 \wxheading{See also}
68
69 \helpref{wxClipboard}{wxclipboard}, \helpref{wxInitClipboard}{wxinitclipboard}.
70
71 \latexignore{\rtfignore{\wxheading{Members}}}
72
73 \membersection{wxClipboardClient::formats}
74
75 \member{wxStringList}{formats}
76
77 This list should be filled in with strings indicating the formats
78 this client can provide. Almost all clients will provide``TEXT".
79 Format names should be 4 characters long, so things will work
80 out on the Macintosh.
81
82 \membersection{wxClipboardClient::BeingReplaced}
83
84 \func{void}{BeingReplaced}{\void}
85
86 This method is called when the client is losing the selection.
87
88 \membersection{wxClipboardClient::GetData}
89
90 \func{char*}{GetData}{\param{const wxString\& }{format}, \param{long *}{size}}
91
92 This method is called when someone wants the data this client is
93 supplying to the clipboard.
94
95 {\it format} is a string indicating the
96 format of the data - one of the strings from the ``formats"
97 list.
98
99 {\it size} should be filled with the size of the resulting
100 data. In the case of text, {\it size} does not count the
101 NULL terminator.
102
103