This file is indexed.

/usr/include/tuxcap/Widget.h is in libtuxcap-dev 1.4.0.dfsg2-2.3+b2.

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
#ifndef  __WIDGET_H__
#define __WIDGET_H__

#include "Common.h"
#include "Color.h"
#include "Insets.h"
#include "Graphics.h"
#include "KeyCodes.h"
#include "WidgetContainer.h"

namespace Sexy
{

class WidgetManager;

typedef std::vector<Color> ColorVector;

class Widget : public WidgetContainer
{
public:			
	bool					mVisible;
	bool					mMouseVisible;		
	bool					mDisabled;
	bool					mHasFocus;	
	bool					mIsDown;
	bool					mIsOver;
	bool					mHasTransparencies;	
	ColorVector				mColors;
	Insets					mMouseInsets;
	bool					mDoFinger;
	bool					mWantsFocus;

	Widget*					mTabPrev;
	Widget*					mTabNext;	

	static bool				mWriteColoredString;  // controls whether ^color^ works in calls to WriteString
	
	void					WidgetRemovedHelper();

public:
	Widget();
	virtual ~Widget();
		
	virtual void			OrderInManagerChanged();
	virtual void			SetVisible(bool isVisible);
	
	virtual void			SetColors(int theColors[][3], int theNumColors);
	virtual void			SetColors(int theColors[][4], int theNumColors);
	virtual void			SetColor(int theIdx, const Color& theColor);
	virtual const Color&	GetColor(int theIdx);
	virtual Color			GetColor(int theIdx, const Color& theDefaultColor);	
		
	virtual void			SetDisabled(bool isDisabled);
	virtual void			ShowFinger(bool on);
	
	virtual void			Resize(int theX, int theY, int theWidth, int theHeight);
	virtual void			Resize(const Rect& theRect);
	virtual void			Move(int theNewX, int theNewY);	
	virtual bool			WantsFocus();
	virtual void			Draw(Graphics* g); // Already translated
	virtual void			DrawOverlay(Graphics* g);
	virtual void			DrawOverlay(Graphics* g, int thePriority);
	virtual void			Update();
	virtual void			UpdateF(float theFrac);
	virtual void			GotFocus();
	virtual void			LostFocus();	
	virtual void			KeyChar(SexyChar theChar);
	virtual void			KeyDown(KeyCode theKey);
	virtual void			KeyUp(KeyCode theKey);	
	virtual void			MouseEnter();
	virtual void			MouseLeave();
	virtual void			MouseMove(int x, int y);
	virtual void			MouseDown(int x, int y, int theClickCount);
	virtual void			MouseDown(int x, int y, int theBtnNum, int theClickCount);
	virtual void			MouseUp(int x, int y);
	virtual void			MouseUp(int x, int y, int theClickCount);
	virtual void			MouseUp(int x, int y, int theBtnNum, int theClickCount);
	virtual void			MouseDrag(int x, int y);
	virtual void			MouseWheel(int theDelta);
	virtual bool			IsPointVisible(int x, int y);
	
	//////// Helper functions
	
	virtual Rect			WriteCenteredLine(Graphics* g, int anOffset, const SexyString& theLine);
	virtual Rect			WriteCenteredLine(Graphics* g, int anOffset, const SexyString& theLine, Color theColor1, Color theColor2, const Point& theShadowOffset = Point(1,2));

	virtual int				WriteString(Graphics* g, const SexyString& theString, int theX, int theY, int theWidth = -1, int theJustification = -1, bool drawString = true, int theOffset = 0, int theLength = -1);
	virtual int				WriteWordWrapped(Graphics* g, const Rect& theRect, const SexyString& theLine, int theLineSpacing, int theJustification);
	virtual int				GetWordWrappedHeight(Graphics* g, int theWidth, const SexyString& theLine, int aLineSpacing);
	virtual int				GetNumDigits(int theNumber);
	virtual void			WriteNumberFromStrip(Graphics* g, int theNumber, int theX, int theY, Image* theNumberStrip, int aSpacing);
	virtual bool			Contains(int theX, int theY);
	virtual Rect			GetInsetRect();	
	void					DeferOverlay(int thePriority = 0);	

	//////// Layout functions
	int						Left()							{ return mX; } 
	int						Top()							{ return mY; }
	int						Right()							{ return mX + mWidth; }
	int						Bottom()						{ return mY + mHeight; }
	int						Width()							{ return mWidth; }
	int						Height()						{ return mHeight; }

	void					Layout(int theLayoutFlags, Widget *theRelativeWidget, int theLeftPad = 0, int theTopPad = 0, int theWidthPad = 0, int theHeightPad = 0);
};

/////// Layout flags used in Widget::Layout method
enum LayoutFlags
{
	LAY_SameWidth		=		0x0001,
	LAY_SameHeight		=		0x0002,

	LAY_SetLeft			=		0x0010,
	LAY_SetTop			=		0x0020,
	LAY_SetWidth		=		0x0040,
	LAY_SetHeight		=		0x0080,

	LAY_Above			=		0x0100,
	LAY_Below			=		0x0200,
	LAY_Right			=		0x0400,
	LAY_Left			=		0x0800,

	LAY_SameLeft		=		0x1000,
	LAY_SameRight		=		0x2000,
	LAY_SameTop			=		0x4000,
	LAY_SameBottom		=		0x8000,

	LAY_GrowToRight		=		0x10000,
	LAY_GrowToLeft		=		0x20000,
	LAY_GrowToTop		=		0x40000,
	LAY_GrowToBottom	=		0x80000,

	LAY_HCenter			=		0x100000,
	LAY_VCenter			=		0x200000,
	LAY_Max				=		0x400000,

	LAY_SameSize		=		LAY_SameWidth | LAY_SameHeight,
	LAY_SameCorner		=		LAY_SameLeft  | LAY_SameTop,
	LAY_SetPos			=		LAY_SetLeft   | LAY_SetTop,
	LAY_SetSize			=		LAY_SetWidth  | LAY_SetHeight
};


}

#endif //__WIDGET_H__