final case class Selection(name: String, labels: Vector[String] = ..., hover: Boolean = ..., click: Boolean = ..., listed: Boolean = ..., title: String = ...)
A set of things the viewer picks by pointing at them: the classes of a barcode, the points of a cloud. Items of a Panel name a key (a whole number, the index of the thing they stand for) and choose it with Behavior.Selects; other items appear while a key is chosen with Behavior.Selected, so that pointing at a bar of the barcode lights up its point in the diagram and its cycle on the input. A selection is to the viewer's pointer what a Control is to a slider: a named input that behaviors listen to.
Pointing at an item chooses its key for as long as the pointer stays (hover); a click pins it until it is clicked again (a shift-click adds to the pinned keys, a click on the background of a panel lets them all go); a Panel.Flat.brushable panel chooses by dragging a rectangle.
Value parameters
click
whether clicking an item pins it
hover
whether pointing at an item chooses it
labels
what to write for each key, labels(key), in the list under the panels and in the heading of a still picture
listed
whether the page lists the labels of the chosen keys under the panels
name
what behaviors call it (a letter, then letters, digits, _ or -)
title
what the page writes beside that list, and in the heading of a still picture; the name when empty