gui_add: Creation and management of GUI objects.

View source: R/gui_add.R

gui_addR Documentation

Creation and management of GUI objects.

Description

Create and manipulate gui objects to manage 'SciViews'-compatible GUIs (Graphical User Interfaces).

Usage

gui_add(gui.name = ".GUI", widgets = c("nativeGUI", "textCLI"), ask)

guiAdd(gui.name = ".GUI", widgets = c("nativeGUI", "textCLI"), ask)

gui_change(
  gui.name = ".GUI",
  widgets = c("nativeGUI", "textCLI"),
  reset = FALSE,
  ask
)

guiChange(
  gui.name = ".GUI",
  widgets = c("nativeGUI", "textCLI"),
  reset = FALSE,
  ask
)

gui_remove(gui.name)

guiRemove(gui.name)

gui_list()

guiList()

gui_widgets(gui, gui.name = ".GUI")

guiWidgets(gui, gui.name = ".GUI")

gui_widgets(x, reset = FALSE) <- value

guiWidgets(x, reset = FALSE) <- value

gui_ask(gui.or.name, ask)

guiAsk(gui.or.name, ask)

gui_ask(x) <- value

guiAsk(x) <- value

Arguments

gui.name

The name of the GUI. It is also the name of the object stored in SciViews:TempEnv where you can access it.

widgets

The list of widgets that GUI uses, listed in a priority order.

ask

Logical indicating if modal dialog boxes should be display (ask = TRUE), or if those dialog boxes are by-passed, using default values to simulate script running in non interactive mode, or to test scripts without interruption, using only provided default values (useful for automated tests).

reset

Should the GUI's main parameters (widgets, ask) be reset to default values?

gui

A gui object. If provided, it supersedes any value provided in gui.name.

x

A gui object.

value

The list of widgets to add to this GUI, in priority order, or should we change ask to TRUE, FALSE or NULL (then, use the default value stored in getOption("gui.ask")).

gui.or.name

A gui object or its name.

See Also

gui, setUI(), dont_ask()

Examples

# A 'gui' object named .GUI is automatically created in 'SciViews:TempEnv'
gui_list()

# Create a new GUI object to manage a separate GUI in the same R session
gui_add("myGUI")
gui_list()

# Change general properties of this GUI
gui_ask(myGUI) <- FALSE
# Add widgets to this GUI (you must provide methods for them)
# see the svDialogs package for examples
gui_widgets(myGUI) <- "tcltkWidgets"
gui_widgets(myGUI) # Added to existing ones if reset is FALSE

# Remove this new GUI
gui_remove("myGUI")

SciViews/svGUI documentation built on May 14, 2022, 5:50 p.m.