Action to be taken when an event is triggered.

        Event is scroll of the mouse's wheel. This leads to changing the temporal frame displayed.

        :param event: Scroll of mouse wheel
514941
def onscroll(self, event):
        
        if event.button == 'up':
            self.ind = (self.ind + 1) % self.slices
        else:
            self.ind = (self.ind - 1) % self.slices
        self.update()
330595
def showEvent(self, event):
        
        super(XWalkthroughWidget, self).showEvent(event)
        
        self.autoLayout()
        self.restart()
        self.setFocus()
        self.raise_()
857077
def on_mouse_wheel(self, event):
        
        self.zoom(np.exp(event.delta * (0.01, -0.01)), event.pos)
309491
def mousePressEvent(self, event):
        
        self._region.setX(event.pos().x())
        self._region.setY(event.pos().y())
        super(XSnapshotWidget, self).mousePressEvent(event)
1037772
def mouseMoveEvent( self, event ):
        
        event.setAccepted(False)
        if self._hotspotPressed:
            event.accept()
            return
        
        # ignore events when the scene is in view mode
        scene = self.scene()
        if ( self.isLocked() or self._ignoreMouseEvents or \
             (scene and (scene.inViewMode() or scene.isConnecting()))):
            event.ignore()
            self._ignoreMouseEvents = True
            return
        
        # call the base method
        event.accept()
        super(XNode, self).mouseMoveEvent(event)
585988
def mouseMoveEvent( self, event ):
        
        if ( self._activeConnection ):
            if self._activeConnection.customData('__output__'):
                self._activeConnection.setInputPoint(event.scenePos())
            else:
                self._activeConnection.setOutputPoint(event.scenePos())
        
        super(XNodeScene, self).mouseMoveEvent(event)
946211
def viewbox_mouse_event(self, event):
        
        # When the attached ViewBox reseives a mouse event, it is sent to the
        # camera here.
        
        self.mouse_pos = event.pos[:2]
        if event.type == 'mouse_wheel':
            # wheel rolled; adjust the magnification factor and hide the 
            # event from the superclass
            m = self.mag_target 
            m *= 1.2 ** event.delta[1]
            m = m if m > 1 else 1
            self.mag_target = m
        else:
            # send everything _except_ wheel events to the superclass
            super(MagnifyCamera, self).viewbox_mouse_event(event)
            
        # start the timer to smoothly modify the transform properties. 
        if not self.timer.running:
            self.timer.start()
        
        self._update_transform()
807170
def mousePressEvent(self, event):
        
        self._moveItemStarted = False
        rect = QtCore.QRect(0, 0, 12, self.height())

        # drag the tab off
        if not self._locked and rect.contains(event.pos()):
            tabbar = self.parent()
            panel = tabbar.parent()

            index = tabbar.indexOf(self)
            view = panel.widget(index)
            pixmap = QtGui.QPixmap.grabWidget(view)

            drag = QtGui.QDrag(panel)
            data = QtCore.QMimeData()
            data.setData('x-application/xview/tabbed_view', QtCore.QByteArray(str(index)))
            drag.setMimeData(data)
            drag.setPixmap(pixmap)

            if not drag.exec_():
                cursor = QtGui.QCursor.pos()
                geom = self.window().geometry()
                if not geom.contains(cursor):
                    view.popout()

        # allow moving indexes around
        elif not self._locked and self.isActive():
            self._moveItemStarted = self.parent().count() > 1

        else:
            self.activate()

        super(XViewPanelItem, self).mousePressEvent(event)
