pub trait Decorators: IntoView {
Show 39 methods
// Provided methods
fn style(
self,
style: impl Fn(Style) -> Style + 'static,
) -> Self::Intermediate { ... }
fn debug_name(self, name: impl Into<String>) -> Self::Intermediate { ... }
fn debug_name_if<S>(
self,
apply: impl Fn() -> bool + 'static,
name: impl Fn() -> S + 'static,
) -> Self::Intermediate
where S: Into<String> { ... }
fn dragging_style(
self,
style: impl Fn(Style) -> Style + 'static,
) -> Self::Intermediate { ... }
fn class<C>(self, _class: C) -> Self::Intermediate
where C: StyleClass { ... }
fn class_if<C>(
self,
apply: impl Fn() -> bool + 'static,
_class: C,
) -> Self::Intermediate
where C: StyleClass { ... }
fn remove_class<C>(self, _class: C) -> Self::Intermediate
where C: StyleClass { ... }
fn keyboard_navigable(self) -> Self::Intermediate { ... }
fn disable_default_event<L>(
self,
disable: impl Fn() -> (L, bool) + 'static,
) -> Self::Intermediate
where L: EventListenerTrait { ... }
fn draggable(self) -> <Self::Intermediate as IntoView>::Intermediate { ... }
fn draggable_with_config(
self,
config: impl Fn() -> DragConfig + 'static,
) -> <Self::Intermediate as IntoView>::Intermediate { ... }
fn disabled(
self,
disabled_fn: impl Fn() -> bool + 'static,
) -> Self::Intermediate { ... }
fn on_event_with_config<L>(
self,
listener: L,
config: EventCallbackConfig,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) -> EventPropagation + 'static,
) -> Self::Intermediate
where L: EventListenerTrait,
<L as EventListenerTrait>::EventData: Sized { ... }
fn on_event_cont_with_config<L>(
self,
listener: L,
config: EventCallbackConfig,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static,
) -> Self::Intermediate
where L: EventListenerTrait,
<L as EventListenerTrait>::EventData: Clone { ... }
fn on_event_stop_with_config<L>(
self,
listener: L,
config: EventCallbackConfig,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static,
) -> Self::Intermediate
where L: EventListenerTrait,
<L as EventListenerTrait>::EventData: Clone { ... }
fn on_event<L>(
self,
listener: L,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) -> EventPropagation + 'static,
) -> Self::Intermediate
where L: EventListenerTrait,
<L as EventListenerTrait>::EventData: Sized { ... }
fn on_event_cont<L>(
self,
listener: L,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static,
) -> Self::Intermediate
where L: EventListenerTrait,
<L as EventListenerTrait>::EventData: Clone { ... }
fn on_event_stop<L>(
self,
listener: L,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static,
) -> Self::Intermediate
where L: EventListenerTrait,
<L as EventListenerTrait>::EventData: Clone { ... }
fn on_key_down(
self,
key: Key,
cmp: impl Fn(Modifiers) -> bool + 'static,
action: impl FnMut(&mut EventCx<'_>, &KeyboardEvent) + 'static,
) -> Self::Intermediate { ... }
fn on_key_up(
self,
key: Key,
cmp: impl Fn(Modifiers) -> bool + 'static,
action: impl FnMut(&mut EventCx<'_>, &KeyboardEvent) + 'static,
) -> Self::Intermediate { ... }
fn on_click(
self,
action: impl FnMut(&mut EventCx<'_>) -> EventPropagation + 'static,
) -> Self::Intermediate { ... }
fn on_click_cont(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate { ... }
fn on_click_stop(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate { ... }
fn action(self, action: impl FnMut() + 'static) -> Self::Intermediate { ... }
fn on_double_click(
self,
action: impl FnMut(&mut EventCx<'_>) -> EventPropagation + 'static,
) -> Self::Intermediate { ... }
fn on_double_click_cont(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate { ... }
fn on_double_click_stop(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate { ... }
fn on_secondary_click(
self,
action: impl FnMut(&mut EventCx<'_>) -> EventPropagation + 'static,
) -> Self::Intermediate { ... }
fn on_secondary_click_cont(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate { ... }
fn on_secondary_click_stop(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate { ... }
fn on_cleanup(self, action: impl Fn() + 'static) -> Self::Intermediate { ... }
fn animation(
self,
animation: impl Fn(Animation) -> Animation + 'static,
) -> Self::Intermediate { ... }
fn clear_focus(self, when: impl Fn() + 'static) -> Self::Intermediate { ... }
fn request_focus(self, when: impl Fn() + 'static) -> Self::Intermediate { ... }
fn window_scale(
self,
scale_fn: impl Fn() -> f64 + 'static,
) -> Self::Intermediate { ... }
fn window_title(
self,
title_fn: impl Fn() -> String + 'static,
) -> Self::Intermediate { ... }
fn window_menu(
self,
menu_fn: impl Fn() -> MenuBuilder<Menu> + 'static,
) -> Self::Intermediate { ... }
fn context_menu(
self,
menu: impl Fn() -> MenuBuilder<Menu> + 'static,
) -> Self::Intermediate { ... }
fn popout_menu(
self,
menu: impl Fn() -> MenuBuilder<Menu> + 'static,
) -> Self::Intermediate { ... }
}Expand description
A trait that extends the appearance and functionality of Views through styling and event handling.
This trait is automatically implemented for all IntoView types via a blanket implementation.
The decoration behavior depends on the type’s IntoView::Intermediate type:
Provided Methods§
Sourcefn style(self, style: impl Fn(Style) -> Style + 'static) -> Self::Intermediate
fn style(self, style: impl Fn(Style) -> Style + 'static) -> Self::Intermediate
Alter the style of the view.
Ensure that if you are using signals inside of the style that you track them at the top level
The Floem style system provides comprehensive styling capabilities including:
§Layout & Sizing
- Flexbox & Grid: Full CSS-style layout with
flex(),grid(), alignment, and gap controls - Dimensions: Width, height, min/max sizes with pixels, percentages, or auto sizing
- Spacing: Padding, margins with individual side control or shorthand methods
- Positioning: Absolute positioning with inset controls
§Visual Styling
- Colors & Brushes: Solid colors, gradients, and custom brushes for backgrounds and text
- Borders: Individual border styling per side with colors, widths, and radius
- Shadows: Box shadows with blur, spread, offset, and color customization
- Typography: Font family, size, weight, style, and line height control
§Interactive States
- Pseudo-states: Styling for hover, focus, active, disabled, and selected states
- Dark Mode: Automatic dark mode styling support
- Responsive Design: Breakpoint-based styling for different screen sizes
§Advanced Features
- Animations: Smooth transitions between style changes with easing functions
- Custom Properties: Define and use custom style properties for specialized views
- Style Classes: Reusable style definitions that can be applied across views
- Conditional Styling: Apply styles based on conditions using
apply_if()andapply_opt() - Transform: Scale, translate, and rotate transformations
§Style Application
Styles are reactive and will automatically update when dependencies change.
Subsequent calls to style will overwrite previous ones.
fn view() -> impl View {
label(|| "Hello".to_string())
.style(|s| s.font_size(20.0).color(palette::css::RED))
}
fn other() -> impl View {
stack((
view(), // will be red and size 20
// will be green and default size due to the previous style being overwritten
view().style(|s| s.color(palette::css::GREEN)),
))
}Sourcefn debug_name(self, name: impl Into<String>) -> Self::Intermediate
fn debug_name(self, name: impl Into<String>) -> Self::Intermediate
Add a debug name to the view that will be shown in the inspector.
This can be called multiple times and each name will be shown in the inspector with the most recent name showing first.
Sourcefn debug_name_if<S>(
self,
apply: impl Fn() -> bool + 'static,
name: impl Fn() -> S + 'static,
) -> Self::Intermediate
fn debug_name_if<S>( self, apply: impl Fn() -> bool + 'static, name: impl Fn() -> S + 'static, ) -> Self::Intermediate
Conditionally add a debug name to the view that will be shown in the inspector.
§Reactivity
Both the apply and name functions are reactive.
Sourcefn dragging_style(
self,
style: impl Fn(Style) -> Style + 'static,
) -> Self::Intermediate
fn dragging_style( self, style: impl Fn(Style) -> Style + 'static, ) -> Self::Intermediate
The visual style to apply when the view is being dragged
Sourcefn class<C>(self, _class: C) -> Self::Intermediatewhere
C: StyleClass,
fn class<C>(self, _class: C) -> Self::Intermediatewhere
C: StyleClass,
Add a style class to the view
Sourcefn class_if<C>(
self,
apply: impl Fn() -> bool + 'static,
_class: C,
) -> Self::Intermediatewhere
C: StyleClass,
fn class_if<C>(
self,
apply: impl Fn() -> bool + 'static,
_class: C,
) -> Self::Intermediatewhere
C: StyleClass,
Conditionally add a style class to the view
Sourcefn remove_class<C>(self, _class: C) -> Self::Intermediatewhere
C: StyleClass,
fn remove_class<C>(self, _class: C) -> Self::Intermediatewhere
C: StyleClass,
Remove a style class from the view
👎Deprecated: Set this property using Style::keyboard_navigable instead
Set this property using Style::keyboard_navigable instead
Allows the element to be navigated to with the keyboard. Similar to setting tabindex=“0” in html.
Sourcefn disable_default_event<L>(
self,
disable: impl Fn() -> (L, bool) + 'static,
) -> Self::Intermediatewhere
L: EventListenerTrait,
fn disable_default_event<L>(
self,
disable: impl Fn() -> (L, bool) + 'static,
) -> Self::Intermediatewhere
L: EventListenerTrait,
Dynamically controls whether the default view behavior for an event should be disabled. When disable is true, children will still see the event, but the view event function will not be called nor the event listeners on the view.
§Reactivity
This function is reactive and will re-run the disable function automatically in response to changes in signals
Sourcefn draggable(self) -> <Self::Intermediate as IntoView>::Intermediate
fn draggable(self) -> <Self::Intermediate as IntoView>::Intermediate
Mark the current view as draggable with default configuration.
Uses default threshold of 3.0 pixels, 300ms animation, and linear easing.
Sourcefn draggable_with_config(
self,
config: impl Fn() -> DragConfig + 'static,
) -> <Self::Intermediate as IntoView>::Intermediate
fn draggable_with_config( self, config: impl Fn() -> DragConfig + 'static, ) -> <Self::Intermediate as IntoView>::Intermediate
Mark the current view as draggable with custom configuration.
§Example
use floem::event::DragConfig;
use std::time::Duration;
let _view = empty().draggable_with_config(|| {
DragConfig::default()
.with_threshold(5.0)
.with_animation_duration(Duration::from_millis(400))
});Sourcefn disabled(
self,
disabled_fn: impl Fn() -> bool + 'static,
) -> Self::Intermediate
👎Deprecated: use Style::set_disabled directly instead
fn disabled( self, disabled_fn: impl Fn() -> bool + 'static, ) -> Self::Intermediate
use Style::set_disabled directly instead
Sourcefn on_event_with_config<L>(
self,
listener: L,
config: EventCallbackConfig,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) -> EventPropagation + 'static,
) -> Self::Intermediate
fn on_event_with_config<L>( self, listener: L, config: EventCallbackConfig, action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) -> EventPropagation + 'static, ) -> Self::Intermediate
Add an event handler for the given EventListener with custom phase configuration.
Sourcefn on_event_cont_with_config<L>(
self,
listener: L,
config: EventCallbackConfig,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static,
) -> Self::Intermediate
fn on_event_cont_with_config<L>( self, listener: L, config: EventCallbackConfig, action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static, ) -> Self::Intermediate
Add an event handler for the given EventListener. This event will be handled with
the given handler and the event will continue propagating.
Sourcefn on_event_stop_with_config<L>(
self,
listener: L,
config: EventCallbackConfig,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static,
) -> Self::Intermediate
fn on_event_stop_with_config<L>( self, listener: L, config: EventCallbackConfig, action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static, ) -> Self::Intermediate
Add an event handler for the given EventListener. This event will be handled with
the given handler and the event will stop propagating.
Sourcefn on_event<L>(
self,
listener: L,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) -> EventPropagation + 'static,
) -> Self::Intermediate
fn on_event<L>( self, listener: L, action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) -> EventPropagation + 'static, ) -> Self::Intermediate
Add an event handler for the given EventListener.
Sourcefn on_event_cont<L>(
self,
listener: L,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static,
) -> Self::Intermediate
fn on_event_cont<L>( self, listener: L, action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static, ) -> Self::Intermediate
Add an event handler for the given EventListener. This event will be handled with
the given handler and the event will continue propagating.
Sourcefn on_event_stop<L>(
self,
listener: L,
action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static,
) -> Self::Intermediate
fn on_event_stop<L>( self, listener: L, action: impl FnMut(&mut EventCx<'_>, &<L as EventListenerTrait>::EventData) + 'static, ) -> Self::Intermediate
Add an event handler for the given EventListener. This event will be handled with
the given handler and the event will stop propagating.
Sourcefn on_key_down(
self,
key: Key,
cmp: impl Fn(Modifiers) -> bool + 'static,
action: impl FnMut(&mut EventCx<'_>, &KeyboardEvent) + 'static,
) -> Self::Intermediate
👎Deprecated: Use on_event(listener::KeyDown, ...) instead.
fn on_key_down( self, key: Key, cmp: impl Fn(Modifiers) -> bool + 'static, action: impl FnMut(&mut EventCx<'_>, &KeyboardEvent) + 'static, ) -> Self::Intermediate
Use on_event(listener::KeyDown, ...) instead.
Add a handler for pressing down a specific key.
Sourcefn on_key_up(
self,
key: Key,
cmp: impl Fn(Modifiers) -> bool + 'static,
action: impl FnMut(&mut EventCx<'_>, &KeyboardEvent) + 'static,
) -> Self::Intermediate
👎Deprecated: Use on_event(listener::KeyUp, ...) instead.
fn on_key_up( self, key: Key, cmp: impl Fn(Modifiers) -> bool + 'static, action: impl FnMut(&mut EventCx<'_>, &KeyboardEvent) + 'static, ) -> Self::Intermediate
Use on_event(listener::KeyUp, ...) instead.
Add a handler for a specific key being released.
Sourcefn on_click(
self,
action: impl FnMut(&mut EventCx<'_>) -> EventPropagation + 'static,
) -> Self::Intermediate
👎Deprecated: Use on_event(Click, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
fn on_click( self, action: impl FnMut(&mut EventCx<'_>) -> EventPropagation + 'static, ) -> Self::Intermediate
Use on_event(Click, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
Add an event handler for EventListener::Click.
Sourcefn on_click_cont(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate
👎Deprecated: Use on_event_cont(Click, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
fn on_click_cont( self, action: impl FnMut(&mut EventCx<'_>) + 'static, ) -> Self::Intermediate
Use on_event_cont(Click, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
Add an event handler for EventListener::Click. This event will be handled with
the given handler and the event will continue propagating.
Sourcefn on_click_stop(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate
👎Deprecated: Use on_event_stop(Click, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
fn on_click_stop( self, action: impl FnMut(&mut EventCx<'_>) + 'static, ) -> Self::Intermediate
Use on_event_stop(Click, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
Add an event handler for EventListener::Click. This event will be handled with
the given handler and the event will stop propagating.
Sourcefn action(self, action: impl FnMut() + 'static) -> Self::Intermediate
fn action(self, action: impl FnMut() + 'static) -> Self::Intermediate
Attach action executed on button click or Enter or Space Key.
Sourcefn on_double_click(
self,
action: impl FnMut(&mut EventCx<'_>) -> EventPropagation + 'static,
) -> Self::Intermediate
👎Deprecated: Use on_event(DoubleClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
fn on_double_click( self, action: impl FnMut(&mut EventCx<'_>) -> EventPropagation + 'static, ) -> Self::Intermediate
Use on_event(DoubleClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
Add an event handler for EventListener::DoubleClick
Sourcefn on_double_click_cont(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate
👎Deprecated: Use on_event_cont(DoubleClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
fn on_double_click_cont( self, action: impl FnMut(&mut EventCx<'_>) + 'static, ) -> Self::Intermediate
Use on_event_cont(DoubleClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
Add an event handler for EventListener::DoubleClick. This event will be handled with
the given handler and the event will continue propagating.
Sourcefn on_double_click_stop(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate
👎Deprecated: Use on_event_stop(DoubleClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
fn on_double_click_stop( self, action: impl FnMut(&mut EventCx<'_>) + 'static, ) -> Self::Intermediate
Use on_event_stop(DoubleClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
Add an event handler for EventListener::DoubleClick. This event will be handled with
the given handler and the event will stop propagating.
Sourcefn on_secondary_click(
self,
action: impl FnMut(&mut EventCx<'_>) -> EventPropagation + 'static,
) -> Self::Intermediate
👎Deprecated: Use on_event(SecondaryClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
fn on_secondary_click( self, action: impl FnMut(&mut EventCx<'_>) -> EventPropagation + 'static, ) -> Self::Intermediate
Use on_event(SecondaryClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
Add an event handler for EventListener::SecondaryClick. This is most often the “Right” click.
Sourcefn on_secondary_click_cont(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate
👎Deprecated: Use on_event_cont(SecondaryClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
fn on_secondary_click_cont( self, action: impl FnMut(&mut EventCx<'_>) + 'static, ) -> Self::Intermediate
Use on_event_cont(SecondaryClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
Add an event handler for EventListener::SecondaryClick. This is most often the “Right” click.
This event will be handled with the given handler and the event will continue propagating.
Sourcefn on_secondary_click_stop(
self,
action: impl FnMut(&mut EventCx<'_>) + 'static,
) -> Self::Intermediate
👎Deprecated: Use on_event_stop(SecondaryClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
fn on_secondary_click_stop( self, action: impl FnMut(&mut EventCx<'_>) + 'static, ) -> Self::Intermediate
Use on_event_stop(SecondaryClick, |cx, _event| { ... }) instead. The new API provides direct access to typed event data.
Add an event handler for EventListener::SecondaryClick. This is most often the “Right” click.
This event will be handled with the given handler and the event will stop propagating.
Sourcefn on_cleanup(self, action: impl Fn() + 'static) -> Self::Intermediate
fn on_cleanup(self, action: impl Fn() + 'static) -> Self::Intermediate
Adds an event handler for cleanup events for this view.
The cleanup event occurs when the view is removed from the view tree.
§Reactivity
The action will be called when the view is removed from the view tree but will not rerun automatically in response to signal changes
Sourcefn animation(
self,
animation: impl Fn(Animation) -> Animation + 'static,
) -> Self::Intermediate
fn animation( self, animation: impl Fn(Animation) -> Animation + 'static, ) -> Self::Intermediate
Add an animation to the view.
You can add more than one animation to a view and all of them can be active at the same time.
See the Animation struct for more information on how to create animations.
§Reactivity
The animation function will be updated in response to signal changes in the function. The behavior is the same as the Decorators::style method.
Sourcefn clear_focus(self, when: impl Fn() + 'static) -> Self::Intermediate
fn clear_focus(self, when: impl Fn() + 'static) -> Self::Intermediate
Clear the focus from the window.
§Reactivity
The when function is reactive and will rereun in response to any signal changes in the function.
Sourcefn request_focus(self, when: impl Fn() + 'static) -> Self::Intermediate
fn request_focus(self, when: impl Fn() + 'static) -> Self::Intermediate
Request that this view gets the focus for the window.
§Reactivity
The when function is reactive and will rereun in response to any signal changes in the function.
Sourcefn window_scale(
self,
scale_fn: impl Fn() -> f64 + 'static,
) -> Self::Intermediate
fn window_scale( self, scale_fn: impl Fn() -> f64 + 'static, ) -> Self::Intermediate
Set the window scale factor.
This internally calls the crate::action::set_window_scale function.
§Reactivity
The scale function is reactive and will rereun in response to any signal changes in the function.
Sourcefn window_title(
self,
title_fn: impl Fn() -> String + 'static,
) -> Self::Intermediate
fn window_title( self, title_fn: impl Fn() -> String + 'static, ) -> Self::Intermediate
Set the window title.
This internally calls the crate::action::set_window_title function.
§Reactivity
The title function is reactive and will rereun in response to any signal changes in the function.
Set the system window menu
This internally calls the crate::action::set_window_menu function.
Platform support:
- Windows: No
- macOS: Yes (not currently implemented)
- Linux: No
- wasm32: No
§Reactivity
The menu function is reactive and will rereun in response to any signal changes in the function.
Adds a secondary-click context menu to the view, which opens at the mouse position.
§Reactivity
The menu function is not reactive and will not rerun automatically in response to signal changes while the menu is showing and will only update the menu items each time that it is created
Adds a primary-click context menu, which opens below the view.
§Reactivity
The menu function is not reactive and will not rerun automatically in response to signal changes while the menu is showing and will only update the menu items each time that it is created
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
impl<T> Decorators for Twhere
T: IntoView,
Blanket implementation for all IntoView types.