#[allow(unused)] use crate::*; /// A three-column layout. pub struct Tryptich { pub top: bool, pub h: u16, pub left: (u16, A), pub middle: (u16, B), pub right: (u16, C), } impl Tryptich<(), (), ()> { pub fn center (h: u16) -> Self { Self { h, top: false, left: (0, ()), middle: (0, ()), right: (0, ()) } } pub fn top (h: u16) -> Self { Self { h, top: true, left: (0, ()), middle: (0, ()), right: (0, ()) } } } impl Tryptich { pub fn left (self, w: u16, content: D) -> Tryptich { Tryptich { left: (w, content), ..self } } pub fn middle (self, w: u16, content: D) -> Tryptich { Tryptich { middle: (w, content), ..self } } pub fn right (self, w: u16, content: D) -> Tryptich { Tryptich { right: (w, content), ..self } } }