R: Creation of GUI objects

guiAdd {svGUI} | R Documentation

## Creation of GUI objects

### Description

Create 'gui' object to manage SciViews-compatible GUIs (Graphical User Interfaces).

### Usage

    guiAdd(gui.name = ".GUI", widgets = c("nativeGUI", "textCLI"), ask)
    guiChange(gui.name = ".GUI", widgets = c("nativeGUI", "textCLI"),
        reset = FALSE, ask)
    guiRemove(gui.name)
    guiList()
    guiWidgets(gui, gui.name = ".GUI")
    guiWidgets(x, reset = FALSE) <- value
    guiAsk(gui.or.name, ask)
    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. Although not required, you are better to use short, syntactically correct names.
`widgets` | the list of widgets that GUI uses, listed in a priority order.
`ask` | logical indicating if simple 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 default value stored in `getOption("gui.ask")`).
`gui.or.name` | a 'gui' object or its name.

### Value

The 'gui' object just created or changed for `guiAdd()`, `guiChange()`, `guiWidgets(agui) <- value` or `guiAsk(agui) <- value`. For `guiRemove()`, `TRUE` if an object was removed, or `FALSE` if the object was not there, invisibly. For `guiList()`, the list of current 'gui' objects in SciViews:TempEnv, or a zero-length character if none (should not happen, since `.GUI`, the default GUI, cannot be removed).

### Author(s)

Philippe Grosjean (phgrosjean@sciviews.org)

### See Also

`gui`, `setUI`, `dontAsk`

### Examples

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

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

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

    ## Remove this new GUI
    guiRemove("myGUI")

[Package svGUI version 0.9-55 Index]