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 
30 namespace Ultima {
31 namespace Shared {
32 
33 using Shared::CInfoMsg;
34 using Shared::CInfoGetCommandKeypress;
35 using Shared::CInfoGetInput;
36 using Shared::CKeypressMsg;
37 
41 class 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);
48 private:
49  Common::StringArray _lines;
50  Gfx::TextInput *_textInput;
51  Gfx::CharacterInput *_characterInput;
52  TreeItem *_commandRespondTo;
53 protected:
57  virtual void drawPrompt(Gfx::VisualSurface &surf, const Point &pt) = 0;
58 public:
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:265
Definition: messages.h:250
void draw() override
Definition: tree_item.h:50
Definition: visual_surface.h:39
Definition: rect.h:144
Definition: character_input.h:34
Definition: visual_item.h:39
Definition: text_input.h:34
Definition: info.h:41
Definition: detection.h:27
Definition: rect.h:45
Definition: messages.h:240
Definition: messages.h:235
Definition: messages.h:245
Info(TreeItem *parent, const Rect &bounds)
virtual void drawPrompt(Gfx::VisualSurface &surf, const Point &pt)=0