pub struct List<S: RowSource> { /* private fields */ }Expand description
Implementations§
Source§impl<S: RowSource + 'static> List<S>
impl<S: RowSource + 'static> List<S>
Sourcepub fn row_height(self, h: RowHeight) -> Self
pub fn row_height(self, h: RowHeight) -> Self
Row sizing: Uniform(h) (fastest) or Automatic (self-sizing).
Sourcepub fn on_activate(self, f: impl Fn(S::Ref) + 'static) -> Self
pub fn on_activate(self, f: impl Fn(S::Ref) + 'static) -> Self
Open, play, or otherwise activate a row. Desktop lists use double-click or Enter; touch lists use a tap. Selection callbacks remain independent.
Sourcepub fn on_select(self, f: impl Fn(S::Ref) + 'static) -> Self
pub fn on_select(self, f: impl Fn(S::Ref) + 'static) -> Self
Called with the selected row when the native list reports a selection: the key for a
plain-data source, the row’s Elem handle for a store source.
Sourcepub fn multi_select(self) -> Self
pub fn multi_select(self) -> Self
Allow selecting several rows at once, where the toolkit supports it (docs/list.md has
the matrix; single-selection backends fall back to one row at a time). Every selection
change calls Self::on_selection with the full set of selected rows.
Sourcepub fn on_selection(self, f: impl Fn(Vec<S::Ref>) + 'static) -> Self
pub fn on_selection(self, f: impl Fn(Vec<S::Ref>) + 'static) -> Self
Called with the full set of selected rows (row order, empty = cleared) whenever the
selection changes: the multi-select analogue of Self::on_select. Also fired by
single-selection backends with a one-element (or empty) set.
Sourcepub fn selected_rows(self, rows: impl Fn() -> Vec<usize> + 'static) -> Self
pub fn selected_rows(self, rows: impl Fn() -> Vec<usize> + 'static) -> Self
Reactively sync the native selection to rows (row indices; empty clears). Re-runs
whenever the closure’s tracked reads change; the toolkit applies the sync without
re-emitting a selection event. Drive it from app state to build “Clear selection”.
Sourcepub fn selection(self, selected: impl Binding<Option<u64>>) -> Selfwhere
S::Ref: SelectionKey,
pub fn selection(self, selected: impl Binding<Option<u64>>) -> Selfwhere
S::Ref: SelectionKey,
Two-way single selection by key, for a list of day-model store rows: selected holds
the selected row’s key (None for no selection). A row the user picks writes its key,
clearing the selection writes None, and a key the app writes selects that row and
scrolls it into view, following the row through inserts and moves.
list(scene.items, row_view).selection(scene.selected)Sourcepub fn scroll_to_end(self, trigger: Trigger) -> Self
pub fn scroll_to_end(self, trigger: Trigger) -> Self
Scroll the list so its last row is fully visible whenever trigger fires, e.g. a chat
timeline sticking to the newest message. Fire it with day_reactive::Trigger::notify
after appending. No-op while the list is empty. The scroll targets the native list
(NSTableView/UITableView/GtkListView/QListView/RecyclerView), so it respects the
platform’s own scroll physics.
Sourcepub fn stick_to_bottom(self) -> Self
pub fn stick_to_bottom(self) -> Self
Best-effort auto-stick: after a data reload, scroll to the end so freshly appended rows stay
visible. Convenience over Self::scroll_to_end for feeds that always follow the newest
row; for finer control (only stick when the user is already near the bottom) drive
scroll_to_end from your own logic instead. Off by default.
Sourcepub fn scroll_to_row(self, target: impl Binding<Option<usize>>) -> Self
pub fn scroll_to_row(self, target: impl Binding<Option<usize>>) -> Self
Programmatic scroll-to-row (docs/list.md): set the signal to Some(row) and the native
list scrolls that row into view, realizing it if it was virtualized away: the row rail’s
counterpart to scroll(...).scroll_target(...). The signal is left as written; setting
the same row again re-fires. Takes a Signal<Option<usize>> or any other binding.
Sourcepub fn first_visible_row(self, first: impl Binding<usize>) -> Self
pub fn first_visible_row(self, first: impl Binding<usize>) -> Self
The first actually visible article/item index, reported by native scrolling into
first (a Signal<usize> or any other binding). Use with a heading overlay for
floating group headers. No periodic timer is used.
Sourcepub fn reorderable(self, reorder: Reorder) -> Self
pub fn reorderable(self, reorder: Reorder) -> Self
Sourcepub fn swipe_leading(
self,
provider: impl Fn(usize) -> Vec<SwipeAction> + 'static,
) -> Self
pub fn swipe_leading( self, provider: impl Fn(usize) -> Vec<SwipeAction> + 'static, ) -> Self
Offer swipe actions on the row’s leading edge, the reading-direction start, where the
platform reveals them as the user drags the row aside (probe Cap::ListSwipeActions;
docs/list.md has the matrix; a backend without the affordance shows nothing, so pair
each action with an explicit control for the rest). provider runs at gesture time
with the row index, so the offer can reflect the row’s current state (“Mark as Read”
vs “Mark as Unread”). Keep it pure and fast; it runs inside the platform’s swipe
callback; the actions’ handlers run later, at the event drain. A full swipe across
activates the edge’s first action.
Sourcepub fn swipe_trailing(
self,
provider: impl Fn(usize) -> Vec<SwipeAction> + 'static,
) -> Self
pub fn swipe_trailing( self, provider: impl Fn(usize) -> Vec<SwipeAction> + 'static, ) -> Self
Offer swipe actions on the row’s trailing edge, the reading-direction end. Same
contract as swipe_leading.
Sourcepub fn separators(self) -> Self
pub fn separators(self) -> Self
Draw a separator under each row. It is the host’s separator, drawn at the row boundary
and never by row content (docs/list.md): it aligns with the native selection and stays
put while a macOS/iOS swipe slides the row past it, exactly as Mail’s separators do.
Unset, each platform keeps its default (iOS draws them, the desktops don’t); see
Self::no_separators for the other override. A backend without a separator mechanism
ignores this (the docs matrix says which); don’t re-create the old hand-drawn hairline
there. Rows separate by their pitch.
Sourcepub fn no_separators(self) -> Self
pub fn no_separators(self) -> Self
Draw no separator between rows, on a platform whose default draws one (iOS).
Sourcepub fn editing<M>(self, on: impl IntoReactive<bool, M>) -> Self
pub fn editing<M>(self, on: impl IntoReactive<bool, M>) -> Self
Put the list in the platform’s editing mode (docs/list.md): on iOS, the rows show
their delete controls (where a Delete offers one) and reorder grips (where a
Reorder moves them), and a tap still activates
the row. Reactive, so an Edit/Done button can toggle it, and the change animates.
Probe Cap::ListEditing. The other toolkits have no separate editing mode: their
rows drag, swipe and open menus as they are, so the list renders as if this were off.
Trait Implementations§
Source§impl<S: RowSource + 'static> ListBuilder<S> for List<S>
impl<S: RowSource + 'static> ListBuilder<S> for List<S>
Source§fn row_height(self, h: RowHeight) -> Self
fn row_height(self, h: RowHeight) -> Self
Uniform(h) (fastest) or Automatic (self-sizing).Source§fn on_activate(self, f: impl Fn(S::Ref) + 'static) -> Self
fn on_activate(self, f: impl Fn(S::Ref) + 'static) -> Self
Source§fn on_select(self, f: impl Fn(S::Ref) + 'static) -> Self
fn on_select(self, f: impl Fn(S::Ref) + 'static) -> Self
Elem handle for a store source.Source§fn multi_select(self) -> Self
fn multi_select(self) -> Self
Self::on_selection with the full set of selected rows.Source§fn on_selection(self, f: impl Fn(Vec<S::Ref>) + 'static) -> Self
fn on_selection(self, f: impl Fn(Vec<S::Ref>) + 'static) -> Self
Self::on_select. Also fired by
single-selection backends with a one-element (or empty) set.Source§fn selected_rows(self, rows: impl Fn() -> Vec<usize> + 'static) -> Self
fn selected_rows(self, rows: impl Fn() -> Vec<usize> + 'static) -> Self
rows (row indices; empty clears). Re-runs
whenever the closure’s tracked reads change; the toolkit applies the sync without
re-emitting a selection event. Drive it from app state to build “Clear selection”.Source§fn selection(self, selected: impl Binding<Option<u64>>) -> Selfwhere
S::Ref: SelectionKey,
fn selection(self, selected: impl Binding<Option<u64>>) -> Selfwhere
S::Ref: SelectionKey,
selected holds
the selected row’s key (None for no selection). A row the user picks writes its key,
clearing the selection writes None, and a key the app writes selects that row and
scrolls it into view, following the row through inserts and moves. Read moreSource§fn scroll_to_end(self, trigger: Trigger) -> Self
fn scroll_to_end(self, trigger: Trigger) -> Self
trigger fires, e.g. a chat
timeline sticking to the newest message. Fire it with day_reactive::Trigger::notify
after appending. No-op while the list is empty. The scroll targets the native list
(NSTableView/UITableView/GtkListView/QListView/RecyclerView), so it respects the
platform’s own scroll physics.Source§fn stick_to_bottom(self) -> Self
fn stick_to_bottom(self) -> Self
Self::scroll_to_end for feeds that always follow the newest
row; for finer control (only stick when the user is already near the bottom) drive
scroll_to_end from your own logic instead. Off by default.Source§fn scroll_to_row(self, target: impl Binding<Option<usize>>) -> Self
fn scroll_to_row(self, target: impl Binding<Option<usize>>) -> Self
Some(row) and the native
list scrolls that row into view, realizing it if it was virtualized away: the row rail’s
counterpart to scroll(...).scroll_target(...). The signal is left as written; setting
the same row again re-fires. Takes a Signal<Option<usize>> or any other binding.Source§fn first_visible_row(self, first: impl Binding<usize>) -> Self
fn first_visible_row(self, first: impl Binding<usize>) -> Self
first (a Signal<usize> or any other binding). Use with a heading overlay for
floating group headers. No periodic timer is used.Source§fn reorderable(self, reorder: Reorder) -> Self
fn reorderable(self, reorder: Reorder) -> Self
Source§fn swipe_leading(
self,
provider: impl Fn(usize) -> Vec<SwipeAction> + 'static,
) -> Self
fn swipe_leading( self, provider: impl Fn(usize) -> Vec<SwipeAction> + 'static, ) -> Self
Cap::ListSwipeActions;
docs/list.md has the matrix; a backend without the affordance shows nothing, so pair
each action with an explicit control for the rest). provider runs at gesture time
with the row index, so the offer can reflect the row’s current state (“Mark as Read”
vs “Mark as Unread”). Keep it pure and fast; it runs inside the platform’s swipe
callback; the actions’ handlers run later, at the event drain. A full swipe across
activates the edge’s first action.Source§fn swipe_trailing(
self,
provider: impl Fn(usize) -> Vec<SwipeAction> + 'static,
) -> Self
fn swipe_trailing( self, provider: impl Fn(usize) -> Vec<SwipeAction> + 'static, ) -> Self
swipe_leading.Source§fn separators(self) -> Self
fn separators(self) -> Self
Self::no_separators for the other override. A backend without a separator mechanism
ignores this (the docs matrix says which); don’t re-create the old hand-drawn hairline
there. Rows separate by their pitch.Source§fn no_separators(self) -> Self
fn no_separators(self) -> Self
Source§fn editing<M>(self, on: impl IntoReactive<bool, M>) -> Self
fn editing<M>(self, on: impl IntoReactive<bool, M>) -> Self
Auto Trait Implementations§
impl<S> !RefUnwindSafe for List<S>
impl<S> !Send for List<S>
impl<S> !Sync for List<S>
impl<S> !UnwindSafe for List<S>
impl<S> Freeze for List<S>where
S: Freeze,
impl<S> Unpin for List<S>where
S: Unpin,
impl<S> UnsafeUnpin for List<S>where
S: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<P> Decorate for Pwhere
P: Piece,
impl<P> Decorate for Pwhere
P: Piece,
Source§fn id(self, id: ElementId) -> Decorated<Self>
fn id(self, id: ElementId) -> Decorated<Self>
Source§fn wrapper_id(self, id: ElementId) -> Decorated<Self>
fn wrapper_id(self, id: ElementId) -> Decorated<Self>
id.Source§fn apply_if(
self,
cond: bool,
f: impl FnOnce(Decorated<Self>) -> Decorated<Self>,
) -> Decorated<Self>
fn apply_if( self, cond: bool, f: impl FnOnce(Decorated<Self>) -> Decorated<Self>, ) -> Decorated<Self>
f to the chain when cond holds, else continue unchanged
(see Decorated::apply_if): nav(sel).apply_if(!primary, |n| n.local()). The
closure receives the decorated piece, so forwarded builder methods and modifiers both
chain inside it.Source§fn apply_some<T>(
self,
value: Option<T>,
f: impl FnOnce(Decorated<Self>, T) -> Decorated<Self>,
) -> Decorated<Self>
fn apply_some<T>( self, value: Option<T>, f: impl FnOnce(Decorated<Self>, T) -> Decorated<Self>, ) -> Decorated<Self>
f with the value when there is one, else continue unchanged
(see Decorated::apply_some): canvas(draw).apply_some(id, |c, id| c.id(id)).Source§fn id_of(self, id: impl Fn() -> ElementId + 'static) -> Decorated<Self>
fn id_of(self, id: impl Fn() -> ElementId + 'static) -> Decorated<Self>
list. A plain
id is assigned once at build, but a recycled cell rebinds to different
items over its life (and drag-to-reorder rebinds eagerly), so a static item-derived id
keeps naming the first-bound item. This variant re-registers whenever the closure’s
value changes; read your ItemSlot inside it:
.id_of(move || day_core::id!(row_remove, slot.key())).Source§fn tweak(self, f: impl FnOnce(RNode) + 'static) -> Decorated<Self>
fn tweak(self, f: impl FnOnce(RNode) + 'static) -> Decorated<Self>
f runs once at mount, after the native widget exists, with the
realized node (docs/tweaks.md). Reach the typed native handle through the compiled
backend’s ext accessor (day_appkit::with_native, day_gtk::with_native, …), or apply
a packaged day-tweak-* crate’s modifier instead of calling this directly. If the native
change affects the widget’s intrinsic size, follow it with
day_core::invalidate_size. Day may overwrite managed properties (title, value,
enabled, frame, a11y) on its next patch; unmanaged properties are stable. Read moreSource§fn selectable(self) -> Decorated<Self>
fn selectable(self) -> Decorated<Self>
Source§fn cursor<M>(self, cursor: impl IntoReactive<Cursor, M>) -> Decorated<Self>
fn cursor<M>(self, cursor: impl IntoReactive<Cursor, M>) -> Decorated<Self>
Cursor constant, a Signal<Cursor>, or a closure, so a canvas tool or a busy state
moves the shape without rebuilding the piece. The nearest ancestor’s cursor wins, and
Cursor::Default releases the piece back to the platform. capability(Cap::Cursor)
says whether this toolkit draws the requested shapes, a nearest neighbor, or nothing;
a touch-only host never shows one, which is correct rather than a failure.Source§fn window_drag_region(self) -> Decorated<Self>
fn window_drag_region(self) -> Decorated<Self>
WindowChrome::Overlay or
WindowChrome::Frameless window needs. The piece’s own background starts the drag,
with the platform’s snapping and tiling; buttons and fields inside it keep their clicks;
a double click does what the user’s title-bar setting says (zoom, minimize, nothing).
capability(Cap::DragRegion); on a phone the piece is an ordinary view.Source§fn native_ref(self, r: &NativeRef) -> Decorated<Self>
fn native_ref(self, r: &NativeRef) -> Decorated<Self>
NativeRef to this piece’s realized node for later imperative access
(docs/tweaks.md). The ref clears automatically when the piece’s scope is disposed.fn padding(self, insets: impl IntoInsets) -> Decorated<Self>
Source§fn max_width(self, max: f64) -> Decorated<Self>
fn max_width(self, max: f64) -> Decorated<Self>
max points: the child is never PROPOSED more, so text
wraps inside the cap (chat bubbles, readable columns) while narrower content hugs.Source§fn reserving(self, sample: impl Into<String>) -> Decorated<Self>
fn reserving(self, sample: impl Into<String>) -> Decorated<Self>
sample needs, so this piece’s size stops changing with its
content. Read morefn frame(self, width: f64, height: f64) -> Decorated<Self>
Source§fn width(self, width: f64) -> Decorated<Self>
fn width(self, width: f64) -> Decorated<Self>
width points while its height stays flexible (hugging its
content or filling on the cross axis). The single-axis complement to Self::frame, e.g.
a fixed-width sidebar pane in a row whose height fills the window.Source§fn height(self, height: f64) -> Decorated<Self>
fn height(self, height: f64) -> Decorated<Self>
height points while its width stays flexible. The single-axis
complement to Self::frame, e.g. a fixed-height header/toolbar bar that fills its width.fn a11y( self, f: impl FnOnce(A11yBuilder) -> A11yBuilder + 'static, ) -> Decorated<Self>
Source§fn on_tap(self, f: impl Fn() + 'static) -> Decorated<Self>
fn on_tap(self, f: impl Fn() + 'static) -> Decorated<Self>
Source§fn focused<M>(self, binding: impl IntoFocusBinding<M>) -> Decorated<Self>
fn focused<M>(self, binding: impl IntoFocusBinding<M>) -> Decorated<Self>
Signal<bool> for one control, or (Signal<Option<K>>, K::Variant) binding one control
of a group; writing false/None resigns focus (dismissing the soft keyboard on
mobile). Focus applies asynchronously: a write is a request, resolved on the next turn,
and the signal always ends up reflecting what the platform actually did.Source§fn on_key(self, f: impl Fn(&KeyEvent) + 'static) -> Decorated<Self>
fn on_key(self, f: impl Fn(&KeyEvent) + 'static) -> Decorated<Self>
Decorate::focused or with a
piece the user can click into: a canvas takes focus on a press, and only the focused
piece hears the keys, so a nudge handler can never fire while a text field, a list or a
sidebar is the one being typed into. Read moreSource§fn toolbar<M>(self, content: impl ToolbarContent<M>) -> Decorated<Self>
fn toolbar<M>(self, content: impl ToolbarContent<M>) -> Decorated<Self>
Source§fn searchable(self, search: Search) -> Decorated<Self>
fn searchable(self, search: Search) -> Decorated<Self>
UISearchController), its app bar on Android. It shows while this page does, and
its text is the app’s query both ways. For a search the server runs, act on
crate::Search::on_submit; for a local filter, read the query. Declare it on a
nav_stack destination, as .toolbar(…) is declared; a whole navigation surface takes
crate::Nav::searchable instead.Source§fn focusable(self) -> Decorated<Self>
fn focusable(self) -> Decorated<Self>
.focused(…), and hears the arrows through .on_key(…) while focused. A composed
list column is the motivating case (docs/navigation.md). On a backend without the
set_focusable duty the piece renders normally and never takes focus.Source§fn drag_source(
self,
source: impl Fn(Point) -> Option<Offer> + 'static,
) -> Decorated<Self>
fn drag_source( self, source: impl Fn(Point) -> Option<Offer> + 'static, ) -> Decorated<Self>
menu_item/sub_menu/menu_role/
menu_separator. Passing an empty Vec removes any menu.fn drop_target(self, target: Target) -> Decorated<Self>
menu_item/sub_menu entries as everywhere else. Takes a fixed list, or a closure
built when the menu is summoned (“Dynamic context menus”): with no argument, or with the
summon point in this piece’s own coordinates, so a canvas can select what is under the
pointer and offer commands for that selection. An empty result shows nothing. Read morefn on_drag(self, f: impl Fn(Drag) + 'static) -> Decorated<Self>
Source§fn on_pinch(self, f: impl Fn(Pinch) + 'static) -> Decorated<Self>
fn on_pinch(self, f: impl Fn(Pinch) + 'static) -> Decorated<Self>
Source§fn on_pan(self, f: impl Fn(Pan) + 'static) -> Decorated<Self>
fn on_pan(self, f: impl Fn(Pan) + 'static) -> Decorated<Self>
delta is incremental; apply it
as it arrives.Source§fn on_hover(self, f: impl Fn(Option<Point>) + 'static) -> Decorated<Self>
fn on_hover(self, f: impl Fn(Option<Point>) + 'static) -> Decorated<Self>
Some(point) in its own coordinates while inside,
None when it leaves (docs/canvas.md “Interaction”). Pointer-only; wire on_tap_at
alongside it so a touch-only device can reach the same thing.Source§fn card(self) -> Decorated<Self>
fn card(self) -> Decorated<Self>
Color, a Signal<Color>, or a Fn() -> Color; a
reactive color repaints the surface when its source changes. Wraps the piece in a native
container that carries the fill, so it composes with Self::corner_radius for a rounded
colored surface and with Self::padding for interior inset.
The platform’s card around this piece: the grouped-content surface with rounded
corners and a Space::M inset (see Decorated::card).fn background<M>(self, color: impl IntoReactive<Color, M>) -> Decorated<Self>
Source§fn corner_radius(self, radius: f64) -> Decorated<Self>
fn corner_radius(self, radius: f64) -> Decorated<Self>
radius points, clipping its background and content to the
rounded rectangle. Compose after Self::background for a rounded colored surface, or use
alone to round a clipped child (e.g. an avatar image).Source§fn opacity<M>(self, opacity: impl IntoReactive<f64, M>) -> Decorated<Self>
fn opacity<M>(self, opacity: impl IntoReactive<f64, M>) -> Decorated<Self>
0.0 transparent … 1.0 opaque). Wrapped in a native
layer so it composes with .background; the change animates when made inside
with_animation or under a .animation ancestor (§8.4).Source§fn transform<M>(self, t: impl IntoReactive<Transform, M>) -> Decorated<Self>
fn transform<M>(self, t: impl IntoReactive<Transform, M>) -> Decorated<Self>
Transform (translate/scale/rotate about the center): the cheap
movement/scaling channel that never triggers relayout (§8.4). Prefer this over .offset
for animated motion.Source§fn scale<M>(self, factor: impl IntoReactive<f64, M>) -> Decorated<Self>
fn scale<M>(self, factor: impl IntoReactive<f64, M>) -> Decorated<Self>
factor about its center (animatable). Convenience over
Self::transform.Source§fn rotation<M>(self, degrees: impl IntoReactive<f64, M>) -> Decorated<Self>
fn rotation<M>(self, degrees: impl IntoReactive<f64, M>) -> Decorated<Self>
degrees clockwise about its center (animatable).Source§fn translation<Mx, My>(
self,
x: impl IntoReactive<f64, Mx>,
y: impl IntoReactive<f64, My>,
) -> Decorated<Self>
fn translation<Mx, My>( self, x: impl IntoReactive<f64, Mx>, y: impl IntoReactive<f64, My>, ) -> Decorated<Self>
x, y) points without relayout (animatable): the
animation-friendly sibling of .offset.Source§fn animation(self, anim: AnimSpec) -> Decorated<Self>
fn animation(self, anim: AnimSpec) -> Decorated<Self>
anim even outside a with_animation. SwiftUI’s
.animation. The ambient with_animation takes precedence when both apply.Source§fn overlay(self, over: impl Piece) -> Decorated<Self>
fn overlay(self, over: impl Piece) -> Decorated<Self>
over on top of this piece, centered, without affecting layout size: a badge /
annotation overlay. self is the sizing content (bottom of the z-order); over is proposed
self’s size and drawn on top. For an explicit alignment use Self::overlay_aligned; for
a stack that sizes to the union of its children use zstack.Source§fn overlay_aligned(self, align: Alignment, over: impl Piece) -> Decorated<Self>
fn overlay_aligned(self, align: Alignment, over: impl Piece) -> Decorated<Self>
Self::overlay with an explicit Alignment for the annotation (e.g. a corner badge with
Alignment::TopTrailing).Source§fn aspect_ratio(self, ratio: f64) -> Decorated<Self>
fn aspect_ratio(self, ratio: f64) -> Decorated<Self>
width / height ratio: the largest box of that shape which
fits whatever the parent offers (SwiftUI’s .aspectRatio(_:contentMode: .fit)). Read moreSource§fn grow(self) -> Decorated<Self>
fn grow(self) -> Decorated<Self>
Flex: the stack
offers it the space and it fills; no native backing, so this is a pure layout change.Source§fn grid_align(self, a: Alignment) -> Decorated<Self>
fn grid_align(self, a: Alignment) -> Decorated<Self>
grid
(docs/grid.md). Apply last (outermost), like Decorated::grid_span.Source§fn defers_system_gestures(self, edges: Edges) -> Decorated<Self>
fn defers_system_gestures(self, edges: Edges) -> Decorated<Self>
edges (docs/cover.md), the SwiftUI defersSystemGestures(on:)
analogue. Put it on a game or drawing surface whose touches run to the screen edge,
so a swipe up from the bottom doesn’t leave the app. iOS defers the chosen edges’
system gestures; Android enters swipe-to-reveal immersive mode while any subtree
requests deferral; desktop backends no-op.hidden is true, hide the system status bar, the
SwiftUI statusBarHidden(_:) analogue (docs/cover.md). hidden is a constant, a
Signal, or a closure, so a setting can turn it on and off in place. Put it on a page
that wants the whole screen (a reader, a game, a photo viewer); the bar returns when
the page unmounts. Any mounted request that answers true hides the bar. iOS, Android and
HarmonyOS hide it (Cap::StatusBarHidden); desktop and web have none and ignore it.Source§fn interactive_dismiss_disabled(self) -> Decorated<Self>
fn interactive_dismiss_disabled(self) -> Decorated<Self>
cover (or other modal surface) must
not be dismissed interactively, the SwiftUI interactiveDismissDisabled() analogue
(docs/cover.md). System back / sheet gestures are ignored; only programmatic writes
(an explicit close control) dismiss it.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more