VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
vtkHandleWidget Class Reference

a general widget for moving handles More...

#include <vtkHandleWidget.h>

Inheritance diagram for vtkHandleWidget:
[legend]
Collaboration diagram for vtkHandleWidget:
[legend]

Public Types

enum  _WidgetState { Start = 0, Active }
- Public Types inherited from vtkAbstractWidget
typedef vtkInteractorObserver Superclass

Public Member Functions

void CreateDefaultRepresentation ()
void SetRepresentation (vtkHandleRepresentation *r)
vtkHandleRepresentationGetHandleRepresentation ()
virtual void SetEnableAxisConstraint (int)
virtual int GetEnableAxisConstraint ()
virtual void EnableAxisConstraintOn ()
virtual void EnableAxisConstraintOff ()
virtual void SetAllowHandleResize (int)
virtual int GetAllowHandleResize ()
virtual void AllowHandleResizeOn ()
virtual void AllowHandleResizeOff ()
virtual int GetWidgetState ()
- Public Member Functions inherited from vtkAbstractWidget
virtual void SetEnabled (int)
void Render ()
virtual void SetPriority (float)
virtual void SetProcessEvents (int)
virtual int GetProcessEvents ()
virtual void ProcessEventsOn ()
virtual void ProcessEventsOff ()
vtkWidgetEventTranslatorGetEventTranslator ()
void SetParent (vtkAbstractWidget *parent)
virtual vtkAbstractWidgetGetParent ()
vtkWidgetRepresentationGetRepresentation ()
virtual void SetManagesCursor (int)
virtual int GetManagesCursor ()
virtual void ManagesCursorOn ()
virtual void ManagesCursorOff ()
- Public Member Functions inherited from vtkInteractorObserver
virtual void OnChar ()
int GetEnabled ()
void EnabledOn ()
void EnabledOff ()
void On ()
void Off ()
virtual void SetInteractor (vtkRenderWindowInteractor *iren)
virtual vtkRenderWindowInteractorGetInteractor ()
virtual float GetPriority ()
virtual void SetKeyPressActivation (int)
virtual int GetKeyPressActivation ()
virtual void KeyPressActivationOn ()
virtual void KeyPressActivationOff ()
virtual void SetKeyPressActivationValue (char)
virtual char GetKeyPressActivationValue ()
virtual vtkRendererGetDefaultRenderer ()
virtual void SetDefaultRenderer (vtkRenderer *)
virtual vtkRendererGetCurrentRenderer ()
virtual void SetCurrentRenderer (vtkRenderer *)
void GrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
void ReleaseFocus ()
- Public Member Functions inherited from vtkObject
virtual void DebugOn ()
virtual void DebugOff ()
unsigned char GetDebug ()
void SetDebug (unsigned char 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)
vtkCommandGetCommand (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)
int InvokeEvent (unsigned long event, void *callData)
int InvokeEvent (const char *event, void *callData)
int InvokeEvent (unsigned long event)
int InvokeEvent (const char *event)
- Public Member Functions inherited from vtkObjectBase
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 &os)
virtual void PrintHeader (ostream &os, vtkIndent indent)
virtual void PrintTrailer (ostream &os, vtkIndent indent)
int GetReferenceCount ()

Static Public Member Functions

static vtkHandleWidgetNew ()
- Static Public Member Functions inherited from vtkAbstractWidget

Protected Member Functions

 vtkHandleWidget ()
 ~vtkHandleWidget ()
void SetCursor (int state)
- Protected Member Functions inherited from vtkAbstractWidget
 vtkAbstractWidget ()
 ~vtkAbstractWidget ()
void SetWidgetRepresentation (vtkWidgetRepresentation *r)
virtual void SetCursor (int vtkNotUsed(state))
- Protected Member Functions inherited from vtkInteractorObserver
 vtkInteractorObserver ()
 ~vtkInteractorObserver ()
int RequestCursorShape (int requestedShape)
virtual void StartInteraction ()
virtual void EndInteraction ()
void ComputeDisplayToWorld (double x, double y, double z, double worldPt[4])
void ComputeWorldToDisplay (double x, double y, double z, double displayPt[3])
- Protected Member Functions inherited from vtkObject
 vtkObject ()
