autoLayout: Added tests
[sdk] / autoLayout / tests / test1.ec
1 import "autoLayout"
2
3 AutoLayoutForm form1 { contents = Elemental1 { }, clientSize = { 1024, 768 } };
4
5 class Elemental1 : Col
6 {
7    bgColor = ivory;
8    font = { "Verdana", 20, true };
9
10    Bar c1 { this, bgColor = gray, maxSize = { 1.0, 100 }, hAlignment = center, vAlignment = right, caption = "Line 1" };
11       Element b0 { c1, caption = "<<", fgColor = white, bgColor = navy, selfHAlignment = left, selfVAlignment = left };
12       Element b1 { c1, caption = "The", bgColor = red };
13       Element b2 { c1, caption = "Quick", bgColor = blue, fgColor = white };
14       Element b3 { c1, caption = "Brown" };
15       Element b3b { c1, caption = ">>", fgColor = white, bgColor = navy, selfHAlignment = right, selfVAlignment = left };
16
17    Bar r3 { this, bgColor = green, maxSize = { 1.0, 150 }, caption = "Line 2" };
18       Element b4 { r3, caption = "Fox.", bgColor = yellow };
19       Element b5 { r3, bgColor = aquamarine, maxSize = { .25, 50 } };
20       Element b6 { r3, bgColor = tomato, maxSize = { .5, 50 } };
21    Bar r4 { this, bgColor = blue, maxSize = { 1.0, 50 }, caption = "Line 3", fgColor = white };
22       Element b7 { r4, caption = "Left", bgColor = skyBlue };
23       Element b8 { r4, caption = "Address Bar", bgColor = teal, maxSize.w = 1.0 };
24       Element b9 { r4, caption = "Right", bgColor = maroon };
25 }