ScummVM API documentation
pet_remote.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 TITANIC_PET_REMOTE_H
23#define TITANIC_PET_REMOTE_H
24
25#include "common/array.h"
26#include "titanic/pet_control/pet_section.h"
27#include "titanic/pet_control/pet_glyphs.h"
28#include "titanic/pet_control/pet_remote_glyphs.h"
29#include "titanic/gfx/text_control.h"
30
31namespace Titanic {
32
33class CPetRemote : public CPetSection {
34private:
35 CPetRemoteGlyphs _items;
36 CPetGfxElement _onOff;
38 CPetGfxElement _down;
39 CPetGfxElement _left;
40 CPetGfxElement _right;
41 CPetGfxElement _top;
42 CPetGfxElement _bottom;
43 CPetGfxElement _action;
44 CPetGfxElement _send;
45 CPetGfxElement _receive;
46 CPetGfxElement _call;
47 CTextControl _text;
48private:
52 bool setupControl(CPetControl *petControl);
53
57 CRoomItem *getRoom() const;
58
62 int getHighlightIndex(RemoteGlyph val);
63
67 int roomIndexOf(const CString &name);
68
72 bool getRemoteData(int roomIndex, Common::Array<uint> &indexes);
73
77 void clearGlyphs() { _items.clear(); }
78
82 bool loadGlyphs(const Common::Array<uint> &indexes);
83
87 bool loadGlyph(int glyphIndex);
88public:
89 CPetRemote();
90
94 bool setup(CPetControl *petControl) override;
95
99 bool reset() override;
100
104 void draw(CScreenManager *screenManager) override;
105
111 bool MouseButtonUpMsg(CMouseButtonUpMsg *msg) override;
112 bool MouseDoubleClickMsg(CMouseDoubleClickMsg *msg) override;
113 bool ActionMsg(CActionMsg *msg) override;
114 bool MouseWheelMsg(CMouseWheelMsg *msg) override;
115
119 bool isValid(CPetControl *petControl) override;
120
124 void postLoad() override;
125
129 void enter(PetArea oldArea) override;
130
134 void enterRoom(CRoomItem *room) override;
135
140
144 CPetGfxElement *getElement(uint id) override;
145
149 void highlight(int id) override;
150
154 void generateMessage(RemoteMessage msgNum, const CString &name, int num);
155};
156
157} // End of namespace Titanic
158
159#endif /* TITANIC_PET_REMOTE_H */
Definition: messages.h:410
Definition: mouse_messages.h:71
Definition: mouse_messages.h:87
Definition: mouse_messages.h:117
Definition: mouse_messages.h:103
Definition: pet_control.h:45
Definition: pet_gfx_element.h:29
Definition: pet_remote_glyphs.h:52
Definition: pet_remote.h:33
void enter(PetArea oldArea) override
bool isValid(CPetControl *petControl) override
CPetGfxElement * getElement(uint id) override
void generateMessage(RemoteMessage msgNum, const CString &name, int num)
bool reset() override
void highlight(int id) override
void draw(CScreenManager *screenManager) override
bool setup(CPetControl *petControl) override
void postLoad() override
CTextControl * getText() override
void enterRoom(CRoomItem *room) override
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg) override
Definition: pet_section.h:51
Definition: room_item.h:33
Definition: screen_manager.h:49
Definition: string.h:40
Definition: text_control.h:35