Expand description
A rectangular part of the screen
Fields§
§left: u16
§top: u16
§width: u16
§height: u16
Implementations§
source§impl Area
impl Area
sourcepub const fn uninitialized() -> Area
pub const fn uninitialized() -> Area
build a new area. You’ll need to set the position and size before you can use it
sourcepub fn full_screen() -> Area
pub fn full_screen() -> Area
build an area covering the whole terminal
pub const fn right(&self) -> u16
pub const fn bottom(&self) -> u16
sourcepub const fn contains(&self, x: u16, y: u16) -> bool
pub const fn contains(&self, x: u16, y: u16) -> bool
tell whether the char at (x,y) is in the area
sourcepub fn pad_for_max_width(&mut self, max_width: u16)
pub fn pad_for_max_width(&mut self, max_width: u16)
symmetrically shrink the area if its width is bigger than max_width