protected override bool OnButtonPressEvent(EventButton evnt)
        {
            if (evnt.Button != 1 || evnt.IsContextMenuButton())
            {
                return(base.OnButtonPressEvent(evnt));
            }

            if (IsOverIndicator(evnt.Y))
            {
                parentStrip.GotoTask(parentStrip.SearchNextTask(GetHoverMode()));
                return(base.OnButtonPressEvent(evnt));
            }

            var hoverTask = GetHoverTask(evnt.Y);

            if (hoverTask != null)
            {
                MoveToTask(hoverTask);
            }

            if (IsInsideBar(evnt.X, evnt.Y))
            {
                Grab.Add(this);
                grabCenter = GetSliderCenter();
                grabY      = evnt.Y;
            }
            else
            {
                MovePosition(evnt.Y);
            }

            return(base.OnButtonPressEvent(evnt));
        }
        protected override bool OnButtonPressEvent(EventButton evnt)
        {
            button |= evnt.Button;

            if (!evnt.TriggersContextMenu() && evnt.Button == 1 && evnt.Type == EventType.ButtonPress)
            {
                if (hoverOverIndicator)
                {
                    parentStrip.GotoTask(parentStrip.SearchNextTask(currentHoverMode));
                    return(base.OnButtonPressEvent(evnt));
                }
                else if (hoverTask != null)
                {
                    TextEditor.Caret.Location = new DocumentLocation(hoverTask.Location.Line, Math.Max(DocumentLocation.MinColumn, hoverTask.Location.Column));
                    TextEditor.CenterToCaret();
                    TextEditor.StartCaretPulseAnimation();
                    TextEditor.GrabFocus();
                }
            }

            if (evnt.Type == EventType.ButtonPress)
            {
                MouseMove(evnt.Y);
            }

            return(base.OnButtonPressEvent(evnt));
        }
 public void PerformPress(object sender, EventArgs args)
 {
     if (task != null)
     {
         strip.GotoTask(task);
     }
     else
     {
         strip.GotoUsage(usage);
     }
 }
 public void PerformPress(object sender, EventArgs args)
 {
     strip.GotoTask(strip.SearchNextTask(mode.GetHoverMode()));
 }