Learn R Programming

RGtk2 (version 2.20.4)

classes: Custom GObject classes

Description

Highly experimental support for constructing new GObject classes entirely from with R.

Usage

gClass(name, parent = "GObject", ..., abstract = FALSE)
  parentHandler(method, obj = NULL, ...)
  assignProp(obj, pspec, value)
  getProp(obj, pspec)
  registerVirtuals(virtuals)
  unregisterVirtuals(virtuals)

Arguments

Value

For gClass, the GType of the new class. For getProp, the value of the property.

Details

The bulk of the class definition (everything except the name and the parent) is passed through additional arguments to the gClass function. This information includes: [object Object],[object Object],[object Object],[object Object],[object Object] The above may seem complicated, and it is. Please see the alphaSliderClass for an example. Also note that the local function is convenient for defining static namespaces on the fly. For calling parent virtuals, use parentHandler. assignProp and getProp are low-level functions; they should not be used in place of the conventional GObject property mechanism, except in the case mentioned above. registerVirtuals and unregisterVirtuals are meant for use by packages that bind C GObject classes to R using the RGtk2 system. An example of such a package is rggobi.