This file is indexed.

/usr/include/vtk-7.1/vtkChartLegend.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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkChartLegend.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   vtkChartLegend
 * @brief   draw the chart legend
 *
 *
 * The vtkChartLegend is drawn in screen coordinates. It is usually one of the
 * last elements of a chart to be drawn. It renders the the mark/line for each
 * plot, and the plot labels.
*/

#ifndef vtkChartLegend_h
#define vtkChartLegend_h

#include "vtkChartsCoreModule.h" // For export macro
#include "vtkContextItem.h"
#include "vtkNew.h"         // For vtkNew
#include "vtkRect.h"        // For vtkRectf return value

class vtkChart;
class vtkPen;
class vtkBrush;
class vtkTextProperty;

class VTKCHARTSCORE_EXPORT vtkChartLegend : public vtkContextItem
{
public:
  vtkTypeMacro(vtkChartLegend, vtkContextItem);
  virtual void PrintSelf(ostream &os, vtkIndent indent);

  /**
   * Creates a 2D Chart object.
   */
  static vtkChartLegend *New();

  //@{
  /**
   * Set point the legend box is anchored to.
   */
  vtkSetVector2Macro(Point, float);
  //@}

  //@{
  /**
   * Get point the legend box is anchored to.
   */
  vtkGetVector2Macro(Point, float);
  //@}

  enum {
    LEFT = 0,
    CENTER,
    RIGHT,
    TOP,
    BOTTOM,
    CUSTOM
  };

  /**
   * Set point the legend box is anchored to.
   */
  void SetPoint(const vtkVector2f &point);

  /**
   * Get point the legend box is anchored to.
   */
  const vtkVector2f& GetPointVector();

  //@{
  /**
   * Set the horizontal alignment of the legend to the point specified.
   * Valid values are LEFT, CENTER and RIGHT.
   */
  vtkSetMacro(HorizontalAlignment, int);
  //@}

  //@{
  /**
   * Get the horizontal alignment of the legend to the point specified.
   */
  vtkGetMacro(HorizontalAlignment, int);
  //@}

  //@{
  /**
   * Set the vertical alignment of the legend to the point specified.
   * Valid values are TOP, CENTER and BOTTOM.
   */
  vtkSetMacro(VerticalAlignment, int);
  //@}

  //@{
  /**
   * Get the vertical alignment of the legend to the point specified.
   */
  vtkGetMacro(VerticalAlignment, int);
  //@}

  //@{
  /**
   * Set the padding between legend marks, default is 5.
   */
  vtkSetMacro(Padding, int);
  //@}

  //@{
  /**
   * Get the padding between legend marks.
   */
  vtkGetMacro(Padding, int);
  //@}

  //@{
  /**
   * Set the symbol width, default is 15.
   */
  vtkSetMacro(SymbolWidth, int);
  //@}

  //@{
  /**
   * Get the legend symbol width.
   */
  vtkGetMacro(SymbolWidth, int);
  //@}

  /**
   * Set the point size of the label text.
   */
  virtual void SetLabelSize(int size);

  /**
   * Get the point size of the label text.
   */
  virtual int GetLabelSize();

  //@{
  /**
   * Get/set if the legend should be drawn inline (inside the chart), or not.
   * True would generally request that the chart draws it inside the chart,
   * false would adjust the chart axes and make space to draw the axes outside.
   */
  vtkSetMacro(Inline, bool);
  vtkGetMacro(Inline, bool);
  //@}

  //@{
  /**
   * Get/set if the legend can be dragged with the mouse button, or not.
   * True results in left click and drag causing the legend to move around the
   * scene. False disables response to mouse events.
   * The default is true.
   */
  vtkSetMacro(DragEnabled, bool);
  vtkGetMacro(DragEnabled, bool);
  //@}

  /**
   * Set the chart that the legend belongs to and will draw the legend for.
   */
  void SetChart(vtkChart* chart);

  /**
   * Get the chart that the legend belongs to and will draw the legend for.
   */
  vtkChart* GetChart();

  /**
   * Update the geometry of the axis. Takes care of setting up the tick mark
   * locations etc. Should be called by the scene before rendering.
   */
  virtual void Update();

  /**
   * Paint event for the axis, called whenever the axis needs to be drawn.
   */
  virtual bool Paint(vtkContext2D *painter);

  /**
   * Request the space the legend requires to be drawn. This is returned as a
   * vtkRect4f, with the corner being the offset from Point, and the width/
   * height being the total width/height required by the axis. In order to
   * ensure the numbers are correct, Update() should be called first.
   */
  virtual vtkRectf GetBoundingRect(vtkContext2D* painter);

  /**
   * Get the pen used to draw the legend outline.
   */
  vtkPen * GetPen();

  /**
   * Get the brush used to draw the legend background.
   */
  vtkBrush * GetBrush();

  /**
   * Get the vtkTextProperty for the legend's labels.
   */
  vtkTextProperty * GetLabelProperties();

  //@{
  /**
   * Toggle whether or not this legend should attempt to cache its position
   * and size.  The default value is true.  If this value is set to false,
   * the legend will recalculate its position and bounds every time it is
   * drawn.  If users will be able to zoom in or out on your legend, you
   * may want to set this to false.  Otherwise, the border around the legend
   * may not resize appropriately.
   */
  vtkSetMacro(CacheBounds, bool);
  vtkGetMacro(CacheBounds, bool);
  vtkBooleanMacro(CacheBounds, bool);
  //@}

  /**
   * Return 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:
  vtkChartLegend();
  ~vtkChartLegend();

  float* Point;  // The point the legend is anchored to.
  int HorizontalAlignment; // Alignment of the legend to the point it is anchored to.
  int VerticalAlignment; // Alignment of the legend to the point it is anchored to.

  /**
   * The pen used to draw the legend box.
   */
  vtkNew<vtkPen> Pen;

  /**
   * The brush used to render the background of the legend.
   */
  vtkNew<vtkBrush> Brush;

  /**
   * The text properties of the labels used in the legend.
   */
  vtkNew<vtkTextProperty> LabelProperties;

  /**
   * Should we move the legend box around in response to the mouse drag?
   */
  bool DragEnabled;

  /**
   * Should the legend attempt to avoid recalculating its position &
   * bounds unnecessarily?
   */
  bool CacheBounds;

  /**
   * Last button to be pressed.
   */
  int Button;

  vtkTimeStamp PlotTime;
  vtkTimeStamp RectTime;

  vtkRectf Rect;

  /**
   * Padding between symbol and text.
   */
  int Padding;

  /**
   * Width of the symbols in pixels in the legend.
   */
  int SymbolWidth;

  /**
   * Should the legend be drawn inline in its chart?
   */
  bool Inline;

  // Private storage class
  class Private;
  Private* Storage;

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

#endif //vtkChartLegend_h