示例#1
0
 protected override bool OnButtonPressEvent(Gdk.EventButton evnt)
 {
     if (bar.Frame.OverlayWidgetVisible)
     {
         return(false);
     }
     if (evnt.TriggersContextMenu())
     {
         it.ShowDockPopupMenu(evnt.Time);
     }
     else if (evnt.Button == 1)
     {
         if (evnt.Type == Gdk.EventType.TwoButtonPress)
         {
             // Instead of changing the state of the pad here, do it when the button is released.
             // Changing the state will make this bar item to vanish before the ReleaseEvent is received, and in this
             // case the ReleaseEvent may be fired on another widget that is taking the space of this bar item.
             // This was happening for example with the feedback button.
             itemActivated = true;
         }
         else
         {
             AutoShow();
             it.Present(true);
         }
     }
     return(true);
 }
        protected override bool OnButtonPressEvent(Gdk.EventButton evnt)
        {
            if (evnt.TriggersContextMenu())
            {
                ITabStrip tabStrip = null;
                if (Parent is ITabStripBox)
                {
                    tabStrip = ((ITabStripBox)Parent).TabStrip as ITabStrip;
                }
                item.ShowDockPopupMenu(evnt.Time, tabStrip);
                return(false);
            }
            else if (evnt.Button == Mouse.LEFT_MOUSE_BUTTON)
            {
                if (evnt.Type == Gdk.EventType.ButtonPress)
                {
                    tabPressed = true;
                    pressX     = evnt.X;
                    pressY     = evnt.Y;
                }
#if false
                else if (evnt.Type == Gdk.EventType.TwoButtonPress)
                {
                    tabActivated = true;
                }
#endif
            }
            return(base.OnButtonPressEvent(evnt));
        }
 protected override bool OnButtonPressEvent(Gdk.EventButton evnt)
 {
     if (evnt.TriggersContextMenu())
     {
         item.ShowDockPopupMenu(evnt.Time);
         return(false);
     }
     else if (evnt.Button == 1)
     {
         if (evnt.Type == Gdk.EventType.ButtonPress)
         {
             tabPressed = true;
             pressX     = evnt.X;
             pressY     = evnt.Y;
         }
         else if (evnt.Type == Gdk.EventType.TwoButtonPress)
         {
             tabActivated = true;
         }
     }
     return(base.OnButtonPressEvent(evnt));
 }