kaycxx-term
C++ terminal library
Loading...
Searching...
No Matches
sgr.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Klaus Reimer <k@ailis.de>
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
11namespace kaycxx::term {
12
16struct sgr {
18 int code;
19};
20
22inline constexpr sgr reset{0};
23
25inline constexpr sgr bold{1};
26
28inline constexpr sgr dim{2};
29
31inline constexpr sgr italic{3};
32
34inline constexpr sgr underline{4};
35
37inline constexpr sgr inverse{7};
38
40inline constexpr sgr normal_intensity{22};
41
43inline constexpr sgr no_italic{23};
44
46inline constexpr sgr no_underline{24};
47
49inline constexpr sgr no_inverse{27};
50
52inline constexpr sgr reset_foreground{39};
53
55inline constexpr sgr reset_background{49};
56
57} // namespace kaycxx::term
constexpr sgr no_inverse
Disable inverse colors.
Definition sgr.hpp:49
constexpr sgr no_italic
Disable italic text.
Definition sgr.hpp:43
constexpr sgr inverse
Enable inverse colors.
Definition sgr.hpp:37
constexpr sgr reset_background
Reset background color.
Definition sgr.hpp:55
constexpr sgr dim
Enable dim intensity.
Definition sgr.hpp:28
constexpr sgr bold
Enable bold intensity.
Definition sgr.hpp:25
constexpr sgr reset
Reset all SGR attributes.
Definition sgr.hpp:22
constexpr sgr normal_intensity
Reset bold and dim intensity.
Definition sgr.hpp:40
constexpr sgr underline
Enable underlined text.
Definition sgr.hpp:34
constexpr sgr reset_foreground
Reset foreground color.
Definition sgr.hpp:52
constexpr sgr no_underline
Disable underlined text.
Definition sgr.hpp:46
constexpr sgr italic
Enable italic text.
Definition sgr.hpp:31
Select Graphic Rendition command.
Definition sgr.hpp:16
int code
SGR numeric code.
Definition sgr.hpp:18