factor/library/ui/init-world.factor

41 lines
1.0 KiB
Factor
Raw Normal View History

2005-03-03 22:24:51 -05:00
! Copyright (C) 2005 Slava Pestov.
! See http://factor.sf.net/license.txt for BSD license.
IN: gadgets
2005-07-09 16:08:50 -04:00
USING: generic io kernel listener math namespaces styles threads ;
2005-03-22 21:20:58 -05:00
: init-world
global [
<world> world set
{{
[[ background [ 255 255 255 ] ]]
[[ rollover-bg [ 255 255 204 ] ]]
[[ foreground [ 0 0 0 ] ]]
[[ reverse-video f ]]
[[ font "Sans Serif" ]]
[[ font-size 12 ]]
[[ font-style plain ]]
}} world get set-gadget-paint
{ 1024 768 0 } world get set-gadget-dim
<plain-gadget> add-layer
2005-03-22 21:20:58 -05:00
<pane> dup
<scroller> "Stack display goes here" <label> 3/4 <y-splitter> add-layer
[ [ clear print-banner listener ] with-stream ] in-thread
2005-07-13 21:03:34 -04:00
dup request-focus
pane set
] bind ;
SYMBOL: first-time
global [ first-time on ] bind
: ?init-world
first-time get [ init-world first-time off ] when ;