ScummVM API documentation
pet_translation.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_TRANSLATION_H
23 #define TITANIC_PET_TRANSLATION_H
24 
25 #include "titanic/pet_control/pet_section.h"
26 #include "titanic/gfx/text_control.h"
27 
28 namespace Titanic {
29 
30 class CPetTranslation : public CPetSection {
31 private:
32  CTextControl _message;
33  CTextControl _tooltip;
34 private:
38  bool setupControl(CPetControl *petControl);
39 public:
41 
45  bool setup(CPetControl *petControl) override;
46 
50  bool reset() override { return true; }
51 
55  void draw(CScreenManager *screenManager) override;
56 
61  bool MouseButtonDownMsg(CMouseButtonDownMsg *msg) override { return false; }
62  bool MouseButtonUpMsg(CMouseButtonUpMsg *msg) override { return false; }
63 
67  bool isValid(CPetControl *petControl) override {
68  return setupControl(petControl);
69  }
70 
74  void load(SimpleFile *file, int param) override {}
75 
79  void postLoad() override { reset(); }
80 
84  void save(SimpleFile *file, int indent) override {}
85 
89  CTextControl *getText() override { return &_tooltip; }
90 
94  void clearTranslation();
95 
99  void addTranslation(const CString &str1, const CString &str2);
100 };
101 
102 } // End of namespace Titanic
103 
104 #endif /* TITANIC_PET_TRANSLATION_H */
Definition: text_control.h:35
Definition: pet_section.h:51
bool isValid(CPetControl *petControl) override
Definition: pet_translation.h:67
Definition: simple_file.h:49
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg) override
Definition: pet_translation.h:61
bool setup(CPetControl *petControl) override
Definition: screen_manager.h:49
bool reset() override
Definition: pet_translation.h:50
Definition: arm.h:30
Definition: string.h:40
void save(SimpleFile *file, int indent) override
Definition: pet_translation.h:84
Definition: mouse_messages.h:87
void postLoad() override
Definition: pet_translation.h:79
void draw(CScreenManager *screenManager) override
Definition: mouse_messages.h:71
Definition: pet_translation.h:30
CTextControl * getText() override
Definition: pet_translation.h:89
Definition: pet_control.h:45
void addTranslation(const CString &str1, const CString &str2)
void load(SimpleFile *file, int param) override
Definition: pet_translation.h:74