1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 /* This is a simple colored area widget -- rectangular or round  */
24 
25 #ifndef NUVIE_GUI_GUI_AREA_H
26 #define NUVIE_GUI_GUI_AREA_H
27 
28 #include "ultima/nuvie/gui/widgets/gui_widget.h"
29 #include "ultima/nuvie/screen/screen.h"
30 
31 namespace Ultima {
32 namespace Nuvie {
33 
34 #define AREA_ROUND 1
35 #define AREA_ANGULAR 2
36 
37 class GUI_Area : public GUI_Widget {
38 
39 public:
40 	/* Passed the area, color and shape */
41 	GUI_Area(int x, int y, int w, int h, uint8 r, uint8 g, uint8 b, int aShape = AREA_ANGULAR);
42 
43 	/* Passed the area, color, frame color, frame thickness and shape */
44 	GUI_Area(int x, int y, int w, int h, uint8 r, uint8 g, uint8 b,
45 	         uint8 fr, uint8 fg, uint8 fb, int fthick, int aShape = AREA_ANGULAR);
46 
47 	/* Map the color to the display */
48 	void SetDisplay(Screen *s) override;
49 
50 	/* Show the widget  */
51 	void Display(bool full_redraw) override;
52 
53 
54 protected:
55 	uint8 R, G, B;
56 	uint32 color;
57 
58 	/* flag */
59 	int useFrame;
60 
61 	/* frame color values */
62 	uint8 fR, fG, fB;
63 	uint32 frameColor;
64 
65 	/* remember me */
66 	int frameThickness;
67 	int shape;
68 
69 };
70 
71 } // End of namespace Nuvie
72 } // End of namespace Ultima
73 
74 #endif
75