use std::{collections::HashMap, sync::Arc}; use parking_lot::Mutex; use crate::{layout::align_rect, *}; #[derive(Clone, Copy, Default)] struct PaintStats { num_batches: usize, num_primitives: usize, num_vertices: usize, num_triangles: usize, } /// Contains the input, style and output of all GUI commands. /// Regions keep an Arc pointer to this. /// This allows us to create several child regions at once, /// all working against the same shared Context. pub struct Context { /// The default style for new regions style: Mutex