Properties of plugin elements |
Prev | Reference | Next |
All layout elements, and all active elements hold the following properties, accessible via "id_of_element.name_of_property":
Whether the GUI element is visible or not (boolean)
Whether the GUI element is enabled or not (boolean)
Whether the GUI element is required (to hold a valid setting) or not. Note that any element which is disabled or hidden is also implicitly non-required (boolean).
In addition to this, some elements have additional properties you can connect to. Most active elements also have a "default" property whose value will be returned on calls to getBoolean/getString/getList ("...")
, if no specific property was named, as described below.
Default property is text
The text displayed (text)
No default property
The objects currently selected. You probably do not want to use this. Used internally (RObject)
The root/parent object of the objects offered for selection (RObject)
Default property is "available"
All objects held in the varslot (RObject)
Of the objects held in the varslot, those that are currently selected. You probably do not want to use this. Used internally (RObject)
A copy of the objects selected in the corresponding varselector. You probably do not want to use this. Used internally (RObject)
Default property is "selected"
The strings currently selected. Modifier "labeled" to retrieve the corresponding labels. In a <valueselector> you probably do not want to use this, directly (only in a <select>). (read/write StringList)
The list of string values to select from. (read/write StringList)
Labels to display for the string values. (read/write StringList)
Same as <varslot>, but the properties are lists of strings, instead of RObjects.
Default property is "string"
The value of the currently selected option (string)
The number of the currently selected option (options are numbered top-to-bottom, starting at 0) (integer)
Same as <radio>
Same as <valueselector>
No default property. "enabled" is the *only* property, and it is not currently available for options inside a <select> or <valueselector>. <option> does not have the "visible" or "required" properties.
Whether this single option should be enabled or disabled. In most cases you will enable/disable the entire <radio< or <dropdown<, instead. But this can be used to dynamically set the enabledness of a single option inside a <radio< or <dropdown< (bool)
Default property is "state.labeled", which means that the values specified by the value
, and value_unchecked
-attributes are returned, not the displayed label of the check box.
State of the check box (on or off). Note that useful modifiers of this property (as of all boolean properties) are "not" and "labeled" (see types of properties). However, often it is most useful to connect to the property with no modifier, i.e. "checkbox_id.state", which will return the state of the check box in a format suitable for use in an if statement (0 or 1). (boolean)
Default property is "checked", if - and only if - the frame is checkable. For non-checkable frames, there is no default property.
Available for checkable frames, only: state of the check box (on or off). Note that useful modifiers of this property (as of all boolean properties) are "not" and "numeric" (see types of properties). (boolean)
Default property is "text"
Current text in the input field (string)
Default property is "cbind".
Number of rows in the matrix (integer). If the matrix allows the user to add / remove rows, this property should be treated as read-only. Otherwise, changing it, will change the size of the matrix.
Number of columns in the matrix (integer). If the matrix allows the user to add / remove columns, this property should be treated as read-only. Otherwise, changing it, will change the size of the matrix.
Data in the matrix in tsv format (string; read-write). Note that compared to the usual tsv layout, columns, not rows, are separated by newline characters, and cells within a column are separated by tabulator characters.
The data from a single column (0 for leftmost column). getValue()
/getString()
returns this as a single string, separated by "\n". However, the recommended way to get this is using getList()
, which returns this column as an array of strings.
The data from a single row (0 for topmost row). getValue()
/getString()
returns this as a single string, separated by "\n". However, the recommended way to get this is using getList()
, which returns this row as an array of strings.
Data in a format suitable for pasting to R, wrapped in a cbind statement (string; read-only).
No default property.
Number of items in the optionset (integer). Read-only.
Currently active item in the optionset (integer). -1 for no active item. Read-write.
For each <optioncolumn> you define, a string list property will be created with the specified id.
Default property is "selection"
Current text (selected file name) in the browser (string)
Default property is "selection"
Full name of the selected object (string; read-only - to set this programmatically, use "parent", and "objectname")
The parent object of the selected object. This is always an existing R object of a type that can contain other objects (e.g. a list or data.frame). When set to an empty string or an invalid object, ".GlobalEnv" is assumed (RObject)
The base-name of the selected object, i.e. the string entered by the user (changed to a valid R name, if necessary) (string)
For checkable saveobjects, only: Whether the control is checked/enabled. Always true for non-checkable saveobjects (bool)
Default property is either "int" or "real.formatted" depending on the spinbox's mode
Integer value held by the spinbox, or nearest integer, if in real mode (integer)
Real value held by the spinbox (and integer, if in integer) (real)
Default property is "model"
The current model string (string)
The data.frame holding the required variables. If variables from only one data.frame are used, the name of that data.frame is returned. Otherwise a new data.frame is constructed as required (string)
If variables from multiple data.frames are involved, their names may get mangled (for instance, if both data.frames contain a variable named "x"). This returns a list with the mangled names as indices and the descriptive label as value (string)
The fixed factors. You probably do not want to use this. Used internally (RObject)
The dependent variable(s). You probably do not want to use this. Used internally (RObject)
No default property
The code generated by the embedded plugin (code)
Default property is "state"
Whether the preview box is checked (not necessarily whether the preview has already been shown) (boolean)
This element (used in the <logic> section) is special, in that is technically *is* a property, instead of just holding one or more properties. It is of boolean kind. Note that useful modifiers of this property (as of all boolean properties) are "not" and "numeric" (see types of properties)
This element (used in the <logic> section) is special, in that is technically *is* a (string) property, instead of just holding one or more properties. It allows to switch between several target properties depending on the value of a condition property, or to re-map values of the condition property. Any modifiers that you supply are passed on to the target properties, thus, e.g. if all target
properties are RObject properties, you can use the "shortname" modifier on the switch, too. However, if the target properties are of
different types, using modifiers may lead to errors. For fixed_value
s, any modifier is dropped, silently. Note that target properties, when accessed through a switch, are always read-only.
Prev | Contents | Next |
Elements to be used in the XML description of the plugin | Up | Embeddable plugins shipped with the official RKWard release |