예제 #1
0
파일: FixedPanel.cs 프로젝트: msiyer/Pinta
		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 ();
		}
예제 #2
0
        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);
        }
예제 #3
0
        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();
            }
        }