YSTest: Console.h 源文件

YSTest PreAlpha_b400_20130424 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

全部 类 命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 组 页
Console.h
浏览该文件的文档.
1 ﻿/*
2 Copyright by FrankHB 2011 - 2013.
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 "ycomp.h"
32 #include "../Core/ydevice.h"
33
34 YSL_BEGIN
35
36 YSL_BEGIN_NAMESPACE(UI)
37
38
39 class YF_API Console
40 {
41 public:
42 Devices::Screen& Screen;
43
48 explicit
49 Console(Devices::Screen& scr, bool a = true,
50 Drawing::Color fc = Drawing::ColorSpace::White,
51 Drawing::Color bc = Drawing::ColorSpace::Black)
52 : Screen(scr)
53 {
54 if(a)
55 Activate(*this, fc, bc);
56 }
61 virtual
62 ~Console()
63 {
64 Deactivate(*this);
65 }
66
70 friend void
71 Activate(Console&, Drawing::Color = Drawing::ColorSpace::White,
72 Drawing::Color = Drawing::ColorSpace::Black);
73
77 friend void
78 Deactivate(Console&);
79
80 void
81 Pause();
82 };
83
84 YSL_END_NAMESPACE(UI)
85
86 YSL_END
87
88 #endif
89