Trait rat_widget::tabbed::TabType
source · pub trait TabType: Debug {
// Required methods
fn layout<'a>(
&self,
area: Rect,
tabbed: &Tabbed<'a>,
state: &mut TabbedState,
);
fn render<'a>(
&self,
buf: &mut Buffer,
tabbed: &Tabbed<'a>,
state: &mut TabbedState,
);
}Expand description
The design space for tabs is too big to capture with a handful of parameters.
This trait splits off the layout and rendering of the actual tabs from the general properties and behaviour of tabs.
Required Methods§
sourcefn layout<'a>(&self, area: Rect, tabbed: &Tabbed<'a>, state: &mut TabbedState)
fn layout<'a>(&self, area: Rect, tabbed: &Tabbed<'a>, state: &mut TabbedState)
Calculate the layout for the tabs.
sourcefn render<'a>(
&self,
buf: &mut Buffer,
tabbed: &Tabbed<'a>,
state: &mut TabbedState,
)
fn render<'a>( &self, buf: &mut Buffer, tabbed: &Tabbed<'a>, state: &mut TabbedState, )
Render the tabs.