ScummVM API documentation
gui_area.h
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 modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (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, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 /* This is a simple colored area widget -- rectangular or round */
23 
24 #ifndef NUVIE_GUI_GUI_AREA_H
25 #define NUVIE_GUI_GUI_AREA_H
26 
27 #include "ultima/nuvie/gui/widgets/gui_widget.h"
28 #include "ultima/nuvie/screen/screen.h"
29 
30 namespace Ultima {
31 namespace Nuvie {
32 
33 #define AREA_ROUND 1
34 #define AREA_ANGULAR 2
35 
36 class GUI_Area : public GUI_Widget {
37 
38 public:
39  /* Passed the area, color and shape */
40  GUI_Area(int x, int y, int w, int h, uint8 r, uint8 g, uint8 b, int aShape = AREA_ANGULAR);
41 
42  /* Passed the area, color, frame color, frame thickness and shape */
43  GUI_Area(int x, int y, int w, int h, uint8 r, uint8 g, uint8 b,
44  uint8 fr, uint8 fg, uint8 fb, int fthick, int aShape = AREA_ANGULAR);
45 
46  /* Map the color to the display */
47  void SetDisplay(Screen *s) override;
48 
49  /* Show the widget */
50  void Display(bool full_redraw) override;
51 
52 
53 protected:
54  uint8 R, G, B;
55  uint32 color;
56 
57  /* flag */
58  int useFrame;
59 
60  /* frame color values */
61  uint8 fR, fG, fB;
62  uint32 frameColor;
63 
64  /* remember me */
65  int frameThickness;
66  int shape;
67 
68 };
69 
70 } // End of namespace Nuvie
71 } // End of namespace Ultima
72 
73 #endif
Definition: gui_area.h:36
Definition: gui_widget.h:38
Definition: screen.h:41
Definition: detection.h:27