Storyboard Model Internal Variables

Not all variables have to be defined by the user and associated with render extension and action properties. Storyboard defines a set of variables for the model element properties such as position, size, and visibility. Each class of model elements contains a slightly different set of values, but all of the variables are prefixed with the grd_ (Graphical Runtime Data) variable namespace to avoid any confusion with user created variables.

These variables are generally accessed using ${model_object:varname}, for example ${control:grd_x} indicates the x position of the current control

Layer variables

The following values can be queried and changed through normal data management channels. The position variables are relative to the screen.

grd_x

4s1

The layer instance's x position relative to the screen

grd_y

4s1

The layer instance's y position relative to the screen

grd_xoffset

4s1

The x pixel offset that will be used to determine the origin of the layer instance

grd_yoffset

4s1

The y pixel offset that will be used to determine the origin of the layer instance

Note

Any change to the following values affects all layers.

grd_width

4s1

The layer's width

grd_height

4s1

The layer's height

grd_alpha

1u1

The layer's transparency value. The values range from 255 (opaque) to 0 (transparent)

grd_hidden

1u1

The layer's visibility. A value of 0 states that the layer and all of its controls are visible and a value of 1 hides the layer and all of its controls

Group variables

The following values can be queried and changed through normal data management channels.

grd_x

4s1

The group's x position relative to its layer

grd_y

4s1

The group's y position relative to its layer

grd_zindex

4s1

The group's z-index position. This sets the stacking order of groups within its layer where 0 is at the back (furthest from the eye).

grd_hidden

lu1

The group's visibility. A value of 0 indicates that the control is visible and 1 that it is hidden

Control variables

The following values can be queried and changed through normal data management channels.

grd_x

4s1

The control's x position relative to its layer

grd_y

4s1

The control's y position relative to its layer

grd_width

4s1

The control's width

grd_height

4s1

The control's height

grd_zindex

4s1

The control's z-index position. This sets the stacking order of controls within its layer where 0 is at the back (furthest from the eye).

grd_hidden

1u1

The control's visibility. A value of 0 indicates that the control is visible and 1 that it is hidden

grd_active

1u1

A value of 1 states that the control is active (can receive and react to events) and 0 for an inactive control (cannot receive or react to events)

grd_opaque

1u1

Indicates if the control is opaque to events. If opaque (1), the control will block events from being handled by other controls.  If the value is 0, the events flow through the control to ones behind it.

grd_findex

4s1

The control's focus index. This sets the focus on a control in a navigation sequence, where 1 sets the focus on the first control, 2 sets the second, etc. A value of 0 indicates that the control is not focusable. In order for a control's focus index to be changed dynamically at runtime, the focus value must be initially set to a non-zero value in Storyboard Designer.

Table variables

A table contains all of the control variables and also a set of table specific variables. These table specific variables can be queried but not dynamically changed. In order to change these values in a table, actions are provided: gra.table.resize, gra.table.scroll.  The variables are as follows.

grd_rows

4s1

The number of rows in the table

grd_cols

4s1

The number of columns in the table

grd_visible_rows

4s1

The number of visible rows in the table

grd_visible_cols

4s1

The number of visible columns in the table

grd_active_row

4s1

The row index of the currently active cell

grd_active_col

4s1

The column index of the currently active cell

grd_row

4s1

The table’s current top left row

grd_col

4s1

The table’s current top left column

grd_xoffset

4s1

The x pixel offset that will be used to determine the origin of the 1,1 table cell

grd_yoffset

4s1

The y pixel offset that will be used to determine the origin of the 1,1 table cell

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.