Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkXYPlotWidget Class Reference

`#include <vtkXYPlotWidget.h>`

Inheritance diagram for vtkXYPlotWidget:

[legend]
Collaboration diagram for vtkXYPlotWidget:

[legend]
List of all members.

## Detailed Description

2D widget for manipulating a XY plot

Date:
  2002/09/14 00:10:56

Revision:
  1.2

This class provides support for interactively manipulating the position, size, and orientation of a scalar bar. 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 the scalar bar 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::EnableEvent vtkCommand::EndInteractionEvent vtkCommand::DisableEvent vtkCommand::StartInteractionEvent

Created by:
  - Cedilnik, Andy

CVS contributions (if > 5%):
  - Cedilnik, Andy (97%)

CVS logs (CVSweb):
  - .`cxx` (`/Hybrid/vtkXYPlotWidget.cxx)`
  - .`h` (`/Hybrid/vtkXYPlotWidget.h)`

Definition at line 56 of file vtkXYPlotWidget.h.

## Public Types
typedef vtkInteractorObserver | Superclass
## Public Methods
virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
virtual void | SetEnabled (int)
virtual void | SetXYPlotActor (vtkXYPlotActor *scalarbar)
virtual vtkXYPlotActor * | GetXYPlotActor ()
## Static Public Methods
vtkXYPlotWidget * | New ()
int | IsTypeOf (const char *type)
vtkXYPlotWidget * | SafeDownCast (vtkObject *o)
## Protected Types
enum | WidgetState { Moving = 0, AdjustingP1, AdjustingP2, AdjustingP3, AdjustingP4, AdjustingE1, AdjustingE2, AdjustingE3, AdjustingE4, Inside, Outside }
## Protected Methods
| vtkXYPlotWidget ()
| ~vtkXYPlotWidget ()
void | OnLeftButtonDown ()
void | OnLeftButtonUp ()
void | OnMouseMove ()
int | ComputeStateBasedOnPosition (int X, int Y, int *pos1, int *pos2)
void | SetCursor (int State)
## Static Protected Methods
void | ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
## Protected Attributes
vtkXYPlotActor * | XYPlotActor
float | StartPosition [2]
int | State

## Member Typedef Documentation

typedef vtkInteractorObserver vtkXYPlotWidget::Superclass

| Reimplemented from vtkInteractorObserver. Definition at line 60 of file vtkXYPlotWidget.h.

## Member Enumeration Documentation

enum vtkXYPlotWidget::WidgetState`[protected]`

  | Enumeration values:
  Moving |
  AdjustingP1 |
  AdjustingP2 |
  AdjustingP3 |
  AdjustingP4 |
  AdjustingE1 |
  AdjustingE2 |
  AdjustingE3 |
  AdjustingE4 |
  Inside |
  Outside |
Definition at line 95 of file vtkXYPlotWidget.h.

## Constructor & Destructor Documentation

vtkXYPlotWidget::vtkXYPlotWidget | ( |  | ) | `[protected]`

vtkXYPlotWidget::~vtkXYPlotWidget | ( |  | ) | `[protected]`

## Member Function Documentation

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.

int vtkXYPlotWidget::IsTypeOf | ( | const char * | type | ) | `[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 vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkInteractorObserver.

virtual int vtkXYPlotWidget::IsA | ( | const char * | type | ) | `[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 vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkInteractorObserver.

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 * | scalarbar | ) | `[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. Implements vtkInteractorObserver.

void vtkXYPlotWidget::ProcessEvents | ( | vtkObject * | object,
|  | unsigned long | event,
|  | void * | clientdata,
|  | void * | calldata
| ) | `[static, protected]`

| 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 77 of file vtkXYPlotWidget.h.

float vtkXYPlotWidget::StartPosition[2]`[protected]`

| Definition at line 91 of file vtkXYPlotWidget.h.

int vtkXYPlotWidget::State`[protected]`

| Definition at line 94 of file vtkXYPlotWidget.h.

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

- Hybrid/vtkXYPlotWidget.h