Struct kiss_ui::text::Label [] [src]

pub struct Label(_);

A static widget that renders text within its parent.

Methods

impl Label

fn new<S: Into<String>>(text: S) -> Label

Create a label with some text.

fn new_empty() -> Label

Create a blank label. The text can be set later.

fn set_text(self, text: &str) -> Self

Update the text of this label.

Panics

If any WidgetStr instances from self.get_text() are still reachable.

fn get_text(&self) -> WidgetStr

Get the text of this label.

Trait Implementations

impl Widget for Label

fn show(self) -> Self

fn hide(self) -> Self

fn set_visible(self, visible: bool) -> Self

fn set_enabled(self, enabled: bool) -> Self

fn set_position(self, x: i32, y: i32) -> Self

fn get_position(self) -> (i32, i32)

fn set_name(self, name: &str) -> Self

fn get_name(&self) -> Option<WidgetStr>

fn get_sibling(self) -> Option<BaseWidget>

fn get_parent(self) -> Option<BaseWidget>

fn get_dialog(self) -> Option<Dialog>

fn get_size_pixels(self) -> (u32, u32)

fn store<N: Into<String>>(self, name: N) -> Option<BaseWidget>

fn to_base(self) -> BaseWidget

impl Copy for Label

impl Clone for Label

fn clone(&self) -> Self

fn clone_from(&mut self, source: &Self)

impl Downcast for Label

fn can_downcast(base: &BaseWidget) -> bool

fn try_downcast(base: BaseWidget) -> Result<Self, BaseWidget>

impl ImageContainer for Label

fn set_image(self, image: Image) -> Self

fn get_image(&self) -> Option<Image>