Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gtoolbar

A toolbar constructor


Description

A toolbar can be added to a main window to proxy various actions. Toolbars can also contain various widgets, such as buttons, checkboxes, radio buttons, etc. These should be constructed using a parent argument – not a container argument. In gWidgets2 a toolbar is specified by a list of toolbar items. The svalue and svalue<- methods may be used to get or set the items.

generic for toolkit dispatch

A toolbar item is a list of action items or a toolbar instance

for a toolbar, svalue<- replaces the toolbar items with new ones specified by value.

Usage

gtoolbar(toolbar.list = list(), style = c("both", "icons", "text",
  "both-horiz"), container = NULL, ..., toolkit = guiToolkit())

.gtoolbar(toolkit, toolbar.list = list(), style = c("both", "icons", "text",
  "both-horiz"), container = NULL, ...)

## S3 method for class 'GToolBar'
add(obj, child, expand = FALSE, fill = NULL,
  anchor = NULL, ...)

## S3 replacement method for class 'GToolBar'
 svalue(obj, index=NULL, ...) <- value

Arguments

toolbar.list

list. A one-level list of gaction items, gseparator items or possibly other widgets. In the latter cases the container argument is not specified prior. (XXX Need to work this out with gWidgetstcltk)

style

style for icon or text.

container

a GWindow instance

...

ignored

toolkit

toolkit

obj

parent object

child

child widget

expand

NULL or logical. For box containers controls whether a child will expand to fill the allocated space.

fill

NULL or character. For box containers. The value of fill (not always respected) is used to control if expansion happens vertically (y), horizontally (x) or both (both or TRUE). For vertically filled box containers, children always fill horizontally (atleast) and for horizontally filled box containers, children always fill vertically (atleast). This is important to realize when trying to size buttons, say.

anchor

NULL or integer. For box containers. The anchor argument is used to position the child within the parent when there is more space allocated than the child requests. This is specified with a Cartesian pair in -1,0,1 x -1, 0, 1.

index

NULL or logical. If TRUE and widget supports it an index, instead of a value will be returned.

value

value to assign for selection or property


gWidgets2

Rewrite of gWidgets API for Simplified GUI Construction

v1.0-8
GPL (>= 3)
Authors
John Verzani
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.