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);
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
vtkChartsCoreModule.h
vtkContextMouseEvent
data structure to represent mouse events.
Definition: vtkContextMouseEvent.h:40
vtkPiecewisePointHandleItem::~vtkPiecewisePointHandleItem
~vtkPiecewisePointHandleItem()
vtkPiecewisePointHandleItem::Hit
virtual bool Hit(const vtkContextMouseEvent &mouse)
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkPiecewisePointHandleItem::PiecewiseFunction
vtkWeakPointer< vtkPiecewiseFunction > PiecewiseFunction
Definition: vtkPiecewisePointHandleItem.h:93
vtkAbstractContextItem
base class for items that are part of a vtkContextScene.
Definition: vtkAbstractContextItem.h:40
vtkPiecewisePointHandleItem::MouseMoveEvent
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
vtkPiecewisePointHandleItem::vtkPiecewisePointHandleItem
vtkPiecewisePointHandleItem()
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkPiecewisePointHandleItem::MouseButtonReleaseEvent
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:57
vtkContextItem.h
vtkPiecewisePointHandleItem
a vtkContextItem that draws handles around a point of a piecewise function
Definition: vtkPiecewisePointHandleItem.h:39
vtkgl::event
struct _cl_event * event
Definition: vtkgl.h:14387
vtkPiecewisePointHandleItem::MouseButtonPressEvent
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
vtkPiecewisePointHandleItem::CurrentPointIndex
vtkIdType CurrentPointIndex
Definition: vtkPiecewisePointHandleItem.h:90
vtkPiecewisePointHandleItem::SetParent
virtual void SetParent(vtkAbstractContextItem *parent)
vtkgl::params
GLenum const GLfloat * params
Definition: vtkgl.h:11333
vtkPiecewisePointHandleItem::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPiecewisePointHandleItem::SetPiecewiseFunction
virtual void SetPiecewiseFunction(vtkPiecewiseFunction *piecewiseFunc)
vtkWeakPointer.h
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkPiecewisePointHandleItem::GetPiecewiseFunction
vtkWeakPointer< vtkPiecewiseFunction > GetPiecewiseFunction()
vtkPiecewiseFunction
Defines a 1D piecewise function.
Definition: vtkPiecewiseFunction.h:51
vtkPiecewisePointHandleItem::Redraw
virtual void Redraw()
vtkContextItem
base class for items that are part of a vtkContextScene.
Definition: vtkContextItem.h:34
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkPiecewisePointHandleItem::New
static vtkPiecewisePointHandleItem * New()
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:50
vtkPiecewisePointHandleItem::HandleRadius
float HandleRadius
Definition: vtkPiecewisePointHandleItem.h:91
vtkPiecewisePointHandleItem::MouseOverHandleIndex
int MouseOverHandleIndex
Definition: vtkPiecewisePointHandleItem.h:89
VTKCHARTSCORE_EXPORT
#define VTKCHARTSCORE_EXPORT
Definition: vtkChartsCoreModule.h:15
vtkPiecewisePointHandleItem::Callback
vtkCallbackCommand * Callback
Definition: vtkPiecewisePointHandleItem.h:94
vtkPiecewisePointHandleItem::Paint
virtual bool Paint(vtkContext2D *painter)
vtkWeakPointer< vtkPiecewiseFunction >
vtkPiecewisePointHandleItem::CallRedraw
static void CallRedraw(vtkObject *sender, unsigned long event, void *receiver, void *params)
vtkPiecewisePointHandleItem::IsOverHandle
int IsOverHandle(float *pos)