Tab

Trait Tab 

Source
pub trait Tab {
    type AppState;

Show 35 methods // Required methods fn widgets( &mut self, area: Rect, ) -> Vec<(&mut dyn Widget<AppData = Self::AppState>, Rect)>; fn tabdata(&mut self) -> &mut TabData<Self::AppState>; fn tabdata_ref(&self) -> &TabData<Self::AppState>; fn title(&self) -> &str; // Provided methods fn remove_popup_hook(&mut self) { ... } fn resolve_tab(&mut self, value: Box<dyn Any>) { ... } fn exit_tab(&mut self) { ... } fn set_popup(&mut self, pop: Box<dyn Tab<AppState = Self::AppState>>) { ... } fn set_popup_with_modifier( &mut self, pop: Box<dyn Tab<AppState = Self::AppState>>, f: Box<dyn FnMut(&Box<dyn Any>)>, ) { ... } fn move_to_widget(&mut self, w: &dyn Widget<AppData = Self::AppState>) { ... } fn move_to_id(&mut self, id: &str) { ... } fn move_to_area(&mut self, area: Rect) { ... } fn handle_popup_value( &mut self, _app_data: &mut Self::AppState, _return_value: Box<dyn Any>, ) { ... } fn tab_keyhandler_deselected( &mut self, _app_data: &mut Self::AppState, _key: KeyEvent, ) -> bool { ... } fn tab_keyhandler_selected( &mut self, _app_data: &mut Self::AppState, _key: KeyEvent, ) -> bool { ... } fn is_selected(&self, w: &dyn Widget<AppData = Self::AppState>) -> bool { ... } fn pre_render_hook(&mut self, _app_data: &mut Self::AppState) { ... } fn render( &mut self, f: &mut Frame<'_>, app_data: &mut Self::AppState, area: Rect, ) { ... } fn after_keyhandler(&mut self, _app_data: &mut Self::AppState) { ... } fn pop_up(&mut self) -> Option<&mut Box<dyn Tab<AppState = Self::AppState>>> { ... } fn get_popup_value(&mut self) -> Option<&mut PopUpState> { ... } fn popup_state(&mut self) -> &mut PopUpState { ... } fn validate_pos(&mut self, area: Rect) { ... } fn remove_popup(&mut self) { ... } fn check_popup_value(&mut self, app_data: &mut Self::AppState) { ... } fn pre_keyhandler_hook(&mut self, _key: KeyEvent) { ... } fn entry_keyhandler( &mut self, event: Event, app_data: &mut Self::AppState, area: Rect, ) { ... } fn tab_keyhandler( &mut self, app_data: &mut Self::AppState, key: KeyEvent, ) -> bool { ... } fn widget_keyhandler( &mut self, app_data: &mut Self::AppState, key: KeyEvent, area: Rect, ) { ... } fn set_map(&mut self, area: Rect) { ... } fn entry_render( &mut self, f: &mut Frame<'_>, app_data: &mut Self::AppState, area: Rect, ) { ... } fn should_exit(&mut self) -> bool { ... } fn cursor(&mut self) -> Pos { ... } fn selected(&mut self) -> bool { ... } fn navigate(&mut self, dir: Retning) { ... }
}

Required Associated Types§

Required Methods§

Source

fn widgets( &mut self, area: Rect, ) -> Vec<(&mut dyn Widget<AppData = Self::AppState>, Rect)>

Source

fn tabdata(&mut self) -> &mut TabData<Self::AppState>

Source

fn tabdata_ref(&self) -> &TabData<Self::AppState>

Source

fn title(&self) -> &str

Provided Methods§

Source

fn remove_popup_hook(&mut self)

Source

fn resolve_tab(&mut self, value: Box<dyn Any>)

Source

fn exit_tab(&mut self)

Source

fn set_popup(&mut self, pop: Box<dyn Tab<AppState = Self::AppState>>)

Source

fn set_popup_with_modifier( &mut self, pop: Box<dyn Tab<AppState = Self::AppState>>, f: Box<dyn FnMut(&Box<dyn Any>)>, )

Source

fn move_to_widget(&mut self, w: &dyn Widget<AppData = Self::AppState>)

Source

fn move_to_id(&mut self, id: &str)

Source

fn move_to_area(&mut self, area: Rect)

Source

fn handle_popup_value( &mut self, _app_data: &mut Self::AppState, _return_value: Box<dyn Any>, )

Source

fn tab_keyhandler_deselected( &mut self, _app_data: &mut Self::AppState, _key: KeyEvent, ) -> bool

Keyhandler stuff that should run if no widgets are selected.

Source

fn tab_keyhandler_selected( &mut self, _app_data: &mut Self::AppState, _key: KeyEvent, ) -> bool

Keyhandler stuff that should run if a widget is selected. Think of this as widget specific stuff that requires the state of the tab, and therefore the logic cannot be handled by the widget directly.

Source

fn is_selected(&self, w: &dyn Widget<AppData = Self::AppState>) -> bool

Source

fn pre_render_hook(&mut self, _app_data: &mut Self::AppState)

Source

fn render( &mut self, f: &mut Frame<'_>, app_data: &mut Self::AppState, area: Rect, )

Source

fn after_keyhandler(&mut self, _app_data: &mut Self::AppState)

Source

fn pop_up(&mut self) -> Option<&mut Box<dyn Tab<AppState = Self::AppState>>>

Source

fn get_popup_value(&mut self) -> Option<&mut PopUpState>

Source

fn popup_state(&mut self) -> &mut PopUpState

Source

fn validate_pos(&mut self, area: Rect)

Source

fn remove_popup(&mut self)

its a function so that it can be overriden if needed.

Source

fn check_popup_value(&mut self, app_data: &mut Self::AppState)

Source

fn pre_keyhandler_hook(&mut self, _key: KeyEvent)

Source

fn entry_keyhandler( &mut self, event: Event, app_data: &mut Self::AppState, area: Rect, )

Source

fn tab_keyhandler( &mut self, app_data: &mut Self::AppState, key: KeyEvent, ) -> bool

Source

fn widget_keyhandler( &mut self, app_data: &mut Self::AppState, key: KeyEvent, area: Rect, )

Source

fn set_map(&mut self, area: Rect)

Source

fn entry_render( &mut self, f: &mut Frame<'_>, app_data: &mut Self::AppState, area: Rect, )

Source

fn should_exit(&mut self) -> bool

Source

fn cursor(&mut self) -> Pos

Source

fn selected(&mut self) -> bool

Source

fn navigate(&mut self, dir: Retning)

Implementors§