abstract class defines interface between the widget and widget representation classes
More...
|
|
virtual void | PickingManagedOn () |
|
virtual void | PickingManagedOff () |
|
virtual void | SetPickingManaged (bool) |
|
virtual bool | GetPickingManaged () |
|
|
virtual void | SetRenderer (vtkRenderer *ren) |
|
virtual vtkRenderer * | GetRenderer () |
|
virtual void | BuildRepresentation ()=0 |
|
|
virtual void | PlaceWidget (double *vtkNotUsed(bounds[6])) |
|
virtual void | StartWidgetInteraction (double eventPos[2]) |
|
virtual void | WidgetInteraction (double newEventPos[2]) |
|
virtual void | EndWidgetInteraction (double newEventPos[2]) |
|
virtual int | ComputeInteractionState (int X, int Y, int modify=0) |
|
virtual int | GetInteractionState () |
|
virtual void | Highlight (int vtkNotUsed(highlightOn)) |
|
|
virtual void | SetPlaceFactor (double) |
|
virtual double | GetPlaceFactor () |
|
|
virtual void | SetHandleSize (double) |
|
virtual double | GetHandleSize () |
|
|
virtual int | GetNeedToRender () |
|
virtual void | SetNeedToRender (int) |
|
virtual void | NeedToRenderOn () |
|
virtual void | NeedToRenderOff () |
|
|
virtual double * | GetBounds () |
|
virtual void | ShallowCopy (vtkProp *prop) |
|
virtual void | GetActors (vtkPropCollection *) |
|
virtual void | GetActors2D (vtkPropCollection *) |
|
virtual void | GetVolumes (vtkPropCollection *) |
|
virtual void | ReleaseGraphicsResources (vtkWindow *) |
|
virtual int | RenderOverlay (vtkViewport *vtkNotUsed(viewport)) |
|
virtual int | RenderOpaqueGeometry (vtkViewport *vtkNotUsed(viewport)) |
|
virtual int | RenderTranslucentPolygonalGeometry (vtkViewport *vtkNotUsed(viewport)) |
|
virtual int | RenderVolumetricGeometry (vtkViewport *vtkNotUsed(viewport)) |
|
virtual int | HasTranslucentPolygonalGeometry () |
|
vtkProp * | NewInstance () const |
|
void | PrintSelf (ostream &os, vtkIndent indent) |
|
virtual void | Pick () |
|
virtual bool | HasKeys (vtkInformation *requiredKeys) |
|
virtual void | BuildPaths (vtkAssemblyPaths *paths, vtkAssemblyPath *path) |
|
virtual void | SetVisibility (int) |
|
virtual int | GetVisibility () |
|
virtual void | VisibilityOn () |
|
virtual void | VisibilityOff () |
|
virtual void | SetPickable (int) |
|
virtual int | GetPickable () |
|
virtual void | PickableOn () |
|
virtual void | PickableOff () |
|
virtual void | SetDragable (int) |
|
virtual int | GetDragable () |
|
virtual void | DragableOn () |
|
virtual void | DragableOff () |
|
virtual unsigned long | GetRedrawMTime () |
|
virtual void | SetUseBounds (bool) |
|
virtual bool | GetUseBounds () |
|
virtual void | UseBoundsOn () |
|
virtual void | UseBoundsOff () |
|
virtual void | InitPathTraversal () |
|
virtual vtkAssemblyPath * | GetNextPath () |
|
virtual int | GetNumberOfPaths () |
|
virtual void | PokeMatrix (vtkMatrix4x4 *vtkNotUsed(matrix)) |
|
virtual vtkMatrix4x4 * | GetMatrix () |
|
virtual vtkInformation * | GetPropertyKeys () |
|
virtual void | SetPropertyKeys (vtkInformation *keys) |
|
virtual int | RenderOpaqueGeometry (vtkViewport *) |
|
virtual int | RenderTranslucentPolygonalGeometry (vtkViewport *) |
|
virtual int | RenderVolumetricGeometry (vtkViewport *) |
|
virtual int | RenderOverlay (vtkViewport *) |
|
virtual bool | RenderFilteredOpaqueGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
|
virtual bool | RenderFilteredTranslucentPolygonalGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
|
virtual bool | RenderFilteredVolumetricGeometry (vtkViewport *v, vtkInformation *requiredKeys) |
|
virtual bool | RenderFilteredOverlay (vtkViewport *v, vtkInformation *requiredKeys) |
|
virtual double | GetEstimatedRenderTime (vtkViewport *) |
|
virtual double | GetEstimatedRenderTime () |
|
virtual void | SetEstimatedRenderTime (double t) |
|
virtual void | RestoreEstimatedRenderTime () |
|
virtual void | AddEstimatedRenderTime (double t, vtkViewport *vtkNotUsed(vp)) |
|
virtual void | SetAllocatedRenderTime (double t, vtkViewport *vtkNotUsed(v)) |
|
virtual double | GetAllocatedRenderTime () |
|
void | SetRenderTimeMultiplier (double t) |
|
virtual double | GetRenderTimeMultiplier () |
|
virtual bool | GetSupportsSelection () |
|
virtual int | GetNumberOfConsumers () |
|
void | AddConsumer (vtkObject *c) |
|
void | RemoveConsumer (vtkObject *c) |
|
vtkObject * | GetConsumer (int i) |
|
int | IsConsumer (vtkObject *c) |
|
vtkObject * | NewInstance () const |
|
virtual void | DebugOn () |
|
virtual void | DebugOff () |
|
bool | GetDebug () |
|
void | SetDebug (bool debugFlag) |
|
virtual void | Modified () |
|
virtual unsigned long | GetMTime () |
|
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
|
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
|
vtkCommand * | GetCommand (unsigned long tag) |
|
void | RemoveObserver (vtkCommand *) |
|
void | RemoveObservers (unsigned long event, vtkCommand *) |
|
void | RemoveObservers (const char *event, vtkCommand *) |
|
int | HasObserver (unsigned long event, vtkCommand *) |
|
int | HasObserver (const char *event, vtkCommand *) |
|
void | RemoveObserver (unsigned long tag) |
|
void | RemoveObservers (unsigned long event) |
|
void | RemoveObservers (const char *event) |
|
void | RemoveAllObservers () |
|
int | HasObserver (unsigned long event) |
|
int | HasObserver (const char *event) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
|
int | InvokeEvent (unsigned long event, void *callData) |
|
int | InvokeEvent (const char *event, void *callData) |
|
int | InvokeEvent (unsigned long event) |
|
int | InvokeEvent (const char *event) |
|
const char * | GetClassName () const |
|
virtual void | Delete () |
|
virtual void | FastDelete () |
|
void | Print (ostream &os) |
|
virtual void | Register (vtkObjectBase *o) |
|
virtual void | UnRegister (vtkObjectBase *o) |
|
void | SetReferenceCount (int) |
|
void | PrintRevisions (ostream &) |
|
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
|
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
|
int | GetReferenceCount () |
|
abstract class defines interface between the widget and widget representation classes
This class is used to define the API for, and partially implement, a representation for different types of widgets. Note that the widget representation (i.e., subclasses of vtkWidgetRepresentation) are a type of vtkProp; meaning that they can be associated with a vtkRenderer end embedded in a scene like any other vtkActor. However, vtkWidgetRepresentation also defines an API that enables it to be paired with a subclass vtkAbstractWidget, meaning that it can be driven by a widget, serving to represent the widget as the widget responds to registered events.
The API defined here should be regarded as a guideline for implementing widgets and widget representations. Widget behavior is complex, as is the way the representation responds to the registered widget events, so the API may vary from widget to widget to reflect this complexity.
- Warning
- The separation of the widget event handling and representation enables users and developers to create new appearances for the widget. It also facilitates parallel processing, where the client application handles events, and remote representations of the widget are slaves to the client (and do not handle events).
Definition at line 53 of file vtkWidgetRepresentation.h.
virtual void vtkWidgetRepresentation::SetRenderer |
( |
vtkRenderer * |
ren | ) |
|
|
virtual |
virtual void vtkWidgetRepresentation::BuildRepresentation |
( |
| ) |
|
|
pure virtual |
Subclasses of vtkWidgetRepresentation must implement these methods. This is considered the minimum API for a widget representation.
SetRenderer() - the renderer in which the representations draws
itself. Typically the renderer is set by the associated widget. Use
the widget's SetCurrentRenderer() method in most cases; otherwise
there is a risk of inconsistent behavior as events and drawing may be
performed in different viewports. BuildRepresentation() - update the
geometry of the widget based on its current state.
WARNING: The renderer is NOT reference counted by the representation, in order to avoid reference loops. Be sure that the representation lifetime does not extend beyond the renderer lifetime.
Implemented in vtkContourRepresentation, vtkSphereRepresentation, vtkImplicitPlaneRepresentation, vtkImplicitCylinderRepresentation, vtkBorderRepresentation, vtkBalloonRepresentation, vtkCurveRepresentation, vtkConstrainedPointHandleRepresentation, vtkPointHandleRepresentation3D, vtkBoxRepresentation, vtkLineRepresentation, vtkAffineRepresentation2D, vtkParallelopipedRepresentation, vtkDistanceRepresentation, vtkSliderRepresentation3D, vtkTexturedButtonRepresentation, vtkAngleRepresentation, vtkDistanceRepresentation3D, vtkSliderRepresentation2D, vtkAxesTransformRepresentation, vtkCenteredSliderRepresentation, vtkSeedRepresentation, vtkResliceCursorRepresentation, vtkTexturedButtonRepresentation2D, vtkCheckerboardRepresentation, vtkCompassRepresentation, vtkCameraRepresentation, vtkSphereHandleRepresentation, vtkSplineRepresentation, vtkAngleRepresentation3D, vtkRectilinearWipeRepresentation, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkOrientedGlyphContourRepresentation, vtkBiDimensionalRepresentation2D, vtkDistanceRepresentation2D, vtkAbstractPolygonalHandleRepresentation3D, vtkCaptionRepresentation, vtkProp3DButtonRepresentation, vtkAngleRepresentation2D, vtkPointHandleRepresentation2D, vtkFixedSizeHandleRepresentation3D, vtkPlaybackRepresentation, vtkLogoRepresentation, vtkPolyLineRepresentation, vtkScalarBarRepresentation, vtkTextRepresentation, vtkResliceCursorLineRepresentation, vtkXYPlotRepresentation, vtkTensorProbeRepresentation, vtkContinuousValueWidgetRepresentation, and vtkEllipsoidTensorProbeRepresentation.
virtual void vtkWidgetRepresentation::PlaceWidget |
( |
double * |
vtkNotUsedbounds[6] | ) |
|
|
inlinevirtual |
The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.
PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected.
Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.
Definition at line 114 of file vtkWidgetRepresentation.h.
virtual void vtkWidgetRepresentation::StartWidgetInteraction |
( |
double |
eventPos[2] | ) |
|
|
inlinevirtual |
The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.
PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected.
Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.
Reimplemented in vtkContourRepresentation, vtkSphereRepresentation, vtkImplicitPlaneRepresentation, vtkImplicitCylinderRepresentation, vtkBorderRepresentation, vtkCurveRepresentation, vtkConstrainedPointHandleRepresentation, vtkBalloonRepresentation, vtkPointHandleRepresentation3D, vtkBoxRepresentation, vtkLineRepresentation, vtkDistanceRepresentation, vtkAffineRepresentation2D, vtkSliderRepresentation3D, vtkAngleRepresentation, vtkSliderRepresentation2D, vtkAxesTransformRepresentation, vtkCenteredSliderRepresentation, vtkCompassRepresentation, vtkSphereHandleRepresentation, vtkRectilinearWipeRepresentation, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkOrientedGlyphContourRepresentation, vtkAbstractPolygonalHandleRepresentation3D, vtkPointHandleRepresentation2D, vtkResliceCursorLineRepresentation, and vtkContinuousValueWidgetRepresentation.
Definition at line 115 of file vtkWidgetRepresentation.h.
virtual void vtkWidgetRepresentation::WidgetInteraction |
( |
double |
newEventPos[2] | ) |
|
|
inlinevirtual |
The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.
PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected.
Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.
Reimplemented in vtkContourRepresentation, vtkSphereRepresentation, vtkImplicitPlaneRepresentation, vtkImplicitCylinderRepresentation, vtkBorderRepresentation, vtkCurveRepresentation, vtkConstrainedPointHandleRepresentation, vtkPointHandleRepresentation3D, vtkBoxRepresentation, vtkLineRepresentation, vtkDistanceRepresentation, vtkAffineRepresentation2D, vtkSliderRepresentation3D, vtkAngleRepresentation, vtkSliderRepresentation2D, vtkAxesTransformRepresentation, vtkCenteredSliderRepresentation, vtkCompassRepresentation, vtkSphereHandleRepresentation, vtkRectilinearWipeRepresentation, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkBiDimensionalRepresentation2D, vtkOrientedGlyphContourRepresentation, vtkAbstractPolygonalHandleRepresentation3D, vtkPointHandleRepresentation2D, vtkScalarBarRepresentation, vtkResliceCursorLineRepresentation, vtkXYPlotRepresentation, and vtkContinuousValueWidgetRepresentation.
Definition at line 116 of file vtkWidgetRepresentation.h.
virtual void vtkWidgetRepresentation::EndWidgetInteraction |
( |
double |
newEventPos[2] | ) |
|
|
inlinevirtual |
The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.
PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected.
Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.
Reimplemented in vtkImplicitPlaneRepresentation, vtkImplicitCylinderRepresentation, vtkCurveRepresentation, vtkBalloonRepresentation, and vtkAffineRepresentation2D.
Definition at line 117 of file vtkWidgetRepresentation.h.
virtual int vtkWidgetRepresentation::ComputeInteractionState |
( |
int |
X, |
|
|
int |
Y, |
|
|
int |
modify = 0 |
|
) |
| |
|
virtual |
The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.
PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected.
Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.
Reimplemented in vtkContourRepresentation, vtkSphereRepresentation, vtkImplicitPlaneRepresentation, vtkImplicitCylinderRepresentation, vtkBorderRepresentation, vtkBalloonRepresentation, vtkConstrainedPointHandleRepresentation, vtkCurveRepresentation, vtkPointHandleRepresentation3D, vtkBoxRepresentation, vtkLineRepresentation, vtkParallelopipedRepresentation, vtkAffineRepresentation2D, vtkDistanceRepresentation, vtkTexturedButtonRepresentation, vtkAngleRepresentation, vtkAxesTransformRepresentation, vtkCenteredSliderRepresentation, vtkSeedRepresentation, vtkCompassRepresentation, vtkSphereHandleRepresentation, vtkTexturedButtonRepresentation2D, vtkRectilinearWipeRepresentation, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkOrientedGlyphContourRepresentation, vtkAbstractPolygonalHandleRepresentation3D, vtkBiDimensionalRepresentation2D, vtkPointHandleRepresentation2D, vtkProp3DButtonRepresentation, and vtkResliceCursorLineRepresentation.
virtual int vtkWidgetRepresentation::GetInteractionState |
( |
| ) |
|
|
inlinevirtual |
The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.
PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected.
Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.
Definition at line 119 of file vtkWidgetRepresentation.h.
virtual void vtkWidgetRepresentation::Highlight |
( |
int |
vtkNotUsedhighlightOn | ) |
|
|
inlinevirtual |
The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.
PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected.
Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.
Definition at line 121 of file vtkWidgetRepresentation.h.