Class vtkMRMLLayerDMObjectEventObserver
Defined in File vtkMRMLLayerDMObjectEventObserver.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public vtkObject
Derived Type
public vtkMRMLLayerDMObjectEventObserverScripted(Class vtkMRMLLayerDMObjectEventObserverScripted)
Class Documentation
-
class vtkMRMLLayerDMObjectEventObserver : public vtkObject
Inheritance diagram for vtkMRMLLayerDMObjectEventObserver:
Collaboration diagram for vtkMRMLLayerDMObjectEventObserver:
VTK object observer with one callback endpoint when an event is triggered. Can observe multiple objects and multiple events per object.
Depending on the callback used, event id and call data can either be forwarded or ignored.
Subclassed by vtkMRMLLayerDMObjectEventObserverScripted
Unnamed Group
-
bool UpdateObserver(vtkObject *prevObj, vtkObject *obj, unsigned long event = vtkCommand::ModifiedEvent)
Remove previous monitored events from
See also
Warning
prevObj is not mutated by this call. To update the pointer, a manual set is required after update.
- Parameters:
prevObj – and observe events from the
obj – If both obj are the same, does nothing. On event triggered, calls the update set by
-
bool UpdateObserver(vtkObject *prevObj, vtkObject *obj, const std::vector<unsigned long> &events)
Unnamed Group
-
void SetUpdateCallback(const std::function<void(vtkObject *node)> &callback)
Set the callback triggered when one of the observed objects and event is invoked.
-
void SetUpdateCallback(const std::function<void(vtkObject *node, unsigned long eventId)> &callback)
-
void SetUpdateCallback(const std::function<void(vtkObject *node, unsigned long eventId, void *callData)> &callback)
Public Functions
-
vtkTypeMacro(vtkMRMLLayerDMObjectEventObserver, vtkObject)
-
void RemoveObserver(vtkObject *obj)
Remove observers attached to the input object. Use
See also
UpdateObserver to update the observed events for a new object (RemoveObserver is then called automatically).
-
bool SetBlocked(bool isBlocked)
Set update callback blocked.
- Returns:
previous blocked state.
Public Static Functions
-
static vtkMRMLLayerDMObjectEventObserver *New()
Protected Functions
-
vtkMRMLLayerDMObjectEventObserver()
-
~vtkMRMLLayerDMObjectEventObserver() override
-
struct UpdateGuard
Helper update guard. Blocks update during struct lifetime for the given input observer.
-
bool UpdateObserver(vtkObject *prevObj, vtkObject *obj, unsigned long event = vtkCommand::ModifiedEvent)