eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'VUMeter':

Home

everywhere
www.exept.de
for:
[back]

Class: VUMeter


Inheritance:

   Object
   |
   +--GraphicsContext
      |
      +--DeviceGraphicsContext
         |
         +--GraphicsMedium
            |
            +--DisplaySurface
               |
               +--SimpleView
                  |
                  +--View
                     |
                     +--VUMeter

Package:
stx:libwidg3
Category:
Views-Misc
Version:
rev: 1.7 date: 2009/09/15 12:53:17
user: cg
file: VUMeter.st directory: libwidg3
module: stx stc-classLibrary: libwidg3
Author:
cg (cg@CG-VOSTRO)

Description:


nice display of a measurement value or simular...
model value must be 0..1


[instance variables:]

[class variables:]


Related information:



Class protocol:

image specs
o  offImage
This resource specification was automatically generated
by the ImageEditor of ST/X.

o  onImage
This resource specification was automatically generated
by the ImageEditor of ST/X.

o  poti1
This resource specification was automatically generated
by the ImageEditor of ST/X.

o  poti2
This resource specification was automatically generated
by the ImageEditor of ST/X.


Instance protocol:

change & update
o  update: something with: aParameter from: changedObject
Invoked when an object that I depend upon sends a change notification.

drawing
o  redrawValue

o  redrawX: x y: y width: w height: h
called to redraw a part of the widgets area. x/y define the origin, w/h the size of
that area. The clipping region has already been set by the caller, so even if the code
below draws outside the redraw-area, it will not affect what is on the screen.
Therefore, the example below can fill the rectangle in the redraw area, but still draw
the cross in the outside regions.

initialization & release
o  initialize

queries
o  preferredExtent


Examples:


Notice that everything between [exBegin] and [exEnd] is extracted by the html-doc generator to create nicely formatted and clickable executable examples in the generated html-doc. (see the browsers class-documentation menu items for more) trying the widget as standAlone view:


   VUMeter new open
embedded in another view:


   |top v|

   top := StandardSystemView new.
   top extent:300@300.
   v := VUMeter new.
   v origin:10@10 corner:150@150.
   top add:v.
   top open


   |m top v stop|

   m := 0 asValue.

   top := StandardSystemView new.
   top extent:300@300.
   v := VUMeter new.
   v model:m.
   v origin:10@10 corner:150@150.
   top add:v.
   top open.

   stop := false asValue.
   (Button label:'stop') model:stop; open.
   [
       [stop value] whileFalse:[
         0 to:1 by:0.1 do:[:v  |
           m value:v.
           Delay waitForSeconds:0.5
         ]
       ].
       top destroy.
   ] fork.


ST/X 6.1.1; WebServer 1.620 at exept:8081; Tue, 22 May 2012 23:07:38 GMT