Name

selection

selection operation [arg arg...]

The selection command provides a Tcl interface to the X selection mechanism as described in the X Inter-Client Communication Conventions Manual(ICCCM). For the commands that follow, selection specifies the X selection and should be an atom name such as PRIMARY (the default) or CLIPBOARD. A selection is display specific. If the display is not specified with the -displayof option, it defaults to the display of the ''.'' window. The selection command can take the following forms:

selection clear [-displayof window] [selection selection]

If selection exists anywhere on the display of window, clear it so that no window owns the selection.

selection get [-displayof window] [-selection selection] [-type type]

Retrieve the value of selection from the display of window and return it in the form specified by type. Type must be a valid atom name as described in the ICCCM and defaults to STRING.

selection handle [-displayof window] [-type type] [-format format] window command

Arrange for command to be evaluated whenever selection is owned by window and an attempt is made to retrieve it in the form given by type (defaults to STRING).

Command will be executed as a Tcl command with two additional numbers appended as arguments: offset and maxBytes. The command should return a value consisting of at most maxBytes of the selection starting at position offset. If exactly maxBytes is returned, command will be invoked again until it eventually returns a result shorter than maxBytes.

The format argument is for compatibility with non-Tk selection requesters and specifies the representation that should be used to transmit the selection. The default is STRING.

selection own [-displayof window] [-selection selection]

Return the pathname of the window in the application that owns selection on window’s display.

selection own [-command command] [-selection selection] window

Make window the new owner of selection on window’s display. If command is specified, it is a Tcl script that will be evaluated when ownership of selection is taken away from window.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset