l_bind_item: Create a Canvas Binding

View source: R/l_bind.R

l_bind_itemR Documentation

Create a Canvas Binding

Description

Canvas bindings are triggered by a mouse/keyboard gesture over the plot as a whole.

Usage

l_bind_item(widget, tags, event, callback)

Arguments

widget

widget path as a string or as an object handle

tags

item tags as as explained in l_help("learn_R_bind.html#item-bindings")

event

event patterns as defined for Tk canvas widget https://www.tcl.tk/man/tcl8.6/TkCmd/bind.htm#M5.

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

Item bindings are used for evaluating callbacks at certain mouse and/or keyboard gestures events (i.e. X events) on visual items on the canvas. Items on the canvas can have tags and item bindings are specified to be evaluated at certain X events for items with specific tags.

Note that item bindings get currently evaluated in the order that they are added.

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

Value

item binding id

See Also

l_bind_item_ids, l_bind_item_get, l_bind_item_delete, l_bind_item_reorder


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