/usr/include/vtk-7.1/vtkPiecewisePointHandleItem.h is in libvtk7-dev 7.1.1+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkPiecewisePointHandleItem.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkPiecewisePointHandleItem
* @brief a vtkContextItem that draws handles
* around a point of a piecewise function
*
*
* This is a vtkContextItem that can be placed into a vtkContextScene. It draws
* handles around a given point of a piecewise function so that the curve can
* be adjusted using these handles.
*/
#ifndef vtkPiecewisePointHandleItem_h
#define vtkPiecewisePointHandleItem_h
#include "vtkChartsCoreModule.h" // For export macro
#include "vtkContextItem.h"
#include "vtkWeakPointer.h" // Needed for weak pointer to the PiecewiseFunction.
class vtkContext2D;
class vtkPiecewiseFunction;
class vtkCallbackCommand;
class vtkAbstractContextItem;
class VTKCHARTSCORE_EXPORT vtkPiecewisePointHandleItem : public vtkContextItem
{
public:
vtkTypeMacro(vtkPiecewisePointHandleItem, vtkContextItem);
virtual void PrintSelf(ostream &os, vtkIndent indent);
static vtkPiecewisePointHandleItem *New();
static void CallRedraw(vtkObject* sender, unsigned long event, void* receiver, void* params);
/**
* Set the parent item, which should be a vtkControlPointItem
*/
virtual void SetParent(vtkAbstractContextItem *parent);
/**
* Paint event for the item.
*/
virtual bool Paint(vtkContext2D *painter);
//@{
/**
* The current point id in the piecewise function being handled.
*/
vtkSetMacro(CurrentPointIndex, vtkIdType);
vtkGetMacro(CurrentPointIndex, vtkIdType);
//@}
//@{
/**
* Set the PieceWiseFunction the handles will manipulate
*/
virtual void SetPiecewiseFunction(vtkPiecewiseFunction* piecewiseFunc);
vtkWeakPointer<vtkPiecewiseFunction> GetPiecewiseFunction();
//@}
/**
* Returns the index of the handle if pos is over any of the handles,
* otherwise return -1;
*/
int IsOverHandle(float* pos);
/**
* Returns true if the supplied x, y coordinate is inside the item.
*/
virtual bool Hit(const vtkContextMouseEvent &mouse);
/**
* Mouse move event.
*/
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse);
/**
* Mouse button down event.
*/
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse);
/**
* Mouse button release event.
*/
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse);
protected:
vtkPiecewisePointHandleItem();
~vtkPiecewisePointHandleItem();
/**
* Redraw all the handles
*/
virtual void Redraw();
int MouseOverHandleIndex;
vtkIdType CurrentPointIndex;
float HandleRadius;
vtkWeakPointer<vtkPiecewiseFunction> PiecewiseFunction;
vtkCallbackCommand* Callback;
private:
vtkPiecewisePointHandleItem(const vtkPiecewisePointHandleItem &) VTK_DELETE_FUNCTION;
void operator=(const vtkPiecewisePointHandleItem &) VTK_DELETE_FUNCTION;
class InternalPiecewisePointHandleInfo;
InternalPiecewisePointHandleInfo* Internal;
};
#endif //vtkPiecewisePointHandleItem_h
|