FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    NavigationStack

    struct · ferroui-controls · v0.5.0

    struct NavigationStack
    

    The back or the forward stack of a frame (WinUI's IVector<PageStackEntry> of Frame.BackStack and Frame.ForwardStack): a live, observable list of entries. Clones are the same list.

    An edit is rejected during a navigation, with an index outside the list, or with an entry of the journal of another frame (NavigationHistory.cpp, PageStackEntryTrackerCollection.cpp); the edits return a Result where WinUI returns a failing HRESULT.

    View source

    Members

    count

    fn count(self: &Self) -> usize
    

    Gets the number of entries.

    Source

    is_empty

    fn is_empty(self: &Self) -> bool
    

    Gets whether the stack has no entry.

    Source

    get

    fn get(self: &Self, index: usize) -> Option<Ref<PageStackEntry>>
    

    Gets the entry at index.

    Source

    snapshot

    fn snapshot(self: &Self) -> Rc<Vec<Ref<PageStackEntry>>>
    

    Gets the entries, oldest first.

    Source

    add_collection_changed

    fn add_collection_changed(self: &Self, handler: Rc<CollectionChangedHandler<Ref<PageStackEntry>>>) -> u64
    

    Adds a handler of the changes of the list; returns its token.

    Source

    remove_collection_changed

    fn remove_collection_changed(self: &Self, token: u64) -> bool
    

    Removes the handler of token.

    Source

    add

    fn add(self: &Self, entry: Ref<PageStackEntry>) -> Result<(), NavigationError>
    

    Adds an entry at the end (the newest).

    Source

    insert

    fn insert(self: &Self, index: usize, entry: Ref<PageStackEntry>) -> Result<(), NavigationError>
    

    Inserts an entry at index.

    Source

    set

    fn set(self: &Self, index: usize, entry: Ref<PageStackEntry>) -> Result<(), NavigationError>
    

    Replaces the entry at index.

    Source

    remove_at

    fn remove_at(self: &Self, index: usize) -> Result<(), NavigationError>
    

    Removes the entry at index.

    Source

    clear

    fn clear(self: &Self) -> Result<(), NavigationError>
    

    Removes every entry.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.