Properties of plugin elements

All layout elements, and all active elements hold the following properties, accessible via "id_of_element.name_of_property":

visible

Whether the GUI element is visible or not (boolean)

enabled

Whether the GUI element is enabled or not (boolean)

required

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.

<text>

Default property is text

text

The text displayed (text)

<varselector>

No default property

selected

The objects currently selected. You probably do not want to use this. Used internally (RObject)

root

The root/parent object of the objects offered for selection (RObject)

<varslot>

Default property is "available"

available

All objects held in the varslot (RObject)

selected

Of the objects held in the varslot, those that are currently selected. You probably do not want to use this. Used internally (RObject)

source

A copy of the objects selected in the corresponding varselector. You probably do not want to use this. Used internally (RObject)

<valueselector>

Default property is "selected"

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)

available

The list of string values to select from. (read/write StringList)

labels

Labels to display for the string values. (read/write StringList)

<valueslot>

Same as <varslot>, but the properties are lists of strings, instead of RObjects.

<radio>

Default property is "string"

string

The value of the currently selected option (string)

number

The number of the currently selected option (options are numbered top-to-bottom, starting at 0) (integer)

<dropdown>

Same as <radio>

<select>

Same as <valueselector>

<option>

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.

enabled

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)

<checkbox>

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

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)

<frame>

Default property is "checked", if - and only if - the frame is checkable. For non-checkable frames, there is no default property.

checked

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)

<input>

Default property is "text"

text

Current text in the input field (string)

<matrix>

Default property is "cbind".

rows

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.

columns

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.

tsv

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.

0,1,2...

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.

row.0,row.1,row.2...

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.

cbind

Data in a format suitable for pasting to R, wrapped in a cbind statement (string; read-only).

<optionset>

No default property.

row_count

Number of items in the optionset (integer). Read-only.

current_row

Currently active item in the optionset (integer). -1 for no active item. Read-write.

optioncolumn_ids

For each <optioncolumn> you define, a string list property will be created with the specified id.

<browser>

Default property is "selection"

selection

Current text (selected file name) in the browser (string)

<saveobject>

Default property is "selection"

selection

Full name of the selected object (string; read-only - to set this programmatically, use "parent", and "objectname")

parent

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)

objectname

The base-name of the selected object, i.e. the string entered by the user (changed to a valid R name, if necessary) (string)

active

For checkable saveobjects, only: Whether the control is checked/enabled. Always true for non-checkable saveobjects (bool)

<spinbox>

Default property is either "int" or "real.formatted" depending on the spinbox's mode

int

Integer value held by the spinbox, or nearest integer, if in real mode (integer)

real

Real value held by the spinbox (and integer, if in integer) (real)

<formula>

Default property is "model"

model

The current model string (string)

table

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)

labels

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)

fixed_factors

The fixed factors. You probably do not want to use this. Used internally (RObject)

dependent

The dependent variable(s). You probably do not want to use this. Used internally (RObject)

<embed>

No default property

code

The code generated by the embedded plugin (code)

<preview>

Default property is "state"

state

Whether the preview box is checked (not necessarily whether the preview has already been shown) (boolean)

<convert>

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)

<switch>

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_values, any modifier is dropped, silently. Note that target properties, when accessed through a switch, are always read-only.