.TH xclipboard "" "" "X Utility"
.PC "Hold multiple selections for later retrieval"
\fBxclipboard [\-w \-nw \-display [\fIhost\fB]:\fIserver\fB[.\fIscreen\^\fB] \-geometry \fIgeometry\^\fB]\fR
.PP
.HS
.SH Options:
.IC "\fB\-bd \fIcolor\fR"
Set the color of the border to \fIcolor\fR
.IC "\fB\-bg \fIcolor\fR"
Set the color of the background to \fIcolor\fR
.IC "\fB\-bw \fIpixels\fR"
Set the width of the border to \fIpixels\fR
.IC "\fB\-display \fIhost\^\fB[:\fIserver\^\fB][.\fIscreen\^\fB]\fR"
Display the client's window on screen number \fIscreen\fR
of \fIserver\fR on host system \fIhost\fR
.IC "\fB\-fg \fIcolor\fR"
Set the color of the foreground to \fIcolor\fR
.IC "\fB\-fn \fIfont\fR"
Use \fIfont\fR in the display
.IC "\fB\-geometry \fIgeometry\fR"
lSet the geometry of the program's window to \fIgeometry\fR
.IC \fB\-nw\fR
Do not wrap long lines of text
.IC \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors
.IC \fB\-w\fR
Wrap onto the line each line of text that is too long to fit onto one line
.IC "\fB\-xrm \fIresourcestring\fR"
Use \fIresourcestring\fR to define a resource
.HE
.II "clipboard"
By default, the X system lets you cut only one ``hunk'' of text at a time.
The X utility
.B xclipboard
lets you store multiple hunks of text on an internal ``clipboard''.
You can display these hunks one at a time, and select one or another
to copy into another window.
.SH "Using xclipboard"
When you invoke
.BR xclipboard ,
it draws the following window:
.PH 1 1 \*(XD/xclipboard.eps
Its buttons do the following:
.IP \fK(Quit)\fR
Exit from
.BR xclipboard .
.IP \fK(Delete)\fR
Delete the current buffer and display the next.
.IP \fK(New)\fR
Create a new text buffer.
.IP \fK(Save)\fR
Save the current buffer into a file.
When you select this option,
.B xclipboard
displays a pop-up window to prompt you for the name of the file to save
the cut text.
.IP \fK(Next)\fR
Display the next buffer.
.IP \fK(Prev)\fR
Display the previous buffer.
.PP
The window also shows a small sub-window, within which text is displayed.
.PP
To copy a hunk of text to the clipboard, do the following:
.IP \(bu 0.3i
Click the button \fK(New)\fR to open a new entry on the clipboard.
.IP \(bu
Move the mouse cursor to the text you wish to copy;
then press the left mouse button
and drag the mouse cursor across the text.
X redisplays the text in reverse video, to show that it has been cut.
.IP \(bu
Move the mouse pointer into the clipboard window's text sub-window.
Press the middle mouse button:
this drops the cut text into the clipboard.
.IP \(bu
Finally, move the mouse pointer back into the window from which you cut the
text and click the left mouse button.
This un-highlights the cut text, to indicate that it is no longer cut.
.PP
To copy text from the clipboard back into an application, do the following:
.IP \(bu 0.3i
Click on the \fK(Next)\fR and \fK(Prev)\fR buttons until
.B xclipboard
displays in its text sub-window the hunk of text you want.
.IP \(bu
Press the left mouse button and sweep the mouse cursor across the text you
wish to copy.
Again, the text is highlighted.
.IP \(bu
Move the mouse cursor into the window into which you wish to copy the text.
Click the center mouse button.
This drops the cut text into place.
.IP \(bu
Finally, move the mouse cursor into text sub-window of
.BR xclipboard 's
window, and click the left mouse button again.
This un-highlights the text, to show that it is no longer cut.
.SH Options
.B xclipboard
recognizes the following command-line options:
.IP "\fB\-bd \fIcolor\fR" 0.75i
Set the color of the border to
.IR color .
.IP "\fB\-bg \fIcolor\fR"
Set the color of the background to
.IR color .
.IP "\fB\-bw \fIpixels\fR"
Set the width of the border to
.IR pixels .
.IP "\fB\-display \fIhost\^\fB[:\fIserver\^\fB][.\fIscreen\^\fB]\fR"
Display its window on screen number
.I screen
of
.I server
on host system
.IR host .
.IP "\fB\-fg \fIcolor\fR"
Set the color of the foreground to
.IR color .
.IP "\fB\-fn \fIfont\fR"
Use
.I font
in the display.
.IP "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to
.IR geometry .
The term ``geometry'' means the dimensions of the window and its location
on the screen.
.I geometry
has the form \fIwidth\(muheight\(+-xoffset\(+-yoffset\fR.
.IP \fB\-nw\fR
Do not wrap long lines of text.
This is the default.
.IP \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors.
.IP \fB\-w\fR
Wrap onto the next line each line of text that is too long to fit onto one line.
.IP "\fB\-xrm \fIresourcestring\fR"
Use
.I resourcestring
to define a resource.
.SH Selection
.B xclipboard
stores each hunk of text as a string.
You can select each hunk separately from other hunks.
Text is copied to the clipboard whenever a client asserts ownership of the
\f(SCCLIPBOARD\fR selection.
Text is copied from the clipboard whenever a client requests the
contents of the \f(SCCLIPBOARD\fR selection.
The following gives examples of event bindings that you may wish to include
in the resource file of a client that uses the clipboard:
in this file:
.DM
	*VT100.Translations: #override \e
		Button1 <Btn3Down>:	select-end(CLIPBOARD) \en\e
			<Btn2Up>:	insert-selection(PRIMARY,CLIPBOARD) \en\e
.DE
.PP
Each time an application asserts the clipboard,
.B xclipboard
transfers the text that application selected into a new buffer and displays
it in its text window.
.B xclipboard
does not automatically delete these buffers:
you must use the delete button on the mouse to drop useless buffers into
the bit bucket.
.PP
.B xclipboard
also responds to requests for the clipboard selection from other clients
by sending the entire contents of the currently displayed buffer.
.SH Resources
.B xclipboard
accepts all of the standard X Toolkit resource names and classes.
In addition, it accepts:
.IP "\fBwordWrap(\fRclass \fBWordWrap)\fR"
Specify whether long lines of text should wrap to the following lines.
The default is no.
.\".SH Widgets
.\"To specify resources, it is useful to know the hierarchy of widgets that compose
.\".BR xclipboard .
.\"In the notation below, indentation indicates hierarchical structure.
.\"The widget class name is given first, followed by the name of the widget
.\"instance:
.\".DM
.\"	XClipboard	xclipboard
.\"		Form	form
.\"			Command	quit
.\"			Command	delete
.\"			Command	new
.\"			Command	next
.\"			Command	prev
.\"			Text	text
.\".DE
.SH Files
.B "/usr/X11/lib/app-defaults/XClipboard\fR \(em Resource file
.SH "See Also"
.B
X utilities
.R
.SH Notes
.II "Swick, Ralph R."
.II "Peterson, Chris"
.II "Packard, Keith"
.B xclipboard
was written by Ralph R. Swick of DEC/MIT Project Athena, and by
Chris Peterson and Keith Packard of the MIT X Consortium.
