YSTest: TextArea.h 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

TextArea.h
浏览该文件的文档.
1 /*
2 © 2011-2015, 2020 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #ifndef YSL_INC_UI_TextArea_h_
29 #define YSL_INC_UI_TextArea_h_ 1
30
31 #include "YModules.h"
32 #include YFM_YSLib_UI_YWidget
33 //#include YFM_YSLib_Service_YResource
34 #include YFM_YSLib_Service_TextRenderer
35
36 namespace YSLib
37 {
38
39 namespace UI
40 {
41
45 class YF_API TextArea : public Widget,
46 public Drawing::TextState, public Drawing::TextRenderer
47 {
48 public:
49 Drawing::Rotation Rotation;
50
55 explicit
56 TextArea(const Drawing::Rect& = {}, HBrush = MakeBlankBrush(),
57 Drawing::Color = Drawing::ColorSpace::Black);
62 TextArea(const Drawing::Rect&, Drawing::FontCache&,
63 HBrush = MakeBlankBrush(), Drawing::Color = Drawing::ColorSpace::Black);
68 ~TextArea() override;
69
70 using Widget::GetWidth;
71 using Widget::GetHeight;
72 };
73
74
78 class YF_API BufferedTextArea : public Widget, public Drawing::TextRegion
79 {
80 public:
81 Drawing::Rotation Rotation;
82
87 explicit
88 BufferedTextArea(const Drawing::Rect& = {}, HBrush = MakeBlankBrush(),
89 Drawing::Color = Drawing::ColorSpace::Black);
94 BufferedTextArea(const Drawing::Rect&, Drawing::FontCache&,
95 HBrush = MakeBlankBrush(), Drawing::Color = Drawing::ColorSpace::Black);
96
97 using Widget::GetWidth;
98 using Widget::GetHeight;
99
104 void
105 Refresh(PaintEventArgs&&) override;
106 };
107
108 } // namespace UI;
109
110 } // namespace YSLib;
111
112 #endif
113
YSLib::Drawing::TextState
文本状态。
Definition: TextBase.h:87
YSLib::Drawing::TextRenderer
文本渲染器：简单实现。
Definition: TextRenderer.h:399
YSLib::Drawing::Color
The boundary is out of the const Rect SDst SPos SPos SPos Color
Definition: YDraw.h:128
YSLib::UI::BufferedTextArea
缓冲文本区域。
Definition: TextArea.h:79
ystdex::function_base
函数包装类模板。
Definition: function.hpp:578
YSLib::UI::Widget
部件。
Definition: YWidget.h:374
YF_API
#define YF_API
Definition: Platform.h:56
YSLib::UI::TextArea
文本区域。
Definition: TextArea.h:47
YSLib::Drawing::FontCache
字体缓存。
Definition: Font.h:467
YSLib::UI::BufferedTextArea::Rotation
Drawing::Rotation Rotation
屏幕指向。
Definition: TextArea.h:81
YSLib::UI::TextArea::~TextArea
~TextArea() override
虚析构：类定义外默认实现。
YSLib::Drawing::TextRegion
文本区域。
Definition: TextRenderer.h:492
YSLib::Drawing::Rotation
Rotation
逆时针旋转角度指示输出指向。
Definition: YGDIBase.h:1145
YSLib::Drawing::ColorSpace::Black
@ Black
Definition: YGDIBase.h:262
YSLib::Drawing::Rect
屏幕标准矩形：表示屏幕矩形区域。
Definition: YGDIBase.h:788
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:46
YModules.h
YSLib 用户界面模块配置文件。
YSLib::UI::TextArea::Rotation
Drawing::Rotation Rotation
屏幕指向。
Definition: TextArea.h:49
YSLib::UI::PaintEventArgs
部件绘制参数。
Definition: YWidgetEvent.h:330
YSLib::UI::BufferedTextArea::BufferedTextArea
BufferedTextArea(const Drawing::Rect &={}, HBrush=MakeBlankBrush(), Drawing::Color=Drawing::ColorSpace::Black)
构造：使用指定边界、背景画刷、文本颜色和默认字型缓存。
YSLib::Drawing::GetHeight
YB_ATTR_nodiscard YB_PURE tr GetHeight())) inline PDefH(void
按字体高度和行距调整文本区域的底边距。