! Copyright (C) 2005, 2006 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. IN: gadgets-presentations USING: arrays gadgets gadgets-borders gadgets-browser gadgets-labels gadgets-layouts gadgets-outliner gadgets-panes hashtables io kernel sequences strings styles ; ! Character styles : apply-style ( style gadget key quot -- style gadget ) >r pick hash r> when* ; inline : apply-foreground-style ( style gadget -- style gadget ) foreground [ over set-label-color ] apply-style ; : apply-background-style ( style gadget -- style gadget ) background [ over set-gadget-interior ] apply-style ; : specified-font ( style -- font ) [ font swap hash [ "monospace" ] unless* ] keep [ font-style swap hash [ plain ] unless* ] keep font-size swap hash [ 12 ] unless* 3array ; : apply-font-style ( style gadget -- style gadget ) over specified-font over set-label-font ; : apply-browser-style ( style gadget -- style gadget ) presented [ ] apply-style ; : ( style text -- gadget )