Chapter 18. Clipboard

Note

There is the "Managing Selections" chapter in the original C version tutorial. Even thought LablGtk supports "selection" widget too, "clipboard" widget is simpler so we will make document only for this widget for the time being.

18.1. Overview

Text copy and paste is a good example of clipboard widget. You can do inter-processor communication throuth the widget.

Before copy or paste, you have the access point to the clipboard: see Gdk.Atom and GData.clipboard

val GData.clipboard : Gdk.atom -> clipboard

After that, you can do clear clipboard, set data and get data: see GData.clipboard class

method clear : unit -> unit
method set_text : string -> unit
method text : string option