Adroit.Gui.Widgets.ModeButton.OnMotionNotifyEvent C# (CSharp) Метод

OnMotionNotifyEvent() защищенный Метод

protected OnMotionNotifyEvent ( Gdk.EventMotion evnt ) : bool
evnt Gdk.EventMotion
Результат bool
        protected override bool OnMotionNotifyEvent(EventMotion evnt)
        {
            int n_children = m_box.Children.Length - 1;

            if (n_children < 1)
                return false;

            double child_size = this.Allocation.Width / n_children;
            int i = -1;

            if (child_size > 0)
                i = (int) (evnt.X / child_size);

            if (i >= 0 && i < n_children)
                this.Hovered = i;

            return false;
        }