protected override void OnSizeAllocated(GRect alloc)
{
base.OnSizeAllocated (alloc);
int legend_height = 20;
background = GRect.Inflate (alloc, -border, -border);
background.Height -= legend_height;
legend = new GRect (border, background.Bottom, background.Width, legend_height);
if (event_window != null) {
event_window.MoveResize (alloc.X, alloc.Y, alloc.Width, alloc.Height);
event_window.Move (alloc.X, alloc.Y);
}
UpdateCache ();
}