factor/basis/io/styles/styles.factor

45 lines
789 B
Factor
Raw Normal View History

2008-07-28 23:28:13 -04:00
! Copyright (C) 2005, 2008 Slava Pestov.
2007-09-20 18:09:08 -04:00
! See http://factorcode.org/license.txt for BSD license.
2008-07-28 23:28:13 -04:00
USING: hashtables io ;
2007-09-20 18:09:08 -04:00
IN: io.styles
SYMBOL: plain
SYMBOL: bold
SYMBOL: italic
SYMBOL: bold-italic
! Character styles
SYMBOL: foreground
SYMBOL: background
SYMBOL: font
SYMBOL: font-size
SYMBOL: font-style
! Presentation
SYMBOL: presented
SYMBOL: presented-path
SYMBOL: presented-printer
! Paragraph styles
SYMBOL: page-color
SYMBOL: border-color
SYMBOL: border-width
SYMBOL: wrap-margin
! Table styles
SYMBOL: table-gap
SYMBOL: table-border
: standard-table-style ( -- style )
H{
{ table-gap { 5 5 } }
{ table-border { 0.8 0.8 0.8 1.0 } }
} ;
! Input history
TUPLE: input string ;
C: <input> input
2008-07-28 23:28:13 -04:00
: write-object ( str obj -- ) presented associate format ;