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§
Sourcefn left(&self) -> &Vec<ClickableString>
fn left(&self) -> &Vec<ClickableString>
Reference to the elements
fn right(&self) -> &Vec<ClickableString>
Sourcefn full_width(&self) -> u16
fn full_width(&self) -> u16
Full width of the terminal
Provided Methods§
Sourcefn offset(&self, is_right: bool) -> u16
fn offset(&self, is_right: bool) -> u16
used offset. 1 if the text is on left tab, width / 2 + 2 otherwise.
Sourcefn draw_left(&self, f: &mut Frame<'_>, rect: Rect, effect_reverse: bool)
fn draw_left(&self, f: &mut Frame<'_>, rect: Rect, effect_reverse: bool)
Draw the left aligned elements of the line.
Sourcefn draw_right(&self, f: &mut Frame<'_>, rect: Rect, effect_reverse: bool)
fn draw_right(&self, f: &mut Frame<'_>, rect: Rect, effect_reverse: bool)
Draw the right aligned elements of the line.