1 #ifndef CPPURSES_PAINTER_ATTRIBUTE_HPP
2 #define CPPURSES_PAINTER_ATTRIBUTE_HPP
3 #include <array>
4 #include <cstdint>
5 
6 namespace cppurses {
7 
8 /// Attributes that can be applied to alter the appearance of a Glyph object.
9 enum class Attribute : std::int8_t {
10     Bold,
11     Italic,
12     Underline,
13     Standout,
14     Dim,
15     Inverse,
16     Invisible,
17     Blink
18 };
19 
20 /// Global list of all Attributes.
21 /** Useful if querying a Brush for each Attribute with the
22  *  Brush::has_attribute() function. Brush holds a std::bitset internally making
23  *  a query about a specific Attribute quick. Returning a list of all set
24  *  Attributes is expensive, requiring an allocation if using std::vector. Might
25  *  change in the future to give a better interface. */
26 constexpr std::array<Attribute, 8> Attribute_list{
27     Attribute::Bold,      Attribute::Italic, Attribute::Underline,
28     Attribute::Standout,  Attribute::Dim,    Attribute::Inverse,
29     Attribute::Invisible, Attribute::Blink};
30 
31 }  // namespace cppurses
32 #endif  // CPPURSES_PAINTER_ATTRIBUTE_HPP
33