pub trait DialogWidget<Global, Event, Error>{
type State: DialogState<Global, Event, Error> + ?Sized;
// Required method
fn render(
&self,
area: Rect,
buf: &mut Buffer,
state: &mut Self::State,
ctx: &mut RenderContext<'_, Global>,
) -> Result<(), Error>;
}
Expand description
DialogWidget mimics AppWidget.
This needs a separate trait otherwise DialogState would need to be an AppState too, which is rather inconvenient.
Required Associated Types§
Sourcetype State: DialogState<Global, Event, Error> + ?Sized
type State: DialogState<Global, Event, Error> + ?Sized
Type of the State.