public class SoMouseButtonEvent extends SoButtonEvent
SoMouseButtonEvent
represents mouse button press and release events in the Open Inventor event model.
Mouse event can only have one state: Press, Release or DoubleClick.
Mouse move events are represented by an SoLocation2Event
.
Add an SoEventCallback
node to the scene graph to handle Open Inventor events.
See also:
SoEvent
, SoButtonEvent
, SoKeyboardEvent
, SoLocation2Event
, SoMotion3Event
, SoSpaceballButtonEvent
, SoHandleEventAction
, SoEventCallback
, SoSelection
, SoInteraction, SoWinDevice
Modifier and Type | Class and Description |
---|---|
static class |
SoMouseButtonEvent.Buttons
Button.
|
SoButtonEvent.States
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
static int |
ANY
Deprecated.
Use
SoMouseButtonEvent.Buttons.ANY instead. |
static int |
BUTTON1
Deprecated.
Use
SoMouseButtonEvent.Buttons.BUTTON1 instead. |
static int |
BUTTON2
Deprecated.
Use
SoMouseButtonEvent.Buttons.BUTTON2 instead. |
static int |
BUTTON3
Deprecated.
Use
SoMouseButtonEvent.Buttons.BUTTON3 instead. |
DBCLK, DOWN, UNKNOWN, UP
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoMouseButtonEvent()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SoMouseButtonEvent.Buttons |
getButton()
Gets which mouse button generated the event.
|
static boolean |
isButtonDoubleClickEvent(SoEvent e,
SoMouseButtonEvent.Buttons whichButton)
Returns whether the passed event is a mouse button double click event of the passed button.
|
static boolean |
isButtonPressEvent(SoEvent e,
SoMouseButtonEvent.Buttons whichButton)
Returns whether the passed event is a mouse button press event of the passed button.
|
static boolean |
isButtonReleaseEvent(SoEvent e,
SoMouseButtonEvent.Buttons whichButton)
Returns whether the passed event is a mouse button release event of the passed button.
|
void |
setButton(SoMouseButtonEvent.Buttons b)
Sets which mouse button generated the event.
|
getState, setState
getNormalizedPosition, getPosition, getPosition, getPositionFloat, getPositionFloat, getTime, setAltDown, setButton1Down, setCtrlDown, setPosition, setPosition, setShiftDown, setTime, wasAltDown, wasButton1Down, wasCtrlDown, wasShiftDown
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
@Deprecated public static final int ANY
SoMouseButtonEvent.Buttons.ANY
instead.@Deprecated public static final int BUTTON1
SoMouseButtonEvent.Buttons.BUTTON1
instead.@Deprecated public static final int BUTTON2
SoMouseButtonEvent.Buttons.BUTTON2
instead.@Deprecated public static final int BUTTON3
SoMouseButtonEvent.Buttons.BUTTON3
instead.public static boolean isButtonDoubleClickEvent(SoEvent e, SoMouseButtonEvent.Buttons whichButton)
SoMouseButtonEvent.ANY
is passed, this returns true if the event represents a double click of any mouse button.public static boolean isButtonReleaseEvent(SoEvent e, SoMouseButtonEvent.Buttons whichButton)
SoMouseButtonEvent.ANY
is passed, this returns true if the event represents a button release of any mouse button.public void setButton(SoMouseButtonEvent.Buttons b)
public SoMouseButtonEvent.Buttons getButton()
public static boolean isButtonPressEvent(SoEvent e, SoMouseButtonEvent.Buttons whichButton)
SoMouseButtonEvent.ANY
is passed, this returns true if the event represents a button press of any mouse button.Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com