#include <vtkCommand.h>
Inheritance diagram for vtkCommand:
vtkCommand is an implementation of the observer/command design pattern. In this design pattern, any instance of vtkObject can be "observered" for any events it might invoke. For example, vtkRenderer invokes a StartEvent as it begins to render and a EndEvent when it finishes rendering. Filters (subclasses of vtkProcessObject) invoke StartEvent, ProgressEvent, and EndEvent as the filter processes data. Observers of events are added with the AddObserver() method found in vtkObject. AddObserver(), besides requiring an event id or name, also takes an instance of vtkCommand (or a subclasses). Note that vtkCommand is meant to be subclassed, so that you can package the information necessary to support your callback.
Event processing can be organized in priority lists, so it is possible to truncate the processing of a particular event by setting the AbortFlag variable. The priority is set using the AddObserver() method. By default the priority is 0, events of the same priority are processed in last-in-first-processed order. The ordering/aborting of events is important for things like 3D widgets, which handle an event if the widget is selected (and then aborting further processing of that event). Otherwise. the event is passed along for further processing.
Definition at line 69 of file vtkCommand.h.
|
All the currently defined events are listed here. Developers can use -- vtkCommand::UserEvent + int to specify their own event ids. If this list is adjusted, be sure to adjust vtkCommandEventStrings in vtkCommand.cxx to match.
Definition at line 121 of file vtkCommand.h. |
|
|
|
Definition at line 180 of file vtkCommand.h. |
|
Definition at line 184 of file vtkCommand.h. |
|
Decrease the reference count (release by another object). This has the same effect as invoking Delete() (i.e., it reduces the reference count by 1). |
|
Decrease the reference count (release by another object). This has the same effect as invoking Delete() (i.e., it reduces the reference count by 1). Reimplemented from vtkObjectBase. Definition at line 77 of file vtkCommand.h. References vtkObjectBase::UnRegister(). |
|
All derived classes of vtkCommand must implement this method. This is the method that actually does the work of the callback. The caller argument is the object invoking the event, the eventId parameter is the id of the event, and callData parameter is data that can be passed into the execute method. (Note: vtkObject::InvokeEvent() takes two parameters: the event id (or name) and call data. Typically call data is NULL, but the user can package data and pass it this way. Alternatively, a derived class of vtkCommand can be used to pass data.) Implemented in vtkCallbackCommand, and vtkOldStyleCallbackCommand. |
|
Convenience methods for translating between event names and event ids. |
|
Convenience methods for translating between event names and event ids. |
|
Set/Get the abort flag. If this is set to true no further commands are executed. Definition at line 105 of file vtkCommand.h. |
|
Set/Get the abort flag. If this is set to true no further commands are executed. Definition at line 107 of file vtkCommand.h. |
|
Set/Get the abort flag. If this is set to true no further commands are executed. Definition at line 109 of file vtkCommand.h. |
|
Set/Get the abort flag. If this is set to true no further commands are executed. Definition at line 111 of file vtkCommand.h. |
|
Definition at line 185 of file vtkCommand.h. |
|
Definition at line 178 of file vtkCommand.h. |