|
Class: AnimatedLabel
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--Label
|
+--AnimatedLabel
- Package:
- stx:libwidg3
- Category:
- Views-Misc
- Version:
- rev:
1.6
date: 2018/09/30 15:14:56
- user: cg
- file: AnimatedLabel.st directory: libwidg3
- module: stx stc-classLibrary: libwidg3
this implements labels which show a little animation sequence
(sequence of images) instead of a fixed logo.
copyrightCOPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
accessing
-
frameDelay: seconds
-
-
imageSequence: aCollectionOfImages
-
initialization
-
initialize
-
(comment from inherited method)
must be called if redefined
realization
-
destroy
-
(comment from inherited method)
unmap & destroy - make me invisible, destroy subviews then
make me unknown to the device
-
mapped
-
(comment from inherited method)
the view has been mapped (by some outside
action - i.e. window manager de-iconified me)
-
release
-
-
startAnimationProcess
-
-
stopAnimationProcess
-
-
unmap
-
(comment from inherited method)
unmap the view - the view stays created (but invisible),
and can be remapped again later.
plain animated label:
|label images|
label := AnimatedLabel new.
images := Array new:8.
1 to:8 do:[:i |
images at:i put:(Image fromFile:'../../clients/Animation/bitmaps/man' , i printString , '.xbm')
].
label imageSequence:images; frameDelay:0.1.
label open
|
animated label in a DialogBox:
|dialog label images|
dialog := Dialog new.
dialog label:'writing'.
dialog addTextLabel:'saving your data - please wait ...'.
label := AnimatedLabel new.
images := Array new:12.
1 to:12 do:[:i |
images at:i put:(Image fromFile:'../../libwidg3/bitmaps/write.' , i printString , '.xbm')
].
label imageSequence:images; frameDelay:0.1.
dialog addComponent:label.
(dialog addAbortButton) label:'abort'.
dialog open.
|
same, using the more convenient ActionWaitBox:
|box label images|
box := ActionWaitBox new.
box label:'writing'.
box addTextLabel:'saving your data - please wait ...'.
label := AnimatedLabel new.
images := Array new:12.
1 to:12 do:[:i |
images at:i put:(Image fromFile:'../../libwidg3/bitmaps/write.' , i printString , '.xbm')
].
label imageSequence:images; frameDelay:0.1.
box addComponent:label.
(box addAbortButton) label:'abort'.
box openDoing:
[
10 timesRepeat:[(Delay forSeconds:1) wait]
].
|
|