l_bind_state: Add a state change binding

View source: R/l_bind.R

l_bind_stateR Documentation

Add a state change binding

Description

The callback of a state change binding is evaluated when certain states change, as specified at binding creation.

Usage

l_bind_state(target, event, callback)

Arguments

target

either an object of class loon or a vector that specifies the widget, layer, glyph, navigator or context completely. The widget is specified by the widget path name (e.g. '.l0.plot'), the remaining objects by their ids.

event

vector with state names

callback

callback function is an R function which is called by the Tcl interpreter if the event of interest happens. Note that in loon the callback functions support different optional arguments depending on the binding type, read the details for more information

Details

Bindings, callbacks, and binding substitutions are described in detail in loon's documentation webpage, i.e. run l_help("learn_R_bind")

Value

state change binding id

See Also

l_info_states, l_bind_state_ids, l_bind_state_get, l_bind_state_delete, l_bind_state_reorder


loon documentation built on July 9, 2023, 5:48 p.m.