YSTest: YSLib::Components::AScrollBar Class Reference

YSTest PreAlpha_b380_20130211 The YSLib Test Project

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
YSLib::Components::AScrollBar Class Reference

滚动条。 More...

`#include <scroll.h>`

Inheritance diagram for YSLib::Components::AScrollBar:
[legend]
Collaboration diagram for YSLib::Components::AScrollBar:
[legend]

## Public Types

typedef ATrack::ValueType | ValueType
typedef ystdex::subscriptive_iterator < AScrollBar, IWidget > | Iterator

## Public Member Functions

| AScrollBar (const Rect &={}, SDst=8, Orientation=Horizontal)
| 构造：使用指定边界、大小和方向。
| AScrollBar (AScrollBar &&)=default
Iterator | GetBegin ()
Iterator | GetEnd ()
WidgetRange | GetChildren () override
IWidget & | operator[] (size_t idx) ynoexcept
size_t | GetChildrenCount () const ynothrow
ATrack & | GetTrack () const ynothrow
| 取轨道引用。
ValueType | GetMaxValue () const ynothrow
ValueType | GetValue () const ynothrow
ValueType | GetLargeDelta () const ynothrow
ValueType | GetSmallDelta () const ynothrow
void | SetMaxValue (ValueType _tempArgName)
void | SetValue (ValueType _tempArgName)
void | SetLargeDelta (ValueType _tempArgName)
void | SetSmallDelta (ValueType _tempArgName)
void | LocateThumb (ValueType val, ScrollCategory t=ScrollCategory::ThumbPosition)
| 定位滑块。
Public Member Functions inherited from YSLib::Components::Control
| Control (const Rect &={})
| 构造：使用指定边界，默认背景（同 Widget 默认构造）。
| Control (const Rect &, NoBackgroundTag)
| 构造：使用指定边界，无背景。
| Control (const Control &)
| 复制构造：除容器为空外深复制。
| Control (Control &&)=default
virtual IWidget * | GetBoundControlPtr (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 Renderer & | GetRenderer () const ynothrow
| 取渲染器。
virtual View & | GetView () const ynothrow
| 取部件视图。
virtual AController & | GetController () 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 > &&)
| 设置渲染器为指定指针指向的对象，同时更新渲染器状态。
virtual void | Refresh (PaintEventArgs &&)
| 刷新：按指定参数绘制界面并更新状态。
Public Member Functions inherited from YSLib::Components::IWidget
virtual | ~IWidget ()

## Protected Attributes

Thumb | btnPrev
| 前滚动条按钮。
Thumb | btnNext
| 后滚动条按钮。

## Private Attributes

unique_ptr< ATrack > | pTrack
ValueType | small_delta
| 小距离滚动偏移量：滚动事件关联的滑块位置变化绝对值。

## Additional Inherited Members

Public Attributes inherited from YSLib::Components::Control
std::function< IWidget *(const KeyInput &)> | BoundControlPtr
| 按键-指针设备输入事件组映射。

## Detailed Description

滚动条。

Since
  build 162

Definition at line 288 of file scroll.h.

## Member Typedef Documentation

typedef ystdex::subscriptive_iterator<AScrollBar, IWidget> YSLib::Components::AScrollBar::Iterator

Since
  build 356

Definition at line 293 of file scroll.h.

typedef ATrack::ValueType YSLib::Components::AScrollBar::ValueType

值类型。

Definition at line 291 of file scroll.h.

## Constructor & Destructor Documentation

YSLib::Components::AScrollBar::AScrollBar | ( | const Rect & | = `{}`,
|  | SDst | = `8`,
|  | Orientation | = `Horizontal`
| ) |  |

explicit

构造：使用指定边界、大小和方向。

Since
  build 337

YSLib::Components::AScrollBar::AScrollBar | ( | AScrollBar && |  | ) |

inlinedefault

## Member Function Documentation

Iterator YSLib::Components::AScrollBar::GetBegin | ( |  | ) |

inline

Since
  build 356

Definition at line 326 of file scroll.h.

WidgetRange YSLib::Components::AScrollBar::GetChildren | ( |  | ) |

inlineoverridevirtual

Since
  build 357

Reimplemented from YSLib::Components::Widget.

Definition at line 326 of file scroll.h.

size_t YSLib::Components::AScrollBar::GetChildrenCount | ( |  | ) | const

inline

Definition at line 326 of file scroll.h.

Iterator YSLib::Components::AScrollBar::GetEnd | ( |  | ) |

inline

Definition at line 326 of file scroll.h.

ValueType YSLib::Components::AScrollBar::GetLargeDelta | ( |  | ) | const

inline

Definition at line 341 of file scroll.h.

ValueType YSLib::Components::AScrollBar::GetMaxValue | ( |  | ) | const

inline

Definition at line 339 of file scroll.h.

ValueType YSLib::Components::AScrollBar::GetSmallDelta | ( |  | ) | const

inline

Definition at line 342 of file scroll.h.

ATrack& YSLib::Components::AScrollBar::GetTrack | ( |  | ) | const

inline

取轨道引用。

Note
  断言： bool(pTrack) 。

Definition at line 333 of file scroll.h.

References YAssert.

ValueType YSLib::Components::AScrollBar::GetValue | ( |  | ) | const

inline

Definition at line 340 of file scroll.h.

void YSLib::Components::AScrollBar::LocateThumb | ( | ValueType | val,
|  | ScrollCategory | t = `ScrollCategory::ThumbPosition`
| ) |  |

inline

定位滑块。

Note
  调用 GetTrack() 的同名函数指定滚动事件关联值设置滑块位置并触发对应事件。

Definition at line 354 of file scroll.h.

IWidget& YSLib::Components::AScrollBar::operator[] | ( | size_t | idx | ) |

inline

Definition at line 326 of file scroll.h.

void YSLib::Components::AScrollBar::SetLargeDelta | ( | ValueType | _tempArgName | ) |

inline

Definition at line 346 of file scroll.h.

void YSLib::Components::AScrollBar::SetMaxValue | ( | ValueType | _tempArgName | ) |

inline

Definition at line 344 of file scroll.h.

void YSLib::Components::AScrollBar::SetSmallDelta | ( | ValueType | _tempArgName | ) |

inline

Definition at line 347 of file scroll.h.

void YSLib::Components::AScrollBar::SetValue | ( | ValueType | _tempArgName | ) |

inline

Definition at line 345 of file scroll.h.

## Member Data Documentation

Thumb YSLib::Components::AScrollBar::btnNext

protected

后滚动条按钮。

Note
  可响应按键持续。

Since
  build 276

Definition at line 310 of file scroll.h.

Referenced by YSLib::Components::VerticalScrollBar::GetBoundControlPtr().

Thumb YSLib::Components::AScrollBar::btnPrev

protected

前滚动条按钮。

Note
  可响应按键持续。

Since
  build 276

Definition at line 304 of file scroll.h.

Referenced by YSLib::Components::VerticalScrollBar::GetBoundControlPtr().

unique_ptr<ATrack> YSLib::Components::AScrollBar::pTrack

private

Definition at line 296 of file scroll.h.

ValueType YSLib::Components::AScrollBar::small_delta

private

小距离滚动偏移量：滚动事件关联的滑块位置变化绝对值。

Definition at line 314 of file scroll.h.

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

- scroll.h