contextMenu hover trigger
438620
function(e) {
            var $this = $(this),
                $related = $(e.relatedTarget),
                $document = $(document);
            
            // abort if we're coming from a menu
            if ($related.is('.context-menu-list') || $related.closest('.context-menu-list').length) {
                return;
            }
            
            // abort if a menu is shown
            if ($currentTrigger && $currentTrigger.length) {
                return;
            }
            
            hoveract.pageX = e.pageX;
            hoveract.pageY = e.pageY;
            hoveract.data = e.data;
            $document.on('mousemove.contextMenuShow', handle.mousemove);
            hoveract.timer = setTimeout(function() {
                hoveract.timer = null;
                $document.off('mousemove.contextMenuShow');
                $currentTrigger = $this;
                $this.trigger($.Event("contextmenu", { data: hoveract.data, pageX: hoveract.pageX, pageY: hoveract.pageY }));
            }, e.data.delay );
        }
720108
private void showContextMenu(ContextMenuEvent e) {
        ContextMenu menu = view.getContextMenu();
        double xOffset = view.getContextMenuXOffset();
        double yOffset = view.getContextMenuYOffset();

        menu.show(view, e.getScreenX() + xOffset, e.getScreenY() + yOffset);
    }
582481
function contextMenuOpenHandler() {
        var file = MainViewManager.getCurrentlyViewedFile(MainViewManager.ACTIVE_PANE);

        if (file) {
            var targetIndex  = MainViewManager.findInWorkingSet(MainViewManager.ACTIVE_PANE, file.fullPath),
                workingSetListSize = MainViewManager.getWorkingSetSize(MainViewManager.ACTIVE_PANE);

            if (targetIndex === workingSetListSize - 1) { // hide "Close Others Below" if the last file in Working Files is selected
                CommandManager.get(closeBelow).setEnabled(false);
            } else {
                CommandManager.get(closeBelow).setEnabled(true);
            }

            if (workingSetListSize === 1) { // hide "Close Others" if there is only one file in Working Files
                CommandManager.get(closeOthers).setEnabled(false);
            } else {
                CommandManager.get(closeOthers).setEnabled(true);
            }

            if (targetIndex === 0) { // hide "Close Others Above" if the first file in Working Files is selected
                CommandManager.get(closeAbove).setEnabled(false);
            } else {
                CommandManager.get(closeAbove).setEnabled(true);
            }
        }
    }
286221
def _mk_context_menu(self, thumbkey, chname, info):
        
        menu = Widgets.Menu()
        item = menu.add_name("Display")
        item.add_callback('activated',
                          lambda w: self.load_file(
                              thumbkey, chname, info.name, info.path,
                              info.image_future))
        menu.add_separator()
        item = menu.add_name("Remove")
        item.add_callback('activated',
                          lambda w: self.fv.remove_image_by_name(
                              chname, info.name, impath=info.path))

        return menu
961211
def hoverMoveEvent( self, event ):
        
        point = event.pos()
        
        found_key = ''
        found = None
        for key, value, subpath in self._subpaths:
            if subpath.contains(point):
                found = subpath
                found_key = key
                break
        
        if found:
            # update the tooltip
            tip    = self.keyToolTip(found_key)
            if ( tip ):
                widget = self.scene().chartWidget()
                anchor = XPopupWidget.Anchor.RightCenter
                
                # show the popup widget
                XPopupWidget.showToolTip(tip, 
                                         anchor = anchor,
                                         parent = widget,
                                         foreground = self.color().darker(120),
                                         background = self.alternateColor())
            
            if ( found != self._hoveredPath ):
                self._hoveredPath = found
                self.update()
1323345
def contextMenuEvent(self, event):
        """"""
        state = self.has_selected_text()
        self.copy_without_prompts_action.setEnabled(state)
        ShellBaseWidget.contextMenuEvent(self, event)
863098
function closeContentAreaContextMenu(controller) {
  var contextMenu = new elementslib.ID(controller.window.document, "contentAreaContextMenu");
  controller.keypress(contextMenu, "VK_ESCAPE", {});
}
73449
function(e) {
			gui.broadcastGlobal(({
				"click": gui.BROADCAST_MOUSECLICK,
				"mousedown": gui.BROADCAST_MOUSEDOWN,
				"mouseup": gui.BROADCAST_MOUSEUP
			})[e.type], gui.$contextid);
		}
939879
def on_mouse_event(self, event):
        ''''''
        pos = event.GetPosition()
        if event.RightDown() and self.popup_menu is not None:
            self.show_popup_menu(pos)
            return
        if event.Leaving():
            self.mouse_pos = None
        else:
            self.mouse_pos = pos

        if event.LeftDown():
            self.mouse_down = self.image_coordinates(pos)
        if event.Dragging() and event.ButtonIsDown(wx.MOUSE_BTN_LEFT):
            self.on_drag_event(event)
99379
def __Script_Editor_Output_plainTextEdit_contextMenuEvent(self, event):
        

        menu = self.Script_Editor_Output_plainTextEdit.createStandardContextMenu()
        menu.addSeparator()
        menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|Edit Selected Path",
            slot=self.__edit_selected_path_action__triggered))
        menu.exec_(event.globalPos())
