MeVisLabToolboxReference
SoMouseGrabber Class Reference

SoMouseGrabber is a general facility to grab mouse events and to map mouse movement to x/y values. More...

#include <SoMouseGrabber.h>

List of all members.

Public Member Functions

 SoMouseGrabber ()
 Constructor.
virtual void handleEvent (SoHandleEventAction *action)
 handle event is reimplemented to handle the mouse events (The events are not consumed, so that following modules in the scene graph can handle them.)
virtual void GLRender (SoGLRenderAction *)
 GLRender dummy implementation.

Static Public Member Functions

static void initClass ()
 inventor type system

Public Attributes

SoSFBool on
 switches the x/y field update on/off
SoSFBool normalized
 if true x and y are set to [xmin,xmax] relative to the viewport
SoSFBool clamp
 clamps the output to [min,max] in noramlized mode
SoSFFloat x
 x value that is changed by mouse movements
SoSFFloat y
 y value that is changed by mouse movements
SoSFFloat absX
SoSFFloat absY
SoSFBool cursorPresent
 this is set to true if the cursor is inside the viewing area
SoSFFloat xmin
 min value for the x field
SoSFFloat xmax
 max value for the x field
SoSFFloat ymin
 min value for the y field
SoSFFloat ymax
 max value for the y field
SoSFBool flipX
 flip the mouse movement to x mapping
SoSFBool flipY
 flip the mouse movement to y mapping
SoSFBool swapXY
 flip the mouse movement to xy mapping (mouse x -> field y, mouse y -> field x)
SoSFFloat sensitivity
 set the sensitivity of the mouse movement to x/y mapping, a value of 1 means that 400 pixel mouse movement interpolate between min and max value
SoSFEnum button1
 button mask for button1
SoSFEnum button2
 button mask for button2
SoSFEnum button3
 button mask for button3
SoSFEnum shift
 mask for shift key
SoSFEnum ctrl
 mask for shift ctrl
SoSFEnum alt
 mask for shift alt, the alt key will not work in SoFullViewer derived classes because those viewers handle the alt key themselves
SoSFEnum cursorShape
 shape of mouse cursor when this grabber is active
SoSFBool shiftPressed
SoSFBool ctrlPressed
SoSFBool altPressed
SoSFBool button1Pressed
SoSFBool button2Pressed
SoSFBool button3Pressed
SoSFTrigger button1DoubleClicked
SoSFTrigger button2DoubleClicked
SoSFTrigger button3DoubleClicked
SoSFTrigger released
 emitted when the mask was valid and switches to invalid again
SoSFBool maskValid
 gives the state of the mask, which calculated by the current mousebuttons and modifier key compared to the button1,button2,button3,ctrl,shift,alt settings.
SoSFBool setEventHandled
 Set events that depend on the button mask handled if they are indeed handled by this extension.
SoSFBool setWheelEventHandled
 Set wheel events handled.
SoSFFloat wheel
 current value that is updated on wheel events
SoSFFloat wheelMin
 min value for wheel
SoSFFloat wheelMax
 max value for wheel
SoSFFloat wheelStep
 step value that is added/subtracted onto wheel on wheel events
SoSFTrigger wheelUp
 tells when the wheel was turned up
SoSFTrigger wheelDown
 tells when the wheel was turned down
SoSFBool wheelOverflow
 if it to true, the wheel value is wrapped around when reaching min/max values

Protected Member Functions

virtual ~SoMouseGrabber ()

Detailed Description

SoMouseGrabber is a general facility to grab mouse events and to map mouse movement to x/y values.

Author:
Florian Link

The default values of the module are:

  on = TRUE
  button1 = RELEASED
  button2 = PRESSED
  button3 = RELEASED
  button1Pressed = FALSE
  button2Pressed = FALSE
  button3Pressed = FALSE
  shift = RELEASED
  ctrl = RELEASED
  alt = RELEASED
  shiftPressed = FALSE
  ctrlPressed = FALSE
  altPressed = FALSE
  x = 0.5
  y = 0.5
  xmin = 0
  xmax = 1
  ymin = 0
  ymax = 1
  maskValid = FALSE
  flipX = FALSE
  flipY = FALSE
  swapXY = FALSE
  sensitivity = 1
  wheelOverflow = FALSE
  wheel = 0
  wheelStep = 1
  wheelMin = 0
  wheelMax = 100

Definition at line 63 of file SoMouseGrabber.h.


Constructor & Destructor Documentation

SoMouseGrabber::SoMouseGrabber ( )

Constructor.