virtual ~vtkObject ()
virtual void RegisterInternal (vtkObjectBase *, int check)
virtual void UnRegisterInternal (vtkObjectBase *, int check)
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
void InternalReleaseFocus ()
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
virtual ~vtkObjectBase ()
virtual void CollectRevisions (ostream &os)
virtual void ReportReferences (vtkGarbageCollector *)
 vtkObjectBase (const vtkObjectBase &)
void operator= (const vtkObjectBase &)

Static Protected Member Functions

static void GenericAction (vtkHandleWidget *)
static void SelectAction (vtkAbstractWidget *)
static void EndSelectAction (vtkAbstractWidget *)
static void TranslateAction (vtkAbstractWidget *)
static void ScaleAction (vtkAbstractWidget *)
static void MoveAction (vtkAbstractWidget *)
- Static Protected Member Functions inherited from vtkAbstractWidget
static void ProcessEventsHandler (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
- Static Protected Member Functions inherited from vtkInteractorObserver
static void ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)

Protected Attributes

int WidgetState
int EnableAxisConstraint
int AllowHandleResize
- Protected Attributes inherited from vtkAbstractWidget
vtkWidgetRepresentationWidgetRep
int ManagesCursor
vtkWidgetEventTranslatorEventTranslator
vtkWidgetCallbackMapperCallbackMapper
vtkAbstractWidgetParent
void * CallData
int ProcessEvents
- Protected Attributes inherited from vtkInteractorObserver
int Enabled
vtkCallbackCommandEventCallbackCommand
vtkCallbackCommandKeyPressCallbackCommand
float Priority
int KeyPressActivation
char KeyPressActivationValue
vtkRenderWindowInteractorInteractor
vtkRendererCurrentRenderer
vtkRendererDefaultRenderer
unsigned long CharObserverTag
unsigned long DeleteObserverTag
vtkObserverMediatorObserverMediator
- Protected Attributes inherited from vtkObject
unsigned char Debug
vtkTimeStamp MTime
vtkSubjectHelper * SubjectHelper
- Protected Attributes inherited from vtkObjectBase
int ReferenceCount
vtkWeakPointerBase ** WeakPointers
typedef vtkAbstractWidget Superclass
static int IsTypeOf (const char *type)
static vtkHandleWidgetSafeDownCast (vtkObject *o)
virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)

Detailed Description

a general widget for moving handles

The vtkHandleWidget is used to position a handle. A handle is a widget with a position (in display and world space). Various appearances are available depending on its associated representation. The widget provides methods for translation, including constrained translation along coordinate axes. To use this widget, create and associate a representation with the widget.

Event Bindings:
By default, the widget responds to the following VTK events (i.e., it watches the vtkRenderWindowInteractor for these events):
  LeftButtonPressEvent - select focal point of widget
  LeftButtonReleaseEvent - end selection
  MiddleButtonPressEvent - translate widget
  MiddleButtonReleaseEvent - end translation
  RightButtonPressEvent - scale widget
  RightButtonReleaseEvent - end scaling
  MouseMoveEvent - interactive movement across widget
Event Bindings:
Note that the event bindings described above can be changed using this class's vtkWidgetEventTranslator. This class translates VTK events into the vtkHandleWidget's widget events:
  vtkWidgetEvent::Select -- focal point is being selected
  vtkWidgetEvent::EndSelect -- the selection process has completed
  vtkWidgetEvent::Translate -- translate the widget
  vtkWidgetEvent::EndTranslate -- end widget translation
  vtkWidgetEvent::Scale -- scale the widget
  vtkWidgetEvent::EndScale -- end scaling the widget
  vtkWidgetEvent::Move -- a request for widget motion
Event Bindings:
In turn, when these widget events are processed, the vtkHandleWidget invokes the following VTK events on itself (which observers can listen for):
  vtkCommand::StartInteractionEvent (on vtkWidgetEvent::Select)
  vtkCommand::EndInteractionEvent (on vtkWidgetEvent::EndSelect)
  vtkCommand::InteractionEvent (on vtkWidgetEvent::Move)
Events:
vtkCommand::EndInteractionEvent vtkCommand::InteractionEvent vtkCommand::StartInteractionEvent
Tests:
vtkHandleWidget (Tests)

Definition at line 77 of file vtkHandleWidget.h.

Member Typedef Documentation

Standard VTK class macros.

Definition at line 85 of file vtkHandleWidget.h.

Member Enumeration Documentation

Enumerator:
Start 
Active 

Definition at line 130 of file vtkHandleWidget.h.

