This file is indexed.

/usr/lib/Wt/examples/planner/ShapesWidget.h is in witty-examples 3.3.0-1build1.

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
// This may look like C code, but it's really -*- C++ -*-
/*
 * Copyright (C) 2010 Emweb bvba, Heverlee, Belgium.
 *
 * See the LICENSE file for terms of use.
 */

#ifndef SHAPES_WIDGET_H_
#define SHAPES_WIDGET_H_

#include "Shape.h"

#include <Wt/WPaintedWidget>
#include <Wt/WPaintDevice>

class ShapesWidget : public Wt::WPaintedWidget
{
public:
  ShapesWidget(Wt::WContainerWidget* parent);
  ~ShapesWidget();

  Wt::WString selectedColor();
  Wt::WString selectedShape();
  bool correctlyClicked(const Wt::WMouseEvent& me);
  void initShapes();
  
protected:
  virtual void paintEvent(Wt::WPaintDevice *paintDevice);

private:
  int randomInt(const unsigned max);
  double randomDouble();
  bool sameShapeAndColor(const Shape* s1, const Shape* s2);
  ShapeColor createRandomColor();
  Shape* createRandomShape();
  void cleanupShapes();

private:
  std::vector<Shape*> shapes_;
  Shape* toSelect_;
};

#endif //SHAPES_WIDGET_H_