About
A brief description of the packages available from this r-forge project:
- gWidgets: an API for writing graphical user interfaces (GUIs)
within R. The package is cross-platform (Linux/Mac/Windows) and
cross-toolkit (RGtk2, qtbase, tcltk). An RNews article is
here. The
gWidgets package needs a further "gWidgetsXXX" package to provide the connection
to the graphical toolkit.
- (The gWidgets package is being replaced by gWidgets2 which is hosted on github. See the files here: https://github.com/jverzani
- gWidgetsRGtk2: needed to use the RGtk2 package for the graphical toolkit
- gWidgetstcltk: needed to use the tcltk package for the graphical toolkit
- gWidgetsQt: needed to use the qtbase package for the graphical toolkit
- gWidgetsrjava: needed to use the rjava package for the graphical
toolkit. This package is not being maintained. For Java-based GUIs please see the deducer project.
- gWidgetsWWW: A standalone implementation of the gWidgets API
that allows one to easily make dynamic web sites, either locally or,
with rapache, to be served to a remote user. See a JSS article for some details. (This package is replaced by the
gWidgetsWWW2 and gWidgetsWWW2.rapache packages on the github site).
- pmg: This is a GUI for R written using gWidgets, primarily aimed around its use in the
classroom.
The package is described here.
- traitr: an alternate interface for programming GUIs which uses
gWidgets for the graphical presentation
Examples
A basic hello world application can be made as follows:
library(gWidgets)
options(guiToolkit="RGtk2") # avoid question if more than one is installed
w <- gwindow("Hello world example") # top level window
g <- ggroup(cont=w, horizontal=FALSE) # a box container, added to w
b <- gbutton("Click me for a message", cont=g) # add button to container g
addHandlerClicked(b, handler=function(h,...) { # add interactivity through a handler
galert("Hello world", parent=h$obj)
})
More documentation/examples
The gWidgets vignette is a source of further examples. The vignette for gWidgets2 is shortened, but still has some exmaples. (See a copy here.)
The text Programming Graphical User Interfaces in R has a part on gWidgets
The project summary page you can find here.
Old web site here.