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