Handbook
Glossary
list
List gadgets
Next:
<list> ( hook presenter model -- gadget )
Vocabulary
ui
.
gadgets
.
lists
Class description
A list control is backed by a
model
holding a sequence of objects, and displays as a list of
presentation
instances of these objects.
Lists are created by calling
<list>
.
Keyboard Navigation commands
Lists can be navigated from the keyboard.
Shortcut
Command
Word
Notes
Press Button
Request Focus
request-focus
UP
Select Previous
select-previous
DOWN
Select Next
select-next
PAGE_UP
List Page Up
list-page-up
PAGE_DOWN
List Page Down
list-page-down
RET
Invoke Value Action
invoke-value-action
Definition
USING:
ui.gadgets.packs
;
IN:
ui.gadgets.lists
TUPLE:
list
<
pack
index presenter color hook
;
Methods
USING:
accessors
kernel
math.rectangles
namespaces
opengl
ui.gadgets.lists
ui.render
;
M:
list
draw-gadget*
origin
get
[
dup
color>>
gl-color
selected-rect
[
rect-bounds
gl-fill-rect
]
when*
]
with-translation
;
USING:
kernel
models
ui.gadgets
ui.gadgets.lists
;
M:
list
model-changed
nip
dup
clear-gadget
dup
<list-items>
add-gadgets
bound-index
;