VTK
vtkPiecewisePointHandleItem.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPiecewisePointHandleItem.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 =========================================================================*/
15 
26 #ifndef vtkPiecewisePointHandleItem_h
27 #define vtkPiecewisePointHandleItem_h
28 
29 #include "vtkChartsCoreModule.h" // For export macro
30 #include "vtkContextItem.h"
31 #include "vtkWeakPointer.h" // Needed for weak pointer to the PiecewiseFunction.
32 
33 class vtkContext2D;
35 class vtkCallbackCommand;
37 
39 {
40 public:
42  virtual void PrintSelf(ostream &os, vtkIndent indent);
43 
45  static void CallRedraw(vtkObject* sender, unsigned long event, void* receiver, void* params);
46 
48  virtual void SetParent(vtkAbstractContextItem *parent);
49 
51  virtual bool Paint(vtkContext2D *painter);
52 
54 
55  vtkSetMacro(CurrentPointIndex, vtkIdType);
56  vtkGetMacro(CurrentPointIndex, vtkIdType);
58 
60 
61  virtual void SetPiecewiseFunction(vtkPiecewiseFunction* piecewiseFunc);
62  vtkWeakPointer<vtkPiecewiseFunction> GetPiecewiseFunction();
64 
67  int IsOverHandle(float* pos);
68 
70  virtual bool Hit(const vtkContextMouseEvent &mouse);
71 
73  virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse);
74 
76  virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse);
77 
79  virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse);
80 
81 //BTX
82 protected:
85 
87  virtual void Redraw();
88 
91  float HandleRadius;
92 
95 
96 private:
97  vtkPiecewisePointHandleItem(const vtkPiecewisePointHandleItem &); // Not implemented.
98  void operator=(const vtkPiecewisePointHandleItem &); // Not implemented.
99 
100  class InternalPiecewisePointHandleInfo;
101  InternalPiecewisePointHandleInfo* Internal;
102 //ETX
103 };
104 
105 #endif //vtkPiecewisePointHandleItem_h
virtual void SetParent(vtkAbstractContextItem *parent)
abstract base class for most VTK objects
Definition: vtkObject.h:61
Defines a 1D piecewise function.
base class for items that are part of a vtkContextScene.
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
virtual bool Paint(vtkContext2D *painter)
int vtkIdType
Definition: vtkType.h:275
vtkWeakPointer< vtkPiecewiseFunction > PiecewiseFunction
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:56
supports function callbacks
a vtkContextItem that draws handles around a point of a piecewise function
data structure to represent mouse events.
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
base class for items that are part of a vtkContextScene.
virtual bool Hit(const vtkContextMouseEvent &mouse)
virtual void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
#define VTKCHARTSCORE_EXPORT