fret-ui 0.1.0

Mechanism-layer UI engine for Fret with tree, layout, focus, routing, and interaction contracts.
Documentation
use super::*;

struct TwoViewportRects {
    a: Rect,
    b: Rect,
}

impl TwoViewportRects {
    fn new(a: Rect, b: Rect) -> Self {
        Self { a, b }
    }
}

impl<H: UiHost> Widget<H> for TwoViewportRects {
    fn layout(&mut self, cx: &mut LayoutCx<'_, H>) -> Size {
        if let Some(&a) = cx.children.first() {
            let _ = cx.layout_viewport_root(a, self.a);
        }
        if let Some(&b) = cx.children.get(1) {
            let _ = cx.layout_viewport_root(b, self.b);
        }
        cx.available
    }
}

mod basics;
mod container;
mod flex_wrap_intrinsic_min_size;
mod interactivity;
mod layout_engine;
mod scroll;
mod text;
mod viewport_roots;