semagrams.Binding
See theBinding companion object
case class Binding[A](selector: PartialFunction[Event, IO[A]], predicate: Option[BindingPredicate], docs: String)
A Binding associates an IO returning A
action to events.
Attributes
- A
The type that the binding eventually returns
- docs
A description of the behavior of the binding, to be shown in a help screen.
- modifiers
If present, the event only matches if these KeyModifiers are down.
- selector
The function which says if an event "matches", and if so, what to do with it.
- Todo:
selector should be concrete data that implements a trait, and part of that trait is a description of the binding, like "Ctrl-click on a box" or "press a".
actually use docs
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any