void CalcPos(Gdk.Rectangle rect, BoxPos hp, BoxPos vp, out int px, out int py)
        {
            if (vp == BoxPos.Start)
            {
                py = rect.Y;
            }
            else if (vp == BoxPos.End)
            {
                py = rect.Bottom;
            }
            else
            {
                py = rect.Y + rect.Height / 2;
            }

            if (hp == BoxPos.Start)
            {
                px = rect.X;
            }
            else if (hp == BoxPos.End)
            {
                px = rect.Right;
            }
            else
            {
                px = rect.X + rect.Width / 2;
            }
        }
        public SelectionHandlePart(BoxFill fill, BoxPos hpos, BoxPos vpos, int x, int y, BoxPos hposEnd, BoxPos vposEnd, int xEnd, int yEnd)
        {
            this.fill = fill;
            this.hpos = hpos;
            this.vpos = vpos;
            this.x    = x;
            this.y    = y;

            this.hposEnd = hposEnd;
            this.vposEnd = vposEnd;
            this.xEnd    = xEnd;
            this.yEnd    = yEnd;
        }
		void CalcPos (Gdk.Rectangle rect, BoxPos hp, BoxPos vp, out int px, out int py)
		{
			if (vp == BoxPos.Start)
				py = rect.Y;
			else if (vp == BoxPos.End)
				py = rect.Bottom;
			else
				py = rect.Y + rect.Height / 2;
			
			if (hp == BoxPos.Start)
				px = rect.X;
			else if (hp == BoxPos.End)
				px = rect.Right;
			else
				px = rect.X + rect.Width / 2;
		}
		public SelectionHandlePart (BoxFill fill, BoxPos hpos, BoxPos vpos, int x, int y, BoxPos hposEnd, BoxPos vposEnd, int xEnd, int yEnd)
		{
			this.fill = fill;
			this.hpos = hpos;
			this.vpos = vpos;
			this.x = x;
			this.y = y;
			
			this.hposEnd = hposEnd;
			this.vposEnd = vposEnd;
			this.xEnd = xEnd;
			this.yEnd = yEnd;
		}