50#ifndef _SO_EVENT_CALLBACK_
51#define _SO_EVENT_CALLBACK_
323 void *userData = NULL);
331 template<
typename EventType>
342 void *userData = NULL);
350 template<
typename EventType>
373 {
return (eventAction != NULL ? eventAction->
getEvent() : NULL); }
391 {
return (eventAction != NULL ? eventAction->
getPickedPoint() : NULL);}
404 {
if (eventAction != NULL) eventAction->
setHandled(); }
411 {
return (eventAction != NULL) ? eventAction->
isHandled() :
FALSE; }
419 {
if (eventAction != NULL) eventAction->
setGrabber(
this); }
433 static void initClass();
434 static void exitClass();
#define FALSE
Possible value of SbBool.
void SoEventCallbackCB(void *userData, SoEventCallback *node)
#define SO_NODE_HEADER(className)
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 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.