Skip to main content

ViewModifiers

Trait ViewModifiers 

Source
pub trait ViewModifiers:
    View
    + Sized
    + 'static {
Show 38 methods // Provided methods fn opacity(self, opacity: impl Into<Live<f32>>) -> LiveOpacity { ... } fn offset(self, dx: f32, dy: f32) -> LiveOffset { ... } fn offset_by(self, offset: impl Into<Live<Vec2>>) -> LiveOffset { ... } fn background(self, color: impl Into<Live<Color>>) -> LiveBackground { ... } fn bg(self, color: impl Into<Live<Color>>) -> LiveBackground { ... } fn blur(self, px: f32) -> Filtered { ... } fn shadow(self, spec: ShadowSpec) -> EffectNode { ... } fn clip(self) -> Clip { ... } fn clip_rounded(self, radius: f32) -> Clip { ... } fn scale(self, scale: impl Into<Live<f32>>) -> Scaled { ... } fn rotate(self, degrees: impl Into<Live<f32>>) -> Rotated { ... } fn width_live(self, width: impl Into<Live<f32>>) -> AnimatedSize { ... } fn height_live(self, height: impl Into<Live<f32>>) -> AnimatedSize { ... } fn size_live( self, width: impl Into<Live<f32>>, height: impl Into<Live<f32>>, ) -> AnimatedSize { ... } fn animate(self, spec: impl Into<AnimSpec>) -> Enter { ... } fn enter(self, motion: impl Into<Motion>) -> Enter { ... } fn hover(self, build: impl FnOnce(StatePatch) -> StatePatch) -> States { ... } fn pressed(self, build: impl FnOnce(StatePatch) -> StatePatch) -> States { ... } fn focused(self, build: impl FnOnce(StatePatch) -> StatePatch) -> States { ... } fn selected(self, build: impl FnOnce(StatePatch) -> StatePatch) -> States { ... } fn disabled(self, build: impl FnOnce(StatePatch) -> StatePatch) -> States { ... } fn state(self, build: impl FnOnce(States) -> States) -> States { ... } fn margin(self, margin: impl Into<Edges>) -> Margined { ... } fn margin_xy(self, x: f32, y: f32) -> Margined { ... } fn margin_x(self, x: f32) -> Margined { ... } fn margin_y(self, y: f32) -> Margined { ... } fn margin_left(self, v: f32) -> Margined { ... } fn margin_right(self, v: f32) -> Margined { ... } fn margin_top(self, v: f32) -> Margined { ... } fn margin_bottom(self, v: f32) -> Margined { ... } fn indent_top(self, v: f32) -> Margined { ... } fn indent_bottom(self, v: f32) -> Margined { ... } fn indent_left(self, v: f32) -> Margined { ... } fn indent_right(self, v: f32) -> Margined { ... } fn indent(self, indents: Indents) -> Margined { ... } fn indent_all(self, v: f32) -> Margined { ... } fn indent_xy(self, x: f32, y: f32) -> Margined { ... } fn indent_axes(self, horizontal: f32, vertical: f32) -> Margined { ... }
}

Provided Methods§

Source

fn opacity(self, opacity: impl Into<Live<f32>>) -> LiveOpacity

Source

fn offset(self, dx: f32, dy: f32) -> LiveOffset

Source

fn offset_by(self, offset: impl Into<Live<Vec2>>) -> LiveOffset

Source

fn background(self, color: impl Into<Live<Color>>) -> LiveBackground

Source

fn bg(self, color: impl Into<Live<Color>>) -> LiveBackground

Source

fn blur(self, px: f32) -> Filtered

Source

fn shadow(self, spec: ShadowSpec) -> EffectNode

Source

fn clip(self) -> Clip

Source

fn clip_rounded(self, radius: f32) -> Clip

Source

fn scale(self, scale: impl Into<Live<f32>>) -> Scaled

Source

fn rotate(self, degrees: impl Into<Live<f32>>) -> Rotated

Source

fn width_live(self, width: impl Into<Live<f32>>) -> AnimatedSize

Source

fn height_live(self, height: impl Into<Live<f32>>) -> AnimatedSize

Source

fn size_live( self, width: impl Into<Live<f32>>, height: impl Into<Live<f32>>, ) -> AnimatedSize

Source

fn animate(self, spec: impl Into<AnimSpec>) -> Enter

Source

fn enter(self, motion: impl Into<Motion>) -> Enter

Source

fn hover(self, build: impl FnOnce(StatePatch) -> StatePatch) -> States

Source

fn pressed(self, build: impl FnOnce(StatePatch) -> StatePatch) -> States

Source

fn focused(self, build: impl FnOnce(StatePatch) -> StatePatch) -> States

Source

fn selected(self, build: impl FnOnce(StatePatch) -> StatePatch) -> States

Source

fn disabled(self, build: impl FnOnce(StatePatch) -> StatePatch) -> States

Source

fn state(self, build: impl FnOnce(States) -> States) -> States

Source

fn margin(self, margin: impl Into<Edges>) -> Margined

Source

fn margin_xy(self, x: f32, y: f32) -> Margined

Source

fn margin_x(self, x: f32) -> Margined

Source

fn margin_y(self, y: f32) -> Margined

Source

fn margin_left(self, v: f32) -> Margined

Source

fn margin_right(self, v: f32) -> Margined

Source

fn margin_top(self, v: f32) -> Margined

Source

fn margin_bottom(self, v: f32) -> Margined

Source

fn indent_top(self, v: f32) -> Margined

Source

fn indent_bottom(self, v: f32) -> Margined

Source

fn indent_left(self, v: f32) -> Margined

Source

fn indent_right(self, v: f32) -> Margined

Source

fn indent(self, indents: Indents) -> Margined

Source

fn indent_all(self, v: f32) -> Margined

Source

fn indent_xy(self, x: f32, y: f32) -> Margined

Source

fn indent_axes(self, horizontal: f32, vertical: f32) -> Margined

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: View + 'static> ViewModifiers for T