Learn R Programming

playwith (version 0.9-11)

quickTool: Create new playwith tools

Description

Part of the playwith Application Programming Interface.

Usage

## Note: this is only to be called inside a tool constructor function.
quickTool(
	playState,
	label = "",
	icon.name = NULL,
	tooltip = NULL,
	f = NULL,
	data = NULL,
	post.plot.action = NULL,
	isToggle = FALSE,
	show = TRUE)

Arguments

playState
a playState object, as passed in to the constructor function.
label
the button label.
icon.name
name of the GTK icon to use, starting with "gtk-". See http://developer.gnome.org/doc/API/2.0/gtk/gtk-Stock-Items.html#GTK-STOCK-ABOUT:CAPS for a list.
tooltip
the button tooltip.
f
function to be called when the button is clicked (button click handler). This should be a function(widget, playState) if data is NULL; otherwise it should be a function(widget, user.data and access user.d
data
extra data to be passed to the callback function. If given, this must be a list, and an element "playState" will be added to it.
post.plot.action
a function to run after the plot has been drawn. This should be a function(widget, playState).
isToggle
whether the button should stay on until it is clicked again (a gtkToggleToolButton).
show
sets the initial visibility.

Value

  • a gtkToolButton. Any post.plot.action is set as an attribute "post.plot.action".

Details

Note: this is only to be called inside a tool constructor function. It is not intended to be called directly. This is just a convenient way to make a gtkToolButton.

See Also

playwith.API, playwith

Examples

Run this code
##
## see the examples in help(playwith.API).
##

Run the code above in your browser using DataLab