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 "vtkContextItem.h"
30 #include "vtkWeakPointer.h" // Needed for weak pointer to the PiecewiseFunction.
31 
32 class vtkContext2D;
34 class vtkCallbackCommand;
36 
38 {
39 public:
41  virtual void PrintSelf(ostream &os, vtkIndent indent);
42 
44  static void CallRedraw(vtkObject* sender, unsigned long event, void* receiver, void* params);
45 
47  virtual void SetParent(vtkAbstractContextItem *parent);
48 
50  virtual bool Paint(vtkContext2D *painter);
51 
53 
54  vtkSetMacro(CurrentPointIndex, vtkIdType);
55  vtkGetMacro(CurrentPointIndex, vtkIdType);
57 
59 
60  virtual void SetPiecewiseFunction(vtkPiecewiseFunction* piecewiseFunc);
61  vtkWeakPointer<vtkPiecewiseFunction> GetPiecewiseFunction();
63 
66  int IsOverHandle(float* pos);
67 
69  virtual bool Hit(const vtkContextMouseEvent &mouse);
70 
72  virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse);
73 
75  virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse);
76 
78  virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse);
79 
80 //BTX
81 protected:
84 
86  virtual void Redraw();
87 
90  float HandleRadius;
91 
94 
95 private:
96  vtkPiecewisePointHandleItem(const vtkPiecewisePointHandleItem &); // Not implemented.
97  void operator=(const vtkPiecewisePointHandleItem &); // Not implemented.
98 
99  class InternalPiecewisePointHandleInfo;
100  InternalPiecewisePointHandleInfo* Internal;
101 //ETX
102 };
103 
104 #endif //__vtkPiecewisePointHandleItem_h