PageRenderTime 35ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/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.
  3. USING: accessors kernel ui ui.gadgets ui.gadgets.buttons ui.gadgets.labels
  4. ui.gadgets.packs ui.gadgets.worlds ;
  5. IN: ui-test
  6. : hello ( -- )
  7. [
  8. f
  9. T{ world-attributes { title "Hi" } }
  10. clone
  11. <pile>
  12. "Hello world" <label> add-gadget
  13. "button" [ drop beep ] <border-button> "TT" >>tooltip add-gadget
  14. >>gadgets
  15. open-window
  16. ] with-ui ;