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 #ifndef NUVIE_GUI_GUI_CONSOLE_H
24 #define NUVIE_GUI_GUI_CONSOLE_H
25 
26 
27 
28 #include "ultima/nuvie/gui/widgets/gui_widget.h"
29 #include "ultima/nuvie/gui/gui_types.h"
30 #include "ultima/nuvie/gui/gui_font.h"
31 #include "ultima/nuvie/screen/screen.h"
32 
33 namespace Ultima {
34 namespace Nuvie {
35 
36 class GUI_Console : public GUI_Widget {
37 
38 	GUI_Color *bg_color;
39 	GUI_Font *font;
40 	uint16 num_cols;
41 	uint16 num_rows;
42 	Std::list<Std::string> data;
43 
44 public:
45 	GUI_Console(uint16 x, uint16 y, uint16 w, uint16 h);
46 	~GUI_Console() override;
47 
48 	/* Map the color to the display */
49 	void SetDisplay(Screen *s) override;
50 
51 	/* Show the widget  */
52 	void Display(bool full_redraw) override;
53 
54 	/* events, used for dragging the area. */
55 	GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
56 	GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
57 	GUI_status MouseMotion(int x, int y, uint8 state) override;
58 
59 	virtual void AddLine(Std::string line);
60 
61 protected:
62 
63 };
64 
65 } // End of namespace Nuvie
66 } // End of namespace Ultima
67 
68 #endif
69