|
| virtual int | IsA (const char *type) |
| |
| vtkAbstractWidget * | NewInstance () const |
| |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| |
| virtual void | SetEnabled (int) |
| |
| virtual void | SetProcessEvents (int) |
| |
| virtual int | GetProcessEvents () |
| |
| virtual void | ProcessEventsOn () |
| |
| virtual void | ProcessEventsOff () |
| |
| vtkWidgetEventTranslator * | GetEventTranslator () |
| |
| virtual void | CreateDefaultRepresentation ()=0 |
| |
| void | Render () |
| |
| void | SetParent (vtkAbstractWidget *parent) |
| |
| virtual vtkAbstractWidget * | GetParent () |
| |
| vtkWidgetRepresentation * | GetRepresentation () |
| |
| virtual void | SetManagesCursor (int) |
| |
| virtual int | GetManagesCursor () |
| |
| virtual void | ManagesCursorOn () |
| |
| virtual void | ManagesCursorOff () |
| |
| virtual void | SetPriority (float) |
| |
| vtkInteractorObserver * | NewInstance () const |
| |
| void | PrintSelf (ostream &os, vtkIndent indent) |
| |
| int | GetEnabled () |
| |
| void | EnabledOn () |
| |
| void | EnabledOff () |
| |
| void | On () |
| |
| void | Off () |
| |
| virtual void | SetInteractor (vtkRenderWindowInteractor *iren) |
| |
| virtual vtkRenderWindowInteractor * | GetInteractor () |
| |
| virtual float | GetPriority () |
| |
| virtual void | PickingManagedOn () |
| |
| virtual void | PickingManagedOff () |
| |
| virtual void | SetPickingManaged (bool) |
| |
| virtual bool | GetPickingManaged () |
| |
| virtual void | SetKeyPressActivation (int) |
| |
| virtual int | GetKeyPressActivation () |
| |
| virtual void | KeyPressActivationOn () |
| |
| virtual void | KeyPressActivationOff () |
| |
| virtual void | SetKeyPressActivationValue (char) |
| |
| virtual char | GetKeyPressActivationValue () |
| |
| virtual vtkRenderer * | GetDefaultRenderer () |
| |
| virtual void | SetDefaultRenderer (vtkRenderer *) |
| |
| virtual vtkRenderer * | GetCurrentRenderer () |
| |
| virtual void | SetCurrentRenderer (vtkRenderer *) |
| |
| virtual void | OnChar () |
| |
| void | GrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
| |
| void | ReleaseFocus () |
| |
| 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 | PrintHeader (ostream &os, vtkIndent indent) |
| |
| virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
| |
| virtual void | Register (vtkObjectBase *o) |
| |
| virtual void | UnRegister (vtkObjectBase *o) |
| |
| int | GetReferenceCount () |
| |
| void | SetReferenceCount (int) |
| |
| void | PrintRevisions (ostream &) |
| |
define the API for widget / widget representation
The vtkAbstractWidget defines an API and implements methods common to all widgets using the interaction/representation design. In this design, the term interaction means that part of the widget that performs event handling, while the representation corresponds to a vtkProp (or the subclass vtkWidgetRepresentation) used to represent the widget. vtkAbstractWidget also implements some methods common to all subclasses.
Note that vtkAbstractWidget provides access to the vtkWidgetEventTranslator. This class is responsible for translating VTK events (defined in vtkCommand.h) into widget events (defined in vtkWidgetEvent.h). This class can be manipulated so that different VTK events can be mapped into widget events, thereby allowing the modification of event bindings. Each subclass of vtkAbstractWidget defines the events to which it responds.
- Warning
- Note that the pair ( vtkAbstractWidget / vtkWidgetRepresentation ) is an implementation of the second generation VTK Widgets design. In the first generation design, widgets were implemented in a single monolithic class. This design was problematic because in client-server application it was difficult to manage widgets properly. Also, new "representations" or look-and-feel, for a widget required a whole new class, with a lot of redundant code. 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).
- See also
- vtkWidgetRepresentation vtkWidgetEventTranslator vtkWidgetCallbackMapper
- Events:
- vtkCommand::DisableEvent vtkCommand::EnableEvent
Definition at line 65 of file vtkAbstractWidget.h.
| void vtkAbstractWidget::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
|
virtual |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkObject.
Reimplemented in vtkTextWidget, vtkTensorProbeWidget, vtkSplineWidget2, vtkSphereWidget2, vtkSliderWidget, vtkSeedWidget, vtkScalarBarWidget, vtkResliceCursorWidget, vtkRectilinearWipeWidget, vtkPolyLineWidget, vtkPlaybackWidget, vtkParallelopipedWidget, vtkLogoWidget, vtkLineWidget2, vtkImplicitPlaneWidget2, vtkHoverWidget, vtkHandleWidget, vtkDistanceWidget, vtkContourWidget, vtkContinuousValueWidget, vtkCheckerboardWidget, vtkCenteredSliderWidget, vtkCaptionWidget, vtkCameraWidget, vtkButtonWidget, vtkBoxWidget2, vtkBorderWidget, vtkBiDimensionalWidget, vtkBalloonWidget, vtkAxesTransformWidget, vtkAngleWidget, and vtkAffineWidget.
| virtual void vtkAbstractWidget::SetEnabled |
( |
int |
| ) |
|
|
virtual |
Methods for activating this widget. Note that the widget representation must be specified or the widget will not appear. ProcessEvents (On by default) must be On for Enabled widget to respond to interaction. If ProcessEvents is Off, enabling/disabling a widget merely affects the visibility of the representation.
Reimplemented from vtkInteractorObserver.
Reimplemented in vtkSeedWidget, vtkResliceCursorWidget, vtkParallelopipedWidget, vtkHoverWidget, vtkDistanceWidget, vtkContourWidget, vtkCheckerboardWidget, vtkBiDimensionalWidget, vtkBalloonWidget, vtkAngleWidget, vtkAffineWidget, vtkLineWidget2, vtkImplicitPlaneWidget2, vtkCaptionWidget, and vtkAxesTransformWidget.
| virtual void vtkAbstractWidget::CreateDefaultRepresentation |
( |
| ) |
|
|
pure virtual |
Create the default widget representation if one is not set. The representation defines the geometry of the widget (i.e., how it appears) as well as providing special methods for manipulting the state and appearance of the widget.
Implemented in vtkTextWidget, vtkTensorProbeWidget, vtkSplineWidget2, vtkSphereWidget2, vtkSliderWidget, vtkSeedWidget, vtkScalarBarWidget, vtkResliceCursorWidget, vtkRectilinearWipeWidget, vtkPolyLineWidget, vtkPlaybackWidget, vtkParallelopipedWidget, vtkLogoWidget, vtkLineWidget2, vtkImplicitPlaneWidget2, vtkHoverWidget, vtkHandleWidget, vtkDistanceWidget, vtkContourWidget, vtkCheckerboardWidget, vtkCenteredSliderWidget, vtkCaptionWidget, vtkCameraWidget, vtkButtonWidget, vtkBoxWidget2, vtkBorderWidget, vtkBiDimensionalWidget, vtkBalloonWidget, vtkAxesTransformWidget, vtkAngleWidget, vtkAffineWidget, and vtkCompassWidget.