-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConsoleColor.ixx
More file actions
36 lines (34 loc) · 897 Bytes
/
ConsoleColor.ixx
File metadata and controls
36 lines (34 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
export module Dew:ConsoleColor;
import :Object;
import <iostream>;
using namespace std;
namespace Dew {
/*
* żŘÖĆ̨ŃŐÉŤ
*/
class _Color : public Object {
String _name, _code;
class Code {
public:
const _Color& owner;
operator String() const { return owner._code; }
};
public:
_Color(const String& name, const String& code) : _name(name), _code(code) {}
String ToString() { return _name; }
Code Code{ *this };
};
class _ConsoleColor : public Object {
public:
_Color Black{ L"Black",L"\033[30m" };
_Color Red{ L"Red",L"\033[31m" };
_Color Green{ L"Green",L"\033[32m" };
_Color Yellow{ L"Yellow",L"\033[33m" };
_Color Blue{ L"Blue",L"\033[34m" };
_Color Magenta{ L"Magenta",L"\033[35m" };
_Color Cyan{ L"Cyan",L"\033[36m" };
_Color White{ L"White",L"\033[37m" };
_Color Default{ L"Default",L"\033[39m" };
};
export const _ConsoleColor ConsoleColor;
}