Tool {svWidgets} | R Documentation |
These functions provide an unifying way of dealing with tools and toolbars in R.
Currently, they support a little bit a functionnalities for tcltk2 widgets (tile)
and most functions, except ToolRead
are not finished.
ToolbarAdd(toolbar, ...) ToolbarDel(toolbar) ToolbarType(toolbar, warn = TRUE) ToolAdd(tool, ...) ToolDel(tool) ToolNames() ToolItems(toolbar) ToolType(tool, warn = TRUE) ToolChange(tool, action = "", image = "", accel = "", options = "") ToolState(tool, active = TRUE) ToolRead(file = "Tools.txt") ToolReadPackage(package, subdir = "gui", file = "Tools.txt")
toolbar |
Name of a toolbar |
... |
Further options |
warn |
Do we issue a warning if the type of tool or toolbar is not recognized? |
tool |
The name of a tool |
action |
Action the tool triggers (R code) |
image |
Name of an image to display at left of the menu item |
accel |
Accelerator (keystroke) to use to trigger this menu item |
options |
Additional options, for instance 'state = "disable"' to disable the tool at creation. |
active |
Do we enable or disable the tool? |
file |
A file containing menu specifications to read |
package |
Name of a package from where to load tools and toolbars specifications |
subdir |
Subdirectory in the package where the tools and toolbars specifications are stored. By default, it is the "gui" subdirectory. |
These functions care about creating, deleting and managing custom tools and toolbars. Informations and handles to the various tools created with these functions are stored in the .gui.Tools variable, located in the TempEnv environment.
ToolAdd()
return the handle to the newly created tool.
ToolNames()
return the list of all tools registered in .gui.Tools.
Philippe Grosjean
## Not run: ## These cannot be run by examples() but should be OK when pasted ## into an interactive R session with the tcltk or tcltk2 package loaded ## Run these commands one at a time and look at the toolbars being created... ### TODO: examples here! ## End(Not run)