image-control


Vocabulary
images.viewer

Variable description
This gadget is like an image-gadget, but it's image must be in a model. It's used to display changing images.

Definition
IN: images.viewer

TUPLE: image-control < image-gadget image-updated? ;


Methods
USING: generic images.viewer images.viewer.private kernel
ui.render ;

M: image-control draw-gadget*
[ ?update-texture ]
[ M\ image-control draw-gadget* (call-next-method) ] bi ;


USING: images.viewer ui.gadgets ;

M: image-control graft* start-control ;


USING: accessors images.viewer kernel models ui.gadgets ;

M: image-control model-changed
swap value>> >>image t >>image-updated? relayout ;


USING: generic images.viewer kernel ui.gadgets ;

M: image-control ungraft*
[ stop-control ]
[ M\ image-control ungraft* (call-next-method) ] bi ;