| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
| | |
| 12 |
| | |
| 13 |
| | |
| 14 |
|
| 15 |
| | |
| 16 |
|
| 17 |
|
| 18 |
| | |
| 19 |
l. | |
| 20 |
n. | |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
#[derive(Copy, Clone, Debug, PartialEq, Eq, Ord, PartialOrd, Hash)] |
| 31 |
#[non_exhaustive] |
| 32 |
pub enum Attribute { |
| 33 |
|
| 34 |
Reset, |
| 35 |
|
| 36 |
Bold, |
| 37 |
|
| 38 |
Dim, |
| 39 |
|
| 40 |
Italic, |
| 41 |
|
| 42 |
Underlined, |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
DoubleUnderlined, |
| 47 |
|
| 48 |
Undercurled, |
| 49 |
|
| 50 |
Underdotted, |
| 51 |
|
| 52 |
Underdashed, |
| 53 |
|
| 54 |
|
| 55 |
SlowBlink, |
| 56 |
|
| 57 |
RapidBlink, |
| 58 |
|
| 59 |
Reverse, |
| 60 |
|
| 61 |
Hidden, |
| 62 |
|
| 63 |
CrossedOut, |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
Fraktur, |
| 68 |
|
| 69 |
NoBold, |
| 70 |
|
| 71 |
NormalIntensity, |
| 72 |
|
| 73 |
NoItalic, |
| 74 |
|
| 75 |
NoUnderline, |
| 76 |
|
| 77 |
NoBlink, |
| 78 |
|
| 79 |
NoReverse, |
| 80 |
|
| 81 |
NoHidden, |
| 82 |
|
| 83 |
NotCrossedOut, |
| 84 |
|
| 85 |
Framed, |
| 86 |
|
| 87 |
Encircled, |
| 88 |
|
| 89 |
OverLined, |
| 90 |
|
| 91 |
NotFramedOrEncircled, |
| 92 |
|
| 93 |
NotOverLined, |
| 94 |
} |
| 95 |
|
| 96 |
|
| 97 |
pub(crate) fn map_attribute(attribute: Attribute) -> crossterm::style::Attribute { |
| 98 |
match attribute { |
| 99 |
Attribute::Reset => crossterm::style::Attribute::Reset, |
| 100 |
Attribute::Bold => crossterm::style::Attribute::Bold, |
| 101 |
Attribute::Dim => crossterm::style::Attribute::Dim, |
| 102 |
Attribute::Italic => crossterm::style::Attribute::Italic, |
| 103 |
Attribute::Underlined => crossterm::style::Attribute::Underlined, |
| 104 |
Attribute::DoubleUnderlined => crossterm::style::Attribute::DoubleUnderlined, |
| 105 |
Attribute::Undercurled => crossterm::style::Attribute::Undercurled, |
| 106 |
Attribute::Underdotted => crossterm::style::Attribute::Underdotted, |
| 107 |
Attribute::Underdashed => crossterm::style::Attribute::Underdashed, |
| 108 |
Attribute::SlowBlink => crossterm::style::Attribute::SlowBlink, |
| 109 |
Attribute::RapidBlink => crossterm::style::Attribute::RapidBlink, |
| 110 |
Attribute::Reverse => crossterm::style::Attribute::Reverse, |
| 111 |
Attribute::Hidden => crossterm::style::Attribute::Hidden, |
| 112 |
Attribute::CrossedOut => crossterm::style::Attribute::CrossedOut, |
| 113 |
Attribute::Fraktur => crossterm::style::Attribute::Fraktur, |
| 114 |
Attribute::NoBold => crossterm::style::Attribute::NoBold, |
| 115 |
Attribute::NormalIntensity => crossterm::style::Attribute::NormalIntensity, |
| 116 |
Attribute::NoItalic => crossterm::style::Attribute::NoItalic, |
| 117 |
Attribute::NoUnderline => crossterm::style::Attribute::NoUnderline, |
| 118 |
Attribute::NoBlink => crossterm::style::Attribute::NoBlink, |
| 119 |
Attribute::NoReverse => crossterm::style::Attribute::NoReverse, |
| 120 |
Attribute::NoHidden => crossterm::style::Attribute::NoHidden, |
| 121 |
Attribute::NotCrossedOut => crossterm::style::Attribute::NotCrossedOut, |
| 122 |
Attribute::Framed => crossterm::style::Attribute::Framed, |
| 123 |
Attribute::Encircled => crossterm::style::Attribute::Encircled, |
| 124 |
Attribute::OverLined => crossterm::style::Attribute::OverLined, |
| 125 |
Attribute::NotFramedOrEncircled => crossterm::style::Attribute::NotFramedOrEncircled, |
| 126 |
Attribute::NotOverLined => crossterm::style::Attribute::NotOverLined, |
| 127 |
} |
| 128 |
} |