mecomp_tui::ui::components

Trait ComponentRender

source
pub trait ComponentRender<Props> {
    // Required methods
    fn render_border(&self, frame: &mut Frame<'_>, props: Props) -> Props;
    fn render_content(&self, frame: &mut Frame<'_>, props: Props);

    // Provided method
    fn render(&self, frame: &mut Frame<'_>, props: Props) { ... }
}

Required Methods§

source

fn render_border(&self, frame: &mut Frame<'_>, props: Props) -> Props

Render the border of the view, and return the props updated with the remaining area for the view.

source

fn render_content(&self, frame: &mut Frame<'_>, props: Props)

Render the view’s content.

Provided Methods§

source

fn render(&self, frame: &mut Frame<'_>, props: Props)

Render the view (border and content).

Implementors§