pub struct AppState<'a> {Show 27 fields
pub workbook: Workbook,
pub file_path: PathBuf,
pub selected_cell: (usize, usize),
pub start_row: usize,
pub start_col: usize,
pub visible_rows: usize,
pub visible_cols: usize,
pub input_mode: InputMode,
pub input_buffer: String,
pub text_area: TextArea<'a>,
pub should_quit: bool,
pub column_widths: Vec<usize>,
pub sheet_column_widths: HashMap<String, Vec<usize>>,
pub clipboard: Option<String>,
pub g_pressed: bool,
pub search_query: String,
pub search_results: Vec<(usize, usize)>,
pub current_search_idx: Option<usize>,
pub search_direction: bool,
pub highlight_enabled: bool,
pub info_panel_height: usize,
pub notification_messages: Vec<String>,
pub max_notifications: usize,
pub help_text: String,
pub help_scroll: usize,
pub help_visible_lines: usize,
pub undo_history: UndoHistory,
}Fields§
§workbook: Workbook§file_path: PathBuf§selected_cell: (usize, usize)§start_row: usize§start_col: usize§visible_rows: usize§visible_cols: usize§input_mode: InputMode§input_buffer: String§text_area: TextArea<'a>§should_quit: bool§column_widths: Vec<usize>§sheet_column_widths: HashMap<String, Vec<usize>>§clipboard: Option<String>§g_pressed: bool§search_query: String§search_results: Vec<(usize, usize)>§current_search_idx: Option<usize>§search_direction: bool§highlight_enabled: bool§info_panel_height: usize§notification_messages: Vec<String>§max_notifications: usize§help_text: String§help_scroll: usize§help_visible_lines: usize§undo_history: UndoHistoryImplementations§
Source§impl AppState<'_>
impl AppState<'_>
pub fn move_cursor(&mut self, delta_row: isize, delta_col: isize)
pub fn handle_scrolling(&mut self)
pub fn jump_to_first_row(&mut self)
pub fn jump_to_last_row(&mut self)
pub fn jump_to_first_column(&mut self)
pub fn jump_to_first_non_empty_column(&mut self)
pub fn jump_to_last_column(&mut self)
pub fn jump_to_prev_non_empty_cell_left(&mut self)
pub fn jump_to_prev_non_empty_cell_right(&mut self)
pub fn jump_to_prev_non_empty_cell_up(&mut self)
pub fn jump_to_prev_non_empty_cell_down(&mut self)
pub fn ensure_column_visible(&mut self, column: usize)
Source§impl AppState<'_>
impl AppState<'_>
pub fn start_search_forward(&mut self)
pub fn start_search_backward(&mut self)
pub fn execute_search(&mut self)
pub fn find_all_matches(&self, query: &str) -> Vec<(usize, usize)>
pub fn jump_to_next_search_result(&mut self)
pub fn jump_to_prev_search_result(&mut self)
pub fn disable_search_highlight(&mut self)
Source§impl AppState<'_>
impl AppState<'_>
pub fn next_sheet(&mut self) -> Result<()>
pub fn prev_sheet(&mut self) -> Result<()>
pub fn switch_sheet_by_index(&mut self, index: usize) -> Result<()>
pub fn switch_to_sheet(&mut self, name_or_index: &str)
pub fn delete_current_sheet(&mut self)
pub fn delete_current_row(&mut self) -> Result<()>
pub fn delete_row(&mut self, row: usize) -> Result<()>
pub fn delete_rows(&mut self, start_row: usize, end_row: usize) -> Result<()>
pub fn delete_current_column(&mut self) -> Result<()>
pub fn delete_column(&mut self, col: usize) -> Result<()>
pub fn delete_columns(&mut self, start_col: usize, end_col: usize) -> Result<()>
pub fn auto_adjust_column_width(&mut self, col: Option<usize>)
pub fn get_column_width(&self, col: usize) -> usize
pub fn ensure_column_widths(&mut self)
Source§impl AppState<'_>
impl AppState<'_>
pub fn new(workbook: Workbook, file_path: PathBuf) -> Result<Self>
pub fn add_notification(&mut self, message: String)
pub fn adjust_info_panel_height(&mut self, delta: isize)
pub fn get_cell_content(&self, row: usize, col: usize) -> String
pub fn get_cell_content_mut(&mut self, row: usize, col: usize) -> String
pub fn cancel_input(&mut self)
pub fn add_char_to_input(&mut self, c: char)
pub fn delete_char_from_input(&mut self)
pub fn start_command_mode(&mut self)
Source§impl AppState<'_>
impl AppState<'_>
pub fn execute_command(&mut self)
Trait Implementations§
Source§impl ActionExecutor for AppState<'_>
impl ActionExecutor for AppState<'_>
fn execute_action(&mut self, action: &ActionCommand) -> Result<()>
fn execute_cell_action(&mut self, action: &CellAction) -> Result<()>
fn execute_row_action(&mut self, action: &RowAction) -> Result<()>
fn execute_column_action(&mut self, action: &ColumnAction) -> Result<()>
fn execute_sheet_action(&mut self, action: &SheetAction) -> Result<()>
fn execute_multi_row_action(&mut self, action: &MultiRowAction) -> Result<()>
fn execute_multi_column_action( &mut self, action: &MultiColumnAction, ) -> Result<()>
Auto Trait Implementations§
impl<'a> !Freeze for AppState<'a>
impl<'a> RefUnwindSafe for AppState<'a>
impl<'a> !Send for AppState<'a>
impl<'a> !Sync for AppState<'a>
impl<'a> Unpin for AppState<'a>
impl<'a> UnwindSafe for AppState<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more