YSTest: YWindow.h 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

YWindow.h
浏览该文件的文档.
1 /*
2 © 2009-2015, 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_YWindow_h_
29 #define YSL_INC_UI_YWindow_h_ 1
30
31 #include "YModules.h"
32 #include YFM_YSLib_UI_YPanel
33
34 namespace YSLib
35 {
36
37 namespace UI
38 {
39
44 class YF_API Window : public Panel
45 {
46 public:
52 explicit
53 Window(const Rect& = {},
54 unique_ptr<Renderer> = make_unique<BufferedRenderer>());
55
56 void
57 operator+=(IWidget&) override;
58 virtual void
59 operator+=(Window&);
60 template<class _type>
61 inline void
62 operator+=(_type& p)
63 {
64 return operator+=(ystdex::cond_t<std::is_convertible<_type&, Window&>,
65 Window&, IWidget&>(p));
66 }
67
68 bool
69 operator-=(IWidget&) override;
70 virtual bool
71 operator-=(Window&);
72 template<class _type>
73 inline bool
74 operator-=(_type& p)
75 {
76 return operator-=(ystdex::cond_t<std::is_convertible<_type&, Window&>,
77 Window&, IWidget&>(p));
78 }
79
80 using MUIContainer::Contains;
81
83 void
84 Add(IWidget&, ZOrder = DefaultZOrder) override;
85 };
86
87 } // namespace UI;
88
89 } // namespace YSLib;
90
91 #endif
92
YSLib::UI::ZOrder
std::uint8_t ZOrder
Z 顺序类型：覆盖顺序，值越大表示越接近顶层。
Definition: YUIContainer.h:179
YSLib::UI::Panel
面板。
Definition: YPanel.h:46
YSLib::UI::Styles::Window
@ Window
窗口背景。
Definition: YStyle.h:311
YF_API
#define YF_API
Definition: Platform.h:56
YSLib::UI::Window
窗口。
Definition: YWindow.h:45
YSLib::UI::Window::operator-=
bool operator-=(_type &p)
Definition: YWindow.h:74
YSLib::UI::DefaultZOrder
const ZOrder DefaultZOrder(64)
默认 Z 顺序值。
YSLib::Drawing::Rect
屏幕标准矩形：表示屏幕矩形区域。
Definition: YGDIBase.h:788
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:46
ystdex::cond_t
_t< cond< _tCond, _tThen, _tElse > > cond_t
Definition: meta.hpp:794
YModules.h
YSLib 用户界面模块配置文件。
YSLib::UI::Window::operator+=
void operator+=(_type &p)
Definition: YWindow.h:62
YSLib::UI::MUIContainer::Contains
YB_ATTR_nodiscard YB_PURE bool Contains(IWidget &)
判断是否包含指定部件。
Definition: YUIContainer.cpp:244
platform::p
return p p
Definition: YCLib/FileSystem.h:209