The Selection Model

The Windows and Macintosh selection model is simpler than the selection model used in X windows. In the Macintosh and Windows there is one selection, although that selection may store different types of data like text or images. Users copy data from an application into a clipboard, and later they paste it into another application.

In X windows the selection model is generalized to support more than one selection, and they are identified by names like PRIMARY and CLIPBOARD. The CLIPBOARD selection is used for copy and paste as in Macintosh and Windows. The PRIMARY selection is described later. You could use other selection names, like SECONDARY or FOOBAR, but that only works if the other applications know about that selection ...

Get Practical Programming in Tcl & Tk, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.