SoMouseButtonEvent Class Reference
[Events]

Mouse button press and release events. More...

#include <Inventor/events/SoMouseButtonEvent.h>

Inheritance diagram for SoMouseButtonEvent:
SoButtonEvent SoEvent SoTypedObject

List of all members.

Public Types

enum  Button {
  ANY = 0,
  BUTTON1 = 1,
  BUTTON2 = 2,
  BUTTON3 = 3
}

Public Member Functions

virtual SoType getTypeId () const
 SoMouseButtonEvent ()
void setButton (SoMouseButtonEvent::Button b)
SoMouseButtonEvent::Button getButton () const

Static Public Member Functions

static SoType getClassTypeId ()
static SbBool isButtonPressEvent (const SoEvent *e, SoMouseButtonEvent::Button whichButton)
static SbBool isButtonDoubleClickEvent (const SoEvent *e, SoMouseButtonEvent::Button whichButton)
static SbBool isButtonReleaseEvent (const SoEvent *e, SoMouseButtonEvent::Button whichButton)

Detailed Description

Mouse button press and release events.

SoMouseButtonEvent represents mouse button press and release events in the Open Inventor event model.

Some convenience macros for determining if an event matches

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

See related examples:

MedicalVolumePickingGpu


Member Enumeration Documentation

Button.

Enumerator:
ANY 

Any button.

BUTTON1 

First mouse button.

BUTTON2 

Second mouse button.

BUTTON3 

Third mouse button.


Constructor & Destructor Documentation

SoMouseButtonEvent::SoMouseButtonEvent (  ) 

Constructor.


Member Function Documentation

SoMouseButtonEvent::Button SoMouseButtonEvent::getButton (  )  const [inline]

Gets which mouse button generated the event.

static SoType SoMouseButtonEvent::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoButtonEvent.

virtual SoType SoMouseButtonEvent::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoButtonEvent.

static SbBool SoMouseButtonEvent::isButtonDoubleClickEvent ( const SoEvent e,
SoMouseButtonEvent::Button  whichButton 
) [static]

Returns whether the passed event is a mouse button double click event of the passed button.

When SoMouseButtonEvent::ANY is passed, this returns TRUE if the event represents a double click of any mouse button.

static SbBool SoMouseButtonEvent::isButtonPressEvent ( const SoEvent e,
SoMouseButtonEvent::Button  whichButton 
) [static]

Returns whether the passed event is a mouse button press event of the passed button.

When SoMouseButtonEvent::ANY is passed, this returns TRUE if the event represents a button press of any mouse button.

static SbBool SoMouseButtonEvent::isButtonReleaseEvent ( const SoEvent e,
SoMouseButtonEvent::Button  whichButton 
) [static]

Returns whether the passed event is a mouse button release event of the passed button.

When SoMouseButtonEvent::ANY is passed, this returns TRUE if the event represents a button release of any mouse button.

void SoMouseButtonEvent::setButton ( SoMouseButtonEvent::Button  b  )  [inline]

Sets which mouse button generated the event.


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

Open Inventor Toolkit reference manual, generated on 4 Sep 2023
Copyright © Thermo Fisher Scientific All rights reserved.
https://www.openinventor.com/