pub trait Modifiers: View + Sized {
Show 16 methods
fn padding(self, param: impl Into<PaddingParam>) -> Padding<Self> { ... }
fn tap<F: Fn(&mut Context) + 'static>(self, f: F) -> Tap<Self, F> { ... }
fn background<BG: View>(self, background: BG) -> Background<Self, BG> { ... }
fn geom<F: Fn(&mut Context, LocalSize) + 'static>(
self,
f: F
) -> Geom<Self, F> { ... }
fn drag<F: Fn(&mut Context, LocalOffset, GestureState, Option<MouseButton>) + 'static>(
self,
f: F
) -> Drag<Self, F> { ... }
fn offset<Off: Into<LocalOffset>>(self, offset: Off) -> Offset<Self> { ... }
fn size<Sz: Into<LocalSize>>(self, size: Sz) -> Size<Self> { ... }
fn command<F: Fn(&mut Context) + 'static>(
self,
name: &str,
key: Option<HotKey>,
f: F
) -> Command<Self, F> { ... }
fn command_group<T: CommandTuple>(self, cmds: T) -> CommandGroup<Self, T> { ... }
fn key<F: Fn(&mut Context, Key) + 'static>(self, f: F) -> KeyView<Self, F> { ... }
fn role(self, role: Role) -> RoleView<Self> { ... }
fn window_title(self, title: &str) -> TitleView<Self> { ... }
fn fullscreen(self) -> FullscreenView<Self> { ... }
fn env<E: Clone + 'static>(self, value: E) -> SetenvView<Self, E> { ... }
fn anim<F: Fn(&mut Context, f32) + 'static>(
self,
func: F
) -> AnimView<Self, F> { ... }
fn flex(self) -> Flex<Self> { ... }
}
Provided Methods
fn padding(self, param: impl Into<PaddingParam>) -> Padding<Self>
fn padding(self, param: impl Into<PaddingParam>) -> Padding<Self>
Adds space around a view. Can be either Auto
or Px(number_of_pixels)
Calls a function in response to a tap.
fn background<BG: View>(self, background: BG) -> Background<Self, BG>
fn background<BG: View>(self, background: BG) -> Background<Self, BG>
Puts a view behind another. The background view inherits the size of the view.
Calls a function with the view’s geometry after layout runs. Currently only the view’s size is returned.
fn drag<F: Fn(&mut Context, LocalOffset, GestureState, Option<MouseButton>) + 'static>(
self,
f: F
) -> Drag<Self, F>
fn drag<F: Fn(&mut Context, LocalOffset, GestureState, Option<MouseButton>) + 'static>(
self,
f: F
) -> Drag<Self, F>
Calls a function in response to a drag.
fn offset<Off: Into<LocalOffset>>(self, offset: Off) -> Offset<Self>
fn offset<Off: Into<LocalOffset>>(self, offset: Off) -> Offset<Self>
Applies an offset to the view in local space.
Adds a menu command.
fn command_group<T: CommandTuple>(self, cmds: T) -> CommandGroup<Self, T>
fn command_group<T: CommandTuple>(self, cmds: T) -> CommandGroup<Self, T>
Adds a group of menu commands.
Responds to keyboard events
fn window_title(self, title: &str) -> TitleView<Self>
fn window_title(self, title: &str) -> TitleView<Self>
Specify the title of the window.
fn fullscreen(self) -> FullscreenView<Self>
fn fullscreen(self) -> FullscreenView<Self>
Make the window full screen.
fn env<E: Clone + 'static>(self, value: E) -> SetenvView<Self, E>
fn env<E: Clone + 'static>(self, value: E) -> SetenvView<Self, E>
Add an environment value.
Calls a closure after rendering with context and delta time.