SHIP:TextModel

From Serious Documentation
Jump to: navigation, search

Text selection and styling properties are common to a variety of displayable nodes, including box and text.

This common properties are called the Text Model properties, and include textfont, textsize, textcolor and more.

Text Model Property Summary

The following table summarizes the set of Text Model properties.

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.


Font Selection (textfont, textsize, textstyle)

Alignment (textdirection, texthalign, textvalign)

Colors (textcolor, textbgcolor)

Inheritance Model

When a piece of text is rendered, each of the Text Model properties is determined by the following prioritized inheritance rules:

  1. Any property specification on the layout text node itself
  2. Any attached object with the property specified
  3. The nearest displayable parent node's determination of that property