ClickableLine

Trait ClickableLine 

Source
pub trait ClickableLine {
    // Required methods
    fn left(&self) -> &Vec<ClickableString>;
    fn right(&self) -> &Vec<ClickableString>;
    fn full_width(&self) -> u16;

    // Provided methods
    fn action(&self, col: u16, is_right: bool) -> &ActionMap { ... }
    fn offset(&self, is_right: bool) -> u16 { ... }
    fn draw_left(&self, f: &mut Frame<'_>, rect: Rect, effect_reverse: bool) { ... }
    fn draw_right(&self, f: &mut Frame<'_>, rect: Rect, effect_reverse: bool) { ... }
}
Expand description

A line of element that can be clicked on.

Required Methods§

Source

fn left(&self) -> &Vec<ClickableString>

Reference to the elements

Source

fn right(&self) -> &Vec<ClickableString>

Source

fn full_width(&self) -> u16

Full width of the terminal

Provided Methods§

Source

fn action(&self, col: u16, is_right: bool) -> &ActionMap

Action for each associated file.

Source

fn offset(&self, is_right: bool) -> u16

used offset. 1 if the text is on left tab, width / 2 + 2 otherwise.

Source

fn draw_left(&self, f: &mut Frame<'_>, rect: Rect, effect_reverse: bool)

Draw the left aligned elements of the line.

Source

fn draw_right(&self, f: &mut Frame<'_>, rect: Rect, effect_reverse: bool)

Draw the right aligned elements of the line.

Implementors§