PageRenderTime 277ms CodeModel.GetById 89ms app.highlight 2ms RepoModel.GetById 113ms app.codeStats 1ms

/ui-test/ui-test.factor

http://github.com/jlepak/factor-work
Unknown | 17 lines | 16 code | 1 blank | 0 comment | 0 complexity | 876815db6330da1048b913ff745ae965 MD5 | raw file
 1! Copyright (C) 2011 Your name.
 2! See http://factorcode.org/license.txt for BSD license.
 3USING: accessors kernel ui ui.gadgets ui.gadgets.buttons ui.gadgets.labels
 4ui.gadgets.packs ui.gadgets.worlds ;
 5IN: ui-test
 6
 7: hello ( -- )
 8    [
 9        f
10        T{ world-attributes { title "Hi" } }
11        clone
12        <pile>
13        "Hello world" <label> add-gadget
14        "button" [ drop beep ] <border-button> "TT" >>tooltip add-gadget
15        >>gadgets
16        open-window
17    ] with-ui ;