diff options
Diffstat (limited to 'src/term/cell.rs')
-rw-r--r-- | src/term/cell.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/term/cell.rs b/src/term/cell.rs index 18e03dee..d1c6877b 100644 --- a/src/term/cell.rs +++ b/src/term/cell.rs @@ -25,6 +25,8 @@ bitflags! { const WRAPLINE = 0b00010000, const WIDE_CHAR = 0b00100000, const WIDE_CHAR_SPACER = 0b01000000, + const DIM = 0b10000000, + const DIM_BOLD = 0b10000010, } } @@ -73,14 +75,21 @@ impl LineLength for grid::Row<Cell> { } impl Cell { + #[inline] pub fn bold(&self) -> bool { self.flags.contains(BOLD) } + #[inline] pub fn inverse(&self) -> bool { self.flags.contains(INVERSE) } + #[inline] + pub fn dim(&self) -> bool { + self.flags.contains(DIM) + } + pub fn new(c: char, fg: Color, bg: Color) -> Cell { Cell { c: c.into(), |