/usr/include/vtk-5.10/vtkPiecewisePointHandleItem.h is in libvtk5-dev 5.10.1+dfsg-2.1build1.
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 | /*=========================================================================
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.
=========================================================================*/
// .NAME vtkPiecewisePointHandleItem - a vtkContextItem that draws handles
// around a point of a piecewise function
//
// .SECTION Description
// 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 "vtkContextItem.h"
#include "vtkWeakPointer.h" // Needed for weak pointer to the PiecewiseFunction.
class vtkContext2D;
class vtkPiecewiseFunction;
class vtkCallbackCommand;
class vtkAbstractContextItem;
class VTK_CHARTS_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);
// Description:
// Set the parent item, which should be a vtkControlPointItem
virtual void SetParent(vtkAbstractContextItem *parent);
// Description:
// Paint event for the item.
virtual bool Paint(vtkContext2D *painter);
// Description:
// The current point id in the piecewise function being handled.
vtkSetMacro(CurrentPointIndex, vtkIdType);
vtkGetMacro(CurrentPointIndex, vtkIdType);
// Description
// Set the PieceWiseFunction the handles will manipulate
virtual void SetPiecewiseFunction(vtkPiecewiseFunction* piecewiseFunc);
vtkWeakPointer<vtkPiecewiseFunction> GetPiecewiseFunction();
// Description:
// Returns the index of the handle if pos is over any of the handles,
// otherwise return -1;
int IsOverHandle(float* pos);
// Description:
// Returns true if the supplied x, y coordinate is inside the item.
virtual bool Hit(const vtkContextMouseEvent &mouse);
// Description:
// Mouse move event.
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse);
// Description:
// Mouse button down event.
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse);
// Description:
// Mouse button release event.
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse);
//BTX
protected:
vtkPiecewisePointHandleItem();
~vtkPiecewisePointHandleItem();
// Description:
// Redraw all the handles
virtual void Redraw();
int MouseOverHandleIndex;
vtkIdType CurrentPointIndex;
float HandleRadius;
vtkWeakPointer<vtkPiecewiseFunction> PiecewiseFunction;
vtkCallbackCommand* Callback;
private:
vtkPiecewisePointHandleItem(const vtkPiecewisePointHandleItem &); // Not implemented.
void operator=(const vtkPiecewisePointHandleItem &); // Not implemented.
class InternalPiecewisePointHandleInfo;
InternalPiecewisePointHandleInfo* Internal;
//ETX
};
#endif //__vtkPiecewisePointHandleItem_h
|