pub struct ParagraphElement {Show 17 fields
pub layout: LayoutData,
pub spans: Vec<Span<'static>>,
pub contents: Vec<ParagraphContent>,
pub accessibility: AccessibilityData,
pub text_style_data: TextStyleData,
pub cursor_style_data: CursorStyleData,
pub event_handlers: EventHandlers,
pub sk_paragraph: ParagraphHolder,
pub cursor_index: Option<usize>,
pub highlights: Vec<(usize, usize)>,
pub max_lines: Option<usize>,
pub line_height: Option<f32>,
pub relative_layer: Layer,
pub cursor_style: CursorStyle,
pub cursor_mode: CursorMode,
pub vertical_align: VerticalAlign,
pub effect: Option<EffectData>,
}Fields§
§layout: LayoutData§spans: Vec<Span<'static>>§contents: Vec<ParagraphContent>§accessibility: AccessibilityData§text_style_data: TextStyleData§cursor_style_data: CursorStyleData§event_handlers: EventHandlers§sk_paragraph: ParagraphHolder§cursor_index: Option<usize>§highlights: Vec<(usize, usize)>§max_lines: Option<usize>§line_height: Option<f32>§relative_layer: Layer§cursor_style: CursorStyle§cursor_mode: CursorMode§vertical_align: VerticalAlign§effect: Option<EffectData>Trait Implementations§
Source§impl Clone for ParagraphElement
impl Clone for ParagraphElement
Source§impl Default for ParagraphElement
impl Default for ParagraphElement
Source§impl Display for ParagraphElement
impl Display for ParagraphElement
Source§impl ElementExt for ParagraphElement
impl ElementExt for ParagraphElement
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 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 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 events_handlers(&self) -> Option<Cow<'_, EventHandlers>>
fn events_handlers(&self) -> Option<Cow<'_, EventHandlers>>
Returns event handlers registered on this element.
Source§fn render(&self, context: RenderContext<'_>)
fn render(&self, context: RenderContext<'_>)
Renders this element using the supplied canvas and layout context.
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§fn clip(&self, _context: ClipContext<'_>)
fn clip(&self, _context: ClipContext<'_>)
Applies clipping for this element before it and its children are rendered.
Source§impl PartialEq for ParagraphElement
impl PartialEq for ParagraphElement
impl StructuralPartialEq for ParagraphElement
Auto Trait Implementations§
impl !RefUnwindSafe for ParagraphElement
impl !Send for ParagraphElement
impl !Sync for ParagraphElement
impl !UnwindSafe for ParagraphElement
impl Freeze for ParagraphElement
impl Unpin for ParagraphElement
impl UnsafeUnpin for ParagraphElement
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