eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'AnimatedLabel':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: AnimatedLabel


Inheritance:

   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

Description:


this implements labels which show a little animation sequence
(sequence of images) instead of a fixed logo.

copyright

COPYRIGHT (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.

Instance protocol:

accessing
o  frameDelay: seconds

o  imageSequence: aCollectionOfImages

initialization
o  initialize
(comment from inherited method)
must be called if redefined

realization
o  destroy
(comment from inherited method)
unmap & destroy - make me invisible, destroy subviews then
make me unknown to the device

o  mapped
(comment from inherited method)
the view has been mapped (by some outside
action - i.e. window manager de-iconified me)

o  release

o  startAnimationProcess

o  stopAnimationProcess

o  unmap
(comment from inherited method)
unmap the view - the view stays created (but invisible),
and can be remapped again later.


Examples:


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]
          ].


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:51:05 GMT