pub trait Modifiers: View + Sized {
Show 14 methods
fn padding(self, param: impl Into<PaddingParam>) -> Padding<Self>;
fn tap<F: Fn() + 'static>(self, f: F) -> Tap<Self, F>;
fn tap2<F: FnMut()>(self, f: F) -> Tap2<Self, F>;
fn background<BG: View + 'static>(
self,
background: BG
) -> Background<Self, BG>;
fn geom<F: Fn(LocalSize) + 'static>(self, f: F) -> Geom<Self, F>;
fn drag<F: Fn(LocalOffset, GestureState) + '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() + 'static>(
self,
name: &str,
key: Option<KeyCode>,
f: F
) -> Command<Self, F>;
fn command_group<T: CommandTuple>(self, cmds: T) -> CommandGroup<Self, T>;
fn key<F: Fn(KeyPress) + 'static>(self, f: F) -> Key<Self, F>;
fn role(self, role: Role) -> RoleView<Self>;
fn window_title(self, title: &str) -> TitleView<Self>;
fn fullscreen(self) -> FullscreenView<Self>;
}
Required 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)
fn background<BG: View + 'static>(self, background: BG) -> Background<Self, BG>
fn background<BG: View + 'static>(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(LocalOffset, GestureState) + 'static>(self, f: F) -> Drag<Self, F>
fn drag<F: Fn(LocalOffset, GestureState) + '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.
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.