Exemplo n.º 1
0
        public override void MouseMove(Point location, bool inComponent, bool amClipped)
        {
            Rectangle clipDr = DisplayRectangle;

            clipDr.height -= HorizontalScrollbarVisible ? HorizontalScrollbarHeight : 0;
            clipDr.width  -= VerticalScrollbarVisible ? VerticalScrollbarWidth : 0;

            // We trick the children by modifying these positions using the x and y offsets
            var scrollOffset = new Point(xOffset, yOffset);
            var tll          = IComponent_Util.GetTopLevelLocation(this);

            foreach (IComponent c in components)
            {
                if (!c.visible)
                {
                    continue;
                }
                Point useloc            = c.Scrollable ? (Point)location + scrollOffset : (Point)location;
                bool  child_inComponent = c.DisplayRectangle.Contains(useloc);
                bool  child_amClipped   = amClipped ? true : !clipDr.Contains(useloc);
                c.MouseMove(useloc, child_inComponent, child_amClipped);
            }
        }