| window model label input output button check list slider reset |
window := SystemWindow new.
window setLabel: 'LearnSqueak - Form controls'.
model := LearnSqueakFormDemo new.
window model: model.
label := StringMorph contents: 'Name (press Enter to accept):'.
window addMorph: label frame: (0.04@0.03 corner: 0.96@0.10).
input := PluggableTextMorph on: model text: #nameText accept: #acceptName:.
input acceptOnCR: true; wrapFlag: false.
model inputMorph: input.
window addMorph: input frame: (0.04@0.11 corner: 0.96@0.23).
output := PluggableTextMorph on: model text: #result accept: nil.
output readOnly: true.
window addMorph: output frame: (0.04@0.73 corner: 0.96@0.95).
button := SimpleButtonMorph new.
button label: 'Greet'; target: model; actionSelector: #greet.
window addMorph: button frame: (0.66@0.55 corner: 0.79@0.67).
check := PluggableCheckBoxMorph on: model
    getState: #loud action: #toggleLoud label: #loudLabel.
check installButton.
window addMorph: check frame: (0.04@0.26 corner: 0.96@0.35).
list := PluggableListMorph on: model
    list: #choices selected: #choice changeSelected: #choice:.
window addMorph: list frame: (0.04@0.38 corner: 0.60@0.66).
slider := SimpleSliderMorph new.
slider target: model; actionSelector: #level:;
    minVal: 0; maxVal: 100; adjustToValue: 50.
model sliderMorph: slider.
window addMorph: slider frame: (0.66@0.40 corner: 0.94@0.50).
reset := SimpleButtonMorph new.
reset label: 'Reset'; target: model; actionSelector: #reset.
window addMorph: reset frame: (0.82@0.55 corner: 0.96@0.67).
window openInWorld; extent: 650@420; position: 300@150.
window
