[][src]Struct kas::widget::Label

pub struct Label<T: FormattableText + 'static> { /* fields omitted */ }

A text label

This type is generic over the text type. Some aliases are available: StrLabel, StringLabel, AccelLabel.

Implementations

impl<T: FormattableText + 'static> Label<T>[src]

pub fn new(label: T) -> Self[src]

Construct from label

pub fn with_reserve(self, text: T) -> Self[src]

Reserve sufficient room for the given text

If this option is used, the label will be sized to fit this text, not the actual text.

pub fn set_text(&mut self, text: T) -> TkAction[src]

Set text in an existing Label

Note: this must not be called before fonts have been initialised (usually done by the theme when the main loop starts).

impl Label<AccelString>[src]

pub fn keys(&self) -> &[VirtualKeyCode][src]

Get the accelerator keys

Trait Implementations

impl<T: Clone + FormattableText + 'static> Clone for Label<T>[src]

impl<T: Debug + FormattableText + 'static> Debug for Label<T>[src]

impl<T: Default + FormattableText + 'static> Default for Label<T>[src]

impl<'a> From<&'a str> for Label<String>[src]

impl<T: FormattableText + 'static> From<T> for Label<T>[src]

impl<T: FormattableText + 'static> Handler for Label<T>[src]

type Msg = VoidMsg

Type of message returned by this widget Read more

impl<T: FormattableText + 'static> HasStr for Label<T>[src]

impl<T: FormattableText + EditableText + 'static> HasString for Label<T>[src]

impl<T: FormattableText + 'static> Layout for Label<T>[src]

impl<'a> Layout for Label<&'a str>[src]

impl<T: FormattableText + 'static> SendEvent for Label<T>[src]

impl<T: FormattableText + 'static> Widget for Label<T>[src]

impl<T: FormattableText + 'static> WidgetChildren for Label<T>[src]

impl<T: FormattableText + 'static> WidgetConfig for Label<T>[src]

impl<T: FormattableText + 'static> WidgetCore for Label<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Label<T> where
    T: RefUnwindSafe

impl<T> Send for Label<T> where
    T: Send

impl<T> Sync for Label<T> where
    T: Sync

impl<T> Unpin for Label<T> where
    T: Unpin

impl<T> UnwindSafe for Label<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<!> for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.