ScummVM API documentation
info.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 ULTIMA_SHARED_GFX_INFO_H
23#define ULTIMA_SHARED_GFX_INFO_H
24
25#include "ultima/shared/gfx/visual_item.h"
26#include "ultima/shared/gfx/text_input.h"
27#include "ultima/shared/gfx/character_input.h"
28#include "common/str-array.h"
29
30namespace Ultima {
31namespace Shared {
32
33using Shared::CInfoMsg;
34using Shared::CInfoGetCommandKeypress;
35using Shared::CInfoGetInput;
36using Shared::CKeypressMsg;
37
41class Info : public Gfx::VisualItem {
42 DECLARE_MESSAGE_MAP;
43 bool InfoMsg(CInfoMsg *msg);
44 bool InfoGetCommandKeypress(CInfoGetCommandKeypress *msg);
45 bool InfoGetKeypress(CInfoGetKeypress *msg);
46 bool InfoGetInput(CInfoGetInput *msg);
47 bool KeypressMsg(CKeypressMsg *msg);
48private:
50 Gfx::TextInput *_textInput;
51 Gfx::CharacterInput *_characterInput;
52 TreeItem *_commandRespondTo;
53protected:
57 virtual void drawPrompt(Gfx::VisualSurface &surf, const Point &pt) = 0;
58public:
59 CLASSDEF;
60
64 Info(TreeItem *parent, const Rect &bounds);
65
69 ~Info() override;
70
74 void draw() override;
75};
76
77} // End of namespace Shared
78} // End of namespace Ultima
79
80#endif
Definition: messages.h:235
Definition: messages.h:245
Definition: messages.h:240
Definition: messages.h:250
Definition: messages.h:265
Definition: character_input.h:34
Definition: text_input.h:34
Definition: visual_item.h:39
Definition: visual_surface.h:39
Definition: info.h:41
Info(TreeItem *parent, const Rect &bounds)
void draw() override
virtual void drawPrompt(Gfx::VisualSurface &surf, const Point &pt)=0
Definition: tree_item.h:50
Definition: rect.h:144
Definition: rect.h:536