quickTool {playwith} | R Documentation |
Part of the playwith
Application Programming Interface.
## 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)
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.data$playState . |
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. |
This is just a convenient way to make a gtkToolButton
.
The post.plot.action
is attached to the returned object as a GObject with
key "post.plot.action".
quickTool
returns a gtkToolButton
.
Any post.plot.action
is attached to the gObject with key "post.plot.action".
Felix Andrews felix@nfrac.org
## ## see the examples in help(playwith.API). ##