[][src]Trait kas::class::HasText

pub trait HasText {
    fn get_text(&self) -> &str;
fn set_cow_string(&mut self, text: CowString) -> TkAction; fn set_text<T: Into<CowString>>(&mut self, text: T) -> TkAction
    where
        Self: Sized
, { ... } }

Functionality for widgets with visible text.

This applies to both labels and the text content of interactive widgets. The only widgets supporting both labels and interactive content have boolean values (e.g. checkboxes); these may support both HasText and HasBool.

Required methods

fn get_text(&self) -> &str

Get the widget's text.

fn set_cow_string(&mut self, text: CowString) -> TkAction

Set the widget's text (CowString)

This method is for implementation. It is recommended to use HasText::set_text instead.

Loading content...

Provided methods

fn set_text<T: Into<CowString>>(&mut self, text: T) -> TkAction where
    Self: Sized

Set the widget's text.

Loading content...

Implementors

impl HasText for AccelLabel[src]

impl HasText for Label[src]

impl<D: Directional, W: Menu> HasText for SubMenu<D, W>[src]

impl<G> HasText for EditBox<G>[src]

impl<M: Clone + Debug + 'static> HasText for MenuEntry<M>[src]

impl<M: Clone + Debug + 'static> HasText for TextButton<M>[src]

impl<W: HasText + Widget> HasText for Frame<W>[src]

impl<W: HasText + Widget> HasText for MenuFrame<W>[src]

Loading content...