1 ! Copyright (C) 2007, 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors calendar colors colors.constants fonts kernel
4 models models.arrow models.delay sequences summary ui
5 ui.gadgets ui.gadgets.labels ui.gadgets.tracks
6 ui.gadgets.worlds ui.pens.solid ui.private ;
7 IN: ui.gadgets.status-bar
9 : status-bar-font ( -- font )
11 COLOR: FactorDarkSlateBlue >>background
12 COLOR: white >>foreground ;
14 : status-bar-theme ( label -- label )
15 status-bar-font >>font
16 COLOR: FactorDarkSlateBlue <solid> >>interior ;
18 : <status-bar> ( model -- gadget )
19 1/10 seconds <delay> [ "" like ] <arrow> <label-control>
23 : open-status-window ( gadget title/attributes -- )
24 ?attributes f <model> >>status <world>
25 dup status>> <status-bar> f track-add
28 : show-summary ( object gadget -- )
29 [ [ summary ] [ "" ] if* ] dip show-status ;