Learn R Programming

loon (version 1.4.1)

l_bind_canvas_ids: List canvas binding ids

Description

List all user added canvas binding ids

Usage

l_bind_canvas_ids(widget)

Value

vector with canvas binding ids

Arguments

widget

widget path as a string or as an object handle

Details

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

See Also

l_bind_canvas, l_bind_canvas_get, l_bind_canvas_delete, l_bind_canvas_reorder

Examples

Run this code
# binding for when plot is resized
if(interactive()){
p <- l_plot(iris[,1:2], color=iris$Species)

printSize <- function(p) {
    size <- l_size(p)
    cat(paste('Size of widget ', p, ' is: ',
              size[1], 'x', size[2], ' pixels\n', sep=''))
}

l_bind_canvas(p, event='', function(W) {printSize(W)})

id <- l_bind_canvas_ids(p)
id

l_bind_canvas_get(p, id)

}

Run the code above in your browser using DataLab