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