ScummVM API documentation
richtext.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 DIRECTOR_CASTMEMBER_RICHTEXT_H
23 #define DIRECTOR_CASTMEMBER_RICHTEXT_H
24 
25 #include "graphics/pixelformat.h"
26 
27 #include "director/types.h"
28 #include "director/castmember/castmember.h"
29 
30 namespace Director {
31 
33 public:
34  RichTextCastMember(Cast *cast, uint16 castId, Common::SeekableReadStreamEndian &stream, uint16 version);
35  RichTextCastMember(Cast *cast, uint16 castId, RichTextCastMember &source);
37 
38  CastMember *duplicate(Cast *cast, uint16 castId) override { return (CastMember *)(new RichTextCastMember(cast, castId, *this)); }
39 
40  void load() override;
41 
42  Graphics::MacWidget *createWidget(Common::Rect &bbox, Channel *channel, SpriteType spriteType) override;
43 
44  bool hasField(int field) override;
45  Datum getField(int field) override;
46  bool setField(int field, const Datum &value) override;
47 
48  Common::String getText() { return Common::String(_plainText); }
49  uint32 getCastDataSize() override;
50  void writeCastData(Common::SeekableWriteStream *writeStream) override;
51 
52  Common::String formatInfo() override;
53 
54 private:
55  Common::U32String _plainText;
57  Picture *_picture;
58 
59  // _initialRect
60  // _boundingRect
61  byte _antialiasFlag;
62  byte _cropFlags;
63  uint16 _scrollPos;
64  uint16 _antialiasFontSize; // Seems to be always 12
65  uint16 _displayHeight;
66  uint32 _foreColor;
67  uint32 _bgColor;
68 };
69 
70 } // End of namespace Director
71 
72 #endif
Definition: cast.h:87
Definition: str.h:59
Definition: channel.h:40
Definition: picture.h:33
Definition: pixelformat.h:138
Definition: rect.h:524
Definition: archive.h:36
Definition: ustr.h:57
Definition: macwidget.h:39
Definition: richtext.h:32
Definition: lingo.h:130
Definition: stream.h:351
Definition: stream.h:944
Definition: castmember.h:48