//! Tabular container. use super::prelude::*; use super::{GridNode, TrackSizing}; /// A table of items. #[derive(Debug, Hash)] pub struct TableNode { /// Defines sizing for content rows and columns. pub tracks: Spec>, /// Defines sizing of gutter rows and columns between content. pub gutter: Spec>, /// The nodes to be arranged in the table. pub children: Vec, } #[class] impl TableNode { /// The primary cell fill color. pub const PRIMARY: Option = None; /// The secondary cell fill color. pub const SECONDARY: Option = None; /// How the stroke the cells. pub const STROKE: Option = Some(Color::BLACK.into()); /// The stroke's thickness. pub const THICKNESS: Length = Length::pt(1.0); /// How much to pad the cells's content. pub const PADDING: Linear = Length::pt(5.0).into(); fn construct(_: &mut Vm, args: &mut Args) -> TypResult