euv-core 0.48.3

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Compact layout-affecting properties packed into 112 bytes using bit-packed enums, tagged lengths, and `f32::NAN` sentinels.
#[derive(Clone, Copy, Data, Debug)]
pub struct LayoutStyle {
    /// Bit-packed layout enums (`display`, `position`, `flex_direction`, `flex_wrap`, `justify_content`, `align_items`, `align_self`, `overflow`).
    #[get(pub(crate), type(copy))]
    #[get_mut(skip)]
    #[set(pub(crate))]
    pub(crate) flags: u32,
    /// Packed 3-bit unit tags for the seven `Length` slots (`flex_basis`, `width`, `height`, `min_*`, `max_*`).
    #[get(pub(crate), type(copy))]
    #[get_mut(skip)]
    #[set(pub(crate))]
    pub(crate) length_tags: u32,
    /// Numeric payloads for the seven packed `Length` slots (`0.0` when `Length::Auto`).
    #[get(pub(crate), type(copy))]
    #[get_mut(pub(crate))]
    #[set(skip)]
    pub(crate) length_vals: [f32; 7],
    /// Flex grow factor (`>= 0.0`).
    #[get(type(copy))]
    pub(crate) flex_grow: f32,
    /// Flex shrink factor (`>= 0.0`).
    #[get(type(copy))]
    pub(crate) flex_shrink: f32,
    /// Outer margin insets.
    #[get(type(copy))]
    pub(crate) margin: Edges,
    /// Inner padding insets.
    #[get(type(copy))]
    pub(crate) padding: Edges,
    /// Row gap between children in logical pixels.
    #[get(type(copy))]
    pub(crate) row_gap: f32,
    /// Column gap between children in logical pixels.
    #[get(type(copy))]
    pub(crate) column_gap: f32,
    /// Optional explicit top offset encoded with `f32::NAN` sentinel for `None`.
    #[get(pub(crate), type(copy))]
    #[get_mut(skip)]
    #[set(pub(crate))]
    pub(crate) top_val: f32,
    /// Optional explicit right offset encoded with `f32::NAN` sentinel for `None`.
    #[get(pub(crate), type(copy))]
    #[get_mut(skip)]
    #[set(pub(crate))]
    pub(crate) right_val: f32,
    /// Optional explicit bottom offset encoded with `f32::NAN` sentinel for `None`.
    #[get(pub(crate), type(copy))]
    #[get_mut(skip)]
    #[set(pub(crate))]
    pub(crate) bottom_val: f32,
    /// Optional explicit left offset encoded with `f32::NAN` sentinel for `None`.
    #[get(pub(crate), type(copy))]
    #[get_mut(skip)]
    #[set(pub(crate))]
    pub(crate) left_val: f32,
    /// Optional fixed aspect ratio (`width / height`) encoded with `f32::NAN` sentinel for `None`.
    #[get(pub(crate), type(copy))]
    #[get_mut(skip)]
    #[set(pub(crate))]
    pub(crate) aspect_ratio_val: f32,
    /// Stacking order for painting and hit-testing.
    #[get(type(copy))]
    pub(crate) z_index: i32,
    /// Explicit grid column count when `display == Display::Grid`.
    #[get(type(copy))]
    pub(crate) grid_columns: u16,
}