pub struct Label { /* private fields */ }Expand description
A single line of text.
Implementations§
Trait Implementations§
Source§impl<M: 'static> Widget<M> for Label
impl<M: 'static> Widget<M> for Label
Source§fn set_attribute(&mut self, name: &str, value: &str) -> bool
fn set_attribute(&mut self, name: &str, value: &str) -> bool
Takes an attribute from the element description, returning
false
for one the widget does not know. id, class, style, grow,
align, disabled, shortcut and state never reach here.Source§fn measure(&self, fonts: &dyn Fonts, style: &ComputedStyle) -> Size
fn measure(&self, fonts: &dyn Fonts, style: &ComputedStyle) -> Size
The natural size of the widget’s own content, without padding or
border. Containers are measured from their children instead.
Source§fn paint(&self, renderer: &mut dyn Renderer, cx: &PaintCx<'_>, content: Rect)
fn paint(&self, renderer: &mut dyn Renderer, cx: &PaintCx<'_>, content: Rect)
Paints the widget’s own content inside
content, after the
framework has painted the background and border and before it paints
the children.fn as_any(&self) -> &dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Source§fn axis(&self) -> Option<Axis>
fn axis(&self) -> Option<Axis>
Some for a container: the direction it lays its children out in.Source§fn state(&self) -> ElementState
fn state(&self) -> ElementState
State the widget owns, such as
CHECKED, merged into the element’s
state for styling.Auto Trait Implementations§
impl Freeze for Label
impl RefUnwindSafe for Label
impl Send for Label
impl Sync for Label
impl Unpin for Label
impl UnsafeUnpin for Label
impl UnwindSafe for Label
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more