ScummVM API documentation
gui_console.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 #ifndef NUVIE_GUI_GUI_CONSOLE_H
23 #define NUVIE_GUI_GUI_CONSOLE_H
24 
25 
26 
27 #include "ultima/nuvie/gui/widgets/gui_widget.h"
28 #include "ultima/nuvie/gui/gui_types.h"
29 #include "ultima/nuvie/gui/gui_font.h"
30 #include "ultima/nuvie/screen/screen.h"
31 
32 namespace Ultima {
33 namespace Nuvie {
34 
35 class GUI_Console : public GUI_Widget {
36 
37  GUI_Color *bg_color;
38  GUI_Font *font;
39  uint16 num_cols;
40  uint16 num_rows;
42 
43 public:
44  GUI_Console(uint16 x, uint16 y, uint16 w, uint16 h);
45  ~GUI_Console() override;
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  /* events, used for dragging the area. */
54  GUI_status MouseDown(int x, int y, Shared::MouseButton button) override;
55  GUI_status MouseUp(int x, int y, Shared::MouseButton button) override;
56  GUI_status MouseMotion(int x, int y, uint8 state) override;
57 
58  virtual void AddLine(const Std::string &line);
59 };
60 
61 } // End of namespace Nuvie
62 } // End of namespace Ultima
63 
64 #endif
Definition: gui_widget.h:38
Definition: gui_font.h:36
Definition: gui_console.h:35
Definition: screen.h:41
Definition: detection.h:27
Definition: string.h:30
Definition: containers.h:200
Definition: gui_types.h:47