ScummVM API documentation
pet_real_life.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_REAL_LIFE_H
23 #define TITANIC_PET_REAL_LIFE_H
24 
25 #include "titanic/pet_control/pet_section.h"
26 #include "titanic/pet_control/pet_glyphs.h"
27 #include "titanic/gfx/text_control.h"
28 
29 namespace Titanic {
30 
31 class CPetSaveGlyphs : public CPetGlyphs {
32 };
33 
34 class CPetRealLife : public CPetSection {
35 private:
36  CPetGlyphs _glyphs;
37  CTextControl _text;
38 private:
42  bool setupControl(CPetControl *petControl);
43 
47  void addButton(CPetGlyph *glyph);
48 public:
49  ~CPetRealLife() override {}
50 
54  bool setup(CPetControl *petControl) override;
55 
59  bool reset() override;
60 
64  void draw(CScreenManager *screenManager) override;
65 
69  Rect getBounds() const override { return Rect(); }
70 
75  bool MouseButtonDownMsg(CMouseButtonDownMsg *msg) override;
76  bool MouseDragStartMsg(CMouseDragStartMsg *msg) override;
77  bool MouseDragMoveMsg(CMouseDragMoveMsg *msg) override;
78  bool MouseDragEndMsg(CMouseDragEndMsg *msg) override;
79  bool MouseButtonUpMsg(CMouseButtonUpMsg *msg) override;
80  bool KeyCharMsg(CKeyCharMsg *msg) override;
81  bool VirtualKeyCharMsg(CVirtualKeyCharMsg *msg) override;
82 
86  CGameObject *dragEnd(const Point &pt) const override { return nullptr; }
87 
91  bool isValid(CPetControl *petControl) override;
92 
96  void load(SimpleFile *file, int param) override {}
97 
101  void postLoad() override;
102 
106  void save(SimpleFile *file, int indent) override {}
107 
111  void enter(PetArea oldArea) override;
112 
116  void leave() override;
117 
121  void enterRoom(CRoomItem *room) override {}
122 
126  CTextControl *getText() override { return &_text; }
127 
131  void syncSoundSettings();
132 };
133 
134 } // End of namespace Titanic
135 
136 #endif /* TITANIC_PET_REAL_LIFE_H */
Definition: mouse_messages.h:150
void save(SimpleFile *file, int indent) override
Definition: pet_real_life.h:106
Definition: text_control.h:35
Definition: pet_section.h:51
bool MouseDragMoveMsg(CMouseDragMoveMsg *msg)
bool MouseDragEndMsg(CMouseDragEndMsg *msg)
CTextControl * getText() override
Definition: pet_real_life.h:126
Definition: mouse_messages.h:139
Rect getBounds() const override
Definition: pet_real_life.h:69
Definition: simple_file.h:49
Definition: room_item.h:33
void enterRoom(CRoomItem *room) override
Definition: pet_real_life.h:121
void draw(CScreenManager *screenManager)
Definition: screen_manager.h:49
CGameObject * dragEnd(const Point &pt) const override
Definition: pet_real_life.h:86
Definition: game_object.h:79
Definition: messages.h:408
Definition: mouse_messages.h:181
virtual void reset()
Definition: pet_glyphs.h:53
Definition: rect.h:35
Definition: pet_real_life.h:34
Definition: rect.h:45
Definition: arm.h:30
Definition: pet_real_life.h:31
virtual void enter()
Definition: pet_glyphs.h:244
virtual void leave()
virtual void setup(int numVisible, CPetSection *owner)
Definition: mouse_messages.h:87
void load(SimpleFile *file, int param) override
Definition: pet_real_life.h:96
Definition: messages.h:307
bool MouseButtonDownMsg(const Point &pt)
bool KeyCharMsg(int key)
Definition: mouse_messages.h:71
bool MouseButtonUpMsg(const Point &pt)
bool MouseDragStartMsg(CMouseDragStartMsg *msg)
bool VirtualKeyCharMsg(CVirtualKeyCharMsg *msg)
Definition: pet_control.h:45