ScummVM API documentation
text.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
23#ifndef SNATCHER_TEXT_H
24#define SNATCHER_TEXT_H
25
26#include "common/platform.h"
27#include "common/scummsys.h"
28
29namespace Snatcher {
30
31class Animator;
33public:
34
35 TextRenderer() {}
36 virtual ~TextRenderer() {}
37
38 virtual void setFont(const uint8 *font, uint32 fontSize) = 0;
39 virtual void setCharWidthTable(const uint8 *table, uint32 tableSize) = 0;
40
41 virtual void enqueuePrintJob(const uint8 *text) = 0;
42 virtual void setPrintDelay(int delay) = 0;
43 //virtual void setColor(uint8 color) = 0;
44
45 virtual void draw() = 0;
46 virtual void reset() = 0;
47 //virtual void requestRefresh(bool req) = 0;
48 virtual bool needsPrint() const = 0;
49
50protected:
51
52private:
53 static TextRenderer *createSegaTextRenderer(Animator *animator);
54
55public:
56 static TextRenderer *create(Common::Platform platform, Animator *animator) {
57 switch (platform) {
58 case Common::kPlatformSegaCD:
59 return createSegaTextRenderer(animator);
60 default:
61 break;
62 };
63 return 0;
64 }
65};
66
67} // End of namespace Snatcher
68
69#endif // SNATCHER_TEXT_H
Definition: animator.h:33
Definition: text.h:32
Platform
Definition: platform.h:93