ScummVM API documentation
te_text_layout.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 TETRAEDGE_TE_TE_TEXT_LAYOUT_H
23 #define TETRAEDGE_TE_TE_TEXT_LAYOUT_H
24 
25 #include "tetraedge/te/te_layout.h"
26 #include "tetraedge/te/te_i_text_layout.h"
27 #include "tetraedge/te/te_text_base2.h"
28 
29 namespace Tetraedge {
30 
31 class TeTextLayout : public TeITextLayout, public TeLayout {
32 public:
33  TeTextLayout();
34 
35  virtual ~TeTextLayout();
36 
37  void clear() {
38  _base.clear();
39  }
40 
41  void draw() override;
42  void setText(const Common::String &val) override;
43  void setInterLine(float val) override;
44  void setWrapMode(TeTextBase2::WrapMode mode) override;
45  void setTextSizeType(int type) override;
46  void setTextSizeProportionalToWidth(int val) override;
47  void strikethrough(bool val);
48  bool strikethrough() const;
49  const Common::String &text() const;
50  const TeVector2s32 &textSize() const;
51  int textSizeProportionalToWidth() const { return _textSizeProportionalToWidth; }
52  int textSizeType() const { return _textSizeType; }
53  void updateSize() override;
54  TeTextBase2::WrapMode wrapMode() const { return _base.wrapMode(); }
55 
56 private:
57  int _textSizeType;
58  int _textSizeProportionalToWidth;
59  int _baseFontSize;
60 
61  TeTextBase2 _base;
62 
63 };
64 
65 } // end namespace Tetraedge
66 
67 #endif // TETRAEDGE_TE_TE_TEXT_LAYOUT_H
Definition: te_i_text_layout.h:30
Definition: str.h:59
Definition: detection.h:27
Definition: te_text_base2.h:36
Definition: te_layout.h:35
Definition: te_vector2s32.h:31
Definition: te_text_layout.h:31