SHIP:Node:text

From Serious Documentation
Jump to: navigation, search

See Also

Synopsys

Node Type Description
text Defines a text resource or a visual text representation.

text nodes in the layout area are rendered according to the SHIP Text Model, and UTF-8 encoding is used for text node values.

In the resources area, text nodes define re-usable (and unchangeable) text resources. These text resources can have alternate translations such that when the system variable shiplanguage changes the GUI can automatically be updated.

Ancestors

text nodes within the resources area may be found within the following nodes:

Node Type Description
group Lightweight node that encloses other nodes for pure organizational benefit, or to create an array of nodes.
resources All reusable items, such as images, are held in the SHIP top-level node defined as the resources node

text nodes are permitted only directly underneath these nodes.

Within the layout area, text nodes may be found within the following nodes:

Node Type Description
box A generic rectangular container, available as a reusable resource or layout element.
display Contains the visual GUI layout for a specific LCD display/touch set.
group Lightweight node that encloses other nodes for pure organizational benefit, or to create an array of nodes.
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"

text nodes are permitted directly underneath these nodes.

Descendants

The following nodes are permitted within texts:

Node Type Description
constant Defines a constant value for use in SHIPTide properties or SAIL scripts.
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.
script Run-time algorithms, written in SHIPSail.
timer Generates delays and timed alarm events.
variable Run-time value accessible by scripts and able to generate events on change.

text nodes are permitted directly underneath these nodes.

Properties

Property Name Data Type Description
silent
name** String The name used to identify this node in SHIPTide.
object
opacity Byte Opacity of the displayable node and all its children, grandchildren, etc.
value String Value of a text resource or layout area node.
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.

**available only in SHIPTide; cannot be accessed from Sail scripts at run-time.

The following text-related properties are common to all displayable nodes:

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.


Examples