|
YSTest
PreAlpha_b380_20130211
The YSLib Test Project
|
部件。 More...
#include <ywidget.h>


Classes | |
| struct | NoBackgroundTag |
| 无背景标记。 More... | |
Public Member Functions | |
| 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 > &&) |
| 设置渲染器为指定指针指向的对象,同时更新渲染器状态。 | |
| virtual void | Refresh (PaintEventArgs &&) |
| 刷新:按指定参数绘制界面并更新状态。 | |
Public Member Functions inherited from YSLib::Components::IWidget | |
| virtual | ~IWidget () |
Public Attributes | |
| HBrush | Background |
| 背景。 | |
| Color | ForeColor |
| 默认前景色。 | |
Private Member Functions | |
| void | InitializeEvents () |
| 初始化事件组。 | |
Private Attributes | |
| unique_ptr< View > | view_ptr |
| 部件视图指针。 | |
| unique_ptr< Renderer > | renderer_ptr |
| 渲染器指针。 | |
| unique_ptr< AController > | controller_ptr |
| 控制器指针。 | |
|
explicit |
| YSLib::Components::Widget::Widget | ( | const Widget & | ) |
复制构造:除容器指针为空外深复制。
|
default |
|
virtual |
析构:虚实现。
自动释放焦点后释放部件资源。
Definition at line 174 of file ywidget.cpp.
References DoReleaseFocus().

|
inlineoverridevirtual |
Implements YSLib::Components::IWidget.
Reimplemented in YSLib::Components::ScrollableContainer, YSLib::Components::AScrollBar, YSLib::Components::DropDownList, YSLib::Components::ATrack, YSLib::Components::ListBox, YSLib::Components::Panel, and YSLib::Components::DialogBox.
|
overridevirtual |
|
inline |
Definition at line 397 of file ywidget.h.
Referenced by YSLib::Components::ScrollableContainer::FixLayout(), and YSLib::Components::DropDownList::Refresh().

|
inlinevirtual |
|
inlinevirtual |
|
inline |
Definition at line 396 of file ywidget.h.
Referenced by YSLib::Components::ScrollableContainer::FixLayout(), YSLib::Components::DropDownList::Refresh(), and DualScreenReader::Stretch().

|
private |
初始化事件组。
Definition at line 180 of file ywidget.cpp.
References YSLib::Components::BackgroundPriority().

|
virtual |
刷新:按指定参数绘制界面并更新状态。
由参数指定的信息绘制事件发送者。参数的 ClipArea 成员指定边界。 边界仅为暗示,允许实现忽略,但应保证调用后边界内的区域保持最新显示状态。 绘制结束后更新边界,表示实际被绘制的区域。 若部件的内部状态能够保证显示状态最新,则返回的区域可能比传入时表示的范围更小。
Reimplemented in YSLib::Components::TextList, YSLib::Components::DropDownList, YSLib::Components::CheckButton, YSLib::Components::Button, YSLib::Components::Label, YSLib::Components::CheckBox, YSLib::Components::Panel, YSLib::Components::BufferedTextArea, and YSLib::Components::ProgressBar.
Definition at line 208 of file ywidget.cpp.
References YSLib::Components::IsVisible(), and YSLib::Components::PaintChild().

|
inline |
| void Widget::SetRenderer | ( | unique_ptr< Renderer > && | p | ) |
设置渲染器为指定指针指向的对象,同时更新渲染器状态。
Definition at line 195 of file ywidget.cpp.
References YSLib::Components::GetSizeOf().

| void Widget::SetView | ( | unique_ptr< View > && | p | ) |
设置渲染器为指定指针指向的对象,同时更新渲染器状态。
Definition at line 201 of file ywidget.cpp.
References YSLib::Components::GetBoundsOf().

|
inline |
|
inline |
|
inline |
|
mutable |
|
private |
| Color YSLib::Components::Widget::ForeColor |
默认前景色。
Definition at line 345 of file ywidget.h.
Referenced by YSLib::Components::CheckButton::Refresh(), and YSLib::Components::DropDownList::Refresh().
|
private |
|
private |