Struct tui::widgets::Paragraph [] [src]

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

A widget to display some text. You can specify colors using commands embedded in the text such as "{[color] [text]}".

Examples

Paragraph::default()
    .block(Block::default().title("Paragraph").borders(Borders::ALL))
    .style(Style::default().fg(Color::White).bg(Color::Black))
    .wrap(true)
    .text("First line\nSecond line\n{red Colored text}.");

Methods

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

[src]

[src]

[src]

[src]

[src]

[src]

Trait Implementations

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

[src]

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

impl<'a> Widget for Paragraph<'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 Paragraph<'a>

impl<'a> Sync for Paragraph<'a>