SOEVENTCALLBACK(3iv)
π SoEventCallback β the manual page, but make it cute
okay so bestie, you found the SoEventCallback(3IV) page and honestly? it's a bop. this is the node which invokes callbacks for events. that's it, that's the whole vibe. let's get into it π
πΈ INHERITS FROM
SoBase > SoFieldContainer > SoNode > SoEventCallback
yes she's got a whole ancestry, a whole lineage, main character energy all the way down π«Ά
β¨ SYNOPSIS
#include <Inventor/nodes/SoEventCallback.h>
typedef void SoEventCallbackCB(void *userData, SoEventCallback
*node)
π Methods from class SoEventCallback:
static SoType getClassTypeId()
SoEventCallback()
void setPath(SoPath *path)
const SoPath * getPath()
void addEventCallback(SoType eventType,
SoEventCallbackCB *f, void *userData = NULL)
void removeEventCallback(SoType eventType,
SoEventCallbackCB *f, void *userData = NULL)
SoHandleEventAction * getAction() const
const SoEvent * getEvent() const
const SoPickedPoint * getPickedPoint() const
void setHandled()
SbBool isHandled() const
void grabEvents()
void releaseEvents()
π¦ Methods from class SoNode:
void setOverride(SbBool state)
SbBool isOverride() const
SoNode * copy(SbBool copyConnections = FALSE) const
virtual SbBool affectsState() const
static SoNode * getByName(const SbName &name)
static int getByName(const SbName &name, SoNodeList &list)
π Methods from class SoFieldContainer:
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool
copyConnections = FALSE)
SbBool set(const char *fieldDataString)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName)
const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
π Methods from class SoBase:
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SbType type) const
virtual void setName(const SbName &name)
virtual SbName getName() const
π DESCRIPTION
okay so here's the tea: SoEventCallback will invoke application supplied callback functions during SoHandleEventAction traversal. that's the whole point of her existence, she's literally just out here serving callbacks β¨
the methods let your application specify which Inventor events should trigger callbacks, and which path must be picked, if any, for the callback invocation to happen at all. no pick, no callback, no crumbs.
and then the application callback gets to be nosy in the best way β it can get info about the event and the pick detail, and it may grabEvents(), releaseEvents(), and set whether the event was handled. very hands-on, very girlboss π
β οΈ important bestie, listen up: if you register more than one callback function in an SoEventCallback node, all the callback functions will be invoked when an event occurs, even if one of the callbacks handles the event. like, they're all getting their moment, no one's getting cut off. however, if the event is handled by any of the callback functions, no other node in the scene graph will see the event. so it's giving "we all ate, but the rest of the graph is on a diet" π
π§ METHODS
static SoType getClassTypeId()β returns the type id for theSoEventCallbackclass. her little ID card, iconic.SoEventCallback()β constructor creates an event callback node with no event interest and a NULL path. she's born with zero opinions, a blank slate, we love a fresh start πvoid setPath(SoPath *path)/const SoPath * getPath()β set and get the path which must be picked in order for the callbacks to be invoked. if the path isNULL, the callbacks will be invoked for every interesting event, as specified byaddEventCallback(), regardless of what is picked. also,setPath()makes its own copy of the passed path β she doesn't borrow, she owns, periodt πvoid addEventCallback(SoType eventType, SoEventCallbackCB *f, void *userData = NULL)/void removeEventCallback(SoType eventType, SoEventCallbackCB *f, void *userData = NULL)β specifies the callback functions to be invoked for different event types. when invoked, the callback function will be passed theuserData, along with a pointer to thisSoEventCallbacknode. for example, passingSoMouseButtonEvent::getClassTypeId()means callbacks will be invoked only when a mouse button is pressed or released. passingSoEvent::getClassTypeId()for theeventTypewill cause the callback to be invoked for every event which passes through this event callback node. literally the "i want all of it" option π₯SoHandleEventAction * getAction() constβ returns theSoHandleEventActioncurrently traversing this node, orNULLif traversal is not taking place. should be called only from callback functions. read that again bestie, only from callbacks πconst SoEvent * getEvent() constβ returns the event currently being handled, orNULLif traversal is not taking place. should be called only from callback functions.const SoPickedPoint * getPickedPoint() constβ returns pick information duringSoHandleEventActiontraversal, orNULLif traversal is not taking place. should be called only from callback functions.void setHandled()β tells the node the event was handled. the callback function is the one responsible for setting whether the event was handled or not. if there is more than one callback function registered with anSoEventCallbacknode, all of them will be invoked, regardless of whether one has handled the event or not. should be called only from callback functions.SbBool isHandled() constβ returns whether the event has been handled. should be called only from callback functions.void grabEvents()/void releaseEvents()β tells the event callback node to grab events or release the grab. while grabbing, the node will consume all events; however, each callback function will only be invoked for events of interest. so she's eating everything at the table but only chewing on the ones she ordered π
β FILE FORMAT/DEFAULTS
EventCallback {
}
look at her. empty. unbothered. a default queen π
π SEE ALSO
SoInteractionSoSelectionSoHandleEventActionSoDragger
and that's the page bestie!! you made it to the end, so proud π₯Ή this was brought to you by the one and only SoEventCallback(3IV)() manual page β and ngl the date slot on it is justβ¦ empty, no date, mysterious, we don't know when, we just know it's her. ππ ily, go write some callbacks π«Άβ¨
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms