use super::*;
#[derive(Clone, Copy, Data, Debug, Default, New, PartialEq)]
pub struct AvailableSpace {
#[get(type(copy))]
pub(crate) width: f32,
#[get(type(copy))]
pub(crate) height: f32,
#[get(type(copy))]
pub(crate) viewport: Size,
#[get(type(copy))]
pub(crate) origin_x: f32,
#[get(type(copy))]
pub(crate) origin_y: f32,
#[get(type(copy))]
#[new(skip)]
pub(crate) stretch_width: bool,
#[get(type(copy))]
#[new(skip)]
pub(crate) stretch_height: bool,
}
#[derive(Clone, Copy, Data, Debug, Default, New, PartialEq)]
pub(crate) struct ContainerFrame {
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) parent_layout: LayoutStyle,
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) inner_avail: Size,
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) viewport: Size,
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) content_origin: Point,
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) definite_width: bool,
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) definite_height: bool,
}
#[derive(Clone, Copy, Data, Debug, Default, Eq, Hash, New, Ord, PartialEq, PartialOrd)]
pub struct LayoutStats {
#[get(type(copy))]
pub(crate) nodes_computed: usize,
#[get(type(copy))]
pub(crate) subtrees_skipped: usize,
}
#[derive(Clone, Copy, Debug, Default)]
pub(crate) struct TextSizeEntry {
pub(crate) hash_a: u64,
pub(crate) hash_b: u64,
pub(crate) text_len: u32,
pub(crate) font_size_bits: u32,
pub(crate) line_height_bits: u32,
pub(crate) letter_spacing_bits: u32,
pub(crate) max_width_bits: u32,
pub(crate) width: f32,
pub(crate) height: f32,
pub(crate) style_flags: u16,
}
#[derive(Clone, Debug, Default)]
pub(crate) struct TextSizeCache {
pub(crate) entries: Vec<TextSizeEntry>,
}
#[derive(Clone, Copy, Debug, Default)]
pub(crate) struct FlexItemRecord {
pub(crate) node_id: NodeId,
pub(crate) size: Size,
pub(crate) probed_size: Size,
pub(crate) probed_origin: Point,
pub(crate) margin: Edges,
pub(crate) flex_grow: f32,
pub(crate) align_self: AlignSelf,
pub(crate) overflow: Overflow,
pub(crate) flags: u16,
}
#[derive(Clone, Copy, Debug)]
pub(crate) struct FlexLineContext {
pub(crate) frame: ContainerFrame,
pub(crate) is_row: bool,
pub(crate) wrap_enabled: bool,
pub(crate) main_gap: f32,
pub(crate) main_avail: f32,
pub(crate) cross_avail: f32,
pub(crate) total_grow: f32,
pub(crate) line_count: usize,
}