Skip to main content

euv_ui/component/router/hook/
struct.rs

1use crate::*;
2
3/// Router functionality for managing browser history, overlays, and navigation.
4///
5/// Provides methods for scroll-to-top behavior, hash change handling,
6/// overlay history management, and drawer scroll positioning.
7#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
8pub struct Router;
9
10/// A single entry in the unified overlay history stack.
11///
12/// Holds the close callback for an overlay (modal, panel, or drawer) so that
13/// a system back gesture can dismiss the most recently opened overlay first,
14/// regardless of its type.
15pub(crate) struct OverlayEntry {
16    /// The callback that closes the overlay.
17    pub(crate) closer: Rc<dyn Fn()>,
18}