pub struct ModView<S, F> {
pub func: F,
pub value: S,
}
Fields
func: F
value: S
Trait Implementations
sourceimpl<F> SliderMods for ModView<SliderOptions, F> where
ModView<SliderOptions, F>: View,
impl<F> SliderMods for ModView<SliderOptions, F> where
ModView<SliderOptions, F>: View,
fn thumb_color(self, color: Color) -> Self
sourceimpl<S, V, F> View for ModView<S, F> where
V: View,
S: Clone + Default + 'static,
F: Fn(S, &mut Context) -> V + 'static,
impl<S, V, F> View for ModView<S, F> where
V: View,
S: Clone + Default + 'static,
F: Fn(S, &mut Context) -> V + 'static,
sourcefn process(&self, event: &Event, id: ViewId, cx: &mut Context, vger: &mut VGER)
fn process(&self, event: &Event, id: ViewId, cx: &mut Context, vger: &mut VGER)
Processes an event.
sourcefn layout(
&self,
id: ViewId,
sz: LocalSize,
cx: &mut Context,
vger: &mut VGER
) -> LocalSize
fn layout(
&self,
id: ViewId,
sz: LocalSize,
cx: &mut Context,
vger: &mut VGER
) -> LocalSize
Lays out subviews and return the size of the view.
sourcefn dirty(
&self,
id: ViewId,
xform: LocalToWorld,
cx: &mut Context,
region: &mut Region<WorldSpace>
)
fn dirty(
&self,
id: ViewId,
xform: LocalToWorld,
cx: &mut Context,
region: &mut Region<WorldSpace>
)
Determines dirty regions which need repainting.
sourcefn hittest(
&self,
id: ViewId,
pt: LocalPoint,
cx: &mut Context,
vger: &mut VGER
) -> Option<ViewId>
fn hittest(
&self,
id: ViewId,
pt: LocalPoint,
cx: &mut Context,
vger: &mut VGER
) -> Option<ViewId>
Returns the topmost view which the point intersects.
sourcefn commands(&self, id: ViewId, cx: &mut Context, cmds: &mut Vec<CommandInfo>)
fn commands(&self, id: ViewId, cx: &mut Context, cmds: &mut Vec<CommandInfo>)
Accumulates information about menu bar commands.
fn gc(&self, id: ViewId, cx: &mut Context, map: &mut Vec<ViewId>)
Auto Trait Implementations
impl<S, F> RefUnwindSafe for ModView<S, F> where
F: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, F> Send for ModView<S, F> where
F: Send,
S: Send,
impl<S, F> Sync for ModView<S, F> where
F: Sync,
S: Sync,
impl<S, F> Unpin for ModView<S, F> where
F: Unpin,
S: Unpin,
impl<S, F> UnwindSafe for ModView<S, F> where
F: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more