Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

RGtkObject

The base object of RGtk2


Description

RGtkObject identifies an external object as being owned by RGtk. Practically, it allows convenience operators to be specified for any external object.

Usage

## S3 method for class 'RGtkObject'
x[[field, where = parent.frame()]]
## S3 method for class 'RGtkObject'
x$member
## S3 method for class 'RGtkObject'
x == y

Arguments

x

The RGtkObject to which the method or field belongs or the left hand of a comparison

field

The name of the field whose value will be retrieved

member

The name of the member (eg method) that will be retrieved

y

The right hand operand of a comparison

where

The environment in which to look for the field accessor function

Details

The functions [[.RGtkObject and $.RGtkObject both expand to an RGtk function that accesses external objects. The [[ operator looks for a field from an external C structure by expanding objectOfClassName[[fieldName]] to classNameGetFieldName(). External "methods" are expanded by the $ operator to form classNameMethodName(objectOfClassName, ...) from the Java-like objectOfClassName$methodName(...). The long and short mechanisms give the same result, but the shortcut is obviously more convenient. If the method does not exist, $ will fall back to other types of members, like properties (for GObjects) and fields.

The == operator compares two RGtkObjects on the basis of their internal pointer value. This should rarely be useful for users.

Value

A context-dependent value resulting from the specified API call.

Author(s)

Michael Lawrence


RGtk2

R Bindings for Gtk 2.8.0 and Above

v2.20.36
GPL
Authors
Michael Lawrence <michafla@gene.com> and Duncan Temple Lang <duncan@wald.ucdavis.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.