Macro ttygrid::grid[][src]

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

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

Each header is typically defined by the header macro, and add_line is used to add content to the grid.

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)
   );

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

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