Handbook
Glossary
pendulum-gadget
Vocabulary
rosetta-code
.
animate-pendulum
Definition
USING:
ui.gadgets
;
IN:
rosetta-code.animate-pendulum
TUPLE:
pendulum-gadget
<
gadget
alarm
;
Methods
USING:
colors
kernel
opengl
rosetta-code.animate-pendulum
ui.render
;
M:
pendulum-gadget
draw-gadget*
COLOR:
black
gl-color
[
O
]
[
gadget-xy
]
bi
gl-line
;
USING:
accessors
calendar
generic
kernel
rosetta-code.animate-pendulum
timers
ui.gadgets
;
M:
pendulum-gadget
graft*
[
M\
pendulum-gadget
graft*
(call-next-method)
]
[
dup
[
relayout-1
]
curry
20
milliseconds
every
>>alarm
drop
]
bi
;
USING:
accessors
generic
kernel
rosetta-code.animate-pendulum
timers
ui.gadgets
;
M:
pendulum-gadget
ungraft*
[
alarm>>
stop-timer
]
[
M\
pendulum-gadget
ungraft*
(call-next-method)
]
bi
;