From 96fccd9c6c7c5c91c46a49b00cfcc260edc2c680 Mon Sep 17 00:00:00 2001 From: Sam Anklesaria Date: Fri, 26 Jun 2009 15:25:50 -0500 Subject: [PATCH] added summary/ author files --- extra/recipes/recipes.factor | 21 +++++++++++---------- extra/ui/frp/functors/summary.txt | 1 + extra/ui/frp/gadgets/gadgets-docs.factor | 4 ++-- extra/ui/frp/gadgets/gadgets.factor | 15 +++++++-------- extra/ui/frp/gadgets/summary.txt | 1 + extra/ui/frp/layout/layout.factor | 8 ++++---- extra/ui/frp/layout/summary.txt | 1 + extra/ui/frp/signals/signals.factor | 4 ++-- extra/ui/frp/{ => signals}/summary.txt | 0 9 files changed, 29 insertions(+), 26 deletions(-) create mode 100644 extra/ui/frp/functors/summary.txt create mode 100644 extra/ui/frp/gadgets/summary.txt create mode 100644 extra/ui/frp/layout/summary.txt rename extra/ui/frp/{ => signals}/summary.txt (100%) diff --git a/extra/recipes/recipes.factor b/extra/recipes/recipes.factor index 4c793c31c8..bccabdc0cf 100644 --- a/extra/recipes/recipes.factor +++ b/extra/recipes/recipes.factor @@ -1,10 +1,11 @@ -USING: accessors arrays db.tuples db.sqlite persistency db.queries -io.files.temp kernel monads sequences ui ui.frp.gadgets -ui.frp.layout ui.frp.signals ui.gadgets.scrollers ui.gadgets.labels -colors.constants ui.pens.solid combinators math locals strings -ui.images db.types sequences.extras ui.tools.inspector ; +USING: accessors arrays colors.constants combinators db.queries +db.sqlite db.tuples db.types io.files.temp kernel locals math +monads persistency sequences sequences.extras ui ui.frp.gadgets +ui.frp.layout ui.frp.signals ui.gadgets.labels +ui.gadgets.scrollers ui.pens.solid ; FROM: sets => prune ; IN: recipes + STORED-TUPLE: recipe { title { VARCHAR 100 } } { votes INTEGER } { txt TEXT } { genre { VARCHAR 100 } } ; : ( title genre text -- recipe ) recipe new swap >>txt swap >>genre swap >>title 0 >>votes ; "recipes.db" temp-file recipe define-db @@ -30,11 +31,11 @@ STORED-TUPLE: recipe { title { VARCHAR 100 } } { votes INTEGER } { txt TEXT } { interface :> tbl "okay" BUTTON -> :> ok - "submit" [ store-tuple ] >>value TOOLBAR -> :> submit - "love" 1 >>value TOOLBAR -> - "hate" -1 >>value -> 2array :> votes - "back" -> [ -30 ] <$ - "more" -> [ 30 ] <$ 2array :> viewed + IMAGE-BUTTON: submit [ store-tuple ] >>value TOOLBAR -> :> submit + IMAGE-BUTTON: love 1 >>value TOOLBAR -> + IMAGE-BUTTON: hate -1 >>value -> 2array :> votes + IMAGE-BUTTON: back -> [ -30 ] <$ + IMAGE-BUTTON: more -> [ 30 ] <$ 2array :> viewed ->% 1 :> search submit ok [ [ drop ] ] <$ 2array [ drop ] >>value :> quot viewed 0 [ + ] search ok t "all" ALL -> diff --git a/extra/ui/frp/functors/summary.txt b/extra/ui/frp/functors/summary.txt new file mode 100644 index 0000000000..6b4e8d2465 --- /dev/null +++ b/extra/ui/frp/functors/summary.txt @@ -0,0 +1 @@ +Used by ui.frp.signals to combine models \ No newline at end of file diff --git a/extra/ui/frp/gadgets/gadgets-docs.factor b/extra/ui/frp/gadgets/gadgets-docs.factor index b3440aefb3..0df9194746 100644 --- a/extra/ui/frp/gadgets/gadgets-docs.factor +++ b/extra/ui/frp/gadgets/gadgets-docs.factor @@ -58,8 +58,8 @@ HELP: { $values { "field" action-field } } { $description "Field that updates its model with its contents when the user hits the return key" } ; -HELP: -{ $syntax "filename " } +HELP: IMAGE-BUTTON: +{ $syntax "IMAGE-BUTTON: filename" } { $description "Creates a button using a tiff image named as specified found in the icons subdirectory of the vocabulary path" } ; HELP: output-model diff --git a/extra/ui/frp/gadgets/gadgets.factor b/extra/ui/frp/gadgets/gadgets.factor index 6355271e96..a1e4480064 100644 --- a/extra/ui/frp/gadgets/gadgets.factor +++ b/extra/ui/frp/gadgets/gadgets.factor @@ -1,9 +1,9 @@ -USING: accessors arrays kernel models monads -sequences ui.frp.signals ui.gadgets ui.gadgets.borders -ui.gadgets.buttons ui.gadgets.buttons.private -ui.gadgets.editors ui.gadgets.labels ui.gadgets.scrollers -ui.gadgets.tables ui.images vocabs.parser ; +USING: accessors arrays kernel models monads sequences +ui.frp.signals ui.gadgets ui.gadgets.borders ui.gadgets.buttons +ui.gadgets.buttons.private ui.gadgets.editors +ui.gadgets.scrollers ui.gadgets.tables ui.images vocabs.parser lexer ; IN: ui.frp.gadgets + TUPLE: frp-button < button hook value ; : ( gadget -- button ) [ [ dup hook>> [ call( button -- ) ] [ drop ] if* ] @@ -52,9 +52,8 @@ M: frp-field model-changed 2dup frp-model>> = : ( -- field ) f dup [ set-control-value ] curry >>quot f >>model ; -: image-button ( filename path -- button ) ".tiff" surround ; -SYNTAX: current-vocab name>> "vocab:" "/icons/" surround - [ image-button ] curry over push-all ; +SYNTAX: IMAGE-BUTTON: scan current-vocab name>> "vocab:" "/icons/" surround ".tiff" surround + [ ] curry over push-all ; GENERIC: output-model ( gadget -- model ) M: gadget output-model model>> ; diff --git a/extra/ui/frp/gadgets/summary.txt b/extra/ui/frp/gadgets/summary.txt new file mode 100644 index 0000000000..b792b817db --- /dev/null +++ b/extra/ui/frp/gadgets/summary.txt @@ -0,0 +1 @@ +Gadgets using signals as their models \ No newline at end of file diff --git a/extra/ui/frp/layout/layout.factor b/extra/ui/frp/layout/layout.factor index 4527b1f092..5e810f6139 100644 --- a/extra/ui/frp/layout/layout.factor +++ b/extra/ui/frp/layout/layout.factor @@ -1,7 +1,7 @@ -USING: accessors assocs arrays fry kernel make math.parser models -models.product namespaces sequences ui.frp.gadgets parser lexer -ui.gadgets ui.gadgets.books ui.gadgets.tracks vectors words -combinators ui.frp.signals monads sequences.extras ui.tools.inspector ; +USING: accessors arrays fry kernel lexer make math.parser +models models.product monads namespaces parser sequences +sequences.extras ui.frp.gadgets ui.frp.signals ui.gadgets +ui.gadgets.books ui.gadgets.tracks words ; QUALIFIED: make IN: ui.frp.layout diff --git a/extra/ui/frp/layout/summary.txt b/extra/ui/frp/layout/summary.txt new file mode 100644 index 0000000000..30b5ef59c6 --- /dev/null +++ b/extra/ui/frp/layout/summary.txt @@ -0,0 +1 @@ +Syntax for easily building GUIs and using templates \ No newline at end of file diff --git a/extra/ui/frp/signals/signals.factor b/extra/ui/frp/signals/signals.factor index 707c271159..194ff5d25c 100644 --- a/extra/ui/frp/signals/signals.factor +++ b/extra/ui/frp/signals/signals.factor @@ -1,5 +1,5 @@ -USING: accessors arrays kernel monads models models.product sequences classes -sequences.extras ; +USING: accessors arrays kernel models models.product monads +sequences sequences.extras ; FROM: models.product => product ; IN: ui.frp.signals diff --git a/extra/ui/frp/summary.txt b/extra/ui/frp/signals/summary.txt similarity index 100% rename from extra/ui/frp/summary.txt rename to extra/ui/frp/signals/summary.txt