]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/clipbrd.tex
Sorry, I went and removed consts as per the style guide :-)
[wxWidgets.git] / docs / latex / wx / clipbrd.tex
CommitLineData
a660d684
KB
1\section{\class{wxClipboard}}\label{wxclipboard}
2
3There is one wxClipboard object referenced by the pointer
4wxTheClipboard, initialized by calling \helpref{wxInitClipboard}{wxinitclipboard}.
5Under X, clipboard manipulation must be done by using this class, and
6such code will work under MS Windows also. Under MS Windows, you have the
7alternative of using the normal clipboard functions.
8
9The documentation for this class will be expanded in due course. At present,
10wxClipboard 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
26Get the clipboard client directly. Will be NULL if clipboard data
27is a string, or if some other application owns the clipboard.
28This can be useful for shortcutting data translation, if the
29clipboard 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
35Get data from the clipboard.
36
37\membersection{wxClipboard::GetClipboardString}
38
39\func{wxString}{GetClipboardString}{\param{long}{ time}}
40
41Get 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
47Set the clipboard data owner.
48
49\membersection{wxClipboard::SetClipboardString}
50
51\func{void}{SetClipboardString}{\param{const wxString\& }{data}, \param{long}{ time}}
52
53Set the clipboard string; does not require a client.
54
55\section{\class{wxClipboardClient}}\label{wxclipboardclient}
56
57Implemented under X and MS Windows, a clipboard client holds data
58belonging to the clipboard. For plain text, a client is not necessary.
59
60wxClipboardClient is an abstract class for which the virtual functions
61BeingReplaced 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
77This list should be filled in with strings indicating the formats
78this client can provide. Almost all clients will provide``TEXT".
79Format names should be 4 characters long, so things will work
80out on the Macintosh.
81
82\membersection{wxClipboardClient::BeingReplaced}
83
84\func{void}{BeingReplaced}{\void}
85
86This 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
92This method is called when someone wants the data this client is
93supplying to the clipboard.
94
95{\it format} is a string indicating the
96format of the data - one of the strings from the ``formats"
97list.
98
99{\it size} should be filled with the size of the resulting
100data. In the case of text, {\it size} does not count the
101NULL terminator.
102
103