SHIP:Node:box

From Serious Documentation
Revision as of 19:40, 16 November 2016 by CarltonHeyer (talk | contribs) (Descendants)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Node Home

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

The box node is the generic container used to position and enclose other visual elements. 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 Box Model, including margin, borders, padding, and more.

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

Ancestors

The following nodes are permitted to have boxs as descendants:

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"

box nodes are permitted directly underneath these nodes.

Descendants

The following nodes are permitted within boxs:

Node Type Description
box A generic rectangular container, available as a reusable resource or layout element.
constant Defines a constant value for use in SHIPTide properties or SAIL scripts.
frame A generic lightweight rectangular container, available as a reusable resource or layout element. Introduced in 5.0.207.
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.
textframe Defines a textframe 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.

only these nodes are permitted directly underneath the box node.

Properties

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

Box Model Outer Properties
Property Data Type Description
ot Dimension Top edge of a box model node.
ob Dimension Bottom edge of a box model node.
oh Dimension Height of a box model node.
ol Dimension Left edge of a box model node.
or Dimension Right edge of a box model node.
ow Dimension Width of a box model node.
Box Model Vertical and Horizontal Alignment Properties
Property Data Type Description
valign VALIGN Vertical alignment of a box model node within its parent container's inner dimensions.
halign HALIGN Horizontal alignment a box model node within its parent container's inner dimensions.
Box Model Margin Properties
Property Data Type Description
mt Dimension Top margin thickness of a box; not present on lightweight box model nodes such as frame and textframe.
mb Dimension Bottom margin width of a box; not present on lightweight box model nodes such as frame and textframe.
ml Dimension Left margin width of a box; not present on lightweight box model nodes such as frame and textframe
mr Dimension Right margin width of a box; not present on lightweight box model nodes such as frame and textframe
Box Model Border Properties
Property Data Type Description
bt Dimension Top border thickness of a box; not present on lightweight box model nodes such as frame and textframe.
bct Color Top border color of a box; not present on lightweight box model nodes such as frame and textframe.
bb Dimension Bottom border thickness of a box; not present on lightweight box model nodes such as frame and textframe.
bcb Color Bottom border color of a box; not present on lightweight box model nodes such as frame and textframe.
bl Dimension Left border thickness of a box; not present on lightweight box model nodes such as frame and textframe.
bcl Color Left border color of a box; not present on lightweight box model nodes such as frame and textframe.
br Dimension Right border thickness of a box; not present on lightweight box model nodes such as frame and textframe.
bcr Color Right border color of a box; not present on lightweight box model nodes such as frame and textframe.
Box Model Padding Properties
Property Data Type Description
pt Dimension Top padding thickness of a box; not present on lightweight box model nodes such as frame and textframe.
pb Dimension Bottom padding thickness of a box; not present on lightweight box model nodes such as frame and textframe.
pl Dimension Left padding thickness of a box; not present on lightweight box model nodes such as frame and textframe.
pr Dimension Right padding thickness of a box; not present on lightweight box model nodes such as frame and textframe.
Box Model Inner Dimension Properties
Property Data Type Description
it Dimension Inner area top coordinate of a box model node relative to the display.
ib Dimension Inner area bottom coordinate of a box model node relative to the display.
ih Dimension Inner area height of a box model node.
il Dimension Inner area left coordinate of a box model node relative to the display.
ir Dimension Inner area right coordinate of a box model node, relative to the display.
iw Dimension Inner area width of a box model node.
Box Model Background, Fill, Inner Color Properties
Property Data Type Description
bgcolor Color Background color of a Box Model Node, filling the container completely to the outer edges.
fillcolor Color Fill color of a box, filling the box completely within the margin area; not present on lightweight box model nodes such as frame and textframe.
innercolor Color Inner color of a box, filling the box completely within the inner area after padding is applied; not present on lightweight box model nodes such as frame and textframe.
Box Model Attached Image/Canvas Offset Properties
Property Data Type Description
xoffset Dimension The horizontal offset of an attached image or canvas within the inner area of a a Box Model Node. May be positive or negative or 0.
yoffset Dimension The vertical offset of an attached image or canvas within the inner area of a a Box Model Node. May be positive or negative or 0.


The following Text Model properties are available for the box 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 box 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.

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

Other box in layout Area Properties
Property Data Type Description
object Reference:box,image Attaches to the box another object from the resources area, typically an image.
over Boolean If true the touchscreen is currently pressed within the bounds of the outer area of the box.
enabled Boolean If true (default) this node and its children are able to receive events.

Examples