Struct redox::console::ConsoleWindow
[−]
[src]
pub struct ConsoleWindow { pub window: Box<Window>, pub output: Vec<ConsoleChar>, pub history: Vec<String>, pub history_i: usize, pub offset: usize, pub scroll_x: isize, pub scroll_y: isize, pub wrap: bool, }
A console window
Fields
window | The window |
output | The char buffer |
history | Previous commands |
history_i | History index |
offset | Offset |
scroll_x | Scroll distance x |
scroll_y | Scroll distance y |
wrap | Wrap the text, if true |
Methods
impl ConsoleWindow
fn new(x: isize, y: isize, w: usize, h: usize, title: &str) -> Box<Self>
Create a new console window
fn set_title(&mut self, title: &str)
Set the window title
fn poll(&mut self) -> Option<Event>
Poll the window
fn print(&mut self, string: &str, color: Color)
Print to the window
fn read(&mut self) -> Option<String>
Read input
fn sync(&mut self)
Redraw the window