13#ifndef SO_MOUSE_GRABBER_H
14#define SO_MOUSE_GRABBER_H
20#include <Inventor/fields/SoSFBool.h>
21#include <Inventor/fields/SoSFFloat.h>
22#include <Inventor/fields/SoSFTrigger.h>
23#include <Inventor/nodes/SoSeparator.h>
24#include <Inventor/nodes/SoSubNode.h>
25#include <Inventor/events/SoMouseButtonEvent.h>
26#include <Inventor/sensors/SoFieldSensor.h>
30class SoMouseGrabberPointingAction;
216 void updatePointingAction(
SoField*);
242 int _lastButtonPressed;
245 unsigned _prevWheelCode;
SoInteractionNode is the base class for normal interaction nodes in OpenInventor, that handle their i...
SoMouseGrabber is a general facility to grab mouse events and to map mouse movement to x/y values.
SoSFEnum alt
mask for shift alt, the alt key will not work in SoFullViewer derived classes because those viewers h...
SoSFBool normalized
if true x and y are set to [xmin,xmax] relative to the viewport
SoSFBool setEventHandled
Set events that depend on the button mask handled if they are indeed handled by this extension.
SoSFEnum ctrl
mask for shift ctrl
SoSFBool flipY
flip the mouse movement to y mapping
SoSFEnum button2
button mask for button2
void handleEvent(SoHandleEventAction *action) override
handle event is reimplemented to handle the mouse events (The events are not consumed,...
SoMouseGrabber()
Constructor.
static void initClass()
inventor type system
SoSFBool wheelOverflow
if it to true, the wheel value is wrapped around when reaching min/max values
SoSFFloat wheelMax
max value for wheel
SoSFBool useManagedInteraction
If this is on, use managed interaction actions to modify x/y values.
SoSFTrigger wheelDown
tells when the wheel was turned down
SoSFBool shiftPressed
Output Fields that are changed when the state changes.
SoSFFloat xmax
max value for the x field
void GLRender(SoGLRenderAction *) override
GLRender dummy implementation.
SoSFBool swapXY
flip the mouse movement to xy mapping (mouse x -> field y, mouse y -> field x)
SoSFTrigger button2DoubleClicked
void onChanged(SoField *field)
Called when field on changed.
SoSFBool cursorPresent
this is set to true if the cursor is inside the viewing area
SoSFTrigger wheelUp
tells when the wheel was turned up
SoSFTrigger button1DoubleClicked
SoSFTrigger button3DoubleClicked
SoSFFloat y
y value that is changed by mouse movements
SoSFTrigger released
emitted when the mask was valid and switches to invalid again
SoSFFloat ymax
max value for the y field
SoSFFloat wheelMin
min value for wheel
SoSFBool maskValid
gives the state of the mask, which calculated by the current mousebuttons and modifier key compared t...
SoSFFloat sensitivity
set the sensitivity of the mouse movement to x/y mapping, a value of 1 means that 400 pixel mouse mov...
SoSFFloat x
x value that is changed by mouse movements
SoSFBool flipX
flip the mouse movement to x mapping
SoSFEnum button3
button mask for button3
friend class SoMouseGrabberPointingAction
SoSFFloat xmin
min value for the x field
SoSFFloat wheelStep
step value that is added/subtracted onto wheel on wheel events
SoSFEnum cursorShape
shape of mouse cursor when this grabber is active
~SoMouseGrabber() override
SoSFFloat ymin
min value for the y field
SoSFBool setWheelEventHandled
Set wheel events handled.
bool affectsState() const override
this node does not affect the state, so return false!
SoSFEnum shift
mask for shift key
SoSFEnum button1
button mask for button1
SoSFBool clamp
clamps the output to [min,max] in noramlized mode
Target mlrange_cast(Source arg)
Generic version of checked ML casts.