pub struct ModifierNodeSlices { /* private fields */ }Expand description
Snapshot of modifier node slices that impact draw and pointer subsystems.
Implementations§
Source§impl ModifierNodeSlices
impl ModifierNodeSlices
pub fn draw_commands(&self) -> &[DrawCommand]
pub fn pointer_inputs(&self) -> &[Rc<dyn Fn(PointerEvent)>]
Sourcepub fn pointer_input_size_sinks(&self) -> &[Rc<Cell<Size>>]
pub fn pointer_input_size_sinks(&self) -> &[Rc<Cell<Size>>]
The write targets for this node’s resolved size, one per pointer-input
node that exposes a size to its handler. See
ModifierNodeSlices::publish_pointer_input_size.
Sourcepub fn publish_pointer_input_size(&self, size: Size)
pub fn publish_pointer_input_size(&self, size: Size)
Publishes this layout node’s resolved size to every pointer-input
handler attached to it, so PointerInputScope::size() reports the
node’s real dimensions.
Called by every pass that resolves a node’s geometry (the layout place
passes and the per-frame scene build), so the size is current before any
pointer event for that frame is dispatched and tracks resizes.
size is the node’s layout box — the same box the dispatched
PointerEvent positions are made local to — so handlers can compare
event coordinates against it directly.
pub fn click_handlers(&self) -> &[Rc<dyn Fn(Point)>]
pub fn clip_to_bounds(&self) -> bool
pub fn motion_context_animated(&self) -> bool
pub fn translated_content_context(&self) -> bool
pub fn translated_content_context_identity(&self) -> Option<usize>
pub fn translated_content_offset(&self) -> Option<Point>
pub fn text_content(&self) -> Option<&str>
pub fn annotated_text(&self) -> Option<&AnnotatedString>
pub fn annotated_string(&self) -> Option<AnnotatedString>
pub fn text_style(&self) -> Option<&TextStyle>
pub fn text_layout_options(&self) -> Option<TextLayoutOptions>
Sourcepub fn text_pan_resolver(&self) -> Option<TextPanResolver>
pub fn text_pan_resolver(&self) -> Option<TextPanResolver>
Returns the horizontal pan resolver for single-line text fields.
The resolver takes the content viewport width (px) and returns the horizontal scroll offset that keeps the cursor visible. Renderers subtract this offset from the text origin so the glyphs pan together with the cursor and selection.
Sourcepub fn text_field_window_origin(&self) -> Option<Rc<Cell<Point>>>
pub fn text_field_window_origin(&self) -> Option<Rc<Cell<Point>>>
The write target for a text field’s composited window origin, if this
node is a BasicTextField. The layout pass writes the field’s true
on-screen top-left here so its finger selection handles track the field
across scroll. See ModifierNodeSlices::text_field_window_origin.
Sourcepub fn viewport_window_rect(&self) -> Option<Rc<Cell<Rect>>>
pub fn viewport_window_rect(&self) -> Option<Rc<Cell<Rect>>>
The write target for a scroll container’s composited window rect, if this
node carries a report_window_rect modifier. The layout pass writes the
node’s true on-screen viewport rect here so a BringIntoViewResponder
can scroll a focused field’s caret above the soft keyboard.