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
5 ui.gadgets.borders ui.gadgets.labels ui.gadgets.tracks
6 ui.gadgets.theme ui.gadgets.worlds ui.pens.solid ui.private ;
7 IN: ui.gadgets.status-bar
9 : status-bar-font ( -- font )
11 status-bar-background >>background
12 status-bar-foreground >>foreground ;
14 : status-bar-theme ( label -- label )
15 status-bar-font >>font
16 status-bar-background <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>
26 { 7 2 } <filled-border> status-bar-background <solid> >>interior
30 : show-summary ( object gadget -- )
31 [ [ safe-summary ] [ "" ] if* ] dip show-status ;