56#ifndef _SO_EVENT_CALLBACK_
57#define _SO_EVENT_CALLBACK_
131 void *userData = NULL);
135 void *userData = NULL);
152 {
return (eventAction != NULL ? eventAction->getEvent() : NULL); }
158 {
return (eventAction != NULL ? eventAction->getPickedPoint() : NULL);}
170 {
if (eventAction != NULL) eventAction->setHandled(); }
175 {
return (eventAction != NULL) ? eventAction->isHandled() :
FALSE; }
182 {
if (eventAction != NULL) eventAction->setGrabber(
this); }
187 {
if (eventAction != NULL) eventAction->releaseGrabber(); }
213 void invokeCallbacks(
const SoEvent *e);
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
void INVENTOR_API SoEventCallbackCB(void *userData, SoEventCallback *node)
callback function prototypes
#define SO_NODE_HEADER(className)
Non-abstract classes have everything abstract classes have, plus a way to create an instance.
List of generic (void *) pointers.
Node which invokes callbacks for events.
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 the given callback function.
const SoEvent * getEvent() const
Returns the event currently being handled, or NULL if traversal is not taking place.
bool isHandled() const
Returns whether the event has been handled.
void releaseEvents()
Release the grabbing of events.
SoEventCallback()
Constructor creates an event callback node with no event interest and a NULL path.
virtual ~SoEventCallback()
Destructor - protected since ref/unref is what should destroy this.
const SoPath * getPath()
Set and get the path which must be picked in order for the callbacks to be invoked.
static void initClass()
initialize the class
void grabEvents()
Tells the event callback node to grab events or release the grab.
virtual void handleEvent(SoHandleEventAction *ha)
This will be called during handleEventAction traversal.
void setHandled()
Tells the node the event was handled.
void addEventCallback(SoType eventType, SoEventCallbackCB *f, void *userData=NULL)
Specifies the callback functions to be invoked for different event types.
const SoPickedPoint * getPickedPoint() const
Returns pick information during SoHandleEventAction traversal, or NULL if traversal is not taking pla...
void setPath(SoPath *path)
Base class for all events.
Allows nodes in a graph to receive input events.
Abstract base class for all database nodes.
Path that points to a list of hierarchical nodes.
Represents point on surface of picked object.
SoType has no virtual functions to keep it small...