pub struct ModifierNodeSlices { /* private fields */ }Expand description
Re-export the UI crate so applications can depend on a single crate. Snapshot of modifier node slices that impact draw and pointer subsystems.
Implementations§
Source§impl ModifierNodeSlices
impl ModifierNodeSlices
pub fn draw_commands(&self) -> &[DrawCommand]
Sourcepub fn outer_draw_command_count(&self) -> usize
pub fn outer_draw_command_count(&self) -> usize
How many leading draw_commands come from
modifiers chained before the node’s graphics layer or clip. Those draw
around the layer in the parent’s space, outside its clip, alpha and
transform, exactly as an outer drawBehind wraps a graphicsLayer.
pub fn pointer_inputs(&self) -> &[Rc<dyn Fn(PointerEvent)>]
Sourcepub fn dispatch_pointer_event(&self, event: PointerEvent)
pub fn dispatch_pointer_event(&self, event: PointerEvent)
Dispatches an event whose position is already local to this layout node. Consumed events stop propagation except for release and cancellation, which reach every handler so each can finish its active interaction.
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)>]
Sourcepub fn pointer_icon(&self) -> Option<&PointerIcon>
pub fn pointer_icon(&self) -> Option<&PointerIcon>
The pointer’s appearance over this node, when a pointer_icon
modifier names one. The innermost declaration in the chain wins.
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<Rc<dyn Fn(f32) -> f32>>
pub fn text_pan_resolver(&self) -> Option<Rc<dyn Fn(f32) -> f32>>
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<dyn WindowRectSink>>
pub fn viewport_window_rect(&self) -> Option<Rc<dyn WindowRectSink>>
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.
pub fn prepare_text_layout( &self, max_width: Option<f32>, ) -> Option<PreparedTextLayout>
pub fn graphics_layer(&self) -> Option<GraphicsLayer>
pub fn corner_shape(&self) -> Option<RoundedCornerShape>
pub fn with_chain_guard(self, handle: ModifierChainHandle) -> ModifierNodeSlices
pub fn debug_stats(&self) -> ModifierNodeSlicesDebugStats
Trait Implementations§
Source§impl Clone for ModifierNodeSlices
impl Clone for ModifierNodeSlices
Source§fn clone(&self) -> ModifierNodeSlices
fn clone(&self) -> ModifierNodeSlices
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModifierNodeSlices
impl Debug for ModifierNodeSlices
Source§impl Default for ModifierNodeSlices
impl Default for ModifierNodeSlices
Source§fn default() -> ModifierNodeSlices
fn default() -> ModifierNodeSlices
Auto Trait Implementations§
impl !RefUnwindSafe for ModifierNodeSlices
impl !Send for ModifierNodeSlices
impl !Sync for ModifierNodeSlices
impl !UnwindSafe for ModifierNodeSlices
impl Freeze for ModifierNodeSlices
impl Unpin for ModifierNodeSlices
impl UnsafeUnpin for ModifierNodeSlices
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.