Trait intelli_shell::Widget
source · pub trait Widget {
// Required method
fn min_height(&self) -> usize;
// Provided methods
fn peek(&mut self) -> Result<Option<WidgetOutput>> { ... }
fn render<B: Backend>(
&mut self,
_frame: &mut Frame<'_, B>,
_area: Rect,
_inline: bool,
_theme: Theme
) { ... }
fn process_event(&mut self, _event: Event) -> Result<Option<WidgetOutput>> { ... }
fn show<B, F>(
self,
terminal: &mut Terminal<B>,
inline: bool,
theme: Theme,
area: F
) -> Result<WidgetOutput>
where B: Backend,
F: FnMut(&Frame<'_, B>) -> Rect,
Self: Sized { ... }
}Expand description
Trait to display Widgets on the shell
Required Methods§
sourcefn min_height(&self) -> usize
fn min_height(&self) -> usize
Minimum height needed to render the widget
Provided Methods§
sourcefn peek(&mut self) -> Result<Option<WidgetOutput>>
fn peek(&mut self) -> Result<Option<WidgetOutput>>
sourcefn render<B: Backend>(
&mut self,
_frame: &mut Frame<'_, B>,
_area: Rect,
_inline: bool,
_theme: Theme
)
fn render<B: Backend>( &mut self, _frame: &mut Frame<'_, B>, _area: Rect, _inline: bool, _theme: Theme )
Render self in the given area from the frame