1#ifndef KOUTIL_TERM_STYLE_H
2#define KOUTIL_TERM_STYLE_H
13enum class Style : std::uint8_t {
26 using enum_type = std::underlying_type_t<Style>;
28 return static_cast<Style>(
static_cast<enum_type
>(a) |
static_cast<enum_type
>(b));
32 using enum_type = std::underlying_type_t<Style>;
33 return static_cast<Style>(
static_cast<enum_type
>(a) ^ (
static_cast<enum_type
>(b) &
static_cast<enum_type
>(a)));
37 using enum_type = std::underlying_type_t<Style>;
38 return static_cast<Style>(
static_cast<enum_type
>(a) &
static_cast<enum_type
>(b));
50 using namespace std::string_view_literals;
61 constexpr auto bold_dim_lookup = std::to_array<std::string_view>({
"22"sv,
"22;1"sv,
"22;2"sv,
"1;2"sv });
std::ostream & reset_all(std::ostream &stream)
Resets all text styles and colors to default.
Definition style.h:109
constexpr bool style_contains(Style style, Style flags)
Checks if a text style contains certain flags.
Definition style.h:47
Style
Definition style.h:13
std::ostream & operator<<(std::ostream &stream, ColorBG bg)
Definition color_operators.h:52
constexpr Style operator+(Style a, Style b)
Definition style.h:25
constexpr Style operator-(Style a, Style b)
Definition style.h:31
constexpr Style operator&(Style a, Style b)
Definition style.h:36
constexpr char ESC
Definition utils.h:20