OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [tk/] [doc/] [clipboard.n] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1994 The Regents of the University of California.
3
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
4
'\"
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
'\"
8
'\" RCS: @(#) $Id: clipboard.n,v 1.1.1.1 2002-01-16 10:25:48 markom Exp $
9
'\"
10
.so man.macros
11
.TH clipboard n 4.0 Tk "Tk Built-In Commands"
12
.BS
13
'\" Note:  do not modify the .SH NAME line immediately below!
14
.SH NAME
15
clipboard \- Manipulate Tk clipboard
16
.SH SYNOPSIS
17
\fBclipboard \fIoption\fR ?\fIarg arg ...\fR?
18
.BE
19
 
20
.SH DESCRIPTION
21
.PP
22
This command provides a Tcl interface to the Tk clipboard,
23
which stores data for later retrieval using the selection mechanism.
24
In order to copy data into the clipboard, \fBclipboard clear\fR must
25
be called, followed by a sequence of one or more calls to \fBclipboard
26
append\fR.  To ensure that the clipboard is updated atomically, all
27
appends should be completed before returning to the event loop.
28
.PP
29
The first argument to \fBclipboard\fR determines the format of the
30
rest of the arguments and the behavior of the command.  The following
31
forms are currently supported:
32
.PP
33
.TP
34
\fBclipboard clear\fR ?\fB\-displayof\fR \fIwindow\fR?
35
Claims ownership of the clipboard on \fIwindow\fR's display and removes
36
any previous contents.  \fIWindow\fR defaults to ``.''.  Returns an
37
empty string.
38
.TP
39
\fBclipboard append\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-format\fR \fIformat\fR? ?\fB\-type\fR \fItype\fR? ?\fB\-\|\-\fR? \fIdata\fR
40
Appends \fIdata\fR to the clipboard on \fIwindow\fR's
41
display in the form given by \fItype\fR with the representation given
42
by \fIformat\fR and claims ownership of the clipboard on \fIwindow\fR's
43
display.
44
.RS
45
.PP
46
\fIType\fR specifies the form in which the selection is to be returned
47
(the desired ``target'' for conversion, in ICCCM terminology), and
48
should be an atom name such as STRING or FILE_NAME; see the
49
Inter-Client Communication Conventions Manual for complete details.
50
\fIType\fR defaults to STRING.
51
.PP
52
The \fIformat\fR argument specifies the representation that should be
53
used to transmit the selection to the requester (the second column of
54
Table 2 of the ICCCM), and defaults to STRING.  If \fIformat\fR is
55
STRING, the selection is transmitted as 8-bit ASCII characters.  If
56
\fIformat\fR is ATOM, then the \fIdata\fR is
57
divided into fields separated by white space; each field is converted
58
to its atom value, and the 32-bit atom value is transmitted instead of
59
the atom name.  For any other \fIformat\fR,  \fIdata\fR is divided
60
into fields separated by white space and each
61
field is converted to a 32-bit integer; an array of integers is
62
transmitted to the selection requester.  Note that strings passed to
63
\fBclipboard append\fR are concatenated before conversion, so the
64
caller must take care to ensure appropriate spacing across string
65
boundaries.  All items appended to the clipboard with the same
66
\fItype\fR must have the same \fIformat\fR.
67
.PP
68
The \fIformat\fR argument is needed only for compatibility with
69
clipboard requesters that don't use Tk.  If the Tk toolkit is being
70
used to retrieve the CLIPBOARD selection then the value is converted back to
71
a string at the requesting end, so \fIformat\fR is
72
irrelevant.
73
.PP
74
A \fB\-\|\-\fR argument may be specified to mark the end of options:  the
75
next argument will always be used as \fIdata\fR.
76
This feature may be convenient if, for example, \fIdata\fR starts
77
with a \fB\-\fR.
78
.RE
79
 
80
.SH KEYWORDS
81
clear, format, clipboard, append, selection, type

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.