50#ifndef _SO_EVENT_CALLBACK_
51#define _SO_EVENT_CALLBACK_
53#include <Inventor/misc/SoCallbackList.h>
54#include <Inventor/SoPath.h>
55#include <Inventor/nodes/SoNode.h>
56#include <Inventor/actions/SoHandleEventAction.h>
321 void *userData = NULL);
329 template<
typename EventType>
340 void *userData = NULL);
348 template<
typename EventType>
371 {
return (eventAction != NULL ? eventAction->
getEvent() : NULL); }
389 {
return (eventAction != NULL ? eventAction->
getPickedPoint() : NULL);}
402 {
if (eventAction != NULL) eventAction->
setHandled(); }
409 {
return (eventAction != NULL) ? eventAction->
isHandled() : FALSE; }
417 {
if (eventAction != NULL) eventAction->
setGrabber(
this); }
431 static void initClass();
432 static void exitClass();
List of generic (void *) pointers.
Node which invokes callbacks for events.
void removeEventCallback(SoEventCallbackCB *f, void *userData=nullptr)
Removes a previously specified event callback .
SoHandleEventAction * getAction() const
Returns the SoHandleEventAction currently traversing this node, or NULL if traversal is not taking pl...
void SoEventCallbackCB(void *userData, SoEventCallback *node)
void removeEventCallback(SoType eventType, SoEventCallbackCB *f, void *userData=NULL)
Removes a previously specified event callback .
const SoEvent * getEvent() const
Returns the event currently being handled, or NULL if traversal is not taking place.
void releaseEvents()
Tells the event callback node to release the grab of events.
SoEventCallback()
Constructor creates an event callback node with no event interest and a NULL path.
const SoPath * getPath()
Gets the path which must be picked in order for the callbacks to be invoked.
void addEventCallback(SoEventCallbackCB *f, void *userData=nullptr)
Add an event callback .
void grabEvents()
Tells the event callback node to grab events.
SbBool isHandled() const
Returns whether the event has been handled.
void setHandled()
Tells the node the event was handled.
void addEventCallback(SoType eventType, SoEventCallbackCB *f, void *userData=NULL)
Add an event callback .
const SoPickedPoint * getPickedPoint() const
Returns pick information during SoHandleEventAction traversal, or NULL if traversal is not taking pla...
void setPath(SoPath *path)
Sets the path which must be picked in order for the callbacks to be invoked.
Base class for all events.
Allows nodes in a graph to receive input events.
void setHandled()
Sets whether any node has yet handled the event.
void setGrabber(SoNode *node)
Initiates grabbing of future events.
SbBool isHandled() const
Returns whether any node has yet handled the event.
const SoEvent * getEvent() const
Returns the event being handled.
const SoPickedPoint * getPickedPoint()
Returns the frontmost object hit (as an SoPickedPoint) by performing a pick based on the mouse locati...
void releaseGrabber()
Releases the grab.
Abstract base class for all database nodes.
Path that points to a list of hierarchical nodes.
Represents point on surface of picked object.
Stores runtime type information.