#!java net.matrix_rad.skang.Skang module "net.matrix_rad.skang.SkangAWT" /* Clear the skin */ clear window 580, 380, 'Hello world - a demonstration skin.' // Add the usual widgets. application "widget Quit Button -64, _2, 30, 0, 'Quit'" application "action Quit 'quit'" widget Help Button 102, _0, 30, 0, 'Help' action Help 'help' widget Throb Throbber 0, _0, 50, 50, 'earth08_18.gif' widget Copyright Label 0, _-3, 0, 0, '' widget Gnome Label 51, _0, 51, 51, 'Gnome' look Gnome 'dvs1-smile_mini.gif', 'dvs1_mini.gif' widget BotLabLeft Label 0, _-2, 0, 0, '' widget BotLabRight Label 0, _-1, 0, 0, '' // Add some widgets that interact. widget Test0 TextField,0,_2,140,0 "Hello World!" action Test0 'set Test2 "%d"' widget Test1 TextField 0,_3,140,0 'Goodbye World!' action Test1 "get Test1" widget Test2 Label 140,_2,100,0 'A label.' widget Test3 Button, 140,_3,70,0,"Hit me" action Test3 "Test0='Hello kind world!!' Test1='Goodbye Cruel World!!' Test2='The same label.' Test3='' Test4='Back again'" widget Test4 Button, 210,_3,70,0,"" action Test4 "set Test0 'Hello world!'\nset Test1 'Goodbye World!'\nset Test2 'A label'\nset Test3 'Hit me'\nset Test4 ''" // Add everything else. widget Test5 Label, -320,_0,320,0 "Right click any widget to see the Zen developer." colour Test5 255,255,0,0 0,0,255,0 checkboxgroup 3 widget Test6 Checkbox 0, _4, 60, 0, 'Some' action Test6 'get Test6' widget Test7 Checkbox 60, _4, 80, 0, 'linked' action Test7 'get Test7' widget Test8 Checkbox 140, _4, 100, 0, 'checkboxes.' action Test8 'get Test8' widget Test9 TextArea 0,_5,170,_4 'A text area.\nWith several lines of text.\nSome of them bigger than the area.\n\nThis is the last line.' action Test9 'get Test7' widget Test10 Label 290, _2, 90, 0, "Select :" widget Test11 Choice 380, _2, 200, 0 action Test11 'get Test11' append Test11 "Credit card" append Test11 "Money order" append Test11 "Cheque" append Test11 "Cash" widget Test12 Label 290, _3, 90, 0, "Card number :" widget Test13 TextField 380, _3, 200, 0, "" mask Test13 "#### #### #### #### ###" widget Test14 Label 290, _4, 90, 0, "Expiry date :" widget Test15 TextField 380, _4, 50, 0, "" mask Test15 "MM/##" widget Test16 Checkbox 440,_4,100,0 'A check box.' action Test16 'get Test16' widget Test17 Grid 175, _5, 230, _4, '' sethelp Test17 'A Grid (NAWS widget), click on the column headings to sort by that column.' set Test17 'This|is|a|Grid|widget.' append Test17 'It|has|five|cells|across.' append Test17 'It|has|four|cells|down.' append Test17 'You|can|change|the|cell' append Test17 'size|by|dragging|the|separator.' widget Test18 Tree 410, _5, 170, _4, '' set Test18 'tree.|A tree|+' append Test18 'tree.-|This is a branch of "A tree".' append Test18 'tree.--|This is another branch of "A tree".' append Test18 'with.|with many|+' append Test18 'with.-|Yet another branch.' append Test18 'with.--|One more branch.' append Test18 'with.---.|More branches.|+' append Test18 'with.---.sub|A sub branch (a twig).' append Test18 'branch|branches.' // A Skang interpreter widget and reload button. widget Test19 Label 0, _-4, 40, 0, "Tester" widget Test20 TextField 45, _-4, -45, 0, "" action Test20 "%d" sethelp Test20 'Type in Skang commands here.' widget Test21 Button 102, _1, 75, 0, "Reload skin" action Test21 "skang 'net/matrix_rad/skang/Skang.skang'" sethelp Test21 'Reload the current skin.'