[][src]Trait vga_framebuffer::AsciiConsole

pub trait AsciiConsole: BaseConsole {
    fn write_char_at(
        &mut self,
        ch: u8,
        pos: Position
    ) -> Result<(), Self::Error>;
fn handle_escape(&mut self, escaped_char: u8) -> bool; fn write_string(&mut self, s: &[u8]) -> Result<(), Self::Error> { ... }
fn write_character(&mut self, ch: u8) -> Result<(), Self::Error> { ... }
fn write_string_at(
        &mut self,
        s: &[u8],
        pos: Position
    ) -> Result<(), Self::Error> { ... }
fn is_special(&self, ch: u8) -> Option<SpecialChar> { ... } }

Refinement of BaseConsole which supports 8-bit characters. Use this is you are implementing an old-fashioned ASCII console (including extended ASCII, like Code Page 850, or ISO 8859-1).

Required methods

fn write_char_at(&mut self, ch: u8, pos: Position) -> Result<(), Self::Error>

Write a single 8-bit char to the screen at the given position without updating the current position.

fn handle_escape(&mut self, escaped_char: u8) -> bool

Called when they've used an escape character in the string. Currently you can only escape a single byte. The escape character is 0x1B. This function returns 'true' when the escape sequence is complete.

Loading content...

Provided methods

fn write_string(&mut self, s: &[u8]) -> Result<(), Self::Error>

Write an 8-bit string to the screen at the given position. Updates the current position to the end of the string. Strings will wrap across the end of the screen and scroll the screen if they reach the bottom.

fn write_character(&mut self, ch: u8) -> Result<(), Self::Error>

Write a single 8-bit char to the screen at the current position.

fn write_string_at(
    &mut self,
    s: &[u8],
    pos: Position
) -> Result<(), Self::Error>

Write an 8-bit string to the screen at the given position. Updates the current position to the end of the string. Strings will wrap across the end of the screen and scroll the screen if they reach the bottom.

fn is_special(&self, ch: u8) -> Option<SpecialChar>

Check if an 8-bit char is special

Loading content...

Implementors

impl<T> AsciiConsole for FrameBuffer<T> where
    T: Hardware
[src]

fn handle_escape(&mut self, escaped_char: u8) -> bool[src]

Handle an escape char. We take a, b, c, d, e, f, g, h as being a background colour and A..H as being a foreground colour. 'Z' means clear the screen.

fn write_char_at(&mut self, ch: u8, pos: Position) -> Result<(), Self::Error>[src]

Write a single Unicode char to the screen at the given position without updating the current position.

Loading content...