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
28namespace Titanic {
29
31private:
32 CTextControl _message;
33 CTextControl _tooltip;
34private:
38 bool setupControl(CPetControl *petControl);
39public:
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
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: mouse_messages.h:71
Definition: mouse_messages.h:87
Definition: pet_control.h:45
Definition: pet_section.h:51
Definition: pet_translation.h:30
bool setup(CPetControl *petControl) override
bool isValid(CPetControl *petControl) override
Definition: pet_translation.h:67
void addTranslation(const CString &str1, const CString &str2)
void save(SimpleFile *file, int indent) override
Definition: pet_translation.h:84
void draw(CScreenManager *screenManager) override
void load(SimpleFile *file, int param) override
Definition: pet_translation.h:74
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg) override
Definition: pet_translation.h:61
bool reset() override
Definition: pet_translation.h:50
void postLoad() override
Definition: pet_translation.h:79
CTextControl * getText() override
Definition: pet_translation.h:89
Definition: screen_manager.h:49
Definition: string.h:40
Definition: text_control.h:35
Definition: simple_file.h:49