Sensor class that can be attached to Open Inventor base lists. More...
#include <Inventor/sensors/SoListSensor.h>
Public Types | |
enum | ChangeType { UNSPECIFIED , APPEND , INSERT , SET , REMOVE , TRUNCATE , COPY , TOUCH } |
Change type. More... | |
Public Types inherited from SoSensor | |
typedef void | SoSensorCB(void *data, SoSensor *sensor) |
This typedef defines the calling sequence for all callbacks from sensors. | |
Public Member Functions | |
SoListSensor () | |
Constructor. | |
SoListSensor (SoSensorCB *func, void *data) | |
Constructor that takes standard callback function and data. | |
virtual | ~SoListSensor () |
Destructor. | |
void | attach (SoBaseList *list) |
Makes this sensor detect changes to the given list. | |
void | detach () |
Unschedules this sensor (if it is scheduled) and makes it ignore changes to the list. | |
SoBaseList * | getAttachedList () const |
Returns the list that this sensor is sensing, or NULL if it is not attached to any list. | |
void | setDeleteCallback (SoSensorCB *f, void *data=NULL) |
Sets a callback that will be called when the object the sensor is sensing is deleted. | |
ChangeType | getTriggerType () const |
Returns the type of change that occurred. | |
int | getTriggerIndex () const |
Returns the index of the item that was added, removed, inserted, set, ... | |
Public Member Functions inherited from SoSensor | |
SoSensor () | |
Constructor. | |
SoSensor (SoSensorCB *f, void *d) | |
Constructor that takes standard callback function and data. | |
void | setFunction (SoSensorCB *f, void *userData) |
void | setFunction (SoSensorCB *f) |
Sets the callback function that is called when the sensor is triggered. | |
void | setData (void *d) |
Sets the callback data passed to the callback function. | |
SoSensorCB * | getFunction () const |
Returns the callback that will be called when the sensor is triggered. | |
void * | getData () const |
Returns the user-supplied pointer that will be passed to the callback function. | |
virtual SbBool | isScheduled () const |
Returns TRUE if this sensor has been scheduled and is waiting in a sensor queue to be triggered. | |
Sensor class that can be attached to Open Inventor base lists.
List sensors detect changes to SoBaseList derived lists (field list, engine list, ...) and trigger their callback when the list changes.
List sensors provide a delete callback that is called just before the list the list sensor is attached to is deleted; note that the callback should not attempt to modify the list in any way, or core dumps may result.
List sensors also provide methods that can be called in the callback to determine exactly which item of the list caused the sensor to be triggered.
Definition at line 57 of file SoListSensor.h.
Change type.
Definition at line 61 of file SoListSensor.h.
SoListSensor::SoListSensor | ( | ) |
Constructor.
SoListSensor::SoListSensor | ( | SoSensorCB * | func, |
void * | data | ||
) |
Constructor that takes standard callback function and data.
|
virtual |
Destructor.
void SoListSensor::attach | ( | SoBaseList * | list | ) |
Makes this sensor detect changes to the given list.
void SoListSensor::detach | ( | ) |
Unschedules this sensor (if it is scheduled) and makes it ignore changes to the list.
|
inline |
Returns the list that this sensor is sensing, or NULL if it is not attached to any list.
Definition at line 111 of file SoListSensor.h.
int SoListSensor::getTriggerIndex | ( | ) | const |
Returns the index of the item that was added, removed, inserted, set, ...
ChangeType SoListSensor::getTriggerType | ( | ) | const |
Returns the type of change that occurred.
|
inline |
Sets a callback that will be called when the object the sensor is sensing is deleted.
Definition at line 118 of file SoListSensor.h.