]> gitweb.factorcode.org Git - factor.git/commitdiff
added summary/ author files
authorSam Anklesaria <sam@Tintin.local>
Fri, 26 Jun 2009 20:25:50 +0000 (15:25 -0500)
committerSam Anklesaria <sam@Tintin.local>
Fri, 26 Jun 2009 20:25:50 +0000 (15:25 -0500)
extra/recipes/recipes.factor
extra/ui/frp/functors/summary.txt [new file with mode: 0644]
extra/ui/frp/gadgets/gadgets-docs.factor
extra/ui/frp/gadgets/gadgets.factor
extra/ui/frp/gadgets/summary.txt [new file with mode: 0644]
extra/ui/frp/layout/layout.factor
extra/ui/frp/layout/summary.txt [new file with mode: 0644]
extra/ui/frp/signals/signals.factor
extra/ui/frp/signals/summary.txt [new file with mode: 0644]
extra/ui/frp/summary.txt [deleted file]

index 4c793c31c8af6bdc7f1b456461646e6cad425acf..bccabdc0cf762ec0e75e1d32c971a6d2e62593c8 100644 (file)
@@ -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 } } ;
 : <recipe> ( title genre text -- recipe ) recipe new swap >>txt swap >>genre swap >>title 0 >>votes ;
 "recipes.db" temp-file <sqlite-db> recipe define-db
@@ -30,11 +31,11 @@ STORED-TUPLE: recipe { title { VARCHAR 100 } } { votes INTEGER } { txt TEXT } {
     interface
       <frp-table*> :> tbl
       "okay" <frp-border-button> BUTTON -> :> ok
-      "submit" <image-button> [ store-tuple ] >>value TOOLBAR -> :> submit
-      "love" <image-button> 1 >>value TOOLBAR ->
-      "hate" <image-button> -1 >>value -> 2array <merge> :> votes
-      "back" <image-button> -> [ -30 ] <$
-      "more" <image-button> -> [ 30 ] <$ 2array <merge> :> viewed
+      IMAGE-BUTTON: submit [ store-tuple ] >>value TOOLBAR -> :> submit
+      IMAGE-BUTTON: love 1 >>value TOOLBAR ->
+      IMAGE-BUTTON: hate -1 >>value -> 2array <merge> :> votes
+      IMAGE-BUTTON: back -> [ -30 ] <$
+      IMAGE-BUTTON: more -> [ 30 ] <$ 2array <merge> :> viewed
       <spacer> <frp-field*> ->% 1 :> search
       submit ok [ [ drop ] ] <$ 2array <merge> [ drop ] >>value :> quot
       viewed 0 [ + ] <fold> search ok t <basic> "all" <frp-button> ALL ->
diff --git a/extra/ui/frp/functors/summary.txt b/extra/ui/frp/functors/summary.txt
new file mode 100644 (file)
index 0000000..6b4e8d2
--- /dev/null
@@ -0,0 +1 @@
+Used by ui.frp.signals to combine models
\ No newline at end of file
index b3440aefb32d390fb9904dc8309f0f5cb1217e7b..0df91947460c26c42e313181339d5b20b34e8e58 100644 (file)
@@ -58,8 +58,8 @@ HELP: <frp-action-field>
 { $values { "field" action-field } }
 { $description "Field that updates its model with its contents when the user hits the return key" } ;
 
-HELP: <image-button>
-{ $syntax "filename <image-button>" }
+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
index 6355271e96d066bec2ab1926ae5b049adb37d26e..a1e44800644acb61b84e64791da9db399857e730 100644 (file)
@@ -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 ;
 : <frp-button> ( gadget -- button ) [
       [ dup hook>> [ call( button -- ) ] [ drop ] if* ]
@@ -52,9 +52,8 @@ M: frp-field model-changed 2dup frp-model>> =
 : <frp-action-field> ( -- field ) f <action-field> dup [ set-control-value ] curry >>quot
     f <model> >>model ;
 
-: image-button ( filename path -- button ) ".tiff" surround <image-name> <frp-button> ;
-SYNTAX: <image-button> current-vocab name>> "vocab:" "/icons/" surround
-    [ image-button ] curry over push-all ;
+SYNTAX: IMAGE-BUTTON: scan current-vocab name>> "vocab:" "/icons/" surround ".tiff" surround
+    <image-name> [ <frp-button> ] 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 (file)
index 0000000..b792b81
--- /dev/null
@@ -0,0 +1 @@
+Gadgets using signals as their models
\ No newline at end of file
index 4527b1f09299897e4c183d2e5c227c6b0f1425a9..5e810f61395df84a74e409941e80a803bc9847b3 100644 (file)
@@ -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 (file)
index 0000000..30b5ef5
--- /dev/null
@@ -0,0 +1 @@
+Syntax for easily building GUIs and using templates
\ No newline at end of file
index 707c27115932f4600ce4fa633646908555d36931..194ff5d25ce56beaf1f963b73a28241365fe7319 100644 (file)
@@ -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/signals/summary.txt b/extra/ui/frp/signals/summary.txt
new file mode 100644 (file)
index 0000000..3b49d34
--- /dev/null
@@ -0,0 +1 @@
+Utilities for functional reactive programming in user interfaces
diff --git a/extra/ui/frp/summary.txt b/extra/ui/frp/summary.txt
deleted file mode 100644 (file)
index 3b49d34..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Utilities for functional reactive programming in user interfaces