This file is indexed.

/usr/include/KWWidgets/vtkKWMatrixWidget.h is in libkwwidgets1-dev 1.0.0~cvs20100930-8.

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
/*=========================================================================

  Module:    $RCSfile: vtkKWMatrixWidget.h,v $

  Copyright (c) Kitware, Inc.
  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 vtkKWMatrixWidget - matrix widget
// .SECTION Description
// vtkKWMatrixWidget is a widget containing entries that help view and
// edit a matrix.
// .SECTION Thanks
// This work is part of the National Alliance for Medical Image
// Computing (NAMIC), funded by the National Institutes of Health
// through the NIH Roadmap for Medical Research, Grant U54 EB005149.
// Information on the National Centers for Biomedical Computing
// can be obtained from http://nihroadmap.nih.gov/bioinformatics.

#ifndef __vtkKWMatrixWidget_h
#define __vtkKWMatrixWidget_h

#include "vtkKWCompositeWidget.h"

class vtkKWEntrySet;

class KWWidgets_EXPORT vtkKWMatrixWidget : public vtkKWCompositeWidget
{
public:
  static vtkKWMatrixWidget* New();
  vtkTypeRevisionMacro(vtkKWMatrixWidget,vtkKWCompositeWidget);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Set/Get the matrix size. Default to 1x1.
  virtual void SetNumberOfColumns(int col);
  vtkGetMacro(NumberOfColumns, int);
  virtual void SetNumberOfRows(int col);
  vtkGetMacro(NumberOfRows, int);

  // Description:
  // Set/Get the value of a given element.
  virtual void SetElementValue(int row, int col, const char *val);
  virtual const char* GetElementValue(int row, int col);
  virtual void SetElementValueAsInt(int row, int col, int val);
  virtual int GetElementValueAsInt(int row, int col);
  virtual void SetElementValueAsDouble(int row, int col, double val);
  virtual double GetElementValueAsDouble(int row, int col);

  // Description:
  // The width is the number of charaters each element can fit.
  virtual void SetElementWidth(int width);
  vtkGetMacro(ElementWidth, int);

  // Description:
  // Set/Get readonly flag. This flags makes each element read only.
  virtual void SetReadOnly(int);
  vtkBooleanMacro(ReadOnly, int);
  vtkGetMacro(ReadOnly, int);

  // Description:
  // Restrict the value of an element to a given type
  // (integer, double, or no restriction).
  //BTX
  enum
  {
    RestrictNone = 0,
    RestrictInteger,
    RestrictDouble
  };
  //ETX
  vtkGetMacro(RestrictElementValue, int);
  virtual void SetRestrictElementValue(int);
  virtual void SetRestrictElementValueToInteger();
  virtual void SetRestrictElementValueToDouble();
  virtual void SetRestrictElementValueToNone();

  // Description:
  // Specifies a command to be invoked when the value of an element in the
  // matrix has changed.
  // The 'object' argument is the object that will have the method called on
  // it. The 'method' argument is the name of the method to be called and any
  // arguments in string form. If the object is NULL, the method is still
  // evaluated as a simple command. 
  // The following parameters are also passed to the command:
  // - the element location, i.e. its row and column indices: int, int
  // - the element's new value: const char*
  virtual void SetElementChangedCommand(vtkObject *object, const char *method);

  // Description:
  // Events. The ElementChangedEvent is triggered when the value of an
  // element in the matrix has changed.
  // The following parameters are also passed as client data:
  // - the element location, i.e. its row and column indices: int, int
  // - the element's new value: const char*
  // Note that given the heterogeneous nature of types passed as client data,
  // you should treat it as an array of void*[3], each one a pointer to
  // the parameter (i.e., &int, &int, &const char*).
  //BTX
  enum
  {
    ElementChangedEvent = 10000
  };
  //ETX

  // Description:
  // Specify when ElementChangedCommand should be invoked. Default to losing
  // focus and return key in the entry.
  //BTX
  enum
  {
    TriggerOnFocusOut  = 1,
    TriggerOnReturnKey = 2,
    TriggerOnAnyChange = 4
  };
  //ETX
  vtkGetMacro(ElementChangedCommandTrigger, int);
  virtual void SetElementChangedCommandTrigger(int);
  virtual void SetElementChangedCommandTriggerToReturnKeyAndFocusOut();
  virtual void SetElementChangedCommandTriggerToAnyChange();

  // Description:
  // Update the "enable" state of the object and its internal parts.
  // Depending on different Ivars (this->Enabled, the application's 
  // Limited Edition Mode, etc.), the "enable" state of the object is updated
  // and propagated to its internal parts/subwidgets. This will, for example,
  // enable/disable parts of the widget UI, enable/disable the visibility
  // of 3D widgets, etc.
  virtual void UpdateEnableState();

  // Description:
  // Callbacks.
  virtual void ElementChangedCallback(int id, const char *value);

protected:
  vtkKWMatrixWidget();
  virtual ~vtkKWMatrixWidget();

  int NumberOfColumns;
  int NumberOfRows;

  int ElementWidth;
  int ReadOnly;
  int RestrictElementValue;
  int ElementChangedCommandTrigger;

  // Description:
  // Create the widget.
  virtual void CreateWidget();
  virtual void UpdateWidget();

  vtkKWEntrySet *EntrySet;

  char *ElementChangedCommand;
  void InvokeElementChangedCommand(int row, int col, const char *value);

private:
  vtkKWMatrixWidget(const vtkKWMatrixWidget&); // Not implemented
  void operator=(const vtkKWMatrixWidget&); // Not implemented
};

#endif