space.anubis
1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
The Anubis Project.
A Widget System (4th version).
The 'space' widget.
Copyright (c) Alain Proute' 2005.
Authors: Alain Proute'
read widget.anubis
public define Widget
space
(
Word32 width,
Word32 height,
RGB color
).
--- That's all for the public part ! --------------------------------------------------
public define Widget
space
(
Word32 width,
Word32 height,
RGB color
) =
with sc = stretch_cap(width,height,width,height),
create_widget
(
(One u) |-> sc,
(Word32 w, Word32 h) |-> unique,
(One u) |-> (width,height),
(WidgetDrawToolBox dtb) |-> draw(dtb)(rect(0,0,width,height),color),
(WidgetEventToolBox etb, WidgetEvent e) |-> ignored,
(One u) |-> []
).