dlists,http,ui.gadgets.*: nicer formatting of tuples
parent
ee0b34a469
commit
6cb3e313d9
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue