YSTest: YSLib::Components::MUIContainer 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 Member Functions | Protected Attributes | List of all members
YSLib::Components::MUIContainer Class Reference

部件容器模块。 More...

`#include <yuicont.h>`

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

## Public Types

typedef IWidget * | ItemType
| 部件组项目类型。
typedef multimap< ZOrderType, ItemType > | WidgetMap
| 部件映射表类型：映射 Z 顺序至部件。
typedef WidgetMap::value_type | PairType
typedef WidgetIterator | Iterator

## Public Member Functions

bool | Contains (IWidget &)
| 判断是否包含指定部件。
Iterator | GetBegin ()
Iterator | GetEnd ()
void | Add (IWidget &, ZOrderType=DefaultZOrder)
| 向部件组添加部件。

## Protected Member Functions

| MUIContainer ()=default
| 无参数构造：默认实现。
| MUIContainer (MUIContainer &&)=default
void | operator+= (IWidget &wgt)
| 向部件组添加部件。
bool | operator-= (IWidget &)
| 从部件组移除部件。
void | PaintVisibleChildren (PaintEventArgs &)
| 绘制可视子部件。

## Protected Attributes

WidgetMap | mWidgets

## Detailed Description

部件容器模块。

Warning
  非虚析构。

Since
  build 167

Definition at line 161 of file yuicont.h.

## Member Typedef Documentation

typedef IWidget* YSLib::Components::MUIContainer::ItemType

部件组项目类型。

Definition at line 164 of file yuicont.h.

typedef WidgetIterator YSLib::Components::MUIContainer::Iterator

Since
  build 357

Definition at line 169 of file yuicont.h.

typedef WidgetMap::value_type YSLib::Components::MUIContainer::PairType

Definition at line 167 of file yuicont.h.

typedef multimap<ZOrderType, ItemType> YSLib::Components::MUIContainer::WidgetMap

部件映射表类型：映射 Z 顺序至部件。

Definition at line 166 of file yuicont.h.

## Constructor & Destructor Documentation

YSLib::Components::MUIContainer::MUIContainer | ( |  | ) |

protecteddefault

无参数构造：默认实现。

YSLib::Components::MUIContainer::MUIContainer | ( | MUIContainer && |  | ) |

inlineprotecteddefault

## Member Function Documentation

void MUIContainer::Add | ( | IWidget & | wgt,
|  | ZOrderType | z = `DefaultZOrder`
| ) |  |

向部件组添加部件。

向焦点对象组添加焦点对象，同时向部件组按指定 Z 顺序值添加部件。

Note
  部件已存在时忽略。

Definition at line 176 of file yuicont.cpp.

References Contains().

Here is the call graph for this function:

bool MUIContainer::Contains | ( | IWidget & | wgt | ) |

判断是否包含指定部件。

Definition at line 183 of file yuicont.cpp.

References ystdex::get_value.

Referenced by YSLib::Components::MenuHost::IsShowing().

Here is the caller graph for this function:

MUIContainer::Iterator MUIContainer::GetBegin | ( |  | ) |

Since
  build 357

Definition at line 161 of file yuicont.cpp.

References ystdex::get_indirect, and ystdex::get_value.

MUIContainer::Iterator MUIContainer::GetEnd | ( |  | ) |

Since
  build 357

Definition at line 168 of file yuicont.cpp.

References ystdex::get_indirect, and ystdex::get_value.

void YSLib::Components::MUIContainer::operator+= | ( | IWidget & | wgt | ) |

inlineprotected

向部件组添加部件。

向焦点对象组添加焦点对象，同时向部件组按默认 Z 顺序值添加部件。

Note
  部件已存在时忽略。

Definition at line 190 of file yuicont.h.

bool MUIContainer::operator-= | ( | IWidget & | wgt | ) |

protected

从部件组移除部件。

从部件组移除部件，同时从焦点对象组移除焦点对象。

Returns
  存在指定部件且移除成功。

Definition at line 145 of file yuicont.cpp.

References ystdex::erase_all(), ystdex::get_value, and YAssert.

Here is the call graph for this function:

void MUIContainer::PaintVisibleChildren | ( | PaintEventArgs & | e | ) |

protected

绘制可视子部件。

Since
  build 295

Definition at line 192 of file yuicont.cpp.

References YSLib::Drawing::PaintContext::ClipArea, ystdex::get_value, YSLib::Components::IsVisible(), YSLib::Components::PaintChild(), and YAssert.

Here is the call graph for this function:

## Member Data Documentation

WidgetMap YSLib::Components::MUIContainer::mWidgets

protected

Definition at line 176 of file yuicont.h.

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

- yuicont.h
- yuicont.cpp