Learn R Programming

traitr (version 0.14)

traitR-package: An interface for GUI creation using gWidgets

Description

This package provides an alternate interface for creating graphical user interfaces. The design was inspired by the Traits UI module for python developed by enthought.com. The implementation uses the MVC design pattern in the background, although the user need not be aware of this.

Arguments

Details

For basic use, the user creates a bunch of items (the model), specifies how these will be layed out in a simple manner (the view), specifies actions to happen (the controller) and then creates a dialog. See aDialog for examples.

Creating basic dialogs requires no actual GUI programming knowledge. One specifies the items by type of variable (numericItem or stringItem, say) and the "action" through a method call.

The package uses the proto package so at some level, the R user must use that OO syntax. In particular, methods calls are done with the notation obj$method_name and method definitions have an initial argument . for passing in a reference to the proto object. (The name . is a convention, but can be changed to self or this, if that naming convention is preferred. Methods for proto objects are documented (to some degree anyways). Their help page is shown through the method show_help, as in obj$show_help().