morpheus_bootloader::tui::renderer

Struct Screen

Source
pub struct Screen {
    con_out: *mut SimpleTextOutputProtocol,
    width: usize,
    height: usize,
    pub mask: Vec<Vec<bool>>,
}

Fields§

§con_out: *mut SimpleTextOutputProtocol§width: usize§height: usize§mask: Vec<Vec<bool>>

Implementations§

Source§

impl Screen

Source

pub fn new(con_out: *mut SimpleTextOutputProtocol) -> Self

Source

fn get_screen_size(con_out: *mut SimpleTextOutputProtocol) -> (usize, usize)

Source

pub fn width(&self) -> usize

Source

pub fn height(&self) -> usize

Source

pub fn center_x(&self, content_width: usize) -> usize

Source

pub fn center_y(&self, content_height: usize) -> usize

Source

pub fn center_xy( &self, content_width: usize, content_height: usize, ) -> (usize, usize)

Source

pub fn clear(&mut self)

Source

pub fn set_color(&mut self, fg: usize, bg: usize)

Source

pub fn set_cursor(&mut self, x: usize, y: usize)

Source

pub fn put_char(&mut self, ch: char)

Source

pub fn put_str(&mut self, s: &str)

Source

pub fn put_char_at( &mut self, x: usize, y: usize, ch: char, fg: usize, bg: usize, )

Source

pub fn put_str_at(&mut self, x: usize, y: usize, s: &str, fg: usize, bg: usize)

Source

pub fn draw_block(&mut self, lines: &[&str])

Source

pub fn draw_block_colored(&mut self, lines: &[&str], fg: usize, bg: usize)

Source

pub fn draw_centered_block( &mut self, lines: &[&str], width: usize, start_y: usize, fg: usize, bg: usize, )

Source

pub fn set_colors(&mut self, fg: usize, bg: usize)

Alias for set_color

Source

pub fn print(&mut self, s: &str)

Alias for put_str

Source

pub fn print_char(&mut self, ch: char)

Alias for put_char

Auto Trait Implementations§

§

impl Freeze for Screen

§

impl RefUnwindSafe for Screen

§

impl !Send for Screen

§

impl !Sync for Screen

§

impl Unpin for Screen

§

impl UnwindSafe for Screen

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.