1 definition module digitdisplay
3 import StdControl, StdId
5 /* A DigitDisplay displayId format size colour atts
6 is a Controls instance that displays a positive integral number of maximal format digits
7 in the given colour. Each digit has a given size.
8 The following ControlAttribute-s are inherited:
9 ControlPos: the layout position of the digit display control
10 ControlTip: the tool tip text that must be displayed
11 All other attributes are ignored.
14 :: DigitDisplay ls pst
15 = DigitDisplay DigitDisplayId DigitFormat DigitSize Colour [ControlAttribute *(ls,pst)]
16 :: DigitDisplayId // The identification value of the digit display
18 = IntegerFormat !Int // The number of digits
19 :: DigitSize // The size of one digit
22 openDigitDisplayId :: !*env -> (!DigitDisplayId,!*env) | Ids env
24 instance Controls DigitDisplay
26 getDigitDisplayValue :: !DigitDisplayId !(PSt .ps) -> (!Int,!PSt .ps)
27 setDigitDisplayValue :: !DigitDisplayId !Int !(PSt .ps) -> PSt .ps