This file is indexed.

/usr/include/paragui/pgwindow.h is in libparagui1.1-dev 1.1.8-3.1.

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
/*
    ParaGUI - crossplatform widgetset
    Copyright (C) 2000,2001,2002  Alexander Pipelka
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License as published by the Free Software Foundation; either
    version 2 of the License, or (at your option) any later version.
 
    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.
 
    You should have received a copy of the GNU Library General Public
    License along with this library; if not, write to the Free
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
    Alexander Pipelka
    pipelka@teleweb.at
 
    Last Update:      $Author: braindead $
    Update Date:      $Date: 2004/05/27 21:23:49 $
    Source File:      $Source: /cvsroot/paragui/paragui/include/pgwindow.h,v $
    CVS/RCS Revision: $Revision: 1.3.6.3.2.12 $
    Status:           $State: Exp $
*/

#ifndef PG_WINDOW_H
#define PG_WINDOW_H

#include "pgthemewidget.h"
#include "pglabel.h"
#include <string>

class PG_Button;

/**
	@author Alexander Pipelka
 
	@short A window inside the program (not a windowing environment window)
 
	Creates a window entirely inside ParaGUI. This window can be modal or non-modal.
	Non-modal windows can be brought in front of others by clicking the titlebar.
*/

class DECLSPEC PG_Window : public PG_ThemeWidget  {
public:


	typedef enum {
		MODAL = 0x01,
		SHOW_CLOSE = 0x02,
		SHOW_MINIMIZE = 0x04,
		DEFAULT = SHOW_CLOSE
	} WindowFlags;

	enum {
		IDWINDOW_CLOSE	 = PG_WIDGETID_INTERNAL + 14,
		IDWINDOW_MINIMIZE = PG_WIDGETID_INTERNAL + 15,
		IDWINDOW_RESTORE = PG_WIDGETID_INTERNAL + 15
	};

	/**
	Signal type declaration
	**/
	typedef PG_Signal1<PG_Window*> SignalWindowClose;
	typedef PG_Signal1<PG_Window*> SignalWindowMinimize;
	typedef PG_Signal1<PG_Window*> SignalWindowRestore;

	/**
	Constructor for the PG_Window class
	@param parent	pointer to the parent widget or NULL
	@param r	screen position of the button
	@param windowtext window titlebar label
	@param WindowFlags (DEFAULT = SHOW_CLOSE | SHOW_CLOSE | SHOW_MINIMIZE | MODAL )
	@param style themestyle of the window
	@param heightTitlebar	height of the window titlebar
	*/
	PG_Window(PG_Widget* parent, const PG_Rect& r = PG_Rect::null, const char* windowtext = NULL, WindowFlags flags = DEFAULT, const char* style="Window", int heightTitlebar = 25);

	/** */
	~PG_Window();

	void LoadThemeStyle(const char* widgettype);

	/**
	set window titlebar color
	@param	c	pointer to a PG_Color
	*/
	void SetTitlebarColor(const PG_Color& c);

	/**
	get window title
	@return	PG_Color	Giving the height of the titlebar
	*/
	PG_Color GetTitlebarColor();

	/**
	set window titlebar height
	@return	height	height of the titlebar
	*/
	void SetTitlebarHeight(Uint8 height);

	/**
	get window titlebar height
	@return	Uint8	height of the titlebar
	*/
	Uint8 GetTitlebarHeight();

	/**
	set window title and alignment
	@param	title					new window title
	@param alignment	alignment of the text (PG_Label::LEFT | PG_Label::CENTER | PG_Label::RIGHT)
	*/
	void SetTitle(const char* title, PG_Label::TextAlign alignment = PG_Label::CENTER);

	void SetText(const char* text);
	
	/**
	get window title
	@return	pointer to the window title string
	*/
	const char* GetTitle();

	const char* GetText();

	/**
	get window icon
	@return pointer to the window's icon
	*/
	SDL_Surface* GetIcon();

	/**
	set window icon
	@param filename	image-file to load
	*/
	void SetIcon(const char* filename);

	/**
	set window icon
	@param icon		pointer to imagedata (SDL_Surface)
	*/
	void SetIcon(SDL_Surface* icon);
	
	/**
	Make window handle / ignore dragging
	*/
	void SetMoveable(bool moveable = true);
	
	SignalWindowClose sigClose;
	SignalWindowMinimize sigMinimize;
	SignalWindowRestore sigRestore;

protected:

	void RecalcPositions();

	/** */
	void eventBlit(SDL_Surface* surface, const PG_Rect& src, const PG_Rect& dst);

	/** */
	void eventSizeWidget(Uint16 w, Uint16 h);

	/** */
	virtual bool handleButtonClick(PG_Button* button);

	/** */
	bool eventMouseButtonDown(const SDL_MouseButtonEvent* button);

	/** */
	bool eventMouseButtonUp(const SDL_MouseButtonEvent* button);

	/** */
	bool eventMouseMotion(const SDL_MouseMotionEvent* motion);

private:

	Uint8 my_heightTitlebar;

	PG_Button* my_buttonClose;
	PG_Button* my_buttonMinimize;
	PG_Button* my_buttonIcon;

	PG_ThemeWidget* my_titlebar;
	PG_Label* my_labelTitle;

	bool my_moveMode;
	Uint8 my_moveTransparency;
	PG_Point my_moveDelta;

	bool my_showCloseButton;
	bool my_showMinimizeButton;
	bool my_moveable;

private: // disable the copy operators
	
	PG_Window(const PG_Window&);
	PG_Window& operator=(const PG_Window&);

};

#endif // PG_WINDOW_H