public void Put (Widget w, int x, int y) { WidgetPosition wpos = new WidgetPosition (); wpos.X = x; wpos.Y = y; wpos.Widget = w; widgets.Add (wpos); w.Parent = this; QueueResize (); }
public bool GetPosition(Widget w, out int x, out int y) { int n = GetWidgetPosition(w); if (n != -1) { WidgetPosition wpos = (WidgetPosition)widgets [n]; x = wpos.X; y = wpos.Y; return(true); } x = y = 0; return(false); }
public void Move(Widget w, int x, int y) { int n = GetWidgetPosition(w); if (n != -1) { WidgetPosition wpos = (WidgetPosition)widgets [n]; if (wpos.X == x && wpos.Y == y) { return; } wpos.X = x; wpos.Y = y; QueueResize(); } }