Handbook
Glossary
render* ( value name renderer -- xml )
Furnace framework
»
Furnace presentation layer
»
HTML components
Prev:
textarea
Vocabulary
html
.
components
Inputs
value
a value
name
a value name
renderer
a component renderer
Outputs
xml
an XML chunk
Generic word contract
Renders an HTML component, outputting an XHTML snippet.
Definition
IN:
html.components
GENERIC:
render*
( value name renderer -- xml )
Methods
USING:
accessors
html.components
kernel
xml.data
xml.syntax.private
;
M:
checkbox
render*
[
"true"
and
]
[
]
[
label>>
]
tri*
3
nenum
T{
xml-chunk
{
seq
V{
""
T{
tag
{
name ~name~
}
{
attrs ~attrs~
}
{
children ~vector~
}
}
""
}
}
}
interpolate-xml
;
USING:
accessors
html.components
kernel
xml.data
xml.syntax.private
;
M::
choice
render*
( value name choice -- xml )
choice
size>>
:>
size choice
multiple>>
"true"
and
:>
multiple value choice
render-options
:>
contents
H{
{
"name"
name
}
{
"multiple"
multiple
}
{
"contents"
contents
}
{
"size"
size
}
}
T{
xml-chunk
{
seq
V{
""
T{
tag
{
name ~name~
}
{
attrs ~attrs~
}
{
children ~vector~
}
}
""
}
}
}
interpolate-xml
;
USING:
accessors
html.components
html.forms
kernel
xmode.code2html
;
M:
code
render*
[
?split-lines
]
[
drop
]
[
mode>>
value
]
tri*
htmlize-lines
;
USING:
html.components
kernel
lcs.diff2html
;
M:
comparison
render*
2drop
htmlize-diff
;
USING:
accessors
farkup
html.components
kernel
namespaces
;
M:
farkup
render*
[
nip
[
no-follow>>
[
string>boolean
link-no-follow?
set
]
when*
]
[
disable-images>>
[
string>boolean
disable-images?
set
]
when*
]
[
parsed>>
string>boolean
[
(write-farkup)
]
[
farkup>xml
]
if
]
tri
]
with-scope
;
USING:
accessors
html.components
;
M:
field
render*
size>>
"text"
render-field
;
USING:
html.components
kernel
xml.data
xml.syntax.private
;
M:
hidden
render*
drop
2
nenum
T{
xml-chunk
{
seq
V{
""
T{
tag
{
name ~name~
}
{
attrs ~attrs~
}
}
""
}
}
}
interpolate-xml
;
USING:
html.components
kernel
strings
xml.data
;
M:
html
render*
2drop
dup
string?
[
<unescaped>
]
when
;
USING:
html.components
html.streams
inspector
kernel
;
M:
inspector
render*
2drop
[
describe
]
with-html-writer
;
USING:
html.components
kernel
present
;
M:
label
render*
2drop
present
;
USING:
accessors
html.components
kernel
xml.data
xml.syntax.private
;
M:
link
render*
nip
swap
[
target>>
]
[
[
link-href
]
[
link-title
]
bi
]
bi*
3
nenum
T{
xml-chunk
{
seq
V{
""
T{
tag
{
name ~name~
}
{
attrs ~attrs~
}
{
children ~vector~
}
}
""
}
}
}
interpolate-xml
;
USING:
accessors
html.components
kernel
;
M:
password
render*
[
drop
""
]
2dip
size>>
"password"
render-field
;
USING:
accessors
html.components
xml.data
xml.syntax.private
;
M::
textarea
render*
( value name area -- xml )
area
rows>>
:>
rows area
cols>>
:>
cols
H{
{
"name"
name
}
{
"value"
value
}
{
"cols"
cols
}
{
"rows"
rows
}
}
T{
xml-chunk
{
seq
V{
""
T{
tag
{
name ~name~
}
{
attrs ~attrs~
}
{
children ~vector~
}
}
""
}
}
}
interpolate-xml
;
USING:
html.components
kernel
;
M:
xml
render*
2drop
;