9 put_focus(b
: BOOLEAN) is
16 Result := config
.mainfont
28 signal_activate
: INTEGER is 1
29 signal_cancel
: INTEGER is 2
30 signal_change
: INTEGER is 3
32 signal_table
: DICTIONARY
[COMMAND
, INTEGER]
34 put_command(c
: COMMAND
; i
: INTEGER) is
36 signal_table
.put(c
, i
)
39 raise_signal(i
: INTEGER) is
41 if signal_table
.has(i
) then
42 signal_table
.at(i
).execute
51 put_xy(x
, y
: INTEGER) is
57 put_size(w
, h
: INTEGER) is
63 contains(x
, y
: INTEGER) : BOOLEAN is
65 Result := x
>= offsetx
and then x
< offsetx
+ width
66 and then y
>= offsety
and then y
< offsety
+ height
69 handle_event(e
: EVENT
) is
71 e
.put_x(e
.x
- offsetx
)
72 e
.put_y(e
.y
- offsety
)
76 process_event(e
: EVENT
) is
86 fill_rect(0, 0, width
, height
, black
)
89 fill_rect(x
, y
, w
, h
: INTEGER; c
: COLOR
) is
91 ext_fill_rect(x
+ offsetx
, y
+ offsety
, w
, h
, c
.to_integer
)
94 ext_fill_rect(x
, y
, w
, h
, c
: INTEGER) is
98 blit(img
: IMAGE
; x
, y
: INTEGER) is
100 img
.blit(x
+ offsetx
, y
+ offsety
)
103 ext_blit_surface(p
: POINTER
; x
, y
: INTEGER) is
107 ext_get_mouse_state
is
111 last_mouse_x
: INTEGER is
113 Result := get_last_mouse_x
- offsetx
116 last_mouse_y
: INTEGER is
118 Result := get_last_mouse_y
- offsety
121 get_last_mouse_x
: INTEGER is
125 get_last_mouse_y
: INTEGER is
130 text_height
: INTEGER
131 measure_text_size(s
: STRING) is
133 ext_get_text_size(font
.to_external
, s
.to_external
)
134 text_width
:= ext_get_tsw
135 text_height
:= ext_get_tsh
138 ext_get_text_size(f
: POINTER
; s
: POINTER
) is
142 ext_get_tsw
: INTEGER is
146 ext_get_tsh
: INTEGER is