initial framework added
[fp1415-soccerfun.git] / src / Gui / textdisplay.dcl
1 definition module textdisplay
2
3 import StdControl, StdId
4
5 /** A TextDisplay is similar to a TextControl. A TextControl displays text using
6 system settings. A TextDisplay uses the ControlPen attribute to display text.
7 In addition, the ControlSize can be set by the programmer.
8 The following ControlAttribute-s are inherited:
9 ControlMinimumSize: the minimum size of the control in case of resizing
10 ControlPen: the pen settings used to display the text
11 ControlPos: the layout position of the text display control
12 ControlResize: resizing the control
13 ControlTip: the tool tip text that must be displayed
14 */
15 :: TextDisplay ls pst
16 = TextDisplay TextDisplayId String TextSize [ControlAttribute *(ls,pst)]
17 :: TextDisplayId
18 = { customId :: !Id
19 , receiverId :: !R2Id TextDisplayMsgIn TextDisplayMsgOut
20 }
21 :: TextDisplayMsgIn = SetTextIn String | GetTextIn
22 :: TextDisplayMsgOut = SetTextOut | GetTextOut String
23
24 :: TextSize :== Size // The size of the text display
25
26 openTextDisplayId :: !*env -> (!TextDisplayId,!*env) | Ids env
27
28 instance Controls TextDisplay
29
30 getTextDisplayText :: !TextDisplayId !(PSt .ps) -> (!String,!PSt .ps)
31 setTextDisplayText :: !TextDisplayId !String !(PSt .ps) -> PSt .ps