49
edits
| Line 72: | Line 72: | ||
=== Layouts === | === Layouts === | ||
Layout in printing or computer graphics is concerned with the flow of elements with respect to each other. A layout system is a system for defining that layout. For WoW, flow in layout is defined by frames and anchors, and flow order is established by 'laying out' frames from their creation order from top to bottom, and from parent to child. Frames with the same parent and render z-order, will be rendered from first to last in definition order as well. | Layout in printing or computer graphics is concerned with the flow of elements with respect to each other. A layout system is a system for defining that layout. For WoW, flow in layout is defined by frames and anchors, and flow order is established by 'laying out' frames from their creation order from top to bottom, and from parent to child. Frames with the same parent and render z-order, will be rendered from first to last in definition order as well. | ||
<Frame name="Frame"> | <Frame name="Frame"> | ||
<Frames> | |||
<Frame name="Frame2"> | |||
<Size x="100" y="100"> | |||
<[[XML/Anchors|Anchors]]><[[XML/Anchor|Anchor]] point="TOP" relativePoint="BOTTOM" x="0" y="-10" /></Anchors> | |||
</frame> | |||
<Frame name="Frame3"> | |||
<Size x="100" y="100"> | |||
<[[XML/Anchors|Anchors]]><[[XML/Anchor|Anchor]] point="TOPLEFT" /></Anchors> | |||
</frame> | |||
</Frames> | |||
</Frame> | </Frame> | ||
This will place the 'Frame2' child at an offset of 10 from the bottom of its parent frame; 'relativeTo' for 'Frame2' is its parent by default. Frame3 will be rendered on top of Frame2 is they overlap. | This will place the 'Frame2' child at an offset of 10 from the bottom of its parent frame; 'relativeTo' for 'Frame2' is its parent by default. Frame3 will be rendered on top of Frame2 is they overlap. | ||
<Frame name="Frame3"> | <Frame name="Frame3"> | ||
<Size x="50" y="50"> | <Size x="50" y="50"> | ||