guiToolkit: Function to select the GUI toolkit used by gWidgets

Description Usage Arguments Details Value Examples

View source: R/toolkitClasses.R


A GUI toolkit is a separate package that implements the gWidgets API. This function allows one to select the toolkit to be used by default.





The name matches the package name without the initial gWidgets. For instance, "RGtk2" refers to the implementation provided by gWidgetsRGtk2.


Toolkits are named gWidgetsXXX. This function is used to get the toolkit class, or have the user select one. The gtoolkit function returns a string form of the toolkit. One way to set a toolkit is to use the guiToolkit option, as in options(guiToolkit="RGtk2").


The guiToolkit function returns a subclass of guiWidgetsToolkit that is used for dispatching purposes by gWidgets. For example, the method svalue dispatches on its first argument and the value of the toolkit class stored in the toolkit slot of the object.

The gtoolkit function returns a character string for the toolkit.



Example output

Loading required package: gWidgetsRGtk2
Loading required package: RGtk2
R session is headless; GTK+ not initialized.
Loading required package: cairoDevice

(R:22167): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
Error: package or namespace load failed for 'cairoDevice':
 .onLoad failed in loadNamespace() for 'cairoDevice', details:
  call: fun(libname, pkgname)
  error: GDK display not found - please make sure X11 is running
Failed with error:  'package 'cairoDevice' could not be loaded'
An object of class "guiWidgetsToolkitRGtk2"
Slot "toolkit":
[1] "RGtk2"

gWidgets documentation built on April 29, 2020, 9:37 a.m.