/usr/include/paraview/vtkMultiSliceContextItem.h is in paraview-dev 5.0.1+dfsg1-4.
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 126 127 128 129 130 131 132 133 134 135 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkMultiSliceContextItem.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 vtkMultiSliceContextItem
#ifndef vtkMultiSliceContextItem_h
#define vtkMultiSliceContextItem_h
#include "vtkPVVTKExtensionsRenderingModule.h" // needed for export macro
#include "vtkContextItem.h"
#include "vtkCommand.h" // needed for vtkCommand::UserEvent.
class vtkAxis;
class VTKPVVTKEXTENSIONSRENDERING_EXPORT vtkMultiSliceContextItem: public vtkContextItem
{
public:
static vtkMultiSliceContextItem* New();
vtkTypeMacro(vtkMultiSliceContextItem, vtkContextItem);
virtual void PrintSelf(ostream &os, vtkIndent indent);
// Description:
// Paint the texture into a rectangle defined by the bounds. If
// MaskAboveCurve is true and a shape has been provided by a subclass, it
// draws the texture into the shape
virtual bool Paint(vtkContext2D *painter);
// Description:
// Return the Axis on which that ContextItem is based.
// In order to configure that item, just configure the Axis itself.
// (Range + Position)
vtkAxis* GetAxis();
// Description:
// The active size define the number of pixel that are going to be used for
// the slider handle.
void SetActiveSize(int size);
// Description:
// The margin used on the side of the Axis.
void SetEdgeMargin(int margin);
// Description:
// Returns the active slice index. Active slice is only valid when the slice
// is being updated between mouse-press/release events.
int GetActiveSliceIndex();
//BTX
// Description:
// Return true if the supplied x, y coordinate is inside the item.
virtual bool Hit(const vtkContextMouseEvent &mouse);
// Description:
// Mouse button down event
// Return true if the item holds the event, false if the event can be
// propagated to other items.
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse);
// Description:
// Mouse button release event.
// Return true if the item holds the event, false if the event can be
// propagated to other items.
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse);
// Description:
// Mouse button double click event.
// Return true if the item holds the event, false if the event can be
// propagated to other items.
virtual bool MouseDoubleClickEvent(const vtkContextMouseEvent &mouse);
// Description:
// Mouse move event.
// Return true if the item holds the event, false if the event can be
// propagated to other items.
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse);
// Description:
// Get access to the data model. Return a pointer array to the differents
// visible slices
const double* GetVisibleSlices(int &nbSlices) const;
// Description:
// Returns access to slices.
const double* GetSlices(int &nbSlices) const;
// Description:
// Allow user to programatically update the data model. Note, this does not
// fire any of the slice modification/addition/deletion events.
void SetSlices(double* values, bool* visibility, int numberOfSlices);
// Description:
// Return the slice position for a given index
double GetSliceValue(int sliceIndex);
// Description:
// Return the number of slices
int GetNumberOfSlices();
// Events files when slices are modified by interaction.
enum
{
AddSliceEvent = vtkCommand::UserEvent + 1,
RemoveSliceEvent = vtkCommand::UserEvent + 2,
ModifySliceEvent = vtkCommand::UserEvent + 3
};
protected:
double ScreenToRange(float position);
double ComputeEpsilon(int numberOfPixel = 5);
void forceRender();
vtkMultiSliceContextItem();
virtual ~vtkMultiSliceContextItem();
private:
vtkMultiSliceContextItem(const vtkMultiSliceContextItem &); // Not implemented.
void operator=(const vtkMultiSliceContextItem &); // Not implemented.
struct vtkInternal;
vtkInternal* Internal;
//ETX
};
#endif
|