Skip to main content

MountedNode

Struct MountedNode 

Source
pub struct MountedNode<Msg> {
Show 62 fields pub id: NodeId, pub fill: Option<AlphaColor<Srgb>>, pub hover_fill: Option<AlphaColor<Srgb>>, pub radius: f64, pub corner_radii: Option<RoundedRectRadii>, pub shadow: Option<Shadow>, pub fill_gradient: Option<Gradient>, pub border: Option<Border>, pub text: Option<TextSpec>, pub image: Option<ImageBrush>, pub image_fit: Option<ImageFit>, pub mask_image: Option<ImageBrush>, pub mask_placement: Option<MaskPlacement>, pub mask_extra: Vec<(ImageBrush, MaskCompose)>, pub painter: Option<Arc<dyn Fn(&mut Scene, &mut Typesetter, PaintRect) + Send + Sync>>, pub gpu_painter: Option<Arc<dyn Fn(&Device, &Queue, &mut CommandEncoder, &TextureView, PaintRect, (u32, u32)) + Send + Sync>>, pub over_painter: Option<Arc<dyn Fn(&mut Scene, &mut Typesetter, PaintRect) + Send + Sync>>, pub on_click: Option<Msg>, pub on_click_at: Option<Arc<dyn Fn(f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>, pub on_right_click: Option<Msg>, pub on_right_click_at: Option<Arc<dyn Fn(f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>, pub on_middle_click: Option<Msg>, pub drag: Option<Arc<dyn Fn(DragPhase, f32, f32) -> Option<Msg> + Send + Sync>>, pub drag_at: Option<Arc<dyn Fn(DragPhase, f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>, pub drag_velocity: Option<Arc<dyn Fn(DragPhase, f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>, pub drag_payload: Option<u64>, pub on_drop: Option<Arc<dyn Fn(u64) -> Option<Msg> + Send + Sync>>, pub drop_hover_fill: Option<AlphaColor<Srgb>>, pub clip: bool, pub clip_inset: Option<[f32; 4]>, pub clip_ellipse: Option<[f32; 14]>, pub clip_polygon: Option<(bool, Vec<[f32; 4]>)>, pub clip_path_svg: Option<(bool, String)>, pub clip_ref_inset: Option<[f32; 4]>, pub on_pointer_enter: Option<Msg>, pub on_pointer_leave: Option<Msg>, pub on_pointer_move_at: Option<Arc<dyn Fn(f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>, pub on_scroll: Option<Arc<dyn Fn(f32, f32) -> Option<Msg> + Send + Sync>>, pub on_scale: Option<Arc<dyn Fn(GesturePhase, f32, f32, f32) -> Option<Msg> + Send + Sync>>, pub on_rotate: Option<Arc<dyn Fn(GesturePhase, f32, f32, f32) -> Option<Msg> + Send + Sync>>, pub on_double_tap: Option<Msg>, pub on_double_tap_at: Option<Arc<dyn Fn(f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>, pub on_long_press: Option<Msg>, pub on_long_press_at: Option<Arc<dyn Fn(f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>, pub focusable: Option<u64>, pub text_select_key: Option<u64>, pub alpha: Option<f32>, pub anim: Option<Anim>, pub animated_size: Option<SizeAnim>, pub semantics: Option<SemanticsSpec>, pub hero: Option<Hero>, pub transform: Option<Affine>, pub transform_rel: Option<(f64, f64)>, pub transform_origin: Option<TransformPivot>, pub tooltip: Option<String>, pub cursor: Option<Cursor>, pub ripple: Option<Ripple>, pub is_layout_builder: bool, pub backdrop_blur: Option<f32>, pub filter: Vec<FilterOp>, pub blend: Option<BlendMode>, pub subtree_end: usize,
}

Fields§

§id: NodeId§fill: Option<AlphaColor<Srgb>>§hover_fill: Option<AlphaColor<Srgb>>§radius: f64§corner_radii: Option<RoundedRectRadii>§shadow: Option<Shadow>§fill_gradient: Option<Gradient>§border: Option<Border>§text: Option<TextSpec>§image: Option<ImageBrush>§image_fit: Option<ImageFit>

Política de encaje de Self::image (ver ImageFit). None = Contain.

§mask_image: Option<ImageBrush>

Máscara de luminancia del subárbol (CSS mask-image). Ver View::mask_image. El paint aísla el subárbol y aplica la luminancia de esta imagen como alpha. None = sin máscara.

§mask_placement: Option<MaskPlacement>

Encaje de Self::mask_image (size/position/repeat). None = estirar al border-box. Ver MaskPlacement. Fase 7.1227.

§mask_extra: Vec<(ImageBrush, MaskCompose)>

Capas de máscara adicionales (imagen, operador) (ver View::mask_extra). Comparten el mask_placement con la capa 0. Fase 7.1231.

§painter: Option<Arc<dyn Fn(&mut Scene, &mut Typesetter, PaintRect) + Send + Sync>>§gpu_painter: Option<Arc<dyn Fn(&Device, &Queue, &mut CommandEncoder, &TextureView, PaintRect, (u32, u32)) + Send + Sync>>§over_painter: Option<Arc<dyn Fn(&mut Scene, &mut Typesetter, PaintRect) + Send + Sync>>§on_click: Option<Msg>§on_click_at: Option<Arc<dyn Fn(f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>§on_right_click: Option<Msg>§on_right_click_at: Option<Arc<dyn Fn(f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>§on_middle_click: Option<Msg>§drag: Option<Arc<dyn Fn(DragPhase, f32, f32) -> Option<Msg> + Send + Sync>>§drag_at: Option<Arc<dyn Fn(DragPhase, f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>§drag_velocity: Option<Arc<dyn Fn(DragPhase, f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>§drag_payload: Option<u64>§on_drop: Option<Arc<dyn Fn(u64) -> Option<Msg> + Send + Sync>>§drop_hover_fill: Option<AlphaColor<Srgb>>§clip: bool§clip_inset: Option<[f32; 4]>§clip_ellipse: Option<[f32; 14]>§clip_polygon: Option<(bool, Vec<[f32; 4]>)>§clip_path_svg: Option<(bool, String)>§clip_ref_inset: Option<[f32; 4]>§on_pointer_enter: Option<Msg>§on_pointer_leave: Option<Msg>§on_pointer_move_at: Option<Arc<dyn Fn(f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>§on_scroll: Option<Arc<dyn Fn(f32, f32) -> Option<Msg> + Send + Sync>>§on_scale: Option<Arc<dyn Fn(GesturePhase, f32, f32, f32) -> Option<Msg> + Send + Sync>>

Handler de gesto de escala (pinch-to-zoom) de este nodo. Ver View::on_scale y ScaleFn.

§on_rotate: Option<Arc<dyn Fn(GesturePhase, f32, f32, f32) -> Option<Msg> + Send + Sync>>

Handler de gesto de rotación (trackpad) de este nodo. Ver View::on_rotate y RotateFn.

§on_double_tap: Option<Msg>

Handlers de doble-tap (ver View::on_double_tap).

§on_double_tap_at: Option<Arc<dyn Fn(f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>§on_long_press: Option<Msg>

Handlers de long-press (ver View::on_long_press).

§on_long_press_at: Option<Arc<dyn Fn(f32, f32, f32, f32) -> Option<Msg> + Send + Sync>>§focusable: Option<u64>§text_select_key: Option<u64>

Key estable de selección de texto (ver View::selectable).

§alpha: Option<f32>§anim: Option<Anim>§animated_size: Option<SizeAnim>

Animación implícita de tamaño (ver View::animated_size). El runtime ya parchó style.size antes del layout — este campo se guarda principalmente para inspección/tests.

§semantics: Option<SemanticsSpec>

Semántica accesible del nodo (ver View::semantics). El runtime la lee en cada paint para reconstruir el árbol AccessKit del frame.

§hero: Option<Hero>

Marca de hero shared-element (ver View::hero). El runtime lo lee en HeroRegistry::reconcile para enlazar identidad entre frames y escribir transform con la afín “fly” cuando el rect cambia.

§transform: Option<Affine>

Transformación afín 2D del nodo (alrededor del centro de su rect). Ver View::transform. paint la compone con la del padre.

§transform_rel: Option<(f64, f64)>

Traslación relativa al tamaño del nodo (fracciones de su rect). Ver View::transform_rel. paint/hit_test la resuelven contra el rect.

§transform_origin: Option<TransformPivot>

Pivote de transform (CSS transform-origin). None ⇒ centro. Ver TransformPivot / View::transform_origin.

§tooltip: Option<String>

Texto de tooltip de este nodo (ver View::tooltip). El consumidor lo lee tras un hit-test de hover para pintar el rótulo flotante.

§cursor: Option<Cursor>

Forma del puntero sobre este nodo (ver View::cursor). El runtime la resuelve heredando del ancestro más cercano que la declare.

§ripple: Option<Ripple>

Ripple/InkWell de este nodo (ver View::ripple). El runtime lo dispara en el press y lo pinta vía RippleRegistry.

§is_layout_builder: bool

true si este nodo era un View::layout_builder (constructor diferido) al montarse. El runtime lo usa tras la primera pasada de layout para leer el rect del slot (vía collect_builder_constraints) e invocar la closure. Tras expandirse, el nodo final ya es normal (false).

§backdrop_blur: Option<f32>

Backdrop blur (CSS backdrop-filter: blur(N) / Flutter BackdropFilter). Sigma del Gauss en pixels; el runtime aplica una pasada separable (H+V) sobre la intermediate restringida al rect del nodo, antes de pintar el subárbol del nodo. El subárbol se compone sobre el backdrop ya borroso vía un buffer secundario. None = sin blur (la abrumadora mayoría). Limitación v1: el nodo no debe estar dentro de un ancestro con clip/alpha (los subárboles separados pintan fuera de esas capas — documentado en PARIDAD-FLUTTER.md Bloque 11).

§filter: Vec<FilterOp>

Filtros CSS (filter: …) sobre el propio subárbol (ver View::filter / FilterOp). El runtime los recolecta con collect_filters y los aplica como post-pasada GPU sobre la intermediate, restringidos al rect del nodo, después de la rasterización. Vacío = sin filtro. Fase 7.1232.

§blend: Option<BlendMode>

Modo de mezcla del nodo entero contra su backdrop (CSS mix-blend-mode). Ver View::blend / MountedNode. paint_range abre una capa de blend (push_layer(bm, …)) alrededor del rect del nodo que envuelve fill + contenido + hijos y se cierra al fin del subárbol, mezclando el resultado contra lo ya pintado. None = source-over. Fase 7.1237.

§subtree_end: usize

Índice (exclusivo) del fin del subárbol en Mounted::nodes. Los descendientes ocupan [idx + 1, subtree_end). Hace de “barrera” en paint/hit_test para pop_layer y para saltar subárboles enteros.

Auto Trait Implementations§

§

impl<Msg> !RefUnwindSafe for MountedNode<Msg>

§

impl<Msg> !UnwindSafe for MountedNode<Msg>

§

impl<Msg> Freeze for MountedNode<Msg>
where Msg: Freeze,

§

impl<Msg> Send for MountedNode<Msg>
where Msg: Send,

§

impl<Msg> Sync for MountedNode<Msg>
where Msg: Sync,

§

impl<Msg> Unpin for MountedNode<Msg>
where Msg: Unpin,

§

impl<Msg> UnsafeUnpin for MountedNode<Msg>
where Msg: UnsafeUnpin,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more