1 #!/usr/local/bin/rune -d -x
10 alias stdio.File *stdout = stdio.stdout;
12 typedef gfx.Event Event;
13 typedef gfx.Frame Frame;
14 typedef gadgets.ButtonFrame Button;
16 subclass Button as MyButton {
21 stdout->show("BUTTON!", this.text);
26 main(int ac, char **av)
35 frame.createFrame("BODY", &gfx.root, 1024, 512, BODY);
36 frame->setBGColor(255, 129, 0);
37 for (i = 0; i < 20; ++i) {
38 # Note the use of context-sensitive constants like 'ABOVE'.
39 # Access outside of a method argument would be something
43 frame1.createFrame("ABOVE", frame,
46 frame1.createFrame("BELOW", frame,
48 for (j = 0; j < 10; ++j) {
49 button.createButton(frame1, 0, 0, LEFT, "TestL");
51 for (j = 0; j < 10; ++j) {
52 button.createButton(frame1, 0, 0, RIGHT, "TestR");
55 button.createButton(frame, 0, 0, BODY|FILLX|FILLY, "TestM");
58 Thread.waitThreads(); # wait until all threads have exited