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

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [tk/] [doc/] [clipboard.n] - Diff between revs 579 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 579 Rev 1765
'\"
'\"
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
'\" RCS: @(#) $Id: clipboard.n,v 1.1.1.1 2002-01-16 10:25:48 markom Exp $
'\" RCS: @(#) $Id: clipboard.n,v 1.1.1.1 2002-01-16 10:25:48 markom Exp $
'\"
'\"
.so man.macros
.so man.macros
.TH clipboard n 4.0 Tk "Tk Built-In Commands"
.TH clipboard n 4.0 Tk "Tk Built-In Commands"
.BS
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
.SH NAME
clipboard \- Manipulate Tk clipboard
clipboard \- Manipulate Tk clipboard
.SH SYNOPSIS
.SH SYNOPSIS
\fBclipboard \fIoption\fR ?\fIarg arg ...\fR?
\fBclipboard \fIoption\fR ?\fIarg arg ...\fR?
.BE
.BE
.SH DESCRIPTION
.SH DESCRIPTION
.PP
.PP
This command provides a Tcl interface to the Tk clipboard,
This command provides a Tcl interface to the Tk clipboard,
which stores data for later retrieval using the selection mechanism.
which stores data for later retrieval using the selection mechanism.
In order to copy data into the clipboard, \fBclipboard clear\fR must
In order to copy data into the clipboard, \fBclipboard clear\fR must
be called, followed by a sequence of one or more calls to \fBclipboard
be called, followed by a sequence of one or more calls to \fBclipboard
append\fR.  To ensure that the clipboard is updated atomically, all
append\fR.  To ensure that the clipboard is updated atomically, all
appends should be completed before returning to the event loop.
appends should be completed before returning to the event loop.
.PP
.PP
The first argument to \fBclipboard\fR determines the format of the
The first argument to \fBclipboard\fR determines the format of the
rest of the arguments and the behavior of the command.  The following
rest of the arguments and the behavior of the command.  The following
forms are currently supported:
forms are currently supported:
.PP
.PP
.TP
.TP
\fBclipboard clear\fR ?\fB\-displayof\fR \fIwindow\fR?
\fBclipboard clear\fR ?\fB\-displayof\fR \fIwindow\fR?
Claims ownership of the clipboard on \fIwindow\fR's display and removes
Claims ownership of the clipboard on \fIwindow\fR's display and removes
any previous contents.  \fIWindow\fR defaults to ``.''.  Returns an
any previous contents.  \fIWindow\fR defaults to ``.''.  Returns an
empty string.
empty string.
.TP
.TP
\fBclipboard append\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-format\fR \fIformat\fR? ?\fB\-type\fR \fItype\fR? ?\fB\-\|\-\fR? \fIdata\fR
\fBclipboard append\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-format\fR \fIformat\fR? ?\fB\-type\fR \fItype\fR? ?\fB\-\|\-\fR? \fIdata\fR
Appends \fIdata\fR to the clipboard on \fIwindow\fR's
Appends \fIdata\fR to the clipboard on \fIwindow\fR's
display in the form given by \fItype\fR with the representation given
display in the form given by \fItype\fR with the representation given
by \fIformat\fR and claims ownership of the clipboard on \fIwindow\fR's
by \fIformat\fR and claims ownership of the clipboard on \fIwindow\fR's
display.
display.
.RS
.RS
.PP
.PP
\fIType\fR specifies the form in which the selection is to be returned
\fIType\fR specifies the form in which the selection is to be returned
(the desired ``target'' for conversion, in ICCCM terminology), and
(the desired ``target'' for conversion, in ICCCM terminology), and
should be an atom name such as STRING or FILE_NAME; see the
should be an atom name such as STRING or FILE_NAME; see the
Inter-Client Communication Conventions Manual for complete details.
Inter-Client Communication Conventions Manual for complete details.
\fIType\fR defaults to STRING.
\fIType\fR defaults to STRING.
.PP
.PP
The \fIformat\fR argument specifies the representation that should be
The \fIformat\fR argument specifies the representation that should be
used to transmit the selection to the requester (the second column of
used to transmit the selection to the requester (the second column of
Table 2 of the ICCCM), and defaults to STRING.  If \fIformat\fR is
Table 2 of the ICCCM), and defaults to STRING.  If \fIformat\fR is
STRING, the selection is transmitted as 8-bit ASCII characters.  If
STRING, the selection is transmitted as 8-bit ASCII characters.  If
\fIformat\fR is ATOM, then the \fIdata\fR is
\fIformat\fR is ATOM, then the \fIdata\fR is
divided into fields separated by white space; each field is converted
divided into fields separated by white space; each field is converted
to its atom value, and the 32-bit atom value is transmitted instead of
to its atom value, and the 32-bit atom value is transmitted instead of
the atom name.  For any other \fIformat\fR,  \fIdata\fR is divided
the atom name.  For any other \fIformat\fR,  \fIdata\fR is divided
into fields separated by white space and each
into fields separated by white space and each
field is converted to a 32-bit integer; an array of integers is
field is converted to a 32-bit integer; an array of integers is
transmitted to the selection requester.  Note that strings passed to
transmitted to the selection requester.  Note that strings passed to
\fBclipboard append\fR are concatenated before conversion, so the
\fBclipboard append\fR are concatenated before conversion, so the
caller must take care to ensure appropriate spacing across string
caller must take care to ensure appropriate spacing across string
boundaries.  All items appended to the clipboard with the same
boundaries.  All items appended to the clipboard with the same
\fItype\fR must have the same \fIformat\fR.
\fItype\fR must have the same \fIformat\fR.
.PP
.PP
The \fIformat\fR argument is needed only for compatibility with
The \fIformat\fR argument is needed only for compatibility with
clipboard requesters that don't use Tk.  If the Tk toolkit is being
clipboard requesters that don't use Tk.  If the Tk toolkit is being
used to retrieve the CLIPBOARD selection then the value is converted back to
used to retrieve the CLIPBOARD selection then the value is converted back to
a string at the requesting end, so \fIformat\fR is
a string at the requesting end, so \fIformat\fR is
irrelevant.
irrelevant.
.PP
.PP
A \fB\-\|\-\fR argument may be specified to mark the end of options:  the
A \fB\-\|\-\fR argument may be specified to mark the end of options:  the
next argument will always be used as \fIdata\fR.
next argument will always be used as \fIdata\fR.
This feature may be convenient if, for example, \fIdata\fR starts
This feature may be convenient if, for example, \fIdata\fR starts
with a \fB\-\fR.
with a \fB\-\fR.
.RE
.RE
.SH KEYWORDS
.SH KEYWORDS
clear, format, clipboard, append, selection, type
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.