Handbook
Glossary
<editors-section> ( -- gadget )
Vocabulary
ui-demo
Inputs
None
Outputs
gadget
an
object
Definition
USING:
accessors
kernel
models
ui.gadgets
ui.gadgets.buttons
ui.gadgets.editors
ui.gadgets.scrollers
;
IN:
ui-demo
::
<editors-section>
( -- gadget )
"edit me"
<model>
:>
bound
f
<model>
:>
submitted
<editor>
:>
sample-editor
text-samples
sample-editor
set-editor-string
<section>
"An editor is a multi-line text area with a caret, selection a..."
<prose>
add-gadget
"Model field, bound in both directions:"
<heading>
add-gadget
bound
<model-field>
24
>>min-cols
<pref-width>
add-gadget
"Model:"
bound
<readout>
<labeled-row>
add-gadget
"Action field, fires on Enter:"
<heading>
add-gadget
[
submitted
set-model
]
<action-field>
"press Enter"
>>default-text
24
>>min-cols
<pref-width>
add-gadget
"Submitted:"
submitted
<readout>
<labeled-row>
add-gadget
"Plain editor:"
<heading>
add-gadget
<editor>
"Several lines fit here."
>>default-text
<framed>
{
0 90
}
>>min-dim
add-gadget
"Unicode, selection and long lines:"
<heading>
add-gadget
sample-editor
<scroller>
<framed>
{
0 150
}
>>min-dim
add-gadget
<shelf-of>
"Select all"
[
drop
sample-editor
select-all
sample-editor
request-focus
]
<border-button>
add-gadget
"Reset text"
[
drop
text-samples
sample-editor
set-editor-string
]
<border-button>
add-gadget
add-gadget
"Try editing, selecting, copying and undoing across scripts."
<note>
add-gadget
"Baseline and background reference:"
<heading>
add-gadget
<text-samples>
add-gadget
<page>
;