|
Class: VUMeter
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--VUMeter
- Package:
- stx:libwidg3
- Category:
- Views-Misc
- Version:
- rev:
1.10
date: 2018/11/10 07:47:23
- user: cg
- file: VUMeter.st directory: libwidg3
- module: stx stc-classLibrary: libwidg3
- Author:
- cg (cg@CG-VOSTRO)
nice display of a measurement value or simular...
model value must be 0..1
[instance variables:]
[class variables:]
image specs
-
offImage
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
self offImage inspect
ImageEditor openOnClass:self andSelector:#offImage
Icon flushCachedIcons
|
-
onImage
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
self onImage inspect
ImageEditor openOnClass:self andSelector:#onImage
Icon flushCachedIcons
|
-
poti1
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
self poti1 inspect
ImageEditor openOnClass:self andSelector:#poti1
Icon flushCachedIcons
|
-
poti2
-
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
self poti2 inspect
ImageEditor openOnClass:self andSelector:#poti2
Icon flushCachedIcons
|
change & update
-
update: something with: aParameter from: changedObject
-
Invoked when an object that I depend upon sends a change notification.
drawing
-
redrawValue
-
map 0..1 into 0..pi scaling and shifting the phase
-
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
-
initialize
-
self new open
queries
-
computePreferredExtent
-
(comment from inherited method)
return my computed preferred extent - this is the minimum size I would like to have.
If there are any components, a rectangle enclosing them
is returned. Otherwise, the actual extent is returned.
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:
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.
|
|