SHIP:TextframeModel

From Serious Documentation
Jump to: navigation, search

Node Home

Node Type Description
textframe A generic text container, available as a reusable resource or layout element.

The textframe node is the generic text container used to position and enclose other text nodes. They can be nested, stacked, and overlapped. Touch events can be sensed within them. They can be invisible, partially tranparent, or fully opaque. And they have all the properties of the TextframeModel, including margin, borders, padding, and more.

textframe nodes can exist in the layout area or the resources area. In the resources area, the textframe forms a template of properties that can be inherited by a textframe in the layout area.

Ancestors

The following nodes are permitted to have textframes as descendants:

Node Type Description
box A generic rectangular container, available as a reusable resource or layout element.
frame A generic lightweight rectangular container, available as a reusable resource or layout element. Introduced in 5.0.207.
layout Top of the Layout Area within a SHIP GUI, which completely describes how the GUI is visually organized.
page Visual layout area for a specific GUI "page", or "screen"
textframe Defines a textframe resource or a visual text representation.

textframe nodes are permitted directly underneath these nodes.

Descendants

The following nodes are permitted within textframes:

Node Type Description
constant Defines a constant value for use in SHIPTide properties or SAIL scripts.
file
group Lightweight node that encloses other nodes for pure organizational benefit, or to create an array of nodes.
listener Monitors one or more properties (including variable values!) for changes, and on changes invokes a script.
text Defines a text resource or a visual text representation.
variable Run-time value accessible by scripts and able to generate events on change.

only these nodes are permitted directly underneath the textframe node.

Properties

The following Text Frame Model properties are available for the textframe node, whether in the layout or resources area: textframe||A generic text container, available as a reusable resource or layout element.


The following Text Model properties are available for the textframe node, whether in the layout or resources area:

TextModel Property Summary
Property Data Type Description
textfont FontFamilyInfo Font family selector for displayable text.
textsize Dimension Pixel height selector for displayable text.
textstyle FONTSTYLE Style selector for displayable text.
texthalign HALIGN Horizontal alignment of text within its parent container's inner dimensions.
textvalign VALIGN Vertical alignment of text within its parent container's inner dimensions.
textbgcolor Color The background color of displayable text.
textcolor Color The color of displayable text.
textspacing Float A multiplier of the line spacing, with default unset value of 1.0f.
textmultiline Boolean Determines if a text line is permitted to overflow to the next line. The default (unset) is true.
textwrap Boolean Determines if a text line is permitted to automatically wrap to the following line if it will not fit on the current line. The default (unset) is true.


In addition, the following properties are also available, whether in the layout or resources area:

Other textframe Properties
Property Data Type Description
visible Boolean If true (default) this node will be visible iff all direct line parent nodes up to and including the display node are also visible.
opacity Byte Opacity of the displayable node and all its children, grandchildren, etc.
name** String The name used to identify this node in SHIPTide.
direction

textframe nodes in the layout area also have the following properties:

Other textframe in layout Area Properties
Property Data Type Description
object
silent
enabled Boolean If true (default) this node and its children are able to receive events.

Examples