本文整理汇总了C#中Gdk.EventButton.IsContextMenuButton方法的典型用法代码示例。如果您正苦于以下问题:C# EventButton.IsContextMenuButton方法的具体用法?C# EventButton.IsContextMenuButton怎么用?C# EventButton.IsContextMenuButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gdk.EventButton
的用法示例。
在下文中一共展示了EventButton.IsContextMenuButton方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnButtonPressEvent
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);
}
示例2: OnButtonPressEvent
protected override bool OnButtonPressEvent (EventButton evnt)
{
var t = FindTab ((int)evnt.X, (int)evnt.Y);
if (t != null) {
if (evnt.IsContextMenuButton ()) {
DockNotebook.ActiveNotebook = notebook;
notebook.CurrentTab = t;
notebook.DoPopupMenu (notebook, t.Index, evnt);
return true;
}
// Don't select the tab if we are clicking the close button
if (IsOverCloseButton (t, (int)evnt.X, (int)evnt.Y)) {
overCloseOnPress = true;
return true;
}
overCloseOnPress = false;
if (evnt.Type == EventType.TwoButtonPress) {
if (allowDoubleClick) {
notebook.OnActivateTab (t);
buttonPressedOnTab = false;
}
return true;
}
if (evnt.Button == 2) {
notebook.OnCloseTab (t);
return true;
}
DockNotebook.ActiveNotebook = notebook;
buttonPressedOnTab = true;
notebook.CurrentTab = t;
return true;
}
buttonPressedOnTab = true;
QueueDraw ();
return base.OnButtonPressEvent (evnt);
}