Skip to main content

ModifiedView

Struct ModifiedView 

Source
pub struct ModifiedView<V, M> { /* private fields */ }
Expand description

A view that has been transformed by a modifier. Section 4.3: “Each modifier implements ViewModifier and produces a ModifiedView<Inner, Self>.”

Trait Implementations§

Source§

impl<V: Clone, M: Clone> Clone for ModifiedView<V, M>

Source§

fn clone(&self) -> ModifiedView<V, M>

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<V: View, M: ViewModifier> View for ModifiedView<V, M>

Source§

type Body = ModifiedView<<V as View>::Body, M>

The concrete type produced after applying modifiers. For primitive views this is Self.
Source§

fn body(self) -> Self::Body

Source§

fn render(&self, renderer: &mut dyn Renderer, rect: Rect)

Render this view into the provided renderer at the specified bounds. Primitive views override this to perform drawing operations.
Source§

fn intrinsic_size( &self, renderer: &mut dyn Renderer, proposal: SizeProposal, ) -> Size

Calculate the natural (intrinsic) size of this view given proposed constraints. This allows views like Buttons or Labels to inform the layout engine of their needs.
Source§

fn flex_weight(&self) -> f32

Returns the flex weight of this view for proportional distribution in stacks.
Source§

fn layout(&self) -> Option<&dyn LayoutView>

Optionally provide a layout implementation for this view.
Source§

fn get_grid_placement(&self) -> Option<GridPlacement>

Returns the grid placement configuration for this view if it is laid out in a Grid.
Source§

fn modifier<M: ViewModifier>(self, m: M) -> ModifiedView<Self, M>

Provided modifier entry point
Source§

fn bifrost( self, blur: f32, saturation: f32, opacity: f32, ) -> ModifiedView<Self, BifrostModifier>

Apply a Bifrost (Frosted Glass) effect to the view
Source§

fn gungnir( self, color: impl Into<String>, radius: f32, intensity: f32, ) -> ModifiedView<Self, GungnirModifier>

Apply a Gungnir (Neon Glow) effect to the view
Source§

fn mjolnir_slice( self, angle: f32, offset: f32, ) -> ModifiedView<Self, MjolnirSliceModifier>

Apply a Mjolnir Slice (Geometric cut) to the view
Source§

fn mjolnir_shatter( self, pieces: u32, force: f32, ) -> ModifiedView<Self, MjolnirShatterModifier>

Apply a Mjolnir Shatter (Fragmented transition) to the view
Source§

fn bifrost_bridge( self, id: impl Into<String>, ) -> ModifiedView<Self, BifrostBridgeModifier>

Mark this view as a Bifrost Bridge (Shared Element) for cross-view persistence
Source§

fn background(self, color: [f32; 4]) -> ModifiedView<Self, BackgroundModifier>

Add a background color to this view
Source§

fn padding(self, amount: f32) -> ModifiedView<Self, PaddingModifier>

Add padding to this view
Source§

fn opacity(self, opacity: f32) -> ModifiedView<Self, OpacityModifier>

Set the opacity (alpha) of this view in the range [0.0, 1.0].
Source§

fn foreground_color( self, color: [f32; 4], ) -> ModifiedView<Self, ForegroundColorModifier>

Override the foreground (text / icon) color of this view.
Source§

fn frame( self, width: Option<f32>, height: Option<f32>, ) -> ModifiedView<Self, FrameModifier>

Constrain this view to an explicit width and/or height. Constrains the size of this view using fixed width/height values.
Source§

fn flex(self, weight: f32) -> ModifiedView<Self, FlexModifier>

Give this view a flex weight for proportional space distribution in stacks.
Source§

fn grid_placement( self, placement: GridPlacement, ) -> ModifiedView<Self, GridPlacementModifier>

Specify the grid placement configuration (column, row, column_span, row_span) for this view.
Source§

fn overlay<O: View + Clone + 'static>( self, overlay: O, alignment: Alignment, offset: [f32; 2], on_dismiss: Option<Arc<dyn Fn() + Send + Sync>>, ) -> ModifiedView<Self, OverlayModifier>

Overlay a view on top of this view, aligned and offset relative to it.
Source§

fn safe_area_padding(self) -> ModifiedView<Self, SafeAreaModifier>

Automatically add padding to avoid overlapping with platform safe areas (notches, bars).
Source§

fn ignores_safe_area(self) -> ModifiedView<Self, SafeAreaModifier>

Explicitly ignore platform safe areas and draw into the margins.
Source§

fn clip_to_bounds(self) -> ModifiedView<Self, ClipModifier>

Clip all child drawing to this view’s bounds.
Source§

fn border( self, color: [f32; 4], width: f32, ) -> ModifiedView<Self, BorderModifier>

Draw a colored border around this view.
Source§

fn elevation(self, level: f32) -> ModifiedView<Self, ElevationModifier>

