pub struct NavMenuProps {
pub document_keys: Vec<String>,
pub items: Vec<String>,
pub icons: Vec<Option<String>>,
pub badges: Vec<Option<String>>,
pub badge_icons: Vec<Option<String>>,
pub badge_tints: Vec<Option<Color>>,
pub tints: Vec<Option<Color>>,
pub sections: Vec<Option<String>>,
pub menus: Vec<Vec<MenuItem>>,
pub selected: Option<usize>,
}Expand description
Native navigation item list. items are display titles in route order;
selected highlights the active route (split presentation; None on mobile roots).
icons (parallel to items, None = no icon) are bundled image names resolved by each
backend via resource::resolve_image_file; a backend that can’t decorate its rows just
ignores them.
Fields§
§document_keys: Vec<String>Stable document identities, parallel to items; empty for ordinary navigation.
items: Vec<String>§icons: Vec<Option<String>>§badges: Vec<Option<String>>A trailing accessory per row: an unread count, a status. Rendered right-aligned and
de-emphasized, opposite the label. Parallel to items; None draws nothing.
badge_icons: Vec<Option<String>>A trailing symbol accessory per row, in the same slot as Self::badges and drawn
after it: a bundled image name resolved the way Self::icons is. This is what a
row-level status glyph rides on (a starred page’s star) where badges carries only
text. Parallel to items; None draws nothing.
badge_tints: Vec<Option<Color>>The tint for Self::badge_icons, parallel to items. None leaves the glyph at
the backend’s neutral template tint; a status glyph that means something (a yellow
star) names its own color here, exactly as Self::tints does for the leading icon.
tints: Vec<Option<Color>>A per-row icon tint (docs/vectors.md): the row’s glyph recolored to this instead of
the backend’s neutral template tint. Parallel to items; None keeps the default.
sections: Vec<Option<String>>A section header introducing the row at the same index. Some opens a new group
before that row; None continues the current one. Parallel to items, so adding a
header never shifts the selection indices the rows are addressed by.
A per-row context menu (docs/menus.md): shown on secondary-click / long-press on
that row, the same crate::MenuItem model as everywhere else: items carry
registered action ids, so a chosen entry dispatches crate::Event::MenuAction
exactly like a piece context menu. Parallel to items; empty = no menu.
selected: Option<usize>Trait Implementations§
Source§fn clone(&self) -> NavMenuProps
fn clone(&self) -> NavMenuProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more