initial framework added
[fp1415-soccerfun.git] / src / Gui / digitdisplay.dcl
1 definition module digitdisplay
2
3 import StdControl, StdId
4
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.
12 */
13
14 :: DigitDisplay ls pst
15 = DigitDisplay DigitDisplayId DigitFormat DigitSize Colour [ControlAttribute *(ls,pst)]
16 :: DigitDisplayId // The identification value of the digit display
17 :: DigitFormat
18 = IntegerFormat !Int // The number of digits
19 :: DigitSize // The size of one digit
20 :== Size
21
22 openDigitDisplayId :: !*env -> (!DigitDisplayId,!*env) | Ids env
23
24 instance Controls DigitDisplay
25
26 getDigitDisplayValue :: !DigitDisplayId !(PSt .ps) -> (!Int,!PSt .ps)
27 setDigitDisplayValue :: !DigitDisplayId !Int !(PSt .ps) -> PSt .ps