[−][src]Struct uniui_widget_label::Label
Shows text on the screen.
let label = Label::new("Hello world".to_owned()); lable.slot_set_text_alignment().exec_for(TextAlignment::Center);
Macros
You can use u_label! to simplify Label creation/setup:
let label = u_label! { text: "Hello world!".to_owned(), text_alignment: TextAlignment::Center, };
Implementations
impl Label
[src]
pub fn new(text: String) -> Label
[src]
Creates new Label with provided text. You may be interested in u_label! to simplify Label creation/setup.
let label = Label::new("Hello".to_owned());
pub fn slot_set_text(&self) -> &dyn Slot<String>
[src]
Label's text can be changed via provided slot
let label = u_label!{ text: "Hello".to_owned(), }; let mut signal = Signal::new(); signal.connect_slot(label.slot_set_text); // <...> // Changes label's text to "Goodbye" signal.emit("Goodbye".to_owned());
pub fn slot_set_text_alignment(&self) -> &dyn Slot<TextAlignment>
[src]
Label's text alignment can be changed via provided slot
let label = u_lable!{ text: "Hello".to_owned(), }; let mut signal = Signal::new(); signal.connect_slot(label.slot_set_text_alignment()); // <...> // Changes text alignemnt signal.emit(TextAligment::Center);
Trait Implementations
impl DataProcessor for Label
[src]
pub fn process_data(&mut self, _: i64, _: &mut dyn Application)
[src]
impl Widget for Label
[src]
pub fn to_native(
&mut self,
widget_generator: &mut dyn WidgetGenerator
) -> Result<NativeWidget, ()>
[src]
&mut self,
widget_generator: &mut dyn WidgetGenerator
) -> Result<NativeWidget, ()>
pub fn draw(&mut self)
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Label
[src]
impl !Send for Label
[src]
impl !Sync for Label
[src]
impl Unpin for Label
[src]
impl !UnwindSafe for Label
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,