use downcast_rs::{impl_downcast, Downcast};
use crate::{context::WidgetContext, event::WidgetEvent};
pub trait WidgetPlugin: Downcast + Send + Sync {
fn on_update(&self, ctx: &WidgetContext);
fn on_layout(&self, ctx: &WidgetContext);
fn on_events(&self, ctx: &WidgetContext, events: &[WidgetEvent]);
}
impl_downcast!(WidgetPlugin);