Constructor & Destructor Documentation

vtkHandleWidget::vtkHandleWidget ( )
protected
vtkHandleWidget::~vtkHandleWidget ( )
protected

Member Function Documentation

static vtkHandleWidget* vtkHandleWidget::New ( )
static

Instantiate this class.

Reimplemented from vtkObject.

virtual const char* vtkHandleWidget::GetClassName ( )
virtual

Standard VTK class macros.

Reimplemented from vtkAbstractWidget.

static int vtkHandleWidget::IsTypeOf ( const char *  type)
static

Standard VTK class macros.

Reimplemented from vtkAbstractWidget.

virtual int vtkHandleWidget::IsA ( const char *  type)
virtual

Standard VTK class macros.

Reimplemented from vtkAbstractWidget.

static vtkHandleWidget* vtkHandleWidget::SafeDownCast ( vtkObject o)
static

Standard VTK class macros.

Reimplemented from vtkAbstractWidget.

void vtkHandleWidget::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Standard VTK class macros.

Reimplemented from vtkAbstractWidget.

void vtkHandleWidget::SetRepresentation ( vtkHandleRepresentation r)
inline

Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene. Note that the representation is a subclass of vtkProp so it can be added to the renderer independent of the widget.

Definition at line 93 of file vtkHandleWidget.h.

vtkHandleRepresentation* vtkHandleWidget::GetHandleRepresentation ( )
inline

Return the representation as a vtkHandleRepresentation.

Definition at line 99 of file vtkHandleWidget.h.

void vtkHandleWidget::CreateDefaultRepresentation ( )
virtual

Create the default widget representation if one is not set. By default an instance of vtkPointHandleRepresenation3D is created.

Implements vtkAbstractWidget.

virtual void vtkHandleWidget::SetEnableAxisConstraint ( int  )
virtual

Enable / disable axis constrained motion of the handles. By default the widget responds to the shift modifier to constrain the handle along the axis closest aligned with the motion vector.

virtual int vtkHandleWidget::GetEnableAxisConstraint ( )
virtual

Enable / disable axis constrained motion of the handles. By default the widget responds to the shift modifier to constrain the handle along the axis closest aligned with the motion vector.

virtual void vtkHandleWidget::EnableAxisConstraintOn ( )
virtual

Enable / disable axis constrained motion of the handles. By default the widget responds to the shift modifier to constrain the handle along the axis closest aligned with the motion vector.

virtual void vtkHandleWidget::EnableAxisConstraintOff ( )
virtual

Enable / disable axis constrained motion of the handles. By default the widget responds to the shift modifier to constrain the handle along the axis closest aligned with the motion vector.

virtual void vtkHandleWidget::SetAllowHandleResize ( int  )
virtual

Allow resizing of handles ? By default the right mouse button scales the handle size.

virtual int vtkHandleWidget::GetAllowHandleResize ( )
virtual

Allow resizing of handles ? By default the right mouse button scales the handle size.

virtual void vtkHandleWidget::AllowHandleResizeOn ( )
virtual

Allow resizing of handles ? By default the right mouse button scales the handle size.

virtual void vtkHandleWidget::AllowHandleResizeOff ( )
virtual

Allow resizing of handles ? By default the right mouse button scales the handle size.

virtual int vtkHandleWidget::GetWidgetState ( )
virtual

Get the widget state.

static void vtkHandleWidget::GenericAction ( vtkHandleWidget )
staticprotected
static void vtkHandleWidget::SelectAction ( vtkAbstractWidget )
staticprotected
static void vtkHandleWidget::EndSelectAction ( vtkAbstractWidget )
staticprotected
static void vtkHandleWidget::TranslateAction ( vtkAbstractWidget )
staticprotected
static void vtkHandleWidget::ScaleAction ( vtkAbstractWidget )
staticprotected
static void vtkHandleWidget::MoveAction ( vtkAbstractWidget )
staticprotected
void vtkHandleWidget::SetCursor ( int  state)
protected

Member Data Documentation

int vtkHandleWidget::WidgetState
protected

Definition at line 148 of file vtkHandleWidget.h.

int vtkHandleWidget::EnableAxisConstraint
protected

Definition at line 149 of file vtkHandleWidget.h.

int vtkHandleWidget::AllowHandleResize
protected

Definition at line 152 of file vtkHandleWidget.h.


The documentation for this class was generated from the following file: