Skip to main content

TheTextLayoutTrait

Trait TheTextLayoutTrait 

Source
pub trait TheTextLayoutTrait: TheLayout {
    // Required methods
    fn clear(&mut self);
    fn add_pair(&mut self, text: String, widget: Box<dyn TheWidget>);
    fn set_fixed_text_width(&mut self, text_width: i32);
    fn set_text_size(&mut self, text_size: f32);
    fn set_text_margin(&mut self, text_margin: i32);
    fn set_text_align(&mut self, align: TheHorizontalAlign);
}
Expand description

TheTextLayout specific functions.

Required Methods§

Source

fn clear(&mut self)

Clear the text and widget pairs.

Source

fn add_pair(&mut self, text: String, widget: Box<dyn TheWidget>)

Add a text / widget pair.

Source

fn set_fixed_text_width(&mut self, text_width: i32)

Set the fixed text width.

Source

fn set_text_size(&mut self, text_size: f32)

Set the text size to use for the left handed text.

Source

fn set_text_margin(&mut self, text_margin: i32)

Set the text margin between the text and the widget.

Source

fn set_text_align(&mut self, align: TheHorizontalAlign)

The horizontal text alignment

Implementors§