wip: refactor(output): 53 more errors...

This commit is contained in:
same mf who else 2026-02-14 20:20:37 +02:00
parent f033f9ff54
commit 18bd982a95
3 changed files with 21 additions and 42 deletions

View file

@ -90,6 +90,10 @@ pub trait Layout<O: Out> {
fn layout (&self, to: O::Area) -> O::Area { [self.x(to), self.y(to), self.w(to), self.h(to)].into() }
}
pub trait HasContent<O: Out> {
fn content (&self) -> impl Content<O>;
}
// TODO DOCUMENTME
pub trait Content<O: Out>: Draw<O> + Layout<O> {}
@ -143,6 +147,6 @@ pub trait HasXYWH<N: Coord>: HasXY<N> + HasWH<N> {
// TODO DOCUMENTME
pub trait HasSize<O: Out> {
fn size (&self) -> &Measure<O>;
fn width (&self) -> usize { self.size().w() }
fn height (&self) -> usize { self.size().h() }
fn width (&self) -> O::Unit { self.size().w() }
fn height (&self) -> O::Unit { self.size().h() }
}