pub struct LabelElement {
pub text: Cow<'static, str>,
pub accessibility: AccessibilityData,
pub text_style_data: TextStyleData,
pub layout: LayoutData,
pub event_handlers: EventHandlers,
pub max_lines: Option<usize>,
pub line_height: Option<f32>,
pub relative_layer: Layer,
pub effect: Option<EffectData>,
}Fields§
§text: Cow<'static, str>§accessibility: AccessibilityData§text_style_data: TextStyleData§layout: LayoutData§event_handlers: EventHandlers§max_lines: Option<usize>§line_height: Option<f32>§relative_layer: Layer§effect: Option<EffectData>Trait Implementations§
Source§impl Clone for LabelElement
impl Clone for LabelElement
Source§impl Default for LabelElement
impl Default for LabelElement
Source§impl ElementExt for LabelElement
impl ElementExt for LabelElement
Source§fn changed(&self, other: &Rc<dyn ElementExt>) -> bool
fn changed(&self, other: &Rc<dyn ElementExt>) -> bool
Returns whether this element has changed compared to another one.
Source§fn diff(&self, other: &Rc<dyn ElementExt>) -> DiffModifies
fn diff(&self, other: &Rc<dyn ElementExt>) -> DiffModifies
Tells Freya what needs updating when this element changes.
Source§fn layout(&self) -> Cow<'_, LayoutData>
fn layout(&self) -> Cow<'_, LayoutData>
Returns layout properties used to position and size this element.
Source§fn effect(&self) -> Option<Cow<'_, EffectData>>
fn effect(&self) -> Option<Cow<'_, EffectData>>
Returns optional effect properties for this element.
Source§fn style(&self) -> Cow<'_, StyleState>
fn style(&self) -> Cow<'_, StyleState>
Returns visual style properties for this element.
Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Whether the element paints nothing, letting events fall through to
non-ancestor elements behind it.
Source§fn text_style(&self) -> Cow<'_, TextStyleData>
fn text_style(&self) -> Cow<'_, TextStyleData>
Returns text styling inherited by text content in this element.
Source§fn accessibility(&self) -> Cow<'_, AccessibilityData>
fn accessibility(&self) -> Cow<'_, AccessibilityData>
Returns accessibility properties for this element.
Source§fn finish_accessibility(&self, builder: &mut Node)
fn finish_accessibility(&self, builder: &mut Node)
Mutates the accessibility node immediately before it enters the accessibility tree.
Source§fn events_handlers(&self) -> Option<Cow<'_, EventHandlers>>
fn events_handlers(&self) -> Option<Cow<'_, EventHandlers>>
Returns event handlers registered on this element.
Source§fn measure(&self, context: LayoutContext<'_>) -> Option<(Size2D, Rc<dyn Any>)>
fn measure(&self, context: LayoutContext<'_>) -> Option<(Size2D, Rc<dyn Any>)>
Measures the element and optionally returns measurement data for later layout stages.
Source§fn should_hook_measurement(&self) -> bool
fn should_hook_measurement(&self) -> bool
Returns whether this element hooks into layout measurement.
Source§fn should_measure_inner_children(&self) -> bool
fn should_measure_inner_children(&self) -> bool
Returns whether to measure this element’s children.
Source§fn clip(&self, context: ClipContext<'_>)
fn clip(&self, context: ClipContext<'_>)
Applies clipping for this element before it and its children are rendered.
Source§fn render(&self, context: RenderContext<'_>)
fn render(&self, context: RenderContext<'_>)
Renders this element using the supplied canvas and layout context.
Source§fn needs_post_measure(&self) -> bool
fn needs_post_measure(&self) -> bool
Whether this element needs a ElementExt::post_measure step after the layout pass.
Source§fn post_measure(&self, _context: PostMeasureContext<'_>) -> PostMeasure<NodeId>
fn post_measure(&self, _context: PostMeasureContext<'_>) -> PostMeasure<NodeId>
Runs after this element and its children are measured.
Source§fn is_point_inside(&self, context: EventMeasurementContext<'_>) -> bool
fn is_point_inside(&self, context: EventMeasurementContext<'_>) -> bool
Tests whether the pointer position is inside this element’s hit area.
Source§impl PartialEq for LabelElement
impl PartialEq for LabelElement
impl StructuralPartialEq for LabelElement
Auto Trait Implementations§
impl !RefUnwindSafe for LabelElement
impl !Send for LabelElement
impl !Sync for LabelElement
impl !UnwindSafe for LabelElement
impl Freeze for LabelElement
impl Unpin for LabelElement
impl UnsafeUnpin for LabelElement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ComponentProps for T
impl<T> ComponentProps for T
fn changed(&self, other: &(dyn ComponentProps + 'static)) -> bool
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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