1137519
function (event){

    /*
    // @TODO Context menu?
    if(event.isRightClick()) {
      event.stop();

      var overlay = this.overlay;
      overlay.hide();

      function cancelContextMenu () {
        overlay.show();
        E.stopObserving(document, 'mousemove', cancelContextMenu);
      }
      E.observe(document, 'mousemove', cancelContextMenu);
      return;
    }
    */

    if (this.mouseUpHandler) return;
    this.mouseUpHandler = _.bind(function (e) {
      E.stopObserving(document, 'mouseup', this.mouseUpHandler);
      E.stopObserving(document, 'mousemove', this.mouseDownMoveHandler);
      this.mouseDownMoveHandler = null;
      this.mouseUpHandler = null;
      // @TODO why?
      //e.stop();
      E.fire(this.el, 'flotr:mouseup', [e, this]);
    }, this);
    this.mouseDownMoveHandler = _.bind(function (e) {
        var pos = this.getEventPosition(e);
        E.fire(this.el, 'flotr:mousemove', [event, pos, this]);
        this.lastMousePos = pos;
    }, this);
    E.observe(document, 'mouseup', this.mouseUpHandler);
    E.observe(document, 'mousemove', this.mouseDownMoveHandler);
    E.fire(this.el, 'flotr:mousedown', [event, this]);
    this.ignoreClick = false;
  }
1078433
function(e) {
            e.stopPropagation();
            var opt = $(this).data('contextMenu') || {};

            // obtain currently selected menu
            if (opt.$selected) {
                var $s = opt.$selected;
                opt = opt.$selected.parent().data('contextMenu') || {};
                opt.$selected = $s;
            }
            
            var $children = opt.$menu.children(),
                $prev = !opt.$selected || !opt.$selected.prev().length ? $children.last() : opt.$selected.prev(),
                $round = $prev;
            
            // skip disabled
            while ($prev.hasClass('disabled') || $prev.hasClass('not-selectable')) {
                if ($prev.prev().length) {
                    $prev = $prev.prev();
                } else {
                    $prev = $children.last();
                }
                if ($prev.is($round)) {
                    // break endless loop
                    return;
                }
            }
            
            // leave current
            if (opt.$selected) {
                handle.itemMouseleave.call(opt.$selected.get(0), e);
            }
            
            // activate next
            handle.itemMouseenter.call($prev.get(0), e);
            
            // focus input
            var $input = $prev.find('input, textarea, select');
            if ($input.length) {
                $input.focus();
            }
        }
541256
function ContextMenus(chrome) {
  this.chrome = chrome;

  /**
   * The maximum number of top level extension items that can be added to an extension
   * action context menu. Any items beyond this limit will be ignored.
   * @property {undefined}
   */
  this.ACTION_MENU_TOP_LEVEL_LIMIT = null;

  /**
   * Creates a new context menu item. Note that if an error occurs during creation, you
   * may not find out until the creation callback fires (the details will be in chro
   * me.runtime.lastError).
   *
   * @param {Object} createProperties
   * @param {function} callback Called when the item has been created in the browser. If there were any probl...
   * @returns {undefined} The ID of the newly created item.
   */
  this.create = sinon.stub();

  /**
   * Updates a previously created context menu item.
   *
   * @param {undefined} id The ID of the item to update.
   * @param {Object} updateProperties The properties to update. Accepts the same values as the create function.
   * @param {function} callback Called when the context menu has been updated.
   */
  this.update = sinon.stub();

  /**
   * Removes a context menu item.
   *
   * @param {undefined} menuItemId The ID of the context menu item to remove.
   * @param {function} callback Called when the context menu has been removed.
   */
  this.remove = sinon.stub();

  /**
   * Removes all context menu items added by this extension.
   *
   * @param {function} callback Called when removal is complete.
   */
  this.removeAll = sinon.stub();

  /**
   * onClicked Event
   */
  this.onClicked = new Event();
}
572703
function trigger(context, path, data) {
    if (util.isFunction(_hooksCallbacks[path])) {
        _hooksCallbacks[path].call(context, data, context);
    }
}
813287
def hoverEnterEvent(self, event):
        
        self._hovered = True
        if self.toolTip():
            QToolTip.showText(QCursor.pos(), self.toolTip())
            return True
        
        return self.style() == XNodeHotspot.Style.Icon
737488
function triggerMouse(type) {
        var names = {
            start: 'mousedown',
            move: 'mousemove',
            end: 'mouseup'
        };

        var event = document.createEvent('Event');
        event.initEvent(names[type], true, true);
        var touchList = this._createTouchList(this.touches);
        if(touchList[0]) {
            event.pageX = touchList[0].pageX;
            event.pageY = touchList[0].pageY;
            event.clientX = touchList[0].clientX;
            event.clientY = touchList[0].clientY;
            event.button = 0;
        }
        return this.element.dispatchEvent(event);
    }
862167
private void onEnterPressed() {

        if (isEnabled()) {
            if (m_widget.hasSubMenu()) {
                if (!m_widget.isSubmenuOpen()) {
                    boolean menuClosed = m_widget.onItemClicked();
                    m_contextMenuRpc.itemClicked(m_widget.getId(), menuClosed);
                }
            } else {
                boolean menuClosed = m_widget.onItemClicked();
                m_contextMenuRpc.itemClicked(m_widget.getId(), menuClosed);
            }
        }
    }