Add elevation (shadow) to the view. Level determines the shadow depth.
Source§

fn magnetic( self, radius: f32, intensity: f32, ) -> ModifiedView<Self, MagneticModifier>

Add a magnetic effect that pulls the view towards the cursor.
Source§

fn mani_glow( self, color: [f32; 4], radius: f32, ) -> ModifiedView<Self, ManiGlowModifier>

Add a ManiGlow (Lunar Illuminator) effect that glows near the cursor.
Source§

fn memory_layer( self, layer: MemoryLayer, ) -> ModifiedView<Self, BifrostLayerModifier>

Theme this view based on a specific memory layer.
Source§

fn fafnir_evolve(self, id: u64) -> ModifiedView<Self, FafnirModifier>

Enable Fafnir’s Evolution: The component grows and glows as it is used.
Source§

fn mimir_intent(self) -> ModifiedView<Self, MimirIntentModifier>

Enable Mimir’s Intent: The component anticipates user interaction via pointer kinematics.
Source§

fn kvasir_vibes(self, complexity: f32) -> ModifiedView<Self, KvasirVibeModifier>

Enable Kvasir’s Vibes: Subconscious telemetry representing cognitive complexity.
Source§

fn odins_eye(self) -> ModifiedView<Self, OdinsEyeModifier>

Bestow Odin’s Eye: Global omniscient observability layer.
Source§

fn on_appear<F: Fn() + Send + Sync + 'static>( self, action: F, ) -> ModifiedView<Self, LifecycleModifier>

Trigger an action when the view appears
Source§

fn on_disappear<F: Fn() + Send + Sync + 'static>( self, action: F, ) -> ModifiedView<Self, LifecycleModifier>

Trigger an action when the view disappears
Source§

fn on_click<F: Fn() + Send + Sync + 'static>( self, action: F, ) -> ModifiedView<Self, OnClickModifier>

Trigger an action when the view is clicked
Source§

fn on_pointer_enter<F: Fn() + Send + Sync + 'static>( self, action: F, ) -> ModifiedView<Self, OnPointerEnterModifier>

Trigger an action when the pointer enters the view bounds
Source§

fn on_pointer_leave<F: Fn() + Send + Sync + 'static>( self, action: F, ) -> ModifiedView<Self, OnPointerLeaveModifier>

Trigger an action when the pointer leaves the view bounds
Source§

fn on_pointer_move<F: Fn(f32, f32) + Send + Sync + 'static>( self, action: F, ) -> ModifiedView<Self, OnPointerMoveModifier>

Trigger an action when the pointer moves inside the view bounds
Source§

fn on_pointer_down<F: Fn() + Send + Sync + 'static>( self, action: F, ) -> ModifiedView<Self, OnPointerDownModifier>

Trigger an action when the pointer is pressed down
Source§

fn on_pointer_up<F: Fn() + Send + Sync + 'static>( self, action: F, ) -> ModifiedView<Self, OnPointerUpModifier>

Trigger an action when the pointer is released
Source§

fn erase(self) -> AnyView
where Self: Clone + 'static,

Type-erase this view into AnyView
Source§

fn aria_properties(&self) -> Option<AriaProperties>

Return accessibility properties for this view. Override to expose semantic role, label, state to assistive technology. Default returns None (view is not explicitly accessible).
Source§

fn on_key_event(&self, _key: &str, _modifiers: KeyModifiers) -> bool

Handle a keyboard navigation event. Return true if consumed, false to bubble.
Source§

fn key_shortcuts(&self) -> Vec<KeyShortcut>

Return keyboard shortcuts this view responds to.

Auto Trait Implementations§

§

impl<V, M> Freeze for ModifiedView<V, M>
where V: Freeze, M: Freeze,

§

impl<V, M> RefUnwindSafe for ModifiedView<V, M>

§

impl<V, M> Send for ModifiedView<V, M>
where V: Send, M: Send,

§

impl<V, M> Sync for ModifiedView<V, M>
where V: Sync, M: Sync,

§

impl<V, M> Unpin for ModifiedView<V, M>
where V: Unpin, M: Unpin,

§

impl<V, M> UnsafeUnpin for ModifiedView<V, M>
where V: UnsafeUnpin, M: UnsafeUnpin,

§

impl<V, M> UnwindSafe for ModifiedView<V, M>
where V: UnwindSafe, M: UnwindSafe,

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> 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> 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> 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<V> ErasedView for V
where V: View + Clone + 'static,

Source§

fn render_erased(&self, renderer: &mut dyn Renderer, rect: Rect)

Source§

fn name(&self) -> &'static str

Source§

fn flex_weight_erased(&self) -> f32

Source§

fn layout_erased(&self) -> Option<&dyn LayoutView>

Source§

fn grid_placement_erased(&self) -> Option<GridPlacement>

Source§

fn clone_box(&self) -> Box<dyn ErasedView>

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.