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

桌面。 More...

#include <ydesktop.h>

Inheritance diagram for YSLib::Components::Desktop:
Collaboration diagram for YSLib::Components::Desktop:

Public Member Functions

 Desktop (Devices::Screen &, Color=Drawing::ColorSpace::Black, const shared_ptr< Drawing::Image > &={})
 构造:使用指定屏幕对象引用、背景色和背景图像。
 
 Desktop (Desktop &&)=default
 
const Devices::ScreenGetScreen () const ynothrow
 取屏幕对象。
 
BitmapPtr GetBackgroundPtr () const ynothrow
 取屏幕背景指针。
 
Rect GetInvalidatedArea () ynothrow
 
void Update ()
 更新缓冲区至屏幕。
 
Rect Validate ()
 验证:绘制缓冲区使之有效。
 
- Public Member Functions inherited from YSLib::Components::Window
 Window (const Rect &={}, const shared_ptr< Drawing::Image > &={})
 构造:使用指定边界和背景图像。
 
 Window (Window &&)=default
 
void operator+= (IWidget &) override
 
virtual void operator+= (Window &)
 
template<class _type >
void operator+= (_type &p)
 
bool operator-= (IWidget &) override
 
virtual bool operator-= (Window &)
 
template<class _type >
bool operator-= (_type &p)
 
void Add (IWidget &, ZOrderType=DefaultZOrder) override
 按指定 Z 顺序向部件组添加部件,并设置指针。
 
- Public Member Functions inherited from YSLib::Components::Panel
 Panel (const Rect &={})
 构造:使用指定边界。
 
 Panel (Panel &&)=default
 
void ClearContents ()
 清除内容。
 
bool MoveToTop (IWidget &)
 提升部件至顶端。
 
void Refresh (PaintEventArgs &&) override
 刷新:按指定参数绘制界面并更新状态。
 
WidgetRange GetChildren () override
 
- Public Member Functions inherited from YSLib::Components::Control
 Control (const Rect &={})
 构造:使用指定边界,默认背景(同 Widget 默认构造)。
 
 Control (const Rect &, NoBackgroundTag)
 构造:使用指定边界,无背景。
 
 Control (const Control &)
 复制构造:除容器为空外深复制。
 
 Control (Control &&)=default
 
virtual IWidgetGetBoundControlPtr (const KeyInput &)
 取按键-指针设备输入默认事件组映射。
 
void OnTouch_Close (TouchEventArgs &&)
 处理屏幕事件:关闭显示。
 
- 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 RendererGetRenderer () const ynothrow
 取渲染器。
 
virtual ViewGetView () const ynothrow
 取部件视图。
 
virtual AControllerGetController () const 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 ()
 

Private Attributes

Devices::Screenscreen
 屏幕对象。
 

Additional Inherited Members

- Public Attributes inherited from YSLib::Components::Control
std::function< IWidget *(const
KeyInput &)> 
BoundControlPtr
 按键-指针设备输入事件组映射。
 
- Protected Types inherited from YSLib::Components::MUIContainer
typedef IWidgetItemType
 部件组项目类型。
 
typedef multimap< ZOrderType,
ItemType
WidgetMap
 部件映射表类型:映射 Z 顺序至部件。
 
typedef WidgetMap::value_type PairType
 
typedef WidgetIterator Iterator
 
- Protected Member Functions inherited from YSLib::Components::MUIContainer
bool Contains (IWidget &)
 判断是否包含指定部件。
 
Iterator GetBegin ()
 
Iterator GetEnd ()
 
void Add (IWidget &, ZOrderType=DefaultZOrder)
 向部件组添加部件。
 
 MUIContainer ()=default
 无参数构造:默认实现。
 
 MUIContainer (MUIContainer &&)=default
 
void operator+= (IWidget &wgt)
 向部件组添加部件。
 
bool operator-= (IWidget &)
 从部件组移除部件。
 
void PaintVisibleChildren (PaintEventArgs &)
 绘制可视子部件。
 

Detailed Description

桌面。

Since
早于 build 132

Definition at line 43 of file ydesktop.h.

Constructor & Destructor Documentation

YSLib::Components::Desktop::Desktop ( Devices::Screen ,
Color  = Drawing::ColorSpace::Black,
const shared_ptr< Drawing::Image > &  = {} 
)
explicit

构造:使用指定屏幕对象引用、背景色和背景图像。

YSLib::Components::Desktop::Desktop ( Desktop &&  )
inlinedefault

Member Function Documentation

BitmapPtr YSLib::Components::Desktop::GetBackgroundPtr ( ) const
inline

取屏幕背景指针。

Definition at line 60 of file ydesktop.h.

Rect YSLib::Components::Desktop::GetInvalidatedArea ( )
inline

Definition at line 63 of file ydesktop.h.

const Devices::Screen& YSLib::Components::Desktop::GetScreen ( ) const
inline

取屏幕对象。

Definition at line 57 of file ydesktop.h.

void Desktop::Update ( )

更新缓冲区至屏幕。

Definition at line 60 of file ydesktop.cpp.

Rect Desktop::Validate ( )

验证:绘制缓冲区使之有效。

Since
build 267
Todo:
渲染器类型安全。

Definition at line 67 of file ydesktop.cpp.

References YSLib::Components::GetBoundsOf().

Here is the call graph for this function:

Member Data Documentation

Devices::Screen& YSLib::Components::Desktop::screen
private

屏幕对象。

Definition at line 46 of file ydesktop.h.


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