1 ! Copyright (C) 2009 Joe Groff.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors assocs kernel locals sequences ui
4 ui.gadgets ui.gadgets.worlds ;
5 IN: window-controls-demo
7 CONSTANT: window-control-sets-to-test
10 { "Normal title bar" { normal-title-bar } }
11 { "Small title bar" { small-title-bar close-button } }
12 { "Close button" { normal-title-bar close-button } }
13 { "Close and minimize buttons" { normal-title-bar close-button minimize-button } }
14 { "Minimize button" { normal-title-bar minimize-button } }
15 { "Close, minimize, and maximize buttons" { normal-title-bar close-button minimize-button maximize-button } }
16 { "Resizable" { normal-title-bar close-button minimize-button maximize-button resize-handles } }
17 { "Textured background" { normal-title-bar close-button minimize-button maximize-button resize-handles textured-background } }
20 TUPLE: window-controls-demo-world < world
23 M: window-controls-demo-world end-world
24 windows>> [ close-window ] each ;
26 M: window-controls-demo-world pref-dim*
29 : attributes-template ( -- x )
31 { world-class window-controls-demo-world }
34 : window-controls-demo ( -- )
35 attributes-template V{ } clone window-control-sets-to-test
36 [| title attributes windows controls |
39 controls >>window-controls
45 MAIN: window-controls-demo