YSTest  PreAlpha_b380_20130211
The YSLib Test Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
YSLib::Components::BufferedTextArea Class Reference

缓冲文本区域。 More...

#include <textarea.h>

Inheritance diagram for YSLib::Components::BufferedTextArea:
Collaboration diagram for YSLib::Components::BufferedTextArea:

Public Member Functions

 BufferedTextArea (const Drawing::Rect &={})
 构造:使用指定边界和默认字型缓存。
 
 BufferedTextArea (const Drawing::Rect &, Drawing::FontCache &)
 构造:使用指定边界和字体缓存。
 
 BufferedTextArea (BufferedTextArea &&)=default
 
void Refresh (PaintEventArgs &&) override
 刷新:按指定参数绘制界面并更新状态。
 
- Public Member Functions inherited from YSLib::Components::Widget
 Widget (const Rect &={}, Color=Drawing::ColorSpace::White, Color=Drawing::ColorSpace::Black)
 
template<typename _tView , typename _tRenderer , typename _tController >
 Widget (_tView &&pView_=make_unique< View >(), _tRenderer &&pRenderer_=make_unique< Renderer >(), _tController &&pController_={})
 构造:使用视图指针、渲染器指针和控制器指针,无背景。
 
 Widget (const Widget &)
 复制构造:除容器指针为空外深复制。
 
 Widget (Widget &&)=default
 
virtual ~Widget ()
 析构:虚实现。
 
SPos GetX () const ynothrow
 
SPos GetY () const ynothrow
 
SDst GetWidth () const ynothrow
 
SDst GetHeight () const ynothrow
 
virtual Renderer & GetRenderer () const ynothrow
 取渲染器。
 
virtual View & GetView () const ynothrow
 取部件视图。
 
virtual AController & GetController () const override
 取控制器。
 
virtual WidgetRange GetChildren () override
 
void SetX (SDst _tempArgName)
 
void SetY (SDst _tempArgName)
 
void SetWidth (SDst _tempArgName)
 
void SetHeight (SDst _tempArgName)
 
void SetRenderer (unique_ptr< Renderer > &&)
 设置渲染器为指定指针指向的对象,同时更新渲染器状态。
 
void SetView (unique_ptr< View > &&)
 设置渲染器为指定指针指向的对象,同时更新渲染器状态。
 
- Public Member Functions inherited from YSLib::Components::IWidget
virtual ~IWidget ()
 
- Public Member Functions inherited from YSLib::Drawing::TextRegion
 TextRegion ()
 无参数构造。
 
template<typename... _tParams>
 TextRegion (_tParams &&...args)
 构造:使用指定参数确定文本状态。
 
 TextRegion (const TextRegion &)=default
 复制构造:默认实现。
 
 TextRegion (TextRegion &&)=default
 转移构造:默认实现。
 
TextRegion & operator= (const TextState &ts)
 从文本状态中恢复状态。
 
TextRegion & operator= (const TextRegion &)=default
 复制赋值:默认实现。
 
TextRegion & operator= (TextRegion &&)=default
 转移赋值:默认实现。
 
void operator() (ucs4_t)
 渲染单个字符。
 
const TextState & GetTextState () const ynothrow
 
TextState & GetTextState () ynothrow
 
const Graphics & GetContext () const ynothrow
 
void ClearLine (u16 l, SDst n)
 清除缓冲区第 l 行起始的 n 行像素。
 
void ClearTextLine (u16)
 清除缓冲区中的指定行号的文本行。
 
void Scroll (ptrdiff_t n)
 缓冲区特效:整体移动 n 像素。
 
void Scroll (ptrdiff_t n, SDst h)
 缓冲区特效:整体移动 n 像素。
 
- Public Member Functions inherited from YSLib::Drawing::GTextRendererBase< TextRegion >
u16 GetTextLineN () const
 取按当前行高和行距所能显示的最大行数。
 
u16 GetTextLineNEx () const
 取按当前行高和行距(行间距数小于行数 1 )所能显示的最大行数。
 
- Public Member Functions inherited from YSLib::Drawing::TextState
 TextState (const Drawing::Font &={})
 构造:使用指定字体。
 
 TextState (FontCache &)
 构造:使用指定字体缓存。
 
TextState & operator= (const PenStyle &ps)
 赋值:笔样式。
 
TextState & operator= (const Padding &ms)
 赋值:边距。
 
void PutNewline ()
 打印换行。
 
