YSTest: HostWindow.h 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

HostWindow.h
浏览该文件的文档.
1 /*
2 © 2013-2016, 2019 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 INC_Helper_HostWindow_h_
29 #define INC_Helper_HostWindow_h_ 1
30
31 #include "YModules.h"
32 #include YFM_Helper_YGlobal
33 #include YFM_Helper_ScreenBuffer
34 #include YFM_YCLib_HostedGUI
35 #if YCL_Win32
36 # include YFM_YSLib_Core_YString // for YSLib::String;
37 # include YFM_YSLib_UI_YWidget // for UI::IWidget;
38 # include <atomic>
39 #endif
40
41 namespace YSLib
42 {
43
44 #if YF_Hosted
45 namespace Host
46 {
47
52 class YF_API Window : public HostWindow
53 {
54 private:
56 lref<GUIHost> host;
57
58 # if YCL_Win32
59 public:
68 bool UseOpacity{};
74 Drawing::AlphaType Opacity{0xFF};
75
77 WindowInputHost InputHost;
78 # endif
79
80 public:
86 Window(NativeWindowHandle);
88 Window(NativeWindowHandle, GUIHost&);
90 ~Window() override;
91
93 DefGetter(const ynothrow, GUIHost&, GUIHostRef, host)
94
95
99 virtual PDefH(void, Refresh, )
100 ImplExpr(void())
101
108 YB_NONNULL(2) void
109 UpdateFrom(Drawing::ConstBitmapPtr, ScreenBuffer&);
110
111 #if YCL_Win32
112
118 YB_NONNULL(2) void
119 UpdateFromBounds(Drawing::ConstBitmapPtr, ScreenBuffer&,
120 const Drawing::Rect&, const Drawing::Point& = {});
121
126 virtual void
127 UpdateTextInputFocus(UI::IWidget&, const Drawing::Point&);
128 #endif
129 };
130
131 } // namespace Host;
132 #endif
133
134 } // namespace YSLib;
135
136 #endif
137
YSLib::UI::Styles::Window
@ Window
窗口背景。
Definition: YStyle.h:311
YF_API
#define YF_API
Definition: Platform.h:56
YSLib::Drawing::Point
GBinaryGroup< SPos > Point
屏幕二维点（直角坐标表示）。
Definition: YGDIBase.h:520
YSLib::Drawing::AlphaType
octet AlphaType
Alpha 分量类型。
Definition: YGDIBase.h:49
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:46
YModules.h
YSLib 用户界面模块配置文件。
YSLib::ynothrow
YB_PURE const _type size_t n ynothrow
Definition: YCoreUtilities.h:169
YSLib::YB_NONNULL
YB_ATTR_nodiscard YF_API YB_NONNULL(1, 2) ValueNode LoadNPLA1File(const char *disp
载入 NPLA1 配置文件。
ImplExpr
#define ImplExpr(...)
简单通用函数实现。
Definition: YBaseMacro.h:96
DefGetter
#define DefGetter(_q, _t, _n,...)
Definition: YBaseMacro.h:241
YSLib::Drawing::ConstBitmapPtr
const Pixel * ConstBitmapPtr
Definition: YGraphics.h:44
const
const Decapsulate const Decapsulate &y ynothrow ContextNode &ctx const
Definition: NPLA1Forms.cpp:1629
YSLib::PDefH
PDefH(Environment &, FetchEnvironment,) ImplRet(FetchGlobalInstance().GetEnvironmentRef()) inline PDefH(GUIHost &
取单一环境对象引用。