1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
use crate::common::*;
/// The unit widget
///
/// Represents a widget with no behaviour
///
pub struct Element {}
impl Element {
pub fn new() -> Self {
Element {}
}
}
impl Widget for Element {
type Ret = Entity;
type Data = ();
fn on_build(&mut self, _state: &mut State, entity: Entity) -> Self::Ret {
entity
}
}