pub struct Window { /* private fields */ }Expand description
A self-contained pane: a Buffer plus its position on a target
surface.
Implementations§
Source§impl Window
impl Window
Sourcepub fn set_position(&mut self, pos: impl Into<Position>)
pub fn set_position(&mut self, pos: impl Into<Position>)
Move the window. Affects subsequent Self::present calls.
Sourcepub fn buffer_mut(&mut self) -> &mut Buffer
pub fn buffer_mut(&mut self) -> &mut Buffer
Mutable handle to the underlying buffer.
Sourcepub fn present<T: SurfaceMut + ?Sized>(&self, target: &mut T)
pub fn present<T: SurfaceMut + ?Sized>(&self, target: &mut T)
Blit this window’s cells onto target, mapping the window’s
top-left to Self::position in target coordinates.
Trait Implementations§
Source§impl Bounded for Window
impl Bounded for Window
Source§impl SurfaceMut for Window
impl SurfaceMut for Window
Source§fn set_cell(&mut self, pos: Position, cell: &Cell)
fn set_cell(&mut self, pos: Position, cell: &Cell)
Place
cell at pos. Implementations are responsible for
wide-cell semantics (continuation markers, blanking covered
cells) and any dirty tracking they care to do. Taking &Cell
lets implementations skip the clone when the destination
already matches. Read moreSource§fn clear(&mut self)
fn clear(&mut self)
Clear the entire surface bounds to
Cell::BLANK. Read moreSource§fn clear_rect(&mut self, rect: Rect)
fn clear_rect(&mut self, rect: Rect)
Clear a rectangle to
Cell::BLANK. Read moreSource§fn insert_lines(&mut self, y: u16, n: u16, bounds_bottom: u16, fill: &Cell)
fn insert_lines(&mut self, y: u16, n: u16, bounds_bottom: u16, fill: &Cell)
Insert
n blank rows at y, pushing existing rows down within
[y, bounds_bottom). Rows pushed past bounds_bottom are lost.
Freed top rows are filled with fill. Read moreSource§fn delete_lines(&mut self, y: u16, n: u16, bounds_bottom: u16, fill: &Cell)
fn delete_lines(&mut self, y: u16, n: u16, bounds_bottom: u16, fill: &Cell)
Delete
n rows at y, pulling existing rows up within
[y, bounds_bottom). The bottom n rows of the window are
filled with fill. Read moreAuto Trait Implementations§
impl Freeze for Window
impl RefUnwindSafe for Window
impl Send for Window
impl Sync for Window
impl Unpin for Window
impl UnsafeUnpin for Window
impl UnwindSafe for Window
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> Encode for S
impl<S> Encode for S
Source§fn encode<W: Write>(&self, w: &mut W) -> Result<()>
fn encode<W: Write>(&self, w: &mut W) -> Result<()>
Write the surface to
w as escape sequences and text. Read more