YSTest: Console.h 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

Console.h
浏览该文件的文档.
1 /*
2 © 2011-2014 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_Console_h_
29 #define YSL_INC_UI_Console_h_ 1
30
31 #include "YModules.h"
32 #include YFM_YSLib_UI_YComponent
33 #include YFM_YSLib_Core_YDevice
34
35 namespace YSLib
36 {
37
38 namespace UI
39 {
40
42 class YF_API Console
43 {
44 public:
45 Devices::Screen& Screen;
46
51 explicit
52 Console(Devices::Screen& scr, bool a = true,
53 Drawing::Color fc = Drawing::ColorSpace::White,
54 Drawing::Color bc = Drawing::ColorSpace::Black)
55 : Screen(scr)
56 {
57 if(a)
58 Activate(*this, fc, bc);
59 }
64 ~Console()
65 {
66 Deactivate(*this);
67 }
68
73 friend void
74 Activate(Console&, Drawing::Color, Drawing::Color);
75
79 friend void
80 Deactivate(Console&);
81
82 void
83 Pause();
84 };
85
91 inline PDefH(void, Activate, Console& console,
92 Drawing::Color fc = Drawing::ColorSpace::White)
93 ImplExpr(Activate(console, fc, Drawing::ColorSpace::Black))
94
95 } // namespace UI;
96
97 } // namespace YSLib;
98
99 #endif
100
YSLib::Drawing::Color
The boundary is out of the const Rect SDst SPos SPos SPos Color
Definition: YDraw.h:128
YSLib::UI::Console::Console
Console(Devices::Screen &scr, bool a=true, Drawing::Color fc=Drawing::ColorSpace::White, Drawing::Color bc=Drawing::ColorSpace::Black)
构造：使用指定屏幕、有效性、前景色和背景色。
Definition: Console.h:52
YSLib::UI::PDefH
PDefH(void, DisplayFor, IWidget &wgt, Timers::TimeSpan delay) ImplExpr(Show(wgt)
在一定时间内显示部件。
YSLib::UI::fc
fc
Definition: Console.h:93
YF_API
#define YF_API
Definition: Platform.h:56
YSLib::UI::Deactivate
void Deactivate(Console &)
Definition: Console.cpp:50
YSLib::UI::Console
控制台。
Definition: Console.h:43
YSLib::UI::Console::~Console
~Console()
析构。
Definition: Console.h:64
YSLib::Consoles::Black
@ Black
Definition: YConsole.h:53
YSLib::Drawing::ColorSpace::Black
@ Black
Definition: YGDIBase.h:262
YSLib::UI::Activate
void Activate(Console &, Drawing::Color, Drawing::Color)
Definition: Console.cpp:45
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:46
YModules.h
YSLib 用户界面模块配置文件。
YSLib::UI::Console::Screen
Devices::Screen & Screen
Definition: Console.h:45
YSLib::UI::ImplExpr
IWidget bool b ImplExpr(wgt.GetController().SetEnabled(b)) YF_API bool Enable(IWidget &
设置部件可用性，且当可用性改变时无效化部件区域。
platform::KeyCodes::DS::Pause
@ Pause
Definition: Keys.h:257
YSLib::Drawing::ColorSpace::White
@ White
Definition: YGDIBase.h:275
YSLib::Devices::Screen
屏幕。
Definition: YDevice.h:133
YSLib::a
YB_PURE const _type * a
Definition: YCoreUtilities.h:168