add some tests
[org.ibex.core.git] / tests / test.t
1 <ibex xmlns:ui="ibex://ui">
2     <ui:box width="450" height="450" fill="red" axis="z">
3         ibex.ui.frame = thisbox;
4
5
6         <ui:box fill="blue" id="blue" shrink="true" axis="y">
7           <ui:box shrink="true" axis="x" fill="white">
8             <ui:box fill="green" width="25" height="25" id="green"/>
9             <ui:box fill="white" id="white" shrink="true" stroke="black">
10               <ui:box fill="black" stroke="black" text="hello"/>
11             </ui:box>
12             <ui:box fill="purple" height="25" width="25"  id="purple"/>
13           </ui:box>
14           <ui:box shrink="true" axis="x" fill="gray">
15             <ui:box fill="green" width="25" height="25" id="greenx"/>
16             <ui:box fill="white" id="whitex" shrink="true" stroke="black"/>
17             <ui:box fill="purple" height="25" width="25"  id="purplex"/>
18           </ui:box>
19         </ui:box>
20
21         // this thread makes things spin.
22         var rot = 0;
23         ibex.thread = function(f) { while(true) {
24              ibex.thread.sleep(100);
25              $blue.transform = "rotate(" + rot + ")";
26              $blue.x = 200;
27              $blue.y = 200;
28
29              $green.transform = "rotate(" + (rot) + ")";
30              //$white.transform = "rotate(" + (2 * rot) + ")";
31              $purple.transform = "rotate(" + (3 * rot) + ")";
32              $greenx.transform = "rotate(" + (-1 * rot) + ")";
33              //$whitex.transform = "rotate(" + (-2 * rot) + ")";
34              $purplex.transform = "rotate(" + (-3 * rot) + ")";
35
36              rot += 5;
37        } }
38    </ui:box>
39 </ibex>