These functions provide an easy way to create and manipulate Tk toolbars
under R. Note that the corresponding toolXXX()
function also manipulate
Tk toolbars the same way, but are capable of manipulating other toolbars as
well (not currently, but that could be implemented in the future). One should,
thus, preferably use toolXXX()
!
tkToolAdd(toolbar, side = "top")
tkToolAddItem(toolbar, item, action, image = "", options = "")
tkToolDel(toolbar)
tkToolDelItem(toolbar, item)
tkToolItems(toolbar)
tkToolChangeItem(toolbar, item, action = "", options = "")
tkToolStateItem(toolbar, item, active = TRUE)
tkToolInvoke(toolbar, item)
name of a Tk toolbar.
where to place the toolbar in the window (\"top\", \"bottom\", \"left\", or \"right\")?
name of a toolbutton.
action the toolbutton triggers (R code).
name of a Tk image to display in the toolbutton.
additional options, for instance 'state = "disable"' to disable the toolbutton at creation.
do we enable or disable the toolbutton?
tkToolAdd()
and tkToolAddItem()
return the handle of the newly
created toolbar or toolbutton invisibly.
tkToolDel()
and tkToolDelItem()
return invisibly TRUE
if
the resource is found and deleted, FALSE
otherwise.
tkToolItems()
returns the list of all items in a given toolbar.
tkToolInvoke()
returns invisibly TRUE
if the toolbutton was
invoked, FALSE
otherwise.
tkToolStateItem()
returns the new state of the toolbutton.
Do not use these functions directly. Prefer the corresponding toolXXX()
functions that will call them if Tk toolbars or toolbutton are provided.