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

进度条。 More...

#include <progress.h>

Inheritance diagram for YSLib::Components::ProgressBar:
Collaboration diagram for YSLib::Components::ProgressBar:

Public Member Functions

 ProgressBar (const Rect &={}, ValueType=0xFF)
 
 ProgressBar (ProgressBar &&)=default
 
void SetMaxValue (ValueType)
 设置进度关联值最大取值。
 
void SetValue (ValueType _tempArgName)
 
void Refresh (PaintEventArgs &&) 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
 取控制器。
 
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 ()
 

Additional Inherited Members

- Public Attributes inherited from YSLib::Components::Control
std::function< IWidget *(const
KeyInput &)> 
BoundControlPtr
 按键-指针设备输入事件组映射。
 
- Protected Types inherited from YSLib::GMRange< float >
typedef float ValueType
 
- Protected Member Functions inherited from YSLib::GMRange< float >
ValueType GetMaxValue () const ynothrow
 
ValueType GetValue () const ynothrow
 
 GMRange (ValueType m, ValueType v)
 构造:使用指定最大取值和值。
 

Detailed Description

进度条。

Since
build 219

Definition at line 43 of file progress.h.

Constructor & Destructor Documentation

YSLib::Components::ProgressBar::ProgressBar ( const Rect = {},
ValueType  = 0xFF 
)
explicit
Since
build 337
YSLib::Components::ProgressBar::ProgressBar ( ProgressBar &&  )
inlinedefault

Member Function Documentation

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

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

Since
build 294

Reimplemented from YSLib::Components::Widget.

Definition at line 62 of file progress.cpp.

References FillRect(), YSLib::Components::GetSizeOf(), YSLib::Drawing::Size::Height, YSLib::Drawing::Size::Width, YB_LIKELY, and yunseq.

Here is the call graph for this function:

void ProgressBar::SetMaxValue ( ValueType  m)

设置进度关联值最大取值。

Note
当指定值非正值时无效。
约束关联值不大于指定值。

Definition at line 51 of file progress.cpp.

References YB_LIKELY.

void YSLib::Components::ProgressBar::SetValue ( ValueType  _tempArgName)
inline

Definition at line 58 of file progress.h.

Referenced by main().

Here is the caller graph for this function:


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