WINDOW-lifecycle-buffering.sleela
examples/gui/WINDOW-lifecycle-buffering.sleela · 18 line(s) · sleela
#sleela 2.5
class WindowLifecycleBuffering {
int main() {
SLUserInterface ui = new SLUserInterface(); ui.configure("com.mearvk.examples.WindowLifecycle");
if (!ui.open()) { return 1; }
SLTheme theme = new SLTheme(); theme.defaultTheme();
SLWindow win = ui.openWindow("Window Lifecycle", 600, 360, theme.handle());
SLWidget root = win.rootWidget();
SLBox col = new SLBox(); col.vertical(root, 12); col.setMarginAll(18);
SLLabel note = new SLLabel(); note.createIn(col, "Window title, theme, visibility, redraw and buffering controls.");
win.setBuffering(2);
win.setTitle("Window Lifecycle - Triple Buffering");
win.requestRedraw();
win.show();
return ui.run();
}
}