virtual SoMouseGrabber::~SoMouseGrabber ( ) [protected, virtual]

Member Function Documentation

virtual void SoMouseGrabber::GLRender ( SoGLRenderAction *  ) [inline, virtual]

GLRender dummy implementation.

Definition at line 192 of file SoMouseGrabber.h.

virtual void SoMouseGrabber::handleEvent ( SoHandleEventAction *  action) [virtual]

handle event is reimplemented to handle the mouse events (The events are not consumed, so that following modules in the scene graph can handle them.)

static void SoMouseGrabber::initClass ( ) [static]

inventor type system


Member Data Documentation

Definition at line 89 of file SoMouseGrabber.h.

Definition at line 90 of file SoMouseGrabber.h.

mask for shift alt, the alt key will not work in SoFullViewer derived classes because those viewers handle the alt key themselves

Definition at line 126 of file SoMouseGrabber.h.

Definition at line 137 of file SoMouseGrabber.h.

button mask for button1

Definition at line 115 of file SoMouseGrabber.h.

Definition at line 142 of file SoMouseGrabber.h.

Definition at line 138 of file SoMouseGrabber.h.

button mask for button2

Definition at line 117 of file SoMouseGrabber.h.

Definition at line 143 of file SoMouseGrabber.h.

Definition at line 139 of file SoMouseGrabber.h.

button mask for button3

Definition at line 119 of file SoMouseGrabber.h.

Definition at line 144 of file SoMouseGrabber.h.

Definition at line 140 of file SoMouseGrabber.h.

clamps the output to [min,max] in noramlized mode

Definition at line 82 of file SoMouseGrabber.h.

mask for shift ctrl

Definition at line 123 of file SoMouseGrabber.h.

Definition at line 136 of file SoMouseGrabber.h.

this is set to true if the cursor is inside the viewing area

Definition at line 93 of file SoMouseGrabber.h.

shape of mouse cursor when this grabber is active

Definition at line 129 of file SoMouseGrabber.h.

flip the mouse movement to x mapping

Definition at line 105 of file SoMouseGrabber.h.

flip the mouse movement to y mapping

Definition at line 107 of file SoMouseGrabber.h.

gives the state of the mask, which calculated by the current mousebuttons and modifier key compared to the button1,button2,button3,ctrl,shift,alt settings.

Definition at line 151 of file SoMouseGrabber.h.

if true x and y are set to [xmin,xmax] relative to the viewport

Definition at line 80 of file SoMouseGrabber.h.

switches the x/y field update on/off

Definition at line 77 of file SoMouseGrabber.h.

emitted when the mask was valid and switches to invalid again

Definition at line 147 of file SoMouseGrabber.h.

set the sensitivity of the mouse movement to x/y mapping, a value of 1 means that 400 pixel mouse movement interpolate between min and max value

Definition at line 112 of file SoMouseGrabber.h.

Set events that depend on the button mask handled if they are indeed handled by this extension.

Definition at line 154 of file SoMouseGrabber.h.

Set wheel events handled.

Definition at line 157 of file SoMouseGrabber.h.

mask for shift key

Definition at line 121 of file SoMouseGrabber.h.

Definition at line 135 of file SoMouseGrabber.h.

flip the mouse movement to xy mapping (mouse x -> field y, mouse y -> field x)

Definition at line 109 of file SoMouseGrabber.h.

current value that is updated on wheel events

Definition at line 163 of file SoMouseGrabber.h.

tells when the wheel was turned down

Definition at line 174 of file SoMouseGrabber.h.

max value for wheel

Definition at line 167 of file SoMouseGrabber.h.

min value for wheel

Definition at line 165 of file SoMouseGrabber.h.

if it to true, the wheel value is wrapped around when reaching min/max values

Definition at line 177 of file SoMouseGrabber.h.

step value that is added/subtracted onto wheel on wheel events

Definition at line 169 of file SoMouseGrabber.h.

tells when the wheel was turned up

Definition at line 172 of file SoMouseGrabber.h.

SoSFFloat SoMouseGrabber::x

x value that is changed by mouse movements

Definition at line 85 of file SoMouseGrabber.h.

max value for the x field

Definition at line 98 of file SoMouseGrabber.h.

min value for the x field

Definition at line 96 of file SoMouseGrabber.h.

SoSFFloat SoMouseGrabber::y

y value that is changed by mouse movements

Definition at line 87 of file SoMouseGrabber.h.

max value for the y field

Definition at line 102 of file SoMouseGrabber.h.

min value for the y field

Definition at line 100 of file SoMouseGrabber.h.


The documentation for this class was generated from the following file: