mod canvas;
mod capture;
mod elementary;
mod layout;
mod painter;
mod placement;
pub use self::canvas::*;
pub use self::capture::*;
pub use self::elementary::*;
pub use self::layout::*;
pub use self::painter::*;
pub use self::placement::*;
use crate::geometry::*;
use crate::input::*;
use std::io;
pub trait Widget {
fn render(&self, painter: &mut Painter) -> io::Result<()> {
Ok(())
}
fn arrange(&mut self, _window: Window) {}
fn consume(&mut self, input: Vec<GrinInput>) -> Vec<GrinInput> {
input
}
fn captures(&self, window: Window, point: Point) -> bool {
(window & point).is_some()
}
}