pub struct Label(/* private fields */);Expand description
Implementations§
Source§impl Label
impl Label
Sourcepub fn widget_new() -> Self
pub fn widget_new() -> Self
Start building a new instance.
Sourcepub fn widget_type() -> WidgetType
pub fn widget_type() -> WidgetType
Gets the widget type info.
Source§impl Label
impl Label
Sourcepub fn target(&self, target: impl IntoVar<WidgetId>)
pub fn target(&self, target: impl IntoVar<WidgetId>)
P Defines the widget the label is for.
When the label is pressed the widget or the first focusable child of the widget is focused. Accessibility metadata is also set so the target widget is marked as labelled-by this widget in the view-process.
Source§impl Label
impl Label
Sourcepub fn mnemonic_underline(&self, enabled: impl IntoVar<bool>)
pub fn mnemonic_underline(&self, enabled: impl IntoVar<bool>)
P Only draw underline under active mnemonic char in labels.
When enabled this overrides underline_skip in labels, only the char defined by get_mnemonic_char is underlined.
Note that underline must also be set to a visible state in context.
Methods from Deref<Target = StyleMix<Text>>§
Sourcepub fn style_intrinsic(
&mut self,
style_var: ContextVar<StyleFn>,
style_fn: PropertyId,
)
pub fn style_intrinsic( &mut self, style_var: ContextVar<StyleFn>, style_fn: PropertyId, )
Setup the style build.
Trait Implementations§
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more