Difference between revisions of "SHIP:TextModel"

From Serious Documentation
Jump to: navigation, search
Line 1: Line 1:
 
Text selection and styling properties are common to a variety of {{Node|displayable}} nodes, including {{Node|box}} and {{Node|text}}.
 
Text selection and styling properties are common to a variety of {{Node|displayable}} nodes, including {{Node|box}} and {{Node|text}}.
  
This set of common properties are called the [[SHIP:TextModel|Text Model]] properties, and include  {{Prop|displayable|textfont}}, {{Prop|displayable|textsize}}, {{Prop|displayable|color}} and more.
+
This set of common properties are called the [[SHIP:TextModel|Text Model]] properties, and include  {{Prop|textmodel|textfont}}, {{Prop|textmodel|textsize}}, {{Prop|textmodel|textcolor}} and more.
 
 
== Inheritance Model ==
 
 
 
When a piece of {{Node|text}} is rendered, each of the [[SHIP:TextModel|Text Model]] properties is determined by the following prioritized inheritance rules:
 
 
 
# Any property specification on the {{Node|layout}} {{Node|text}} node itself
 
# Any attached object with the property specified
 
# The nearest displayable parent node's determination of that property
 
  
 
== [[SHIP:TextModel|Text Model]] Property Summary ==
 
== [[SHIP:TextModel|Text Model]] Property Summary ==
Line 35: Line 27:
 
</onlyinclude>
 
</onlyinclude>
  
== {{Prop|textmodel|textfont}} ==
 
  
 +
== Font Selection ({{Prop|textmodel|textfont}}, {{Prop|textmodel|textsize}}, {{Prop|textmodel|textstyle}}) ==
  
== Colors ==
+
== Alignment ({{Prop|textmodel|textdirection}}, {{Prop|textmodel|texthalign}}, {{Prop|textmodel|textvalign}}) ==
  
== Rendering and Calculation Order ==
+
 
 +
== Colors ({{Prop|textmodel|textcolor}}, {{Prop|textmodel|textbgcolor}}) ==
 +
 
 +
== Inheritance Model ==
 +
 
 +
When a piece of {{Node|text}} is rendered, each of the [[SHIP:TextModel|Text Model]] properties is determined by the following prioritized inheritance rules:
 +
 
 +
# Any property specification on the {{Node|layout}} {{Node|text}} node itself
 +
# Any attached object with the property specified
 +
# The nearest displayable parent node's determination of that property

Revision as of 08:17, 27 January 2013

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

This set of 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.
SHIP:Property:textmodel:textdirection
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.


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