BufferManagementBehavior

Trait BufferManagementBehavior 

Source
pub trait BufferManagementBehavior {
Show 16 methods // Required methods fn buffer_manager(&mut self) -> &mut BufferManager; fn buffer_handler(&mut self) -> &mut BufferHandler; fn buffer(&self) -> &dyn BufferAPI; fn buffer_mut(&mut self) -> &mut dyn BufferAPI; fn config(&self) -> &Config; fn cursor_manager(&mut self) -> &mut CursorManager; fn set_input_text_with_cursor(&mut self, text: String, cursor: usize); fn next_buffer(&mut self) -> String; fn previous_buffer(&mut self) -> String; fn quick_switch_buffer(&mut self) -> String; fn close_buffer(&mut self) -> (bool, String); fn switch_to_buffer(&mut self, index: usize) -> String; fn buffer_count(&self) -> usize; fn current_buffer_index(&self) -> usize; // Provided methods fn new_buffer(&mut self) { ... } fn yank(&mut self) { ... }
}
Expand description

Trait that provides buffer management behavior for TUI components This extracts buffer operations from EnhancedTui to reduce coupling

Required Methods§

Source

fn buffer_manager(&mut self) -> &mut BufferManager

Source

fn buffer_handler(&mut self) -> &mut BufferHandler

Source

fn buffer(&self) -> &dyn BufferAPI

Source

fn buffer_mut(&mut self) -> &mut dyn BufferAPI

Source

fn config(&self) -> &Config

Source

fn cursor_manager(&mut self) -> &mut CursorManager

Source

fn set_input_text_with_cursor(&mut self, text: String, cursor: usize)

Source

fn next_buffer(&mut self) -> String

Switch to the next buffer

Source

fn previous_buffer(&mut self) -> String

Switch to the previous buffer

Source

fn quick_switch_buffer(&mut self) -> String

Quick switch to the last used buffer

Source

fn close_buffer(&mut self) -> (bool, String)

Close the current buffer

Source

fn switch_to_buffer(&mut self, index: usize) -> String

Switch to a specific buffer by index

Source

fn buffer_count(&self) -> usize

Get the total number of buffers

Source

fn current_buffer_index(&self) -> usize

Get the current buffer index

Provided Methods§

Source

fn new_buffer(&mut self)

Create a new buffer with current config settings

Source

fn yank(&mut self)

Yank (copy) from the current buffer

Implementors§