[−][src]Trait vga_framebuffer::BaseConsole
Abstraction for our console. We can move the cursor around and write text
to it. You should use either UnicodeConsole
or AsciiConsole
depending
on whether you want full Unicode support (&str
, char
, etc), or just
8-bit characters (&[u8]
and u8
).
Associated Types
type Error
Required methods
fn get_width(&self) -> Col
Gets the last col on the screen.
fn get_height(&self) -> Row
Gets the last row on the screen.
fn set_col(&mut self, col: Col) -> Result<(), Self::Error>
Set the horizontal position for the next text output.
fn set_row(&mut self, row: Row) -> Result<(), Self::Error>
Set the vertical position for the next text output.
fn set_pos(&mut self, pos: Position) -> Result<(), Self::Error>
Set the horizontal and vertical position for the next text output.
fn get_pos(&self) -> Position
Get the current screen position.
fn set_control_char_mode(&mut self, mode: ControlCharMode)
Set the control char mode
fn get_control_char_mode(&self) -> ControlCharMode
Get the current control char mode
fn set_escape_char_mode(&mut self, mode: EscapeCharMode)
Set the escape char mode
fn get_escape_char_mode(&self) -> EscapeCharMode
Get the current escape char mode
fn scroll_screen(&mut self) -> Result<(), Self::Error>
Called when the screen needs to scroll up one row.
Provided methods
fn set_pos_unbounded(&mut self, pos: Position)
Set the horizontal and vertical position for the next text output. Don't bounds check the value, we've already done it.
fn move_cursor_right(&mut self) -> Result<(), Self::Error>
Move the current cursor right one position. Wraps at the end of the line. Returns Ok(true) if the screen needs to scroll, or Ok(false) if it does not.
Implementors
impl<T> BaseConsole for FrameBuffer<T> where
T: Hardware,
[src]
T: Hardware,
type Error = ()
fn get_width(&self) -> Col
[src]
Gets the last col on the screen.
fn get_height(&self) -> Row
[src]
Gets the last row on the screen.
fn set_col(&mut self, col: Col) -> Result<(), Self::Error>
[src]
Set the horizontal position for the next text output.
fn set_row(&mut self, row: Row) -> Result<(), Self::Error>
[src]
Set the vertical position for the next text output.
fn set_pos(&mut self, pos: Position) -> Result<(), Self::Error>
[src]
Set the horizontal and vertical position for the next text output.
fn get_pos(&self) -> Position
[src]
Get the current screen position.
fn set_control_char_mode(&mut self, mode: ControlCharMode)
[src]
Set the control char mode
fn get_control_char_mode(&self) -> ControlCharMode
[src]
Get the current control char mode
fn set_escape_char_mode(&mut self, mode: EscapeCharMode)
[src]
Set the escape char mode
fn get_escape_char_mode(&self) -> EscapeCharMode
[src]
Get the current escape char mode
fn scroll_screen(&mut self) -> Result<(), Self::Error>
[src]
Called when the screen needs to scroll up one row.