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

2D widget for manipulating a XY plot More...

#include <vtkXYPlotWidget.h>

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

Public Types

typedef vtkInteractorObserver Superclass
- Public Types inherited from vtkInteractorObserver
typedef vtkObject Superclass
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetEnabled (int)
virtual void SetXYPlotActor (vtkXYPlotActor *)
virtual vtkXYPlotActorGetXYPlotActor ()
- 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 void SetPriority (float)
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 vtkXYPlotWidgetNew ()
static int IsTypeOf (const char *type)
static vtkXYPlotWidgetSafeDownCast (vtkObject *o)
- Static Public Member Functions inherited from vtkInteractorObserver
static void ComputeDisplayToWorld (vtkRenderer *ren, double x, double y, double z, double worldPt[4])
static void ComputeWorldToDisplay (vtkRenderer *ren, double x, double y, double z, double displayPt[3])
- Static Public Member Functions inherited from vtkObject
static void BreakOnError ()
static void SetGlobalWarningDisplay (int val)
static void GlobalWarningDisplayOn ()
static void GlobalWarningDisplayOff ()
static int GetGlobalWarningDisplay ()

Protected Types

enum  WidgetState {
  Moving = 0, AdjustingP1, AdjustingP2, AdjustingP3,
  AdjustingP4, AdjustingE1, AdjustingE2, AdjustingE3,
  AdjustingE4, Inside, Outside
}

Protected Member Functions

 vtkXYPlotWidget ()
 ~vtkXYPlotWidget ()
void OnLeftButtonDown ()
void OnLeftButtonUp ()
void OnMouseMove ()
int ComputeStateBasedOnPosition (int X, int Y, int *pos1, int *pos2)
void SetCursor (int 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 ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)

Protected Attributes

vtkXYPlotActorXYPlotActor
float StartPosition [2]
int State
- 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

Detailed Description

2D widget for manipulating a XY plot

This class provides support for interactively manipulating the position, size, and orientation of a XY Plot. It listens to Left mouse events and mouse movement. It will change the cursor shape based on its location. If the cursor is over an edge of thea XY plot it will change the cursor shape to a resize edge shape. If the position of a XY plot is moved to be close to the center of one of the four edges of the viewport, then the XY plot will change its orientation to align with that edge. This orientation is sticky in that it will stay that orientation until the position is moved close to another edge.

See Also
vtkInteractorObserver
Events:
vtkCommand::DisableEvent vtkCommand::EndInteractionEvent vtkCommand::InteractionEvent vtkCommand::StartInteractionEvent vtkCommand::EnableEvent

Definition at line 41 of file vtkXYPlotWidget.h.

Member Typedef Documentation

Definition at line 45 of file vtkXYPlotWidget.h.

Member Enumeration Documentation

Enumerator:
Moving 
AdjustingP1 
AdjustingP2 
AdjustingP3 
AdjustingP4 
AdjustingE1 
AdjustingE2 
AdjustingE3 
AdjustingE4 
Inside 
Outside 

Definition at line 80 of file vtkXYPlotWidget.h.

Constructor & Destructor Documentation

vtkXYPlotWidget::vtkXYPlotWidget ( )
protected
vtkXYPlotWidget::~vtkXYPlotWidget ( )
protected

Member Function Documentation

static vtkXYPlotWidget* vtkXYPlotWidget::New ( )
static

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

virtual const char* vtkXYPlotWidget::GetClassName ( )
virtual

Reimplemented from vtkInteractorObserver.

static int vtkXYPlotWidget::IsTypeOf ( const char *  name)
static

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkInteractorObserver.

virtual int vtkXYPlotWidget::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkInteractorObserver.

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

Reimplemented from vtkInteractorObserver.

void vtkXYPlotWidget::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 vtkInteractorObserver.

virtual void vtkXYPlotWidget::SetXYPlotActor ( vtkXYPlotActor )
virtual

Get the XY plot used by this Widget. One is created automatically.

virtual vtkXYPlotActor* vtkXYPlotWidget::GetXYPlotActor ( )
virtual

Get the XY plot used by this Widget. One is created automatically.

virtual void vtkXYPlotWidget::SetEnabled ( int  )
virtual

Methods for turning the interactor observer on and off.

Reimplemented from vtkInteractorObserver.

static void vtkXYPlotWidget::ProcessEvents ( vtkObject object,
unsigned long  event,
void *  clientdata,
void *  calldata 
)
staticprotected

Handles the char widget activation event. Also handles the delete event.

Reimplemented from vtkInteractorObserver.

void vtkXYPlotWidget::OnLeftButtonDown ( )
protected
void vtkXYPlotWidget::OnLeftButtonUp ( )
protected
void vtkXYPlotWidget::OnMouseMove ( )
protected
int vtkXYPlotWidget::ComputeStateBasedOnPosition ( int  X,
int  Y,
int *  pos1,
int *  pos2 
)
protected
void vtkXYPlotWidget::SetCursor ( int  State)
protected

Member Data Documentation

vtkXYPlotActor* vtkXYPlotWidget::XYPlotActor
protected

Definition at line 62 of file vtkXYPlotWidget.h.

float vtkXYPlotWidget::StartPosition[2]
protected

Definition at line 76 of file vtkXYPlotWidget.h.

int vtkXYPlotWidget::State
protected

Definition at line 79 of file vtkXYPlotWidget.h.


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