Skip to main content

ModifierNodeSlices

Struct ModifierNodeSlices 

Source
pub struct ModifierNodeSlices { /* private fields */ }
Expand description

Snapshot of modifier node slices that impact draw and pointer subsystems.

Implementations§

Source§

impl ModifierNodeSlices

Source

pub fn draw_commands(&self) -> &[DrawCommand]

Source

pub fn pointer_inputs(&self) -> &[Rc<dyn Fn(PointerEvent)>]

Source

pub fn click_handlers(&self) -> &[Rc<dyn Fn(Point)>]

Source

pub fn clip_to_bounds(&self) -> bool

Source

pub fn motion_context_animated(&self) -> bool

Source

pub fn translated_content_context(&self) -> bool

Source

pub fn translated_content_context_identity(&self) -> Option<usize>

Source

pub fn translated_content_offset(&self) -> Option<Point>

Source

pub fn text_content(&self) -> Option<&str>

Source

pub fn annotated_text(&self) -> Option<&AnnotatedString>

Source

pub fn annotated_string(&self) -> Option<AnnotatedString>

Source

pub fn text_style(&self) -> Option<&TextStyle>

Source

pub fn text_layout_options(&self) -> Option<TextLayoutOptions>

Source

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.

Source

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.

Source

pub fn prepare_text_layout( &self, max_width: Option<f32>, ) -> Option<PreparedTextLayout>

Source

pub fn graphics_layer(&self) -> Option<GraphicsLayer>

Source

pub fn corner_shape(&self) -> Option<RoundedCornerShape>

Source

pub fn with_chain_guard(self, handle: ModifierChainHandle) -> Self

Source

pub fn debug_stats(&self) -> ModifierNodeSlicesDebugStats

Source

pub fn clear(&mut self)

Resets the slice collection for reuse, retaining vector capacity.

Trait Implementations§

Source§

impl Clone for ModifierNodeSlices

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ModifierNodeSlices

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ModifierNodeSlices

Source§

fn default() -> ModifierNodeSlices

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.