pub struct Window {
pub name: String,
pub rows: usize,
pub cols: usize,
pub y: usize,
pub x: usize,
pub cursor_y: usize,
pub cursor_x: usize,
pub scroll: bool,
pub keypad: bool,
pub fg: Color,
pub bg: Color,
pub attrs: Vec<Attribute>,
/* private fields */
}Expand description
A curses window
Fields§
§name: String§rows: usize§cols: usize§y: usize§x: usize§cursor_y: usize§cursor_x: usize§scroll: bool§keypad: bool§fg: Color§bg: Color§attrs: Vec<Attribute>Implementations§
Source§impl Window
impl Window
pub fn new(name: &str, rows: usize, cols: usize, y: usize, x: usize) -> Self
pub fn stdscr() -> Self
pub fn move_cursor(&mut self, y: usize, x: usize)
pub fn addch(&mut self, ch: char)
pub fn addstr(&mut self, s: &str)
pub fn clear(&mut self)
pub fn erase(&mut self)
pub fn clrtoeol(&mut self)
pub fn clrtobot(&mut self)
pub fn set_scroll(&mut self, enable: bool)
pub fn set_keypad(&mut self, enable: bool)
pub fn attron(&mut self, attr: Attribute)
pub fn attroff(&mut self, attr: Attribute)
pub fn set_color(&mut self, fg: Color, bg: Color)
pub fn refresh(&self) -> Result<()>
pub fn getyx(&self) -> (usize, usize)
pub fn getmaxyx(&self) -> (usize, usize)
Trait Implementations§
Auto 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more