let click() =
let s = Graphics.wait_next_event [Graphics.Button_down] in
Printf.printf"Click: %d,%d " s.Graphics.mouse_x s.Graphics.mouse_y;
flush stdout;
let pos = s.Graphics.mouse_x, s.Graphics.mouse_y in
if is_in_next_bt pos then (Printf.printf"Next ";flush stdout; Glob.Next)
else if is_in_quit_bt pos then (Printf.printf"Quit ";flush stdout; Glob.Quit)
else if is_in_gb pos then
let icol, ilig = gb_cell pos in
(Printf.printf"Sel(%d,%d) " icol ilig;flush stdout; Glob.Sel (icol, ilig))
else (Printf.printf"Null ";flush stdout; Glob.Null)