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