euv-ui 0.48.8

Cross-platform UI component library and 17-scheme design system for the euv framework with pixel-consistent rendering across Web, Android, iOS, iPadOS, macOS, Windows, and Linux.
Documentation
use super::*;

/// Stateless Strategy contract evaluating whether a hardware posture applies and resolving its complete chrome layout plan.
pub(crate) trait ChromeLayoutStrategy {
    /// Returns `true` when this strategy owns the hardware posture represented by `metrics`.
    ///
    /// # Arguments
    ///
    /// - `&Self` - Strategy instance.
    /// - `&ShellViewportMetrics` - Live viewport and safe-area snapshot.
    ///
    /// # Returns
    ///
    /// - `bool` - `true` if this strategy should resolve the layout.
    fn matches(&self, metrics: &ShellViewportMetrics) -> bool;

    /// Computes the deterministic `ResolvedChromeLayout` for `metrics`.
    ///
    /// # Arguments
    ///
    /// - `&Self` - Strategy instance.
    /// - `&ShellViewportMetrics` - Live viewport and safe-area snapshot.
    ///
    /// # Returns
    ///
    /// - `ResolvedChromeLayout` - Complete chrome geometry, dock placement, and route-stage clip bounds.
    fn resolve(&self, metrics: &ShellViewportMetrics) -> ResolvedChromeLayout;
}