OpenGLContext.events.mouseevents

Events relating to the mouse

Classes

Base class for mouse in/out events
The mouse in/out event types are "synthetic", that is, they are generated by other events when certain conditions are true. The change events allow for easily constructing common interface elements such as mouse-overs.
Attributes: lastPath -- previous value for target path, in essence, the state from which we have come newPath -- new value for target path, in essence, the new state to which we have just changed
The change event also includes all attributes of the MouseMoveEvent which triggered the change, see the MouseMoveEvent class for details.
Change events are sent anonymously and from the set of nodes which have _changed_ in the path, rather than all nodes in the new/old path.
Mouse event representing a change of state for a mouse button attributes: type -- "mousebutton" renderingPass -- pointer to the OpenGLContext.renderpass.RenderPass object associated with this event modifiers -- three-tuple of booleans: (shift, control, alt) button -- the "button ID" which changed state Valid Values: 0 -- first mouse button, "left" 1 -- second mouse button, "right" 2 -- third mouse button, "middle" n -- nth mouse button, device-specific state -- Boolean 0 = up/released, 1 = down/pressed nameStack -- selection name stack, far, [names,... ),...]
Base class for all mouse-based events.
Provides a number of utility methods for interacting with the mouse event and the select render mode.
Attributes: type -- Event type string specifier viewCoordinate -- 3D vector in view-space of nearest-geometry intersection worldCoordinate -- 3D vector in model-space of nearest-geometry intersection pickPoint -- 2D view-space coordinate for mouse objectPaths -- NodePaths from scenegraph to each shape under the cursor, arranged in nearest- to-farthest order stopPropagation -- flag which, when set, stops the event from continuing along the capture/ bubbling ProcessEvent path. See: eventhandler.BubblingEventManager processMorePaths -- if true (false by default), then continue processing node-paths after the current node-path is complete.
(Low-level data attributes): nameStack -- low-level OpenGL name-stack with GL names and distances: [ (near,far,[name,...]),...] modelViewMatrix -- active model-view matrix for the context on this rendering pass projectionMatrix -- active projection matrix for the context on this rendering pass viewport -- viewport dimensions
Manager base-class for mouse-related events
Mouse has just begun pointing to a particular path
The MouseInEvent indicates that the pointer has just begun pointing to the geometry at the end of the newPath attribute.
  • only sent when the newPath is non-null (i.e. there is actual geometry under the pointer).
  • sent after any corresponding MouseOutEvent for the lastPath has been sent
Event representing a change of position for the mouse.
Can represent either a "free move" or a "drag" with buttons depressed. See the buttons field for a list of the button IDs active while moving
attributes: type -- "mousemove" renderingPass -- pointer to the OpenGLContext.renderpass.RenderPass object associated with this event modifiers -- three-tuple of booleans: (shift, control, alt) buttons -- tuple of active buttons (in ascending order) Valid Values: () -- move with no buttons (n,) -- drag with single button 'n' depressed (n,n+x) -- drag with two buttons depressed nameStack -- selection name stack, far, [names,... ),...]
Mouse has just stopped pointing to a particular path
The MouseOutEvent indicates that the pointer has just stopped pointing to the geometry at the end of the lastPath attribute.
  • only sent when the lastPath is non-null (i.e. there was actual geometry under the pointer).
  • sent before any corresponding MouseInEvent for the newPath has been sent