]> gitweb.factorcode.org Git - factor.git/commitdiff
dlists,http,ui.gadgets.*: nicer formatting of tuples
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 30 Nov 2016 13:34:28 +0000 (14:34 +0100)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 30 Nov 2016 15:36:25 +0000 (16:36 +0100)
basis/dlists/dlists.factor
basis/http/http.factor
basis/ui/gadgets/gadgets.factor
basis/ui/gadgets/panes/panes.factor

index 7b4eb3068567a6e5e48335c09eb4bfeec9629ab9..0965358950c6b50c887329d939b581bb2f73c691 100644 (file)
@@ -7,8 +7,8 @@ sequences vocabs.loader ;
 IN: dlists
 
 TUPLE: dlist-link
-{ prev maybe{ dlist-link } }
-{ next maybe{ dlist-link } } ;
+    { prev maybe{ dlist-link } }
+    { next maybe{ dlist-link } } ;
 
 TUPLE: dlist-node < dlist-link obj ;
 
@@ -26,8 +26,8 @@ M: dlist-link node-value obj>> ;
     \ dlist-node new-dlist-link ; inline
 
 TUPLE: dlist
-{ front maybe{ dlist-link } }
-{ back maybe{ dlist-link } } ;
+    { front maybe{ dlist-link } }
+    { back maybe{ dlist-link } } ;
 
 : <dlist> ( -- list )
     dlist new ; inline
index 50a9336a9fb21b76467fda637bd27c9c6c6d8a49..7dde8a9ad6a271b4f4890210976740e00c87c9fc 100644 (file)
@@ -132,14 +132,14 @@ TUPLE: cookie name value version comment path domain expires max-age http-only s
     ] { } make "; " join ;
 
 TUPLE: request
-method
-url
-proxy-url
-version
-header
-post-data
-cookies
-redirects ;
+    method
+    url
+    proxy-url
+    version
+    header
+    post-data
+    cookies
+    redirects ;
 
 : set-header ( request/response value key -- request/response )
     pick header>> set-at ;
@@ -171,15 +171,15 @@ redirects ;
 
 
 TUPLE: response
-version
-code
-message
-header
-cookies
-content-type
-content-charset
-content-encoding
-body ;
+    version
+    code
+    message
+    header
+    cookies
+    content-type
+    content-charset
+    content-encoding
+    body ;
 
 : <response> ( -- response )
     response new
@@ -207,10 +207,10 @@ M: response clone
     over cookies>> push ;
 
 TUPLE: raw-response
-version
-code
-message
-body ;
+    version
+    code
+    message
+    body ;
 
 : <raw-response> ( -- response )
     raw-response new
index 74a0f06cf936e295a86defc4b0ed1aa11d4c63a0..32315561b9615ef0482120d493b8941ec3a875f5 100644 (file)
@@ -10,20 +10,20 @@ CONSTANT: horizontal { 1 0 }
 CONSTANT: vertical { 0 1 }
 
 TUPLE: gadget < rect
-pref-dim
-parent
-children
-{ orientation initial: { 0 1 } }
-focus
-{ visible? initial: t }
-root?
-clipped?
-layout-state
-{ graft-state initial: { f f } }
-graft-node
-interior
-boundary
-model ;
+    pref-dim
+    parent
+    children
+    { orientation initial: { 0 1 } }
+    focus
+    { visible? initial: t }
+    root?
+    clipped?
+    layout-state
+    { graft-state initial: { f f } }
+    graft-node
+    interior
+    boundary
+    model ;
 
 M: gadget equal? 2drop f ;
 
index 81ccec06d5a8d385f9fc64395bbda453d9b1210a..72c0218a33eb6e040b6131c01a4bb44a447cfb93 100644 (file)
@@ -16,8 +16,8 @@ FROM: ui.gadgets.wrappers => <wrapper> ;
 IN: ui.gadgets.panes
 
 TUPLE: pane < track
-output current input last-line prototype scrolls?
-selection-color caret mark selecting? ;
+    output current input last-line prototype scrolls?
+    selection-color caret mark selecting? ;
 
 TUPLE: pane-stream pane ;
 INSTANCE: pane-stream output-stream