pub struct SelectionState {
pub mode: SelectionMode,
pub selected_row: Option<usize>,
pub selected_column: usize,
pub selected_cells: Vec<(usize, usize)>,
pub selection_anchor: Option<(usize, usize)>,
pub history: VecDeque<SelectionHistoryEntry>,
pub max_history: usize,
pub total_selections: usize,
pub last_selection_time: Option<Instant>,
}
Expand description
Selection state for managing row/cell/column selections
Fields§
§mode: SelectionMode
Current selection mode
selected_row: Option<usize>
Currently selected row (for table navigation)
selected_column: usize
Currently selected column (always tracked)
selected_cells: Vec<(usize, usize)>
Selected cells for multi-cell operations
selection_anchor: Option<(usize, usize)>
Selection anchor for range selections
history: VecDeque<SelectionHistoryEntry>
Selection history for undo
max_history: usize
Maximum history size
total_selections: usize
Total selections made
last_selection_time: Option<Instant>
Last selection time
Implementations§
Source§impl SelectionState
impl SelectionState
pub fn new() -> Self
Sourcepub fn set_mode(&mut self, mode: SelectionMode)
pub fn set_mode(&mut self, mode: SelectionMode)
Set selection mode
Sourcepub fn select_row(&mut self, row: Option<usize>)
pub fn select_row(&mut self, row: Option<usize>)
Select a row
Sourcepub fn select_column(&mut self, column: usize)
pub fn select_column(&mut self, column: usize)
Select a column
Sourcepub fn select_cell(&mut self, row: usize, column: usize)
pub fn select_cell(&mut self, row: usize, column: usize)
Select a cell
Sourcepub fn add_cell_to_selection(&mut self, row: usize, column: usize)
pub fn add_cell_to_selection(&mut self, row: usize, column: usize)
Add cell to multi-selection
Sourcepub fn clear_selections(&mut self)
pub fn clear_selections(&mut self)
Clear all selections
Trait Implementations§
Source§impl Clone for SelectionState
impl Clone for SelectionState
Source§fn clone(&self) -> SelectionState
fn clone(&self) -> SelectionState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SelectionState
impl Debug for SelectionState
Auto Trait Implementations§
impl Freeze for SelectionState
impl RefUnwindSafe for SelectionState
impl Send for SelectionState
impl Sync for SelectionState
impl Unpin for SelectionState
impl UnwindSafe for SelectionState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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