Skin xml files may contain <define> nodes to define skin properties which can then be used in GUI control attributes. <define> nodes may be used in any skin xml file including any file that describes a window, an <include> skin xml file, and the skin's references.xml file.
The general format for a skin <define> node is as follows:
- #name is the user defined name which references a value; a variable name. The name must begin with a hash character ('#'); e.g. #smallFont.
- value is the assigned value
The <define> nodes typically appear before the first <control> element (not required but likely a good standard) and at the same position in the hierarchy as the <control> elements (<define> and <control> are siblings). Regardless of where <define> nodes appear in a skin xml file, all <define> nodes are loaded before any controls are loaded.
The value of a <define> node may be any of the following types of expressions:
A Literal Expression
The final value of the <define>. Literal expressions are useful as global values that are more easly maintained from a single declaration point; e.g., font names, color names, shared geometry (x, y, width, height, ...)
Additional Information and References
This page has no comments.