void ResetPen ()
 复位笔:按字体大小设置笔位置为默认位置。
 
void ResetPen (const Point &, const Padding &={})
 按指定显示区域左上角位置和附加边距重新设置笔位置。
 
- Public Member Functions inherited from YSLib::Drawing::BitmapBufferEx
 BitmapBufferEx ()
 无参数构造。
 
 BitmapBufferEx (ConstBitmapPtr, SDst, SDst)
 构造:使用指定位图指针和大小。
 
 BitmapBufferEx (const BitmapBufferEx &)
 
 BitmapBufferEx (BitmapBufferEx &&) ynothrow
 转移构造:转移资源。
 
virtual BitmapBufferEx * Clone () const
 
 ~BitmapBufferEx () override
 析构:释放资源。
 
BitmapBufferEx & operator= (const BitmapBufferEx &buf)
 
BitmapBufferEx & operator= (BitmapBufferEx &&buf) ynothrow
 
u8 * GetBufferAlphaPtr () const ynothrow
 取 Alpha 缓冲区的指针。
 
size_t GetSizeOfBufferAlpha () const ynothrow
 取 Alpha 缓冲区占用空间。
 
void SetSize (SDst, SDst) override
 重新设置缓冲区大小。
 
void ClearImage () const override
 清除缓冲区。
 
void Swap (BitmapBufferEx &buf) ynothrow
 
- Public Member Functions inherited from YSLib::Drawing::BitmapBuffer
 BitmapBuffer ()=default
 无参数构造:默认实现。
 
 BitmapBuffer (ConstBitmapPtr, SDst, SDst)
 构造:使用指定位图指针和大小。
 
 BitmapBuffer (const BitmapBuffer &)
 
 BitmapBuffer (BitmapBuffer &&) ynothrow
 转移构造:转移资源。
 
virtual ~BitmapBuffer ()
 析构:释放资源。
 
BitmapBuffer & operator= (const BitmapBuffer &buf)
 
BitmapBuffer & operator= (BitmapBuffer &&buf) ynothrow
 
void SetContent (ConstBitmapPtr, SDst, SDst)
 设置内容。
 
void SetSizeSwap ()
 交换宽和高;同时清除缓冲区。
 
void Swap (BitmapBuffer &buf) ynothrow
 
const Graphics & GetContext () const ynothrow
 

Public Attributes

Drawing::Rotation Rotation
 屏幕指向。
 
- Public Attributes inherited from YSLib::Components::Widget
HBrush Background
 背景。
 
Color ForeColor
 默认前景色。
 

Additional Inherited Members

- Protected Member Functions inherited from YSLib::Drawing::TextRegion
void InitializeFont ()
 初始化字体。
 
- Protected Attributes inherited from YSLib::Drawing::PenStyle
Drawing::Font Font
 字体。
 
Drawing::Color Color
 笔颜色。
 
- Protected Attributes inherited from YSLib::Drawing::BitmapBufferEx
u8 * pBufferAlpha
 Alpha 缓冲区指针。
 
- Static Protected Attributes inherited from YSLib::Drawing::Graphics
static const Graphics Invalid
 无效图形接口上下文。
 

Detailed Description

缓冲文本区域。

Definition at line 69 of file textarea.h.

Constructor & Destructor Documentation

YSLib::Components::BufferedTextArea::BufferedTextArea ( const Drawing::Rect &  = {})
explicit

构造:使用指定边界和默认字型缓存。

Since
build 337
YSLib::Components::BufferedTextArea::BufferedTextArea ( const Drawing::Rect &  ,
Drawing::FontCache &   
)

构造:使用指定边界和字体缓存。

Since
build 296
YSLib::Components::BufferedTextArea::BufferedTextArea ( BufferedTextArea &&  )
inlinedefault

Member Function Documentation

void BufferedTextArea::Refresh ( PaintEventArgs &&  e)
overridevirtual

刷新:按指定参数绘制界面并更新状态。

Since
build 294

Reimplemented from YSLib::Components::Widget.

Definition at line 63 of file textarea.cpp.

References BlitTo(), YSLib::Drawing::Rect::GetPoint(), and YSLib::Drawing::Rect::GetSize().

Here is the call graph for this function:

Member Data Documentation

Drawing::Rotation YSLib::Components::BufferedTextArea::Rotation

屏幕指向。

Definition at line 72 of file textarea.h.


The documentation for this class was generated from the following files: