ScummVM API documentation
msg_scroll_new_ui.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_CORE_MSG_SCROLL_NEW_UI_H
23#define NUVIE_CORE_MSG_SCROLL_NEW_UI_H
24
25#include "ultima/nuvie/misc/call_back.h"
26#include "ultima/nuvie/gui/widgets/gui_widget.h"
27#include "common/str.h"
28
29namespace Ultima {
30namespace Nuvie {
31
32class Configuration;
33class Font;
34class MsgScroll;
35class Actor;
36class CallBack;
37
38typedef enum {
39 SCROLL_UP,
40 SCROLL_DOWN,
41 SCROLL_ESCAPE
42} MsgScrollEventType;
43
45
46 CallBack *timer;
47
48 Font *font_normal;
49 Font *font_garg;
50
51 bool solid_bg;
52 uint8 bg_color;
53 uint8 border_color;
54 uint16 position;
55
56 Common::String trailing_whitespace;
57
58public:
59
60 MsgScrollNewUI(const Configuration *cfg, Screen *s);
61 ~MsgScrollNewUI() override;
62
63 GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) override {
64 return GUI_PASS;
65 }
66 uint16 callback(uint16 msg, CallBack *caller, void *data) override;
67 bool can_display_prompt() const override {
68 return false;
69 }
70
71 bool can_fit_token_on_msgline(MsgLine *msg_line, MsgText *token) override;
72
73 void Display(bool full_redraw) override;
74
75 void display_prompt() override {}
76
77 void display_string(const Common::String &s, Font *f, bool include_on_map_window) override;
78
79 void set_font(uint8 font_type) override;
80 bool is_garg_font() override;
81
82 GUI_status KeyDown(const Common::KeyState &key) override;
83 GUI_status MouseDown(int x, int y, Events::MouseButton button) override;
84
85 void move_scroll_down() override {
86 scroll_movement_event(SCROLL_DOWN);
87 }
88 void move_scroll_up() override {
89 scroll_movement_event(SCROLL_UP);
90 }
91
92protected:
93
94
95 MsgLine *add_new_line() override;
96
97private:
98 GUI_status scroll_movement_event(MsgScrollEventType event);
99 uint16 count_empty_lines(const Common::String &s);
100
101};
102
103} // End of namespace Nuvie
104} // End of namespace Ultima
105
106#endif
Definition: str.h:59
Definition: call_back.h:50
Definition: configuration.h:60
Definition: font.h:42
Definition: gui_callback.h:31
Definition: msg_scroll.h:72
Definition: msg_scroll.h:90
Definition: msg_scroll_new_ui.h:44
Definition: msg_scroll.h:51
Definition: screen.h:41
Definition: keyboard.h:294