grid

Macro grid 

Source
macro_rules! grid {
    ($($header:expr),*) => { ... };
}
Expand description

grid defines a crate::TTYGrid full of headers, which are associated with lines.

Each header is typically defined by the crate::header! macro, and crate::add_line! is used to add content to the grid. Headers may have an optional priority; in the case where the line is too long to be displayed on a terminal of that width, columns with a lower priority will be removed to help the higher priority items fit.

Example:

   use ttygrid::{grid, add_line, header};
   let mut grid = grid!(
       header!("line"),     header!("one", 1),  header!("two", 2),
       header!("three", 3), header!("four", 4), header!("five", 5)
   ).unwrap();

   add_line!(grid, "0", "1", "2", "3", "4", "5");

   println!("{}", grid.display().unwrap());