828110
def viewbox_mouse_event(self, event):
        
        if event.handled or not self.interactive:
            return

        # Scrolling
        BaseCamera.viewbox_mouse_event(self, event)

        if event.type == 'mouse_wheel':
            center = self._scene_transform.imap(event.pos)
            self.zoom((1 + self.zoom_factor) ** (-event.delta[1] * 30), center)
            event.handled = True

        elif event.type == 'mouse_move':
            if event.press_event is None:
                return

            modifiers = event.mouse_event.modifiers
            p1 = event.mouse_event.press_event.pos
            p2 = event.mouse_event.pos

            if 1 in event.buttons and not modifiers:
                # Translate
                p1 = np.array(event.last_event.pos)[:2]
                p2 = np.array(event.pos)[:2]
                p1s = self._transform.imap(p1)
                p2s = self._transform.imap(p2)
                self.pan(p1s-p2s)
                event.handled = True
            elif 2 in event.buttons and not modifiers:
                # Zoom
                p1c = np.array(event.last_event.pos)[:2]
                p2c = np.array(event.pos)[:2]
                scale = ((1 + self.zoom_factor) **
                         ((p1c-p2c) * np.array([1, -1])))
                center = self._transform.imap(event.press_event.pos[:2])
                self.zoom(scale, center)
                event.handled = True
            else:
                event.handled = False
        elif event.type == 'mouse_press':
            # accept the event if it is button 1 or 2.
            # This is required in order to receive future events
            event.handled = event.button in [1, 2]
        else:
            event.handled = False
672346
@Override
    public boolean onTouchEvent(MotionEvent event) {
        mScaleDetector.onTouchEvent(event);
        boolean val = mGestureDetector.onTouchEvent(event);

        // Check after call of mGestureDetector, so mCurrentFlingDirection and mCurrentScrollDirection are set.
        if (event.getAction() == MotionEvent.ACTION_UP && !mIsZooming && mCurrentFlingDirection == Direction.NONE) {
            if (mCurrentScrollDirection == Direction.RIGHT || mCurrentScrollDirection == Direction.LEFT) {
                goToNearestOrigin();
            }
            mCurrentScrollDirection = Direction.NONE;
        }

        return val;
    }
531650
def mousePressEvent(self, event):
        
        initial_state = event.isAccepted()
        event.ignore()
        self.mouse_pressed.emit(event)
        if event.button() == QtCore.Qt.LeftButton:
            cursor = self.cursorForPosition(event.pos())
            for sel in self.decorations:
                if sel.cursor.blockNumber() == cursor.blockNumber():
                    if sel.contains_cursor(cursor):
                        sel.signals.clicked.emit(sel)
        if not event.isAccepted():
            event.setAccepted(initial_state)
            super(CodeEdit, self).mousePressEvent(event)
181010
def _on_mouse_moved(self, event):
        
        if event.modifiers() & Qt.ControlModifier:
            self._select_word_under_mouse_cursor()
        else:
            self._remove_decoration()
            self.editor.set_mouse_cursor(Qt.IBeamCursor)
            self._previous_cursor_start = -1
            self._previous_cursor_end = -1
914287
def mousePressEvent( self, event ):
        
        XPopupWidget.hideToolTip()
        
        # update the current date
        self.setCurrentDate(self.dateAt(event.scenePos()))
        
        super(XCalendarScene, self).mousePressEvent(event)
107282
def on_click(self, event):
        
        if event["button"] == self.button_toggle:
            # we only toggle if button was used
            if event.get("index") == "button" and self.py3.is_my_event(event):
                self.urgent = False
                self.open = not self.open
68707
function onMouseWheel(e) {
       /* jshint expr:true */
       if (e.target === me.video.renderer.getScreenCanvas()) {
         // create a (fake) normalized event object
         e.type = "wheel"; // dispatch mouse event to registered object

         return dispatchEvent(normalizeEvent(e));
       }

       return true;
     }
1116747
function(event) {
          var e = event || window.event;
          JSEvents.fillMouseEventData(JSEvents.wheelEvent, e, target);
          HEAPF64[(((JSEvents.wheelEvent)+(72))>>3)]=e["deltaX"];
          HEAPF64[(((JSEvents.wheelEvent)+(80))>>3)]=e["deltaY"];
          HEAPF64[(((JSEvents.wheelEvent)+(88))>>3)]=e["deltaZ"];
          HEAP32[(((JSEvents.wheelEvent)+(96))>>2)]=e["deltaMode"];
          var shouldCancel = Module['dynCall_iiii'](callbackfunc, eventTypeId, JSEvents.wheelEvent, userData);
          if (shouldCancel) {
            e.preventDefault();
          }
        }
448097
def mouseReleaseEvent(self, event):
        
        if event.button() == QtCore.Qt.LeftButton:
            if event.modifiers() == QtCore.Qt.ControlModifier:
                self.goBack()
            else:
                self.goForward()
        
        super(XWalkthroughWidget, self).mouseReleaseEvent(event)