|
Class: DigitalClockView
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--DigitalClockView
- Package:
- stx:libwidg3
- Category:
- Views-Misc
- Version:
- rev:
1.19
date: 2018/11/10 07:48:54
- user: cg
- file: DigitalClockView.st directory: libwidg3
- module: stx stc-classLibrary: libwidg3
- Author:
- Claus Gittinger
another clock replacement ...
This is a regular view - it can also be placed into another one.
Clock
RoundClock
ClockView
Time
ProcessorScheduler
DigitalLedDisplay
others
-
version_CVS
-
startup
-
isVisualStartable
-
yes, I can be started via double click in the browser
-
open
-
open a topView containing a digitalClock
usage example(s):
accessing
-
showSeconds: something
-
set the value of the instance variable 'showSeconds' (automatically generated)
drawing
-
redraw
-
update my view
-
showTime
-
executed every second (by timedBlock)
events
-
destroy
-
the view was destroyed - remove time-scheduled updateBlock
-
mapped
-
view was mapped - launch a time-scheduled updateBlock
-
sizeChanged: how
-
(comment from inherited method)
tell subviews that I changed size.
How is either #smaller, #larger or nil, and is used to control the order,
in which subviews are notified (possibly reducing redraw activity)
initialization
-
fetchDeviceResources
-
fetch device colors, to avoid reallocation at redraw time
-
initialize
-
DigitalClockView new open
-
startClock
-
launch a time-scheduled updateBlock
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.
DigitalClockView new open
in a topView:
|top clk prefSize|
top := StandardSystemView new.
top label:'ST/X clock'.
clk := DigitalClockView in:top.
prefSize := clk preferredExtent.
top extent:prefSize.
top minExtent:prefSize.
top maxExtent:prefSize.
top open
|
as a component:
|top frame clk fileList sz|
top := StandardSystemView new.
top extent:200@200.
clk := DigitalClockView new.
clk showSeconds:false.
sz := clk preferredExtent.
frame := View origin:1.0@0.0 corner:1.0@(sz y) in:top.
frame leftInset:(sz x negated - 4); rightInset:4; topInset:2; bottomInset:-2.
frame level:-1.
clk := DigitalClockView in:frame.
fileList := ScrollableView for:FileSelectionList in:top.
fileList origin:0@50 corner:1.0@1.0.
top open
|
|