Merge branch 'master' of git://factorcode.org/git/factor

db4
Slava Pestov 2008-08-01 17:46:52 -05:00
commit 9e3e1c479f
4 changed files with 27 additions and 4 deletions

View File

@ -1,6 +1,6 @@
! Copyright (C) 2003, 2008 Slava Pestov. ! Copyright (C) 2003, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
IN: prettyprint
USING: arrays generic generic.standard assocs io kernel USING: arrays generic generic.standard assocs io kernel
math namespaces sequences strings io.styles io.streams.string math namespaces sequences strings io.styles io.streams.string
vectors words prettyprint.backend prettyprint.sections vectors words prettyprint.backend prettyprint.sections
@ -8,7 +8,9 @@ prettyprint.config sorting splitting grouping math.parser vocabs
definitions effects classes.builtin classes.tuple io.files definitions effects classes.builtin classes.tuple io.files
classes continuations hashtables classes.mixin classes.union classes continuations hashtables classes.mixin classes.union
classes.intersection classes.predicate classes.singleton classes.intersection classes.predicate classes.singleton
combinators quotations sets accessors ; combinators quotations sets accessors colors ;
IN: prettyprint
: make-pprint ( obj quot -- block in use ) : make-pprint ( obj quot -- block in use )
[ [
@ -95,7 +97,7 @@ combinators quotations sets accessors ;
SYMBOL: -> SYMBOL: ->
\ -> \ ->
{ { foreground { 1 1 1 1 } } { background { 0 0 0 1 } } } { { foreground T{ rgba f 1 1 1 1 } } { background T{ rgba f 0 0 0 1 } } }
"word-style" set-word-prop "word-style" set-word-prop
: remove-step-into ( word -- ) : remove-step-into ( word -- )

View File

@ -1 +0,0 @@
demos

22
extra/demos/demos.factor Normal file
View File

@ -0,0 +1,22 @@
USING: kernel fry sequences
vocabs.loader tools.vocabs.browser
ui ui.gadgets ui.gadgets.buttons ui.gadgets.packs ui.gadgets.scrollers
ui.tools.listener
accessors ;
IN: demos
: demo-vocabs ( -- seq ) "demos" tagged [ second ] map concat [ name>> ] map ;
: <run-vocab-button> ( vocab-name -- button )
dup '[ drop [ , run ] call-listener ] <bevel-button> ;
: <demo-runner> ( -- gadget )
<pile> 1 >>fill demo-vocabs [ <run-vocab-button> add-gadget ] each ;
: demos ( -- ) <demo-runner> <scroller> "Demos" open-window ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
MAIN: demos