SLICE API: XML Node Types

In SLICE, certain XML nodes will result in user interface (UI) elements displayed to the user. The SLICE framework determines the node type by first checking if the XML element has a Type attribute. If so, the value of the Type attribute is used as the type. Otherwise, the XML element's name is used as the type.

Slice Always the name of the root node - should not be used for any other node.
Frames Must be child of root node. Children are Frame nodes.
Frame Contains DisplayId attribute, whose value is the (unique) id (meaning, value of the Id attribute) of a node in the tree; that node contains the items to be displayed in that frame. This node also contains attributes W, H, X, and Y, giving the size and location of the frame, in pixels. The displayed node for a frame must be a container - Panel or InkPanel - node.
InkPanel, Panel Establishes an area that is inkable or non-inkable. These can establish an inkable area over a non-inkable one and vice versa. An InkPanel cannot be placed on another InkPanel. These two node types are collectively known as container nodes.
Button, Label, TextBox These nodes represent the corresponding screen widgets. Each should have size coordinates (X, Y, W, H, except where default values suffice) and attributes describing their appearance, such as ImageFile. These nodes are collectively referred to as leaf control nodes, because they occur at the leaves of the tree (and represent "controls" in the .NET sense; Stroke nodes are also leaves, but are not controls). Because a Frame node must point to a container node, a leaf control node is always a descendant of a container node; its closest container node is referred as "its container."
Stroke A Stroke node contains X, Y, W, and H coordinates giving the bounding box of the stroke, and pen attributes describing the appearance of the pen stroke (e.g. PenColor). It then contains a list of floating-point numbers in the range 0-1, giving the x,y coordinates of each point in the stroke, relative to the bounding box. In addition, it contains two lists of integers, each of the same length as the number of coordinates; one gives the pressure reading at each point, and one gives the "time tick" at each point. Scripts can move and resize strokes by adjusting the location and dimension attributes; there is rarely, if ever, any need to access the coordinates of the stroke, except when creating a new Stroke node. Like leaf control nodes, a stroke node always has a container, but in this case, the container must be an InkPanel.
Floats, Pressure, TimerTicks These names should never be used. In the external, XML representation of trees, nodes with these names are children of Stroke nodes; the Floats node gives the (x,y) coordinates of the stroke, the Pressure node gives the pressure readings at each point, and TimerTicks gives the time tick within the stroke (generally, at 7.5 millisecond intervals). If another node uses this name, the routine that reads XML files will get confused. However, internally, Stroke nodes have no children. Note that the Floats node will always be present, but Pressure and TimerTicks may be absent, depending upon the digitizer (and certainly will be absent when a stroke is drawn with the mouse instead of the pen).