YSTest: YPanel.h 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

YPanel.h
浏览该文件的文档.
1 /*
2 © 2012-2014, 2020 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #ifndef YSL_INC_UI_YPanel_h_
29 #define YSL_INC_UI_YPanel_h_ 1
30
31 #include "YModules.h"
32 #include YFM_YSLib_UI_YControl
33 #include YFM_YSLib_UI_YUIContainer
34
35 namespace YSLib
36 {
37
38 namespace UI
39 {
40
45 class YF_API Panel : public Control, protected MUIContainer
46 {
47 public:
52 explicit
53 Panel(const Rect& = {});
54
55 virtual void
56 operator+=(IWidget&);
57
58 virtual bool
59 operator-=(IWidget&);
60
61 using MUIContainer::Contains;
62
67 DefGetter(override, WidgetRange, Children, WidgetRange(begin(), end()))
68
69
74 virtual void
75 Add(IWidget&, ZOrder = DefaultZOrder);
76
82 void
83 ClearContents();
84
91 bool
92 MoveToFront(IWidget&);
93
95 using MUIContainer::QueryZ;
96
101 void
102 Refresh(PaintEventArgs&&) override;
103
105
106 using MUIContainer::begin;
107
108 using MUIContainer::end;
110 };
111
112 } // namespace UI;
113
114 } // namespace YSLib;
115
116 #endif
117
YSLib::UI::ZOrder
std::uint8_t ZOrder
Z 顺序类型：覆盖顺序，值越大表示越接近顶层。
Definition: YUIContainer.h:179
YSLib::UI::Panel
面板。
Definition: YPanel.h:46
YSLib::UI::Control
控件。
Definition: YControl.h:271
YF_API
#define YF_API
Definition: Platform.h:56
YSLib::UI::Panel::DefGetter
DefGetter(override, WidgetRange, Children, WidgetRange(begin(), end())) virtual void Add(IWidget &
按指定 Z 顺序向部件组添加部件，并设置指针。
YSLib::UI::Styles::Panel
@ Panel
面板背景。
Definition: YStyle.h:312
ystdex::cpp2017::end
auto end(_tRange &c) -> decltype(c.end())
Definition: range.hpp:345
YSLib::UI::DefaultZOrder
const ZOrder DefaultZOrder(64)
默认 Z 顺序值。
YSLib::UI::MUIContainer
部件容器模块。
Definition: YUIContainer.h:315
YSLib::Drawing::Rect
屏幕标准矩形：表示屏幕矩形区域。
Definition: YGDIBase.h:788
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:46
YModules.h
YSLib 用户界面模块配置文件。
YSLib::UI::PaintEventArgs
部件绘制参数。
Definition: YWidgetEvent.h:330
YSLib::UI::MUIContainer::Contains
YB_ATTR_nodiscard YB_PURE bool Contains(IWidget &)
判断是否包含指定部件。
Definition: YUIContainer.cpp:244
YSLib::UI::WidgetRange
pair< WidgetIterator, WidgetIterator > WidgetRange
两个部件迭代器组成的左闭右开区间确定的迭代器范围。
Definition: YWidget.h:57
ystdex::cpp2017::begin
auto begin(_tRange &c) -> decltype(c.begin())
Definition: range.hpp:323