VTK
vtkXYPlotWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXYPlotWidget.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef vtkXYPlotWidget_h
36 #define vtkXYPlotWidget_h
37 
38 #include "vtkInteractionWidgetsModule.h" // For export macro
39 #include "vtkInteractorObserver.h"
40 class vtkXYPlotActor;
41 
43 {
44 public:
45  static vtkXYPlotWidget *New();
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
51  virtual void SetXYPlotActor(vtkXYPlotActor *);
54 
56  virtual void SetEnabled(int);
57 
58 protected:
61 
62  // the actor that is used
64 
65  //handles the events
66  static void ProcessEvents(vtkObject* object,
67  unsigned long event,
68  void* clientdata,
69  void* calldata);
70 
71  // ProcessEvents() dispatches to these methods.
74  void OnMouseMove();
75 
76  // used to compute relative movements
77  float StartPosition[2];
78 
79 //BTX - manage the state of the widget
80  int State;
82  {
83  Moving=0,
93  Outside
94  };
95 //ETX
96 
97  // use to determine what state the mouse is over, edge1 p1, etc.
98  // returns a state from the WidgetState enum above
99  int ComputeStateBasedOnPosition(int X, int Y, int *pos1, int *pos2);
100 
101  // set the cursor to the correct shape based on State argument
102  void SetCursor(int State);
103 
104 private:
105  vtkXYPlotWidget(const vtkXYPlotWidget&); //Not implemented
106  void operator=(const vtkXYPlotWidget&); //Not implemented
107 };
108 
109 #endif
vtkXYPlotWidget::vtkXYPlotWidget
vtkXYPlotWidget()
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkXYPlotWidget::AdjustingE3
@ AdjustingE3
Definition: vtkXYPlotWidget.h:90
vtkXYPlotWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkXYPlotWidget::AdjustingE1
@ AdjustingE1
Definition: vtkXYPlotWidget.h:88
vtkXYPlotWidget::OnLeftButtonDown
void OnLeftButtonDown()
vtkXYPlotWidget::Inside
@ Inside
Definition: vtkXYPlotWidget.h:92
vtkXYPlotWidget::OnMouseMove
void OnMouseMove()
vtkXYPlotWidget::New
static vtkXYPlotWidget * New()
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkInteractionWidgetsModule.h
vtkXYPlotWidget::ProcessEvents
static void ProcessEvents(vtkObject *object, unsigned long event, void *clientdata, void *calldata)
vtkXYPlotWidget::AdjustingP2
@ AdjustingP2
Definition: vtkXYPlotWidget.h:85
vtkInteractorObserver
an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor
Definition: vtkInteractorObserver.h:62
vtkgl::event
struct _cl_event * event
Definition: vtkgl.h:14387
vtkXYPlotWidget::SetCursor
void SetCursor(int State)
vtkXYPlotWidget
2D widget for manipulating a XY plot
Definition: vtkXYPlotWidget.h:43
vtkXYPlotWidget::ComputeStateBasedOnPosition
int ComputeStateBasedOnPosition(int X, int Y, int *pos1, int *pos2)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkXYPlotWidget::OnLeftButtonUp
void OnLeftButtonUp()
vtkXYPlotWidget::XYPlotActor
vtkXYPlotActor * XYPlotActor
Definition: vtkXYPlotWidget.h:63
vtkXYPlotWidget::SetEnabled
virtual void SetEnabled(int)
vtkXYPlotWidget::State
int State
Definition: vtkXYPlotWidget.h:80
vtkXYPlotWidget::~vtkXYPlotWidget
~vtkXYPlotWidget()
vtkXYPlotWidget::AdjustingP3
@ AdjustingP3
Definition: vtkXYPlotWidget.h:86
vtkXYPlotActor
generate an x-y plot from input dataset(s) or field data
Definition: vtkXYPlotActor.h:133
vtkXYPlotWidget::WidgetState
WidgetState
Definition: vtkXYPlotWidget.h:82
VTKINTERACTIONWIDGETS_EXPORT
#define VTKINTERACTIONWIDGETS_EXPORT
Definition: vtkInteractionWidgetsModule.h:15
vtkXYPlotWidget::SetXYPlotActor
virtual void SetXYPlotActor(vtkXYPlotActor *)
vtkInteractorObserver.h
vtkXYPlotWidget::AdjustingE4
@ AdjustingE4
Definition: vtkXYPlotWidget.h:91
vtkXYPlotWidget::AdjustingP4
@ AdjustingP4
Definition: vtkXYPlotWidget.h:87
vtkXYPlotWidget::AdjustingE2
@ AdjustingE2
Definition: vtkXYPlotWidget.h:89
vtkXYPlotWidget::AdjustingP1
@ AdjustingP1
Definition: vtkXYPlotWidget.h:84