This file is indexed.

/usr/include/vtk-7.1/vtkTexturedButtonRepresentation2D.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkTexturedButtonRepresentation2D.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   vtkTexturedButtonRepresentation2D
 * @brief   defines a representation for a vtkButtonWidget
 *
 * This class implements one type of vtkButtonRepresentation. It changes the
 * appearance of a user-provided polydata by assigning textures according to
 * the current button state. It also provides highlighting (when hovering and
 * selecting the button) by fiddling with the actor's property. Since this is
 * a 2D version, the button is rendered in the overlay plane. Typically it is
 * positioned in display coordinates, but it can be anchored to a world
 * position so it will appear to move as the camera moves.
 *
 * To use this representation, always begin by specifying the number of
 * button states.  Then provide a polydata (the polydata should have associated
 * texture coordinates), and a list of textures cooresponding to the button
 * states. Optionally, the HoveringProperty and SelectionProperty can be
 * adjusted to obtain the appropriate appearance.
 *
 * @warning
 * There are two variants of the PlaceWidget() method. The first PlaceWidget(bds[6])
 * allows the widget to be placed in the display coordinates fixed to the overlay
 * plane. The second PlaceWidget(anchor[3],size[2]) places the widget in world space;
 * hence it will appear to move as the camera moves around the scene.
 *
 * @sa
 * vtkButtonWidget vtkButtonRepresentation vtkTexturedButtonRepresentation
 * vtkProp3DButtonRepresentation
*/

#ifndef vtkTexturedButtonRepresentation2D_h
#define vtkTexturedButtonRepresentation2D_h

#include "vtkInteractionWidgetsModule.h" // For export macro
#include "vtkButtonRepresentation.h"

class vtkProperty2D;
class vtkImageData;
class vtkTextureArray; //PIMPLd
class vtkProperty2D;
class vtkAlgorithmOutput;
class vtkBalloonRepresentation;
class vtkCoordinate;


class VTKINTERACTIONWIDGETS_EXPORT vtkTexturedButtonRepresentation2D : public vtkButtonRepresentation
{
public:
  /**
   * Instantiate the class.
   */
  static vtkTexturedButtonRepresentation2D *New();

  //@{
  /**
   * Standard methods for the class.
   */
  vtkTypeMacro(vtkTexturedButtonRepresentation2D,vtkButtonRepresentation);
  void PrintSelf(ostream& os, vtkIndent indent);
  //@}

  //@{
  /**
   * Specify the property to use when the button is to appear "normal"
   * i.e., the mouse pointer is not hovering or selecting the button.
   */
  virtual void SetProperty(vtkProperty2D *p);
  vtkGetObjectMacro(Property,vtkProperty2D);
  //@}

  //@{
  /**
   * Specify the property to use when the hovering over the button.
   */
  virtual void SetHoveringProperty(vtkProperty2D *p);
  vtkGetObjectMacro(HoveringProperty,vtkProperty2D);
  //@}

  //@{
  /**
   * Specify the property to use when selecting the button.
   */
  virtual void SetSelectingProperty(vtkProperty2D *p);
  vtkGetObjectMacro(SelectingProperty,vtkProperty2D);
  //@}

  //@{
  /**
   * Add the ith texture corresponding to the ith button state.
   * The parameter i should be 0<=i<NumberOfStates.
   */
  void SetButtonTexture(int i, vtkImageData *image);
  vtkImageData *GetButtonTexture(int i);
  //@}

  /**
   * Grab the underlying vtkBalloonRepresentation used to position and display
   * the button texture.
   */
  vtkBalloonRepresentation *GetBalloon() {return this->Balloon;}

  //@{
  /**
   * Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
   */
  virtual int ComputeInteractionState(int X, int Y, int modify=0);
  virtual void BuildRepresentation();
  virtual void Highlight(int state);
  //@}

  /**
   * Conventional PlaceWidget() method to satisfy the vtkWidgetRepresentation API.
   * In this version, bounds[6] specifies a rectangle in *display* coordinates
   * in which to place the button. The values for bounds[4] and bounds[5] can be
   * set to zero. Note that PlaceWidget() is typically called at the end of configuring
   * the button representation.
   */
  virtual void PlaceWidget(double bounds[6]);

  /**
   * This alternative PlaceWidget() method can be used to anchor the button
   * to a 3D point. In this case, the button representation will move around
   * the screen as the camera moves around the world space. The first
   * parameter anchor[3] is the world point anchor position (attached to the
   * lower left portion of the button by default); and the size[2] parameter
   * defines a x-y box in display coordinates in which the button will
   * fit. Note that you can grab the vtkBalloonRepresentation and set an
   * offset value if the anchor point is to be elsewhere on the button.
   */
  virtual void PlaceWidget(double anchor[3], int size[2]);

  //@{
  /**
   * Provide the necessary methods to satisfy the rendering API.
   */
  virtual void ShallowCopy(vtkProp *prop);
  virtual double *GetBounds();
  virtual void GetActors(vtkPropCollection *pc);
  virtual void ReleaseGraphicsResources(vtkWindow*);
  virtual int RenderOverlay(vtkViewport*);
  virtual int HasTranslucentPolygonalGeometry();
  //@}

protected:
  vtkTexturedButtonRepresentation2D();
  ~vtkTexturedButtonRepresentation2D();

  // Representing the button
  vtkBalloonRepresentation *Balloon;

  // Properties of the button
  vtkProperty2D *Property;
  vtkProperty2D *HoveringProperty;
  vtkProperty2D *SelectingProperty;
  void CreateDefaultProperties();

  // Keep track of the images (textures) associated with the N
  // states of the button.
  vtkTextureArray *TextureArray;

  // Tracking world position
  vtkCoordinate *Anchor;

private:
  vtkTexturedButtonRepresentation2D(const vtkTexturedButtonRepresentation2D&) VTK_DELETE_FUNCTION;
  void operator=(const vtkTexturedButtonRepresentation2D&) VTK_DELETE_FUNCTION;
};

#endif