pub trait NavigationBehavior {
Show 22 methods
// Required methods
fn viewport_manager(&self) -> &RefCell<Option<ViewportManager>>;
fn buffer_mut(&mut self) -> &mut dyn BufferAPI;
fn buffer(&self) -> &dyn BufferAPI;
fn state_container(&self) -> &AppStateContainer;
fn state_container_mut(&mut self) -> &mut AppStateContainer;
fn get_row_count(&self) -> usize;
fn set_mode_with_sync(&mut self, mode: AppMode, trigger: &str);
// Provided methods
fn apply_row_navigation_result(&mut self, result: RowNavigationResult) { ... }
fn sync_row_state(&mut self, row: usize) { ... }
fn next_row(&mut self) { ... }
fn previous_row(&mut self) { ... }
fn goto_first_row(&mut self) { ... }
fn goto_last_row(&mut self) { ... }
fn page_down(&mut self) { ... }
fn page_up(&mut self) { ... }
fn half_page_down(&mut self) { ... }
fn half_page_up(&mut self) { ... }
fn goto_line(&mut self, line_number: usize) { ... }
fn goto_viewport_top(&mut self) { ... }
fn goto_viewport_middle(&mut self) { ... }
fn goto_viewport_bottom(&mut self) { ... }
fn complete_jump_to_row(&mut self, input: &str) { ... }
}
Expand description
Trait that provides navigation behavior for TUI components This extracts navigation methods from EnhancedTui to reduce coupling
Required Methods§
fn viewport_manager(&self) -> &RefCell<Option<ViewportManager>>
fn buffer_mut(&mut self) -> &mut dyn BufferAPI
fn buffer(&self) -> &dyn BufferAPI
fn state_container(&self) -> &AppStateContainer
fn state_container_mut(&mut self) -> &mut AppStateContainer
fn get_row_count(&self) -> usize
fn set_mode_with_sync(&mut self, mode: AppMode, trigger: &str)
Provided Methods§
Sourcefn sync_row_state(&mut self, row: usize)
fn sync_row_state(&mut self, row: usize)
Centralized method to sync row state across all components This ensures Buffer, AppStateContainer, and any other row tracking stays in sync
fn next_row(&mut self)
fn previous_row(&mut self)
fn goto_first_row(&mut self)
fn goto_last_row(&mut self)
fn page_down(&mut self)
fn page_up(&mut self)
fn half_page_down(&mut self)
fn half_page_up(&mut self)
fn goto_line(&mut self, line_number: usize)
Sourcefn goto_viewport_top(&mut self)
fn goto_viewport_top(&mut self)
Navigate to the top of the current viewport
Sourcefn goto_viewport_middle(&mut self)
fn goto_viewport_middle(&mut self)
Navigate to the middle of the current viewport
Sourcefn goto_viewport_bottom(&mut self)
fn goto_viewport_bottom(&mut self)
Navigate to the bottom of the current viewport
Sourcefn complete_jump_to_row(&mut self, input: &str)
fn complete_jump_to_row(&mut self, input: &str)
Complete jump-to-row operation (called on Enter key)