pub struct Decorated<P> { /* private fields */ }Expand description
A piece with modifiers chained onto it, keeping the decorated piece’s type (§5.2).
Every Decorate modifier returns one of these rather than erasing to AnyPiece, which is
what lets a chain keep reaching the piece’s builder methods: label(…).padding(8.0) is
still a decorated Label, so .font(…) after it resolves. Modifiers applied to a Decorated
append in place (the inherent methods below shadow the trait’s), so a chain stays flat instead
of nesting Decorated<Decorated<…>>.
Modifiers fall into three classes (docs/api-style.md “Modifier classes”), and only one of them is ordered:
- Identity (
id,id_of) names the piece’s own node, the one its build returns, wherever it sits in the chain:label(t).padding(8.0).id(day_core::id!(x))andlabel(t).id(day_core::id!(x)).padding(8.0)are the same tree. - Wrapping modifiers (
padding,frame,background,grow, …) each add a node around what came before, so they compose outward in call order, as they read. - Outer-layout facts (
grid_span,grid_align) describe the piece to the container it sits in, so they land on the outermost node whatever wrappers follow them.
wrapper_id is the one way to name a wrapper deliberately: it tags whatever node is
outermost at the point it is called, for a frame assertion on a padded box.
Erase explicitly with .any() when a single AnyPiece is what’s needed (a Vec<AnyPiece>, a
-> AnyPiece signature).
Implementations§
Source§impl<P> Decorated<P>where
P: Piece,
impl<P> Decorated<P>where
P: Piece,
Sourcepub fn new(inner: P) -> Decorated<P>
pub fn new(inner: P) -> Decorated<P>
An undecorated piece, ready to have modifiers applied CONDITIONALLY. Starting here gives every branch the same type, so an optional modifier needs no erasure:
let leaf = Decorated::new(draw);
let leaf = match id { Some(id) => leaf.id(id), None => leaf };
let leaf = if editable { leaf.on_tap(f) } else { leaf };apply_if and apply_some are the same move as a
chain step.
Sourcepub fn map_inner<Q>(self, f: impl FnOnce(P) -> Q) -> Decorated<Q>where
Q: Piece,
pub fn map_inner<Q>(self, f: impl FnOnce(P) -> Q) -> Decorated<Q>where
Q: Piece,
Replace the undecorated piece, keeping the modifier chain: how a typed builder trait
reaches through a decoration (docs/api-style.md “Typed builders”). f sees the piece as
it was before any modifier, which is why modifier order stops mattering.
Sourcepub fn apply_if(
self,
cond: bool,
f: impl FnOnce(Decorated<P>) -> Decorated<P>,
) -> Decorated<P>
pub fn apply_if( self, cond: bool, f: impl FnOnce(Decorated<P>) -> Decorated<P>, ) -> Decorated<P>
Apply f to the chain when cond holds, else continue unchanged: the conditional
modifier, with no let x = if c { x.m() } else { x } rebinding and no erasure.
nav(sel).apply_if(!primary, |n| n.local())cond is a plain bool resolved at build, like the arms of a match; the modifiers
f applies may themselves be reactive.
Source§impl<P> Decorated<P>where
P: Piece,
impl<P> Decorated<P>where
P: Piece,
pub fn id(self, id: ElementId) -> Decorated<P>
pub fn id_of(self, id: impl Fn() -> ElementId + 'static) -> Decorated<P>
pub fn wrapper_id(self, id: ElementId) -> Decorated<P>
pub fn tweak(self, f: impl FnOnce(RNode) + 'static) -> Decorated<P>
pub fn selectable(self) -> Decorated<P>
pub fn cursor<M>(self, cursor: impl IntoReactive<Cursor, M>) -> Decorated<P>
pub fn native_ref(self, r: &NativeRef) -> Decorated<P>
pub fn window_drag_region(self) -> Decorated<P>
pub fn padding(self, insets: impl IntoInsets) -> Decorated<P>
pub fn max_width(self, max: f64) -> Decorated<P>
Sourcepub fn min_width(self, min: f64) -> Decorated<P>
pub fn min_width(self, min: f64) -> Decorated<P>
Never narrower than min: a stretching control keeps a usable width, and a row that
cannot give it that overflows, so a labeled row stacks the control under its label
rather than squeezing it (docs/forms.md).
pub fn reserving(self, sample: impl Into<String>) -> Decorated<P>
pub fn frame(self, width: f64, height: f64) -> Decorated<P>
pub fn width(self, width: f64) -> Decorated<P>
pub fn height(self, height: f64) -> Decorated<P>
pub fn a11y( self, f: impl FnOnce(A11yBuilder) -> A11yBuilder + 'static, ) -> Decorated<P>
Sourcepub fn on_tap(self, f: impl Fn() + 'static) -> Decorated<P>
pub fn on_tap(self, f: impl Fn() + 'static) -> Decorated<P>
Handle a tap gesture on this piece.
Do not use this to activate a native button; use crate::ButtonBuilder::action.
A separate gesture recognizer can delay pressed feedback and bypass native keyboard,
accessibility, and disabled behavior. Day warns when it attaches a tap to a button.
Sourcepub fn on_tap_at(self, f: impl Fn(Point) + 'static) -> Decorated<P>
pub fn on_tap_at(self, f: impl Fn(Point) + 'static) -> Decorated<P>
Handle a tap with its local position. Like Self::on_tap, this is a gesture,
not native button activation; use crate::ButtonBuilder::action for buttons.
pub fn focused<M>(self, binding: impl IntoFocusBinding<M>) -> Decorated<P>
pub fn on_key(self, f: impl Fn(&KeyEvent) + 'static) -> Decorated<P>
pub fn focusable(self) -> Decorated<P>
pub fn toolbar<M>(self, content: impl ToolbarContent<M>) -> Decorated<P>
Sourcepub fn searchable(self, search: Search) -> Decorated<P>
pub fn searchable(self, search: Search) -> Decorated<P>
See Decorate::searchable.
Sourcepub fn drag_source(
self,
source: impl Fn(Point) -> Option<Offer> + 'static,
) -> Decorated<P>
pub fn drag_source( self, source: impl Fn(Point) -> Option<Offer> + 'static, ) -> Decorated<P>
Offer data through the platform’s native drag session.
Sourcepub fn drop_target(self, target: Target) -> Decorated<P>
pub fn drop_target(self, target: Target) -> Decorated<P>
Attach native drop acceptance policy and an owned-data receiver.
pub fn on_drag(self, f: impl Fn(Drag) + 'static) -> Decorated<P>
pub fn on_pinch(self, f: impl Fn(Pinch) + 'static) -> Decorated<P>
pub fn on_pan(self, f: impl Fn(Pan) + 'static) -> Decorated<P>
Sourcepub fn on_hover(self, f: impl Fn(Option<Point>) + 'static) -> Decorated<P>
pub fn on_hover(self, f: impl Fn(Option<Point>) + 'static) -> Decorated<P>
The pointer moving over this piece: Some(point) in its own coordinates while inside,
None when it leaves (docs/canvas.md “Interaction”).
Pointer-only, which is not a gap: every desktop delivers it, an
iPad does with a trackpad or pencil, an Android device with a mouse or stylus, and a
touch-only phone delivers nothing at all. Anything reachable by hover must also be
reachable by a tap: wire on_tap_at alongside it, exactly as a chart’s selection does.
Sourcepub fn card(self) -> Decorated<P>
pub fn card(self) -> Decorated<P>
The platform’s card: the grouped-content surface (SurfaceRole::SectionCard) with
rounded corners and a Space::M inset. Drawn by the toolkit, so it follows the
appearance and never steals hit testing from the content.
pub fn background<M>(self, color: impl IntoReactive<Color, M>) -> Decorated<P>
pub fn corner_radius(self, radius: f64) -> Decorated<P>
pub fn opacity<M>(self, opacity: impl IntoReactive<f64, M>) -> Decorated<P>
pub fn transform<M>(self, t: impl IntoReactive<Transform, M>) -> Decorated<P>
pub fn scale<M>(self, factor: impl IntoReactive<f64, M>) -> Decorated<P>
pub fn rotation<M>(self, degrees: impl IntoReactive<f64, M>) -> Decorated<P>
pub fn translation<Mx, My>( self, x: impl IntoReactive<f64, Mx>, y: impl IntoReactive<f64, My>, ) -> Decorated<P>
pub fn animation(self, anim: AnimSpec) -> Decorated<P>
Sourcepub fn modifier(self, m: impl Modifier) -> AnyPiece
pub fn modifier(self, m: impl Modifier) -> AnyPiece
Erases, like Decorate::modifier: Modifier is defined over AnyPiece.
pub fn overlay(self, over: impl Piece) -> Decorated<P>
pub fn overlay_aligned(self, align: Alignment, over: impl Piece) -> Decorated<P>
pub fn aspect_ratio(self, ratio: f64) -> Decorated<P>
pub fn grow(self) -> Decorated<P>
pub fn grow_w(self) -> Decorated<P>
pub fn grow_h(self) -> Decorated<P>
pub fn grid_span(self, n: usize) -> Decorated<P>
pub fn grid_align(self, a: Alignment) -> Decorated<P>
pub fn defers_system_gestures(self, edges: Edges) -> Decorated<P>
pub fn interactive_dismiss_disabled(self) -> Decorated<P>
Trait Implementations§
Source§impl<DecoratedInner> AdaptiveBuilder for Decorated<DecoratedInner>where
DecoratedInner: AdaptiveBuilder + Piece,
impl<DecoratedInner> AdaptiveBuilder for Decorated<DecoratedInner>where
DecoratedInner: AdaptiveBuilder + Piece,
Source§impl<DecoratedInner> AsyncImageBuilder for Decorated<DecoratedInner>where
DecoratedInner: AsyncImageBuilder + Piece,
impl<DecoratedInner> AsyncImageBuilder for Decorated<DecoratedInner>where
DecoratedInner: AsyncImageBuilder + Piece,
Source§fn circle(self) -> Decorated<DecoratedInner>
fn circle(self) -> Decorated<DecoratedInner>
Source§fn content_mode(self, mode: ContentMode) -> Decorated<DecoratedInner>
fn content_mode(self, mode: ContentMode) -> Decorated<DecoratedInner>
Source§fn placeholder_color(self, color: Color) -> Decorated<DecoratedInner>
fn placeholder_color(self, color: Color) -> Decorated<DecoratedInner>
Source§impl<DecoratedInner> ButtonBuilder for Decorated<DecoratedInner>where
DecoratedInner: ButtonBuilder + Piece,
impl<DecoratedInner> ButtonBuilder for Decorated<DecoratedInner>where
DecoratedInner: ButtonBuilder + Piece,
Source§fn icon<M>(
self,
symbol: impl IntoReactive<Symbol, M>,
) -> Decorated<DecoratedInner>
fn icon<M>( self, symbol: impl IntoReactive<Symbol, M>, ) -> Decorated<DecoratedInner>
Source§fn image(self, name: impl Into<ImageName>) -> Decorated<DecoratedInner>
fn image(self, name: impl Into<ImageName>) -> Decorated<DecoratedInner>
Source§fn icon_only(self) -> Decorated<DecoratedInner>
fn icon_only(self) -> Decorated<DecoratedInner>
Source§fn action(self, f: impl Fn() + 'static) -> Decorated<DecoratedInner>
fn action(self, f: impl Fn() + 'static) -> Decorated<DecoratedInner>
Source§fn bordered(self) -> Decorated<DecoratedInner>
fn bordered(self) -> Decorated<DecoratedInner>
Source§fn enabled<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
fn enabled<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
true; false = disabled/grayed by the native
control). Reactive, so it can follow app state, e.g. .enabled(move || !busy.get()) to
lock a control while a long operation runs. Read moreSource§fn prominent(self) -> Decorated<DecoratedInner>
fn prominent(self) -> Decorated<DecoratedInner>
Source§fn tint<M>(
self,
color: impl IntoReactive<Color, M>,
) -> Decorated<DecoratedInner>
fn tint<M>( self, color: impl IntoReactive<Color, M>, ) -> Decorated<DecoratedInner>
Source§fn compact(self) -> Decorated<DecoratedInner>
fn compact(self) -> Decorated<DecoratedInner>
Source§fn plain(self) -> Decorated<DecoratedInner>
fn plain(self) -> Decorated<DecoratedInner>
Source§fn selected<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
fn selected<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
UIButton.isSelected, GTK’s :checked, a checked QPushButton, a checked
MaterialButton, aria-pressed on the web) and announces it as selected, while the
button stays enabled, focusable and activatable, which a disabled stand-in is not. Read moreSource§impl<DecoratedInner> ColorPickerBuilder for Decorated<DecoratedInner>where
DecoratedInner: ColorPickerBuilder + Piece,
impl<DecoratedInner> ColorPickerBuilder for Decorated<DecoratedInner>where
DecoratedInner: ColorPickerBuilder + Piece,
Source§fn alpha(self) -> Decorated<DecoratedInner>
fn alpha(self) -> Decorated<DecoratedInner>
<input type="color"> gained an alpha attribute only recently, so the web arm sets it
and stays opaque where the browser has not shipped it (docs/colorpicker.md).Source§fn idiom(self, idiom: PickerIdiom) -> Decorated<DecoratedInner>
fn idiom(self, idiom: PickerIdiom) -> Decorated<DecoratedInner>
PickerIdiom).Source§fn native(self) -> Decorated<DecoratedInner>
fn native(self) -> Decorated<DecoratedInner>
PickerIdiom::Native.Source§fn composed(self) -> Decorated<DecoratedInner>
fn composed(self) -> Decorated<DecoratedInner>
PickerIdiom::Composed.Source§fn title<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
fn title<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
QColorDialog’s window title, the XAML button’s tooltip; AppKit sets the shared color
panel’s title. Composed: the panel’s own heading. A constant, Signal<String> or closure,
read once at build.Source§impl<DecoratedInner> ColumnBuilder for Decorated<DecoratedInner>where
DecoratedInner: ColumnBuilder + Piece,
impl<DecoratedInner> ColumnBuilder for Decorated<DecoratedInner>where
DecoratedInner: ColumnBuilder + Piece,
Source§impl<DecoratedInner> ComboBoxBuilder for Decorated<DecoratedInner>where
DecoratedInner: ComboBoxBuilder + Piece,
impl<DecoratedInner> ComboBoxBuilder for Decorated<DecoratedInner>where
DecoratedInner: ComboBoxBuilder + Piece,
Source§fn placeholder<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
fn placeholder<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
Signal<String>, or
closure, evaluated once for the initial value; not reactive after build).Source§impl<R, DecoratedInner> CoverBuilder<R> for Decorated<DecoratedInner>
impl<R, DecoratedInner> CoverBuilder<R> for Decorated<DecoratedInner>
Source§fn sheet(self) -> Decorated<DecoratedInner>
fn sheet(self) -> Decorated<DecoratedInner>
Source§fn half_sheet(self) -> Decorated<DecoratedInner>
fn half_sheet(self) -> Decorated<DecoratedInner>
Cover::sheet.Source§impl<DecoratedInner> DatePickerBuilder for Decorated<DecoratedInner>where
DecoratedInner: DatePickerBuilder + Piece,
impl<DecoratedInner> DatePickerBuilder for Decorated<DecoratedInner>where
DecoratedInner: DatePickerBuilder + Piece,
fn compact(self) -> Decorated<DecoratedInner>
fn inline(self) -> Decorated<DecoratedInner>
fn style(self, style: Style) -> Decorated<DecoratedInner>
Source§impl<DecoratedInner> DividerBuilder for Decorated<DecoratedInner>where
DecoratedInner: DividerBuilder + Piece,
impl<DecoratedInner> DividerBuilder for Decorated<DecoratedInner>where
DecoratedInner: DividerBuilder + Piece,
Source§impl<DecoratedInner> FormSectionBuilder for Decorated<DecoratedInner>where
DecoratedInner: FormSectionBuilder + Piece,
impl<DecoratedInner> FormSectionBuilder for Decorated<DecoratedInner>where
DecoratedInner: FormSectionBuilder + Piece,
Source§fn title<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
fn title<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
Source§impl<DecoratedInner> GridBuilder for Decorated<DecoratedInner>where
DecoratedInner: GridBuilder + Piece,
impl<DecoratedInner> GridBuilder for Decorated<DecoratedInner>where
DecoratedInner: GridBuilder + Piece,
Source§impl<DecoratedInner> GridRowBuilder for Decorated<DecoratedInner>where
DecoratedInner: GridRowBuilder + Piece,
impl<DecoratedInner> GridRowBuilder for Decorated<DecoratedInner>where
DecoratedInner: GridRowBuilder + Piece,
Source§impl<DecoratedInner> ImageBuilder for Decorated<DecoratedInner>where
DecoratedInner: ImageBuilder + Piece,
impl<DecoratedInner> ImageBuilder for Decorated<DecoratedInner>where
DecoratedInner: ImageBuilder + Piece,
Source§fn content_mode(self, m: ContentMode) -> Decorated<DecoratedInner>
fn content_mode(self, m: ContentMode) -> Decorated<DecoratedInner>
ContentMode::Fit).Source§fn fit(self) -> Decorated<DecoratedInner>
fn fit(self) -> Decorated<DecoratedInner>
Source§fn fill(self) -> Decorated<DecoratedInner>
fn fill(self) -> Decorated<DecoratedInner>
Source§fn stretch(self) -> Decorated<DecoratedInner>
fn stretch(self) -> Decorated<DecoratedInner>
Source§fn aspect_ratio(self, ratio: f64) -> Decorated<DecoratedInner>
fn aspect_ratio(self, ratio: f64) -> Decorated<DecoratedInner>
width / height ratio (e.g. 16.0 / 9.0).Source§fn decorative(self) -> Decorated<DecoratedInner>
fn decorative(self) -> Decorated<DecoratedInner>
Source§impl<DecoratedInner> InspectorBuilder for Decorated<DecoratedInner>where
DecoratedInner: InspectorBuilder + Piece,
impl<DecoratedInner> InspectorBuilder for Decorated<DecoratedInner>where
DecoratedInner: InspectorBuilder + Piece,
Source§fn width(self, width: f64) -> Decorated<DecoratedInner>
fn width(self, width: f64) -> Decorated<DecoratedInner>
INSPECTOR_WIDTH). Where the native
pane has a user-draggable divider this is the initial width, not a limit.Source§fn not_scrollable(self) -> Decorated<DecoratedInner>
fn not_scrollable(self) -> Decorated<DecoratedInner>
Source§fn sheet_done<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
fn sheet_done<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
✕). Pass a localized
“Done”; the sheet is the one home where the panel needs its own way out.Source§fn edge(self, edge: PaneEdge) -> Decorated<DecoratedInner>
fn edge(self, edge: PaneEdge) -> Decorated<DecoratedInner>
PaneEdge::Trailing.Source§fn half_sheet(self) -> Decorated<DecoratedInner>
fn half_sheet(self) -> Decorated<DecoratedInner>
Cover::half_sheet.
Default: the fullscreen sheet.Source§impl<DecoratedInner> LabelBuilder for Decorated<DecoratedInner>where
DecoratedInner: LabelBuilder + Piece,
impl<DecoratedInner> LabelBuilder for Decorated<DecoratedInner>where
DecoratedInner: LabelBuilder + Piece,
Source§fn single_line(self) -> Decorated<DecoratedInner>
fn single_line(self) -> Decorated<DecoratedInner>
Source§fn max_lines(self, lines: u32) -> Decorated<DecoratedInner>
fn max_lines(self, lines: u32) -> Decorated<DecoratedInner>
Source§fn font(self, f: Font) -> Decorated<DecoratedInner>
fn font(self, f: Font) -> Decorated<DecoratedInner>
Font::Title, Font::Footnote, …) or a custom Font::System(pt).
Backends render it with the platform’s native style + accessibility text scaling.Source§fn font_scale(self, scale: f64) -> Decorated<DecoratedInner>
fn font_scale(self, scale: f64) -> Decorated<DecoratedInner>
Source§fn weight(self, w: FontWeight) -> Decorated<DecoratedInner>
fn weight(self, w: FontWeight) -> Decorated<DecoratedInner>
FontWeight::Semibold). See also Label::bold.Source§fn secondary(self) -> Decorated<DecoratedInner>
fn secondary(self) -> Decorated<DecoratedInner>
secondaryLabelColor on Apple, ?android:textColorSecondary, a dim label on GTK). Read moreSource§fn tabular(self) -> Decorated<DecoratedInner>
fn tabular(self) -> Decorated<DecoratedInner>
Source§fn monospace(self) -> Decorated<DecoratedInner>
fn monospace(self) -> Decorated<DecoratedInner>
Source§fn runs(self, runs: Vec<TextRun>) -> Decorated<DecoratedInner>
fn runs(self, runs: Vec<TextRun>) -> Decorated<DecoratedInner>
Source§fn runs_from(self, b: TextBuilder) -> Decorated<DecoratedInner>
fn runs_from(self, b: TextBuilder) -> Decorated<DecoratedInner>
TextBuilder, replacing whatever text the label
was built with. This is the intended entry point: the builder guarantees the ranges match
the string, which is the invariant hand-written runs get wrong.Source§fn align(self, align: TextAlign) -> Decorated<DecoratedInner>
fn align(self, align: TextAlign) -> Decorated<DecoratedInner>
**bold**, *italic*,
`code`, ~~strike~~ and [text](url) become styled runs, and the markers themselves
are stripped. Read morefn markdown(self) -> Decorated<DecoratedInner>
Source§fn on_link(self, f: impl Fn(&str) + 'static) -> Decorated<DecoratedInner>
fn on_link(self, f: impl Fn(&str) + 'static) -> Decorated<DecoratedInner>
Source§fn color<M>(self, c: impl IntoReactive<Color, M>) -> Decorated<DecoratedInner>
fn color<M>(self, c: impl IntoReactive<Color, M>) -> Decorated<DecoratedInner>
Signal<Color>, or a Fn() -> Color. A reactive
source recolors the native label when it changes (theme systems ride this).Source§fn preset(self, preset: &TextPreset) -> Decorated<DecoratedInner>
fn preset(self, preset: &TextPreset) -> Decorated<DecoratedInner>
TextPreset: the font, weight, scale, emphasis and
color an app defined once (label(t).preset(&CAPTION)).Source§impl<DecoratedInner> LinkBuilder for Decorated<DecoratedInner>where
DecoratedInner: LinkBuilder + Piece,
impl<DecoratedInner> LinkBuilder for Decorated<DecoratedInner>where
DecoratedInner: LinkBuilder + Piece,
Source§impl<S, DecoratedInner> ListBuilder<S> for Decorated<DecoratedInner>
impl<S, DecoratedInner> ListBuilder<S> for Decorated<DecoratedInner>
Source§fn row_height(self, h: RowHeight) -> Decorated<DecoratedInner>
fn row_height(self, h: RowHeight) -> Decorated<DecoratedInner>
Uniform(h) (fastest) or Automatic (self-sizing).Source§fn on_activate(
self,
f: impl Fn(<S as RowSource>::Ref) + 'static,
) -> Decorated<DecoratedInner>
fn on_activate( self, f: impl Fn(<S as RowSource>::Ref) + 'static, ) -> Decorated<DecoratedInner>
Source§fn on_select(
self,
f: impl Fn(<S as RowSource>::Ref) + 'static,
) -> Decorated<DecoratedInner>
fn on_select( self, f: impl Fn(<S as RowSource>::Ref) + 'static, ) -> Decorated<DecoratedInner>
Elem handle for a store source.Source§fn multi_select(self) -> Decorated<DecoratedInner>
fn multi_select(self) -> Decorated<DecoratedInner>
Self::on_selection with the full set of selected rows.Source§fn on_selection(
self,
f: impl Fn(Vec<<S as RowSource>::Ref>) + 'static,
) -> Decorated<DecoratedInner>
fn on_selection( self, f: impl Fn(Vec<<S as RowSource>::Ref>) + 'static, ) -> Decorated<DecoratedInner>
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,
) -> Decorated<DecoratedInner>
fn selected_rows( self, rows: impl Fn() -> Vec<usize> + 'static, ) -> Decorated<DecoratedInner>
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>>,
) -> Decorated<DecoratedInner>
fn selection( self, selected: impl Binding<Option<u64>>, ) -> Decorated<DecoratedInner>
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) -> Decorated<DecoratedInner>
fn scroll_to_end(self, trigger: Trigger) -> Decorated<DecoratedInner>
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) -> Decorated<DecoratedInner>
fn stick_to_bottom(self) -> Decorated<DecoratedInner>
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>>,
) -> Decorated<DecoratedInner>
fn scroll_to_row( self, target: impl Binding<Option<usize>>, ) -> Decorated<DecoratedInner>
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>,
) -> Decorated<DecoratedInner>
fn first_visible_row( self, first: impl Binding<usize>, ) -> Decorated<DecoratedInner>
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) -> Decorated<DecoratedInner>
fn reorderable(self, reorder: Reorder) -> Decorated<DecoratedInner>
Source§fn swipe_leading(
self,
provider: impl Fn(usize) -> Vec<SwipeAction> + 'static,
) -> Decorated<DecoratedInner>
fn swipe_leading( self, provider: impl Fn(usize) -> Vec<SwipeAction> + 'static, ) -> Decorated<DecoratedInner>
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,
) -> Decorated<DecoratedInner>
fn swipe_trailing( self, provider: impl Fn(usize) -> Vec<SwipeAction> + 'static, ) -> Decorated<DecoratedInner>
swipe_leading.Source§fn separators(self) -> Decorated<DecoratedInner>
fn separators(self) -> Decorated<DecoratedInner>
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) -> Decorated<DecoratedInner>
fn no_separators(self) -> Decorated<DecoratedInner>
Source§impl<DecoratedInner> ListItemBuilder for Decorated<DecoratedInner>where
DecoratedInner: ListItemBuilder + Piece,
impl<DecoratedInner> ListItemBuilder for Decorated<DecoratedInner>where
DecoratedInner: ListItemBuilder + Piece,
Source§fn subtitle<M>(self, text: impl IntoText<M>) -> Decorated<DecoratedInner>
fn subtitle<M>(self, text: impl IntoText<M>) -> Decorated<DecoratedInner>
Source§fn detail<M>(self, text: impl IntoText<M>) -> Decorated<DecoratedInner>
fn detail<M>(self, text: impl IntoText<M>) -> Decorated<DecoratedInner>
Source§fn icon<M>(
self,
name: impl IntoReactive<VectorName, M>,
) -> Decorated<DecoratedInner>
fn icon<M>( self, name: impl IntoReactive<VectorName, M>, ) -> Decorated<DecoratedInner>
res::vectors::…), drawn as a template in the
foreground color unless Self::icon_tint names one. A signal or closure swaps it in
place.Source§fn symbol(self, symbol: Symbol) -> Decorated<DecoratedInner>
fn symbol(self, symbol: Symbol) -> Decorated<DecoratedInner>
Source§fn refreshable<M>(
self,
refreshing: impl IntoReactive<bool, M>,
action: impl Fn() + 'static,
) -> Decorated<DecoratedInner>
fn refreshable<M>( self, refreshing: impl IntoReactive<bool, M>, action: impl Fn() + 'static, ) -> Decorated<DecoratedInner>
refreshing is app-owned: set it synchronously when accepting a request and clear it
on completion, failure or cancellation. Repeated pulls while busy are ignored. A
declined request stops the indicator immediately. Programmatic state writes never
call action. The handler and state bindings live only as long as this navigation.Source§fn sections(self, sections: Sections) -> Decorated<DecoratedInner>
fn sections(self, sections: Sections) -> Decorated<DecoratedInner>
Sections value:
nav(sel).sections(Sections::restored("nav.sections").on_change(f)).Source§fn section_id<M>(
self,
id: impl Into<String>,
title: impl IntoText<M>,
content: impl NavContent<K>,
) -> Decorated<DecoratedInner>
fn section_id<M>( self, id: impl Into<String>, title: impl IntoText<M>, content: impl NavContent<K>, ) -> Decorated<DecoratedInner>
content (one item, a tuple, an Option, a nav_items block, or a mix).Source§fn reorder_items(
self,
eligible: impl Fn(&K) -> bool + 'static,
moved: impl Fn(K, K) + 'static,
) -> Decorated<DecoratedInner>
fn reorder_items( self, eligible: impl Fn(&K) -> bool + 'static, moved: impl Fn(K, K) + 'static, ) -> Decorated<DecoratedInner>
Cap::NavReorder supports it; otherwise
retains the native navigation widget. UIKit navigation remains fixed even though
content lists support dragging. Tab/rail chrome remains fixed. Persist the order in the callback’s backing data.Source§fn retain_selection_when(
self,
keep: impl Fn(&K) -> bool + 'static,
) -> Decorated<DecoratedInner>
fn retain_selection_when( self, keep: impl Fn(&K) -> bool + 'static, ) -> Decorated<DecoratedInner>
keep returns true.
Useful for filtered sidebars: reading a feed’s last unread article can hide its row
without closing the article. The native sidebar then has no highlighted row.
Return false for deleted records to retain the normal selection-reset behavior.
Evaluated when the item list changes; pair with Self::destination for dynamic keys.Source§fn icon_progress(
self,
progress: impl Fn() -> Vec<(K, Option<f64>)> + 'static,
) -> Decorated<DecoratedInner>
fn icon_progress( self, progress: impl Fn() -> Vec<(K, Option<f64>)> + 'static, ) -> Decorated<DecoratedInner>
.items.fn style(self, style: NavStyle) -> Decorated<DecoratedInner>
Source§fn title<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
fn title<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
Source§fn section<M>(
self,
title: impl IntoText<M>,
content: impl NavContent<K>,
) -> Decorated<DecoratedInner>
fn section<M>( self, title: impl IntoText<M>, content: impl NavContent<K>, ) -> Decorated<DecoratedInner>
Source§fn header<P>(
self,
build: impl FnOnce() -> P + 'static,
) -> Decorated<DecoratedInner>where
P: Piece,
fn header<P>(
self,
build: impl FnOnce() -> P + 'static,
) -> Decorated<DecoratedInner>where
P: Piece,
Self::header, this slot applies to sidebar navigation, not tab/rail chrome.Source§fn presentation(
self,
presentation: NavPresentation,
) -> Decorated<DecoratedInner>
fn presentation( self, presentation: NavPresentation, ) -> Decorated<DecoratedInner>
Source§fn content_list(self, list: ContentList<K>) -> Decorated<DecoratedInner>
fn content_list(self, list: ContentList<K>) -> Decorated<DecoratedInner>
ContentList value: Read moreSource§fn item<M, P>(
self,
key: impl Into<K>,
title: impl IntoText<M>,
build: impl Fn() -> P + 'static,
) -> Decorated<DecoratedInner>where
P: Piece,
fn item<M, P>(
self,
key: impl Into<K>,
title: impl IntoText<M>,
build: impl Fn() -> P + 'static,
) -> Decorated<DecoratedInner>where
P: Piece,
item(key, title).page(build) in one call. key addresses it
(navigate / deep link / dayscript); title is its label; build runs when the item is
first shown. For a typed nav over Option<Section> pass the bare Section::X. For an
icon, a badge or a tint, build the item value and add it with items.Source§fn items(self, content: impl NavContent<K>) -> Decorated<DecoratedInner>
fn items(self, content: impl NavContent<K>) -> Decorated<DecoratedInner>
Source§fn destination<P>(
self,
build: impl Fn(&K) -> P + 'static,
) -> Decorated<DecoratedInner>where
P: Piece,
fn destination<P>(
self,
build: impl Fn(&K) -> P + 'static,
) -> Decorated<DecoratedInner>where
P: Piece,
page of its own (the rows
of a data-driven block). Mirrors NavStack::destination; unused for a nav whose items
all carry a page.Source§fn local(self) -> Decorated<DecoratedInner>
fn local(self) -> Decorated<DecoratedInner>
current_route nor intercepts navigate/deep links. Read moreSource§fn restore(self, key: impl Into<String>) -> Decorated<DecoratedInner>
fn restore(self, key: impl Into<String>) -> Decorated<DecoratedInner>
key on every change and restored at build (so the app reopens on the tab/section
the user last had) unless a launch deep link is pending, which wins. day::launch
installs the preferences as the store (docs/navigation.md); a stale saved
key (its item no longer exists) is ignored. Works whether or not the nav is
routed.Source§fn toolbar<M>(
self,
content: impl ToolbarContent<M>,
) -> Decorated<DecoratedInner>
fn toolbar<M>( self, content: impl ToolbarContent<M>, ) -> Decorated<DecoratedInner>
fn title<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
Source§fn toolbar<M>(
self,
content: impl ToolbarContent<M>,
) -> Decorated<DecoratedInner>
fn toolbar<M>( self, content: impl ToolbarContent<M>, ) -> Decorated<DecoratedInner>
Source§fn destination<P>(
self,
build: impl Fn(&K) -> P + 'static,
) -> Decorated<DecoratedInner>where
P: Piece,
fn destination<P>(
self,
build: impl Fn(&K) -> P + 'static,
) -> Decorated<DecoratedInner>where
P: Piece,
&String for raw keys, the typed value otherwise).Source§fn on_back(
self,
guard: impl Fn(BackRequest) -> BackResponse + 'static,
) -> Decorated<DecoratedInner>
fn on_back( self, guard: impl Fn(BackRequest) -> BackResponse + 'static, ) -> Decorated<DecoratedInner>
nav_back while the stack is above its root; it returns
BackResponse::Proceed to pop now or BackResponse::Handled to consume the back
(stash the BackRequest and call BackRequest::proceed later). Programmatic path
writes are never guarded. While a guard is armed the toolkit stops auto-popping on a
native gesture and routes the back through Day instead (NavPatch::GuardTop).Source§fn restore(self, key: impl Into<String>) -> Decorated<DecoratedInner>
fn restore(self, key: impl Into<String>) -> Decorated<DecoratedInner>
/-joined and saved under key; at build the saved path is parsed back (each
segment via Route::from_key) and restored, so the app reopens exactly where the user
left off, including after an Android process death, unless a launch deep link is pending,
which wins. day::launch installs the preferences as the store (docs/navigation.md); a
saved path with a segment that no longer parses is ignored whole.Source§impl<DecoratedInner> PickerBuilder for Decorated<DecoratedInner>where
DecoratedInner: PickerBuilder + Piece,
impl<DecoratedInner> PickerBuilder for Decorated<DecoratedInner>where
DecoratedInner: PickerBuilder + Piece,
Source§fn enabled<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
fn enabled<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
true); a constant or a reactive bool.Source§fn separators_before(
self,
indexes: impl IntoIterator<Item = usize>,
) -> Decorated<DecoratedInner>
fn separators_before( self, indexes: impl IntoIterator<Item = usize>, ) -> Decorated<DecoratedInner>
fn segmented(self) -> Decorated<DecoratedInner>
fn inline(self) -> Decorated<DecoratedInner>
fn style(self, style: PickerStyle) -> Decorated<DecoratedInner>
Source§impl<DecoratedInner> ProgressBuilder for Decorated<DecoratedInner>where
DecoratedInner: ProgressBuilder + Piece,
impl<DecoratedInner> ProgressBuilder for Decorated<DecoratedInner>where
DecoratedInner: ProgressBuilder + Piece,
Source§impl<DecoratedInner> PullRefreshBuilder for Decorated<DecoratedInner>where
DecoratedInner: PullRefreshBuilder + Piece,
impl<DecoratedInner> PullRefreshBuilder for Decorated<DecoratedInner>where
DecoratedInner: PullRefreshBuilder + Piece,
Source§fn on_refresh(self, f: impl Fn() + 'static) -> Decorated<DecoratedInner>
fn on_refresh(self, f: impl Fn() + 'static) -> Decorated<DecoratedInner>
f when a refresh BEGINS (user pull, dayscript toggle, or programmatic
refreshing.set(true) routed through a pull). Start the reload here and set the bound
signal back to false when it completes.Source§impl<DecoratedInner> RowBuilder for Decorated<DecoratedInner>where
DecoratedInner: RowBuilder + Piece,
impl<DecoratedInner> RowBuilder for Decorated<DecoratedInner>where
DecoratedInner: RowBuilder + Piece,
Source§impl<DecoratedInner> ScrollBuilder for Decorated<DecoratedInner>where
DecoratedInner: ScrollBuilder + Piece,
impl<DecoratedInner> ScrollBuilder for Decorated<DecoratedInner>where
DecoratedInner: ScrollBuilder + Piece,
Source§fn horizontal(self) -> Decorated<DecoratedInner>
fn horizontal(self) -> Decorated<DecoratedInner>
Source§fn scroll_target(
self,
target: impl Binding<Option<ScrollTarget>>,
) -> Decorated<DecoratedInner>
fn scroll_target( self, target: impl Binding<Option<ScrollTarget>>, ) -> Decorated<DecoratedInner>
Some(target) written to sig scrolls
there (animated), then the signal resets to None. Write-and-forget, so the same
target can be sent twice in a row. Read moreSource§impl<DecoratedInner> SearchFieldBuilder for Decorated<DecoratedInner>where
DecoratedInner: SearchFieldBuilder + Piece,
impl<DecoratedInner> SearchFieldBuilder for Decorated<DecoratedInner>where
DecoratedInner: SearchFieldBuilder + Piece,
Source§fn placeholder<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
fn placeholder<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
Signal<String>, or
closure, evaluated once for the initial value; the placeholder is not reactive after build).Source§impl<DecoratedInner> ShapePieceBuilder for Decorated<DecoratedInner>where
DecoratedInner: ShapePieceBuilder + Piece,
impl<DecoratedInner> ShapePieceBuilder for Decorated<DecoratedInner>where
DecoratedInner: ShapePieceBuilder + Piece,
fn fill<M>(self, p: impl IntoReactive<Color, M>) -> Decorated<DecoratedInner>
Source§fn fill_linear<M>(
self,
g: impl IntoReactive<LinearGradient, M>,
) -> Decorated<DecoratedInner>
fn fill_linear<M>( self, g: impl IntoReactive<LinearGradient, M>, ) -> Decorated<DecoratedInner>
LinearGradient (unit points resolve against the shape’s bounds). Takes
precedence over Self::fill when both are set; reactive like every other property:
rectangle().fill_linear(move || sky_gradient(state.get())).Source§fn fill_radial<M>(
self,
g: impl IntoReactive<RadialGradient, M>,
) -> Decorated<DecoratedInner>
fn fill_radial<M>( self, g: impl IntoReactive<RadialGradient, M>, ) -> Decorated<DecoratedInner>
RadialGradient (center + radius in the unit space of the shape’s bounds,
stretching elliptically in non-square bounds). Precedence: radial over linear over solid.fn stroke<M1, M2>( self, color: impl IntoReactive<Color, M1>, width: impl IntoReactive<f64, M2>, ) -> Decorated<DecoratedInner>
Source§fn inset<M>(self, v: impl IntoReactive<f64, M>) -> Decorated<DecoratedInner>
fn inset<M>(self, v: impl IntoReactive<f64, M>) -> Decorated<DecoratedInner>
Source§fn rotate<M>(self, deg: impl IntoReactive<f64, M>) -> Decorated<DecoratedInner>
fn rotate<M>(self, deg: impl IntoReactive<f64, M>) -> Decorated<DecoratedInner>
Source§fn scale<M>(self, s: impl IntoReactive<f64, M>) -> Decorated<DecoratedInner>
fn scale<M>(self, s: impl IntoReactive<f64, M>) -> Decorated<DecoratedInner>
Source§fn offset<M1, M2>(
self,
x: impl IntoReactive<f64, M1>,
y: impl IntoReactive<f64, M2>,
) -> Decorated<DecoratedInner>
fn offset<M1, M2>( self, x: impl IntoReactive<f64, M1>, y: impl IntoReactive<f64, M2>, ) -> Decorated<DecoratedInner>
Source§fn at(self, fx: f64, fy: f64, fw: f64, fh: f64) -> Decorated<DecoratedInner>
fn at(self, fx: f64, fy: f64, fw: f64, fh: f64) -> Decorated<DecoratedInner>
(fx, fy, fw, fh) of its bounds
(unit-space, applied before Self::inset). The workhorse for composing glyphs in a
shape_group, mirroring hand-drawn Rect::new(ox + fx * s, oy + fy * s, …) canvas code.Source§impl<DecoratedInner> SliderBuilder for Decorated<DecoratedInner>where
DecoratedInner: SliderBuilder + Piece,
impl<DecoratedInner> SliderBuilder for Decorated<DecoratedInner>where
DecoratedInner: SliderBuilder + Piece,
Source§impl<DecoratedInner> SplitBuilder for Decorated<DecoratedInner>where
DecoratedInner: SplitBuilder + Piece,
impl<DecoratedInner> SplitBuilder for Decorated<DecoratedInner>where
DecoratedInner: SplitBuilder + Piece,
Source§fn axis<M>(
self,
axis: impl IntoReactive<SplitAxis, M>,
) -> Decorated<DecoratedInner>
fn axis<M>( self, axis: impl IntoReactive<SplitAxis, M>, ) -> Decorated<DecoratedInner>
SplitAxis::Horizontal, the default) or stacked; a signal or a closure
turns the split live, keeping the share.Source§impl<DecoratedInner> SwiftUiBuilder for Decorated<DecoratedInner>where
DecoratedInner: SwiftUiBuilder + Piece,
impl<DecoratedInner> SwiftUiBuilder for Decorated<DecoratedInner>where
DecoratedInner: SwiftUiBuilder + Piece,
Source§fn params<M>(
self,
params: impl IntoReactive<String, M>,
) -> Decorated<DecoratedInner>
fn params<M>( self, params: impl IntoReactive<String, M>, ) -> Decorated<DecoratedInner>
Signal<String>, or a Fn() -> String. When it’s
reactive the hosted view follows it live: each change re-invokes the provider’s body with
the new JSON (@State inside the view survives, see the crate docs).Source§fn state_key(self, key: impl Into<String>) -> Decorated<DecoratedInner>
fn state_key(self, key: impl Into<String>) -> Decorated<DecoratedInner>
when() going false, a page navigation) disposes the
hosting view and its @State with it; with one, the native half retains the hosting view
under key and hands the same instance back on the next mount, so sliders, scroll
positions, @State/@StateObject all survive, and the mount’s current params are
re-applied. Read moreSource§impl<DecoratedInner> TextAreaBuilder for Decorated<DecoratedInner>where
DecoratedInner: TextAreaBuilder + Piece,
impl<DecoratedInner> TextAreaBuilder for Decorated<DecoratedInner>where
DecoratedInner: TextAreaBuilder + Piece,
Source§fn placeholder<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
fn placeholder<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
Signal<String>, or
closure, evaluated once for the initial value; not reactive after build).Source§fn min_lines(self, lines: u32) -> Decorated<DecoratedInner>
fn min_lines(self, lines: u32) -> Decorated<DecoratedInner>
Source§fn max_lines(self, lines: u32) -> Decorated<DecoratedInner>
fn max_lines(self, lines: u32) -> Decorated<DecoratedInner>
0 (the
default) means unbounded: the editor keeps growing and never scrolls.Source§fn editable<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
fn editable<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
true; false = read-only). Reactive.Source§fn selectable<M>(
self,
v: impl IntoReactive<bool, M>,
) -> Decorated<DecoratedInner>
fn selectable<M>( self, v: impl IntoReactive<bool, M>, ) -> Decorated<DecoratedInner>
true). Reactive. Unsupported on
backends where selection is always on (GTK).Source§fn spellcheck<M>(
self,
v: impl IntoReactive<bool, M>,
) -> Decorated<DecoratedInner>
fn spellcheck<M>( self, v: impl IntoReactive<bool, M>, ) -> Decorated<DecoratedInner>
true). Reactive.
Unsupported on backends with no built-in spell-check (GTK, Qt).Source§fn on_submit(self, f: impl Fn() + 'static) -> Decorated<DecoratedInner>
fn on_submit(self, f: impl Fn() + 'static) -> Decorated<DecoratedInner>
f instead of inserting a newline, the chat-composer
contract. Shift+Enter still inserts a line break on desktop and ArkUI; Android and
ArkUI show a Send action on the soft keyboard; iOS’s return key submits. Backends without
the intercept (web-dom today) keep inserting newlines, so pair this with a visible send button. The
bound text signal is already up to date when f runs.Source§impl<DecoratedInner> TextEditorBuilder for Decorated<DecoratedInner>where
DecoratedInner: TextEditorBuilder + Piece,
impl<DecoratedInner> TextEditorBuilder for Decorated<DecoratedInner>where
DecoratedInner: TextEditorBuilder + Piece,
Source§fn highlight(
self,
f: impl Fn(&str) -> Vec<TextRun> + 'static,
) -> Decorated<DecoratedInner>
fn highlight( self, f: impl Fn(&str) -> Vec<TextRun> + 'static, ) -> Decorated<DecoratedInner>
f turns the text into runs, and runs again after every edit
(and whenever a signal it reads changes). The runs reach the native view as an attributes
patch, so the caret and the platform’s undo stack stay put. highlight::highlighter
builds f for the languages the crate knows.Source§fn highlight_limit(self, bytes: usize) -> Decorated<DecoratedInner>
fn highlight_limit(self, bytes: usize) -> Decorated<DecoratedInner>
TextEditor::highlight leaves the text plain (default
HIGHLIGHT_LIMIT, 512 KiB). The tokenizers are linear, but every keystroke restyles
the whole document in the native view, and a body of hundreds of thousands of runs is
where that stops feeling like typing. A read-only body is styled once and can afford
more: raise it there.Source§fn single_line(self) -> Decorated<DecoratedInner>
fn single_line(self) -> Decorated<DecoratedInner>
text_field. Enter submits
(TextEditor::on_submit) and inserts nothing; a pasted newline becomes a space. For a
URL bar or a header value that wants template tags or other runs drawn inline.Source§fn on_submit(self, f: impl Fn() + 'static) -> Decorated<DecoratedInner>
fn on_submit(self, f: impl Fn() + 'static) -> Decorated<DecoratedInner>
TextEditor::single_line editor (and what a dayscript submit
step delivers).Source§fn code(self) -> Decorated<DecoratedInner>
fn code(self) -> Decorated<DecoratedInner>
Source§fn indent(self, spaces: u8) -> Decorated<DecoratedInner>
fn indent(self, spaces: u8) -> Decorated<DecoratedInner>
TextEditor::code.Source§fn selection(self, sel: impl Binding<Range<usize>>) -> Decorated<DecoratedInner>
fn selection(self, sel: impl Binding<Range<usize>>) -> Decorated<DecoratedInner>
doc.text, two-way: the user moving the caret
writes it, and writing it moves the caret. Collapsed when start == end.Source§fn typing_style(
self,
style: impl Binding<RunStyle>,
) -> Decorated<DecoratedInner>
fn typing_style( self, style: impl Binding<RunStyle>, ) -> Decorated<DecoratedInner>
Source§fn base(self, base: Font) -> Decorated<DecoratedInner>
fn base(self, base: Font) -> Decorated<DecoratedInner>
Body).fn editable<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
Source§fn no_spellcheck(self) -> Decorated<DecoratedInner>
fn no_spellcheck(self) -> Decorated<DecoratedInner>
code does
this too.fn placeholder<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
Source§fn min_lines(self, n: u32) -> Decorated<DecoratedInner>
fn min_lines(self, n: u32) -> Decorated<DecoratedInner>
min_lines, grows to max_lines and then
scrolls (0 = unbounded).fn max_lines(self, n: u32) -> Decorated<DecoratedInner>
Source§impl<DecoratedInner> TextFieldBuilder for Decorated<DecoratedInner>where
DecoratedInner: TextFieldBuilder + Piece,
impl<DecoratedInner> TextFieldBuilder for Decorated<DecoratedInner>where
DecoratedInner: TextFieldBuilder + Piece,
Source§fn enabled<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
fn enabled<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
true); a constant or a reactive bool. A
disabled field neither edits nor focuses; TextField::read_only keeps it selectable.fn placeholder<M>(self, t: impl IntoText<M>) -> Decorated<DecoratedInner>
Source§fn on_submit(self, f: impl Fn() + 'static) -> Decorated<DecoratedInner>
fn on_submit(self, f: impl Fn() + 'static) -> Decorated<DecoratedInner>
focus.set(Some(Field::Next))
(docs/focus.md).Source§fn secure<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
fn secure<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
false). Reactive: bind it to a signal
for a show-password switch. The text, the placeholder and the focus carry across the
change on every backend, including the two whose secure field is a different native
class.Source§fn read_only<M>(
self,
v: impl IntoReactive<bool, M>,
) -> Decorated<DecoratedInner>
fn read_only<M>( self, v: impl IntoReactive<bool, M>, ) -> Decorated<DecoratedInner>
false).
Reactive. Unlike .disabled(true) the field keeps its ordinary look and still takes
focus.Source§fn input_purpose(self, purpose: InputPurpose) -> Decorated<DecoratedInner>
fn input_purpose(self, purpose: InputPurpose) -> Decorated<DecoratedInner>
Source§fn submit_label(self, label: SubmitLabel) -> Decorated<DecoratedInner>
fn submit_label(self, label: SubmitLabel) -> Decorated<DecoratedInner>
on_submit either way.Source§fn max_length(self, characters: u32) -> Decorated<DecoratedInner>
fn max_length(self, characters: u32) -> Decorated<DecoratedInner>
Source§impl<DecoratedInner> TimePickerBuilder for Decorated<DecoratedInner>where
DecoratedInner: TimePickerBuilder + Piece,
impl<DecoratedInner> TimePickerBuilder for Decorated<DecoratedInner>where
DecoratedInner: TimePickerBuilder + Piece,
fn compact(self) -> Decorated<DecoratedInner>
fn inline(self) -> Decorated<DecoratedInner>
fn style(self, style: Style) -> Decorated<DecoratedInner>
Source§impl<DecoratedInner> ToggleBuilder for Decorated<DecoratedInner>where
DecoratedInner: ToggleBuilder + Piece,
impl<DecoratedInner> ToggleBuilder for Decorated<DecoratedInner>where
DecoratedInner: ToggleBuilder + Piece,
Source§fn enabled<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
fn enabled<M>(self, v: impl IntoReactive<bool, M>) -> Decorated<DecoratedInner>
true; false = disabled/grayed). Reactive,
e.g. .enabled(capability(Cap::TextSpellCheck) == Support::Native) to gray it out where a
backend can’t honor the thing it controls.Source§impl<S, DecoratedInner> TreeBuilder<S> for Decorated<DecoratedInner>
impl<S, DecoratedInner> TreeBuilder<S> for Decorated<DecoratedInner>
Source§fn row_height(self, h: RowHeight) -> Decorated<DecoratedInner>
fn row_height(self, h: RowHeight) -> Decorated<DecoratedInner>
Uniform(h) (fastest) or Automatic (self-sizing).Source§fn indent(self, pts: f64) -> Decorated<DecoratedInner>
fn indent(self, pts: f64) -> Decorated<DecoratedInner>
Source§fn section_headers(self) -> Decorated<DecoratedInner>
fn section_headers(self) -> Decorated<DecoratedInner>
Source§fn on_expansion(
self,
f: impl Fn(<S as NodeSource>::Key, bool) + 'static,
) -> Decorated<DecoratedInner>
fn on_expansion( self, f: impl Fn(<S as NodeSource>::Key, bool) + 'static, ) -> Decorated<DecoratedInner>
expanded do not echo this callback.Source§fn expanded(
self,
set: impl Binding<HashSet<<S as NodeSource>::Key>>,
) -> Decorated<DecoratedInner>
fn expanded( self, set: impl Binding<HashSet<<S as NodeSource>::Key>>, ) -> Decorated<DecoratedInner>
Source§fn expandable(
self,
f: impl Fn(&<S as NodeSource>::Key) -> bool + 'static,
) -> Decorated<DecoratedInner>
fn expandable( self, f: impl Fn(&<S as NodeSource>::Key) -> bool + 'static, ) -> Decorated<DecoratedInner>
Source§fn selected(
self,
f: impl Fn() -> Vec<<S as NodeSource>::Key> + 'static,
) -> Decorated<DecoratedInner>
fn selected( self, f: impl Fn() -> Vec<<S as NodeSource>::Key> + 'static, ) -> Decorated<DecoratedInner>
Self::on_selection at one signal and selection is two-way, shared with anything
else reading the same state.Source§fn on_selection(
self,
f: impl Fn(Vec<<S as NodeSource>::Key>) + 'static,
) -> Decorated<DecoratedInner>
fn on_selection( self, f: impl Fn(Vec<<S as NodeSource>::Key>) + 'static, ) -> Decorated<DecoratedInner>
Source§fn multi_select(self) -> Decorated<DecoratedInner>
fn multi_select(self) -> Decorated<DecoratedInner>
Source§fn type_ahead(
self,
f: impl Fn(&<S as NodeSource>::Key) -> String + 'static,
) -> Decorated<DecoratedInner>
fn type_ahead( self, f: impl Fn(&<S as NodeSource>::Key) -> String + 'static, ) -> Decorated<DecoratedInner>
Source§fn reveal(
self,
target: impl Binding<Option<<S as NodeSource>::Key>>,
) -> Decorated<DecoratedInner>
fn reveal( self, target: impl Binding<Option<<S as NodeSource>::Key>>, ) -> Decorated<DecoratedInner>
Some(key) and the row scrolls into view with
every ancestor expanded (through Self::expanded, so the app sees the change).Source§fn row_id(
self,
f: impl Fn(&<S as NodeSource>::Key) -> ElementId + 'static,
) -> Decorated<DecoratedInner>
fn row_id( self, f: impl Fn(&<S as NodeSource>::Key) -> ElementId + 'static, ) -> Decorated<DecoratedInner>
tap/assert_text address the row wherever its cell currently sits. It
is also what the expand:/tree_move: steps resolve rows by.Source§impl<DecoratedInner> VectorBuilder for Decorated<DecoratedInner>where
DecoratedInner: VectorBuilder + Piece,
impl<DecoratedInner> VectorBuilder for Decorated<DecoratedInner>where
DecoratedInner: VectorBuilder + Piece,
Source§fn tint<M>(
self,
color: impl IntoReactive<Color, M>,
) -> Decorated<DecoratedInner>
fn tint<M>( self, color: impl IntoReactive<Color, M>, ) -> Decorated<DecoratedInner>
Source§fn weight(self, w: VectorWeight) -> Decorated<DecoratedInner>
fn weight(self, w: VectorWeight) -> Decorated<DecoratedInner>
VectorWeight).Source§fn decorative(self) -> Decorated<DecoratedInner>
fn decorative(self) -> Decorated<DecoratedInner>
Source§impl<DecoratedInner> WhenBuilder for Decorated<DecoratedInner>where
DecoratedInner: WhenBuilder + Piece,
impl<DecoratedInner> WhenBuilder for Decorated<DecoratedInner>where
DecoratedInner: WhenBuilder + Piece,
Source§impl<DecoratedInner> ZStackBuilder for Decorated<DecoratedInner>where
DecoratedInner: ZStackBuilder + Piece,
impl<DecoratedInner> ZStackBuilder for Decorated<DecoratedInner>where
DecoratedInner: ZStackBuilder + Piece,
Auto Trait Implementations§
impl<P> !RefUnwindSafe for Decorated<P>
impl<P> !Send for Decorated<P>
impl<P> !Sync for Decorated<P>
impl<P> !UnwindSafe for Decorated<P>
impl<P> Freeze for Decorated<P>where
P: Freeze,
impl<P> Unpin for Decorated<P>where
P: Unpin,
impl<P> UnsafeUnpin for Decorated<P>where
P: 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