YSTest: Console.h 源文件

YSTest PreAlpha_b500_20140530 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 virtual
65 ~Console()
66 {
67 Deactivate(*this);
68 }
69
74 friend void
75 Activate(Console&, Drawing::Color, Drawing::Color);
76
80 friend void
81 Deactivate(Console&);
82
83 void
84 Pause();
85 };
86
92 inline PDefH(void, Activate, Console& console,
93 Drawing::Color fc = Drawing::ColorSpace::White)
94 ImplExpr(Activate(console, fc, Drawing::ColorSpace::Black))
95
96 } // namespace UI;
97
98 } // namespace YSLib;
99
100 #endif
101
YSLib::Devices::Screen
屏幕。
Definition: ydevice.h:126
YModules.h
YSLib::UI::Deactivate
void Deactivate(Console &)
Definition: Console.cpp:50
YF_API
#define YF_API
Definition: Platform.h:64
platform::Consoles::Black
Definition: Video.h:460
platform::Consoles::White
Definition: Video.h:475
YSLib::UI::PDefH
PDefH(void, Activate, Console &console, Drawing::Color fc=Drawing::ColorSpace::White) ImplExpr(Activate(console
激活：使用指定屏幕、有效性、前景色和默认背景色。
ImplExpr
#define ImplExpr(...)
Definition: YBaseMacro.h:93
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::Console::~Console
virtual ~Console()
析构。
Definition: Console.h:65
YSLib::UI::Console
控制台。
Definition: Console.h:42
platform::Color
颜色。
Definition: Video.h:339
YSLib::UI::fc
fc
Definition: Console.h:94
YSLib::UI::Activate
void Activate(Console &, Drawing::Color, Drawing::Color)
Definition: Console.cpp:45
YSLib::UI::Console::Screen
Devices::Screen & Screen
Definition: Console.h:45