#!/usr/local/bin/rune -x # # Graphical test import "sys"; import ; import ; import ; alias stdio.File *stdout = stdio.stdout; typedef gfx.Event Event; typedef gfx.Frame Frame; typedef gadgets.ButtonFrame Button; subclass Button as MyButton { refine public method void buttonExecute() { stdout->show("BUTTON!", this.text); } } int main(int ac, char **av) { Frame *frame; MyButton *button1; MyButton *button2; frame.createFrame("BODY", &gfx.root, 128, 128, BODY); frame->setBGColor(255, 129, 0); button1.createButton(frame, -1, -1, ABOVE, "Test1"); button2.createButton(frame, -1, -1, ABOVE, "Test2"); frame->recalc(); Thread.waitThreads(); # wait until all threads have exited return(0); }