let draw_bt bt =
Graphics.set_color bt.color;
Graphics.fill_rect
bt.x0
bt.y0
bt.width
bt.height;
Graphics.set_color Graphics.foreground;
Graphics.draw_rect
bt.x0
bt.y0
bt.width
bt.height;
let w, h = Graphics.text_size bt.label in
let dx = (bt.width - w) / 2 in
let dy = (bt.height - h) / 2 in
Graphics.moveto (bt.x0 + dx) (bt.y0 + dy);
Graphics.draw_string bt.label