Struct tui::widgets::Block [] [src]

pub struct Block<'a> { /* fields omitted */ }

Base widget to be used with all upper level ones. It may be used to display a box border around the widget and/or add a title.

Examples

Block::default()
    .title("Block")
    .title_style(Style::default().fg(Color::Red))
    .borders(Borders::LEFT | Borders::RIGHT)
    .border_style(Style::default().fg(Color::White))
    .style(Style::default().bg(Color::Black));

Methods

impl<'a> Block<'a>
[src]

[src]

[src]

[src]

[src]

[src]

[src]

Compute the inner area of a block based on its border visibility rules.

Trait Implementations

impl<'a> Clone for Block<'a>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Copy for Block<'a>
[src]

impl<'a> Default for Block<'a>
[src]

[src]

Returns the "default value" for a type. Read more

impl<'a> Widget for Block<'a>
[src]

[src]

Draws the current state of the widget in the given buffer. That the only method required to implement a custom widget. Read more

[src]

Helper method to quickly set the background of all cells inside the specified area.

[src]

Helper method that can be chained with a widget's builder methods to render it.

Auto Trait Implementations

impl<'a> Send for Block<'a>

impl<'a> Sync for Block<'a>