states.lzx
<canvas>
<window title="Single-state window" bgcolor="yellow">
<simplelayout axis="y"/>
<text multiline="true" width="100%">A window with static contents.</text>
<button onclick="msw.setAttribute('visible', true)">Next</button>
</window>
<window title="Multi-state window" y="100" id="msw" visible="false">
<state name="s1" applied="true">
<attribute name="bgcolor" value="yellow
"/>
<simplelayout axis="y"/>
<text multiline="true" width="100%">A window with two states.
The content of each <state> looks like the content of a
static window.</text>
<button onclick="parent.setstate(parent.s2)">Forward</button>
</state>
<state name="s2">
<attribute name="bgcolor" value="white
"/>
<simplelayout axis="x"/>
<button onclick="parent.setstate(parent.s1)">Back</button>
<text>A second state with a horizontal layout and a different
background color.</text>
</state>
<method name="setstate" args="s">
s1.setAttribute('applied', false); s2.setAttribute('applied', false); s.setAttribute('applied', true);
</method>
</window>
</canvas>
Cross References
Named Instances