Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SoHandleEventAction Class Reference

The SoHandleEventAction class distributes user events to the scene. More...

#include <Inventor/actions/SoHandleEventAction.h>

Inheritance diagram for SoHandleEventAction::

SoAction List of all members.

Public Methods

 SoHandleEventAction (const SbViewportRegion &viewportregion)
virtual ~SoHandleEventAction ()
void setViewportRegion (const SbViewportRegion &newregion)
const SbViewportRegiongetViewportRegion (void) const
void setEvent (const SoEvent *ev)
const SoEventgetEvent (void) const
void setHandled (void)
SbBool isHandled (void) const
void setGrabber (SoNode *node)
void releaseGrabber (void)
SoNodegetGrabber (void) const
void setPickRoot (SoNode *node)
SoNodegetPickRoot (void) const
void setPickRadius (const float radiusinpixels)
const SoPickedPointgetPickedPoint (void)
const SoPickedPointListgetPickedPointList (void)

Static Public Methods

void initClass (void)

Protected Methods

virtual void beginTraversal (SoNode *node)

Detailed Description

The SoHandleEventAction class distributes user events to the scene.

This is the action used by the GUI viewer classes to pass interaction events from the window system to the nodes in the scene graph.

SoHandleEventAction also provides the functionality for tracking the object currently under the cursor, and functionality for "grabbing" the event focus.

See also:
SoEvent


Constructor & Destructor Documentation

SoHandleEventAction::SoHandleEventAction const SbViewportRegion & viewportregion
 

Constructor.

SoHandleEventAction needs a viewportregion to pass on to the raypick action instance it uses for being able to track objects under the mouse cursor.

SoHandleEventAction::~SoHandleEventAction [virtual]
 

Destructor.


Member Function Documentation

void SoHandleEventAction::initClass void [static]
 

Initializes the run-time type system for this class, and sets up the enabled elements and action method list.

Reimplemented from SoAction.

void SoHandleEventAction::setViewportRegion const SbViewportRegion & newregion
 

Set a new viewport region, replacing the one passed in the constructor.

const SbViewportRegion & SoHandleEventAction::getViewportRegion void const
 

Returns the viewport region this action instance is using.

void SoHandleEventAction::setEvent const SoEvent * ev
 

Set the event to distribute to the nodes of the scene.

const SoEvent * SoHandleEventAction::getEvent void const
 

Returns the event this action is handling.

void SoHandleEventAction::setHandled void
 

Marks the action instance as handled, hence terminates the action.

The action is only marked as handled when a node in the graph "grabs" the event this action is carrying, so the handled flag will be FALSE after traversal if no nodes wanted the event.

See also:
isHandled()

SbBool SoHandleEventAction::isHandled void const
 

Returns whether or not the event has been handled by a node during scene graph traversal.

See also:
setHandled()

void SoHandleEventAction::setGrabber SoNode * node
 

Set a node pointer which will get all future events handled by this action until releaseGrabber() is called.

void SoHandleEventAction::releaseGrabber void
 

Don't send the events to a "grabber" node anymore, use the default behavior of the action and pass them along to the scene graph again.

See also:
setGrabber()

SoNode * SoHandleEventAction::getGrabber void const
 

Returns the grabber node, or NULL if no grabber is active.

void SoHandleEventAction::setPickRoot SoNode * node
 

Sets the root node that is used for the pick action tracking the cursor.

SoNode * SoHandleEventAction::getPickRoot void const
 

Returns the root node that is used by nodes that is tracking the cursor.

void SoHandleEventAction::setPickRadius const float radiusinpixels
 

Sets the pick radius for cursor tracking.

const SoPickedPoint * SoHandleEventAction::getPickedPoint void
 

Returns the SoPickedPoint information for the intersection point below the cursor.

const SoPickedPointList & SoHandleEventAction::getPickedPointList void
 

Returns a list of all intersection points below the mouse cursor.

void SoHandleEventAction::beginTraversal SoNode * node [protected, virtual]
 

This virtual method is called from SoAction::apply(), and is the entry point for the actual scenegraph traversal.

It can be overridden to initialize the action at traversal start, for specific initializations in the action subclasses inheriting SoAction.

Default method just calls traverse(), which any overridden implementation of the method must do too (or call SoAction::beginTraversal()) to trigger the scenegraph traversal.

Reimplemented from SoAction.


The documentation for this class was generated from the following files:
Generated at Tue Mar 5 03:31:25 2002 for Coin by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001