This file is indexed.

/usr/include/KWWidgets/Templates/vtkKWWidgetWithSpinButtonsSubclass.cxx.in 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
168
169
170
171
172
/*=========================================================================

  Module:    $RCSfile: vtkKWWidgetWithSpinButtonsSubclass.cxx.in,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.

=========================================================================*/

#include "@WidgetType@WithSpinButtons.h"

#include "vtkKWSpinButtons.h"
#include "vtkObjectFactory.h"
#include "@WidgetType@.h"

#include <vtksys/ios/sstream>

//----------------------------------------------------------------------------
vtkStandardNewMacro(@WidgetType@WithSpinButtons);
vtkCxxRevisionMacro(@WidgetType@WithSpinButtons, "$Revision: 1.6 $");

//----------------------------------------------------------------------------
@WidgetType@WithSpinButtons::@WidgetType@WithSpinButtons()
{
  this->Widget = @WidgetType@::New();
}

//----------------------------------------------------------------------------
@WidgetType@WithSpinButtons::~@WidgetType@WithSpinButtons()
{
  if (this->Widget)
    {
    this->Widget->Delete();
    this->Widget = NULL;
    }
}

//----------------------------------------------------------------------------
@WidgetType@* @WidgetType@WithSpinButtons::GetWidget()
{
  return this->Widget;
}

//----------------------------------------------------------------------------
void @WidgetType@WithSpinButtons::CreateWidget()
{
  // Check if already created

  if (this->IsCreated())
    {
    vtkErrorMacro("@WidgetType@WithSpinButtons already created");
    return;
    }

  // Call the superclass

  this->Superclass::CreateWidget();

  // Create the widget

  if (!this->Widget->GetParent())
    {
    this->Widget->SetParent(this);
    }
  this->Widget->Create();
  if (!this->Widget->IsCreated())
    {
    vtkErrorMacro(<< this->GetClassName() << " failed creating @WidgetType@");
    return;
    }

  // Pack

  this->Pack();

  // Update enable state
  
  this->UpdateEnableState();
}

//----------------------------------------------------------------------------
void @WidgetType@WithSpinButtons::Pack()
{
  if (!this->IsCreated())
    {
    return;
    }

  // Unpack everything

  if (this->Widget)
    {
    this->Widget->UnpackSiblings();
    }

  // Repack everything

  vtksys_ios::ostringstream tk_cmd;

  if (this->Widget && this->Widget->IsCreated())
    {
    tk_cmd << "pack " << this->Widget->GetWidgetName() 
           << " -anchor nw -side left -fill both -expand y" << endl;
    }

  if (this->SpinButtons && this->SpinButtons->IsCreated())
    {
    tk_cmd << "pack " << this->SpinButtons->GetWidgetName() 
           << " -anchor ne -side right -fill y -expand n" << endl;
    }

  this->Script(tk_cmd.str().c_str());
}

//----------------------------------------------------------------------------
void @WidgetType@WithSpinButtons::NextValueCallback()
{
  if (this->Widget)
    {
    this->Widget->NextValue();
    }
}

//----------------------------------------------------------------------------
void @WidgetType@WithSpinButtons::PreviousValueCallback()
{
  if (this->Widget)
    {
    this->Widget->PreviousValue();
    }
}

//----------------------------------------------------------------------------
void @WidgetType@WithSpinButtons::UpdateEnableState()
{
  this->Superclass::UpdateEnableState();
  
  this->PropagateEnableState(this->Widget);
}

// ---------------------------------------------------------------------------
void @WidgetType@WithSpinButtons::SetBalloonHelpString(const char *string)
{
  this->Superclass::SetBalloonHelpString(string);

  if (this->Widget)
    {
    this->Widget->SetBalloonHelpString(string);
    }
}

//----------------------------------------------------------------------------
void @WidgetType@WithSpinButtons::PrintSelf(ostream& os, vtkIndent indent)
{
  this->Superclass::PrintSelf(os,indent);

  os << indent << "Widget: ";
  if (this->Widget)
    {
    os << endl;
    this->Widget->PrintSelf(os, indent.GetNextIndent());
    }
  else
    {
    os << "None" << endl;
    }
}