SHIP:Node:constant

From Serious Documentation
Jump to: navigation, search

Node Home

Node Type Description
constant Defines a constant value for use in SHIPTide properties or SAIL scripts.

constant nodes hold unchangeable values used within SHIPTide as a GUI-designer's convenience to avoid repeating numbers, colors, etc. throughout the GUI design. constants are resolved at GUI export time within SHIPTide; while the values are accessible at run-time, the nodes themselves do not appear as referenceable nodes at run-time in SHIPEngine.

Declarations of constants is via a constant node, rather than embedding the declaration in the script as is traditional in pure coded languages. This permits constants to be referenced throughout SHIPTide in properties.

constant nodes can exist in the layout, resources, platform and cargo areas.

Ancestors

The following nodes are permitted to have constants as descendants:

Node Type Description
alternate Defines a alternate translation for a text resource.
box A generic rectangular container, available as a reusable resource or layout element.
cargo
constant Defines a constant value for use in SHIPTide properties or SAIL scripts.
display Contains the visual GUI layout for a specific LCD display/touch set.
fontfamilyinfo
fontinfo
group Lightweight node that encloses other nodes for pure organizational benefit, or to create an array of nodes.
image Defines a resources area, reusable static image.
layout Top of the Layout Area within a SHIP GUI, which completely describes how the GUI is visually organized.
link Creates a communications link and binds a protocol to a physical comm port.
linkset Encompasses all the traffic between two endpoints in a link.
linkvar Describes shared variables on the given linkset.
listener Monitors one or more properties (including variable values!) for changes, and on changes invokes a script.
locale
page Visual layout area for a specific GUI "page", or "screen"
resources All reusable items, such as images, are held in the SHIP top-level node defined as the resources node
splashimage
text Defines a text resource or a visual text representation.
timer Generates delays and timed alarm events.
variable Run-time value accessible by scripts and able to generate events on change.

constant nodes are permitted directly underneath these nodes.

Descendants

The following nodes are permitted within constant:

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.

Properties

value||||
Property Name Data Type Description
name** String The name used to identify this node in SHIPTide.
datatype

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

Examples