mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
wip: removing Render and Layout from core
This commit is contained in:
parent
c4a5ee7b6e
commit
eeb323b742
11 changed files with 148 additions and 165 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue