wip: removing Render and Layout from core

This commit is contained in:
🪞👃🪞 2024-09-09 15:12:34 +03:00
parent c4a5ee7b6e
commit eeb323b742
11 changed files with 148 additions and 165 deletions

View file

@ -1,10 +1,10 @@
use crate::*;
/// A UI component.
pub trait Component<E: Engine>: Render<E> + Handle<E> + Layout<E> {}
pub trait Component<E: Engine>: Widget<Engine = E> + Handle<E> {}
/// Everything that implements [Render] and [Handle] is a [Component].
impl<E: Engine, C: Render<E> + Handle<E> + Layout<E>> Component<E> for C {}
impl<E: Engine, C: Widget<Engine = E> + Handle<E>> Component<E> for C {}
/// Marker trait for [Component]s that can [Exit]
pub trait ExitableComponent<E>: Exit + Component<E> where E: Engine {