Struct rat_ftable::selection::CellSelection
source · pub struct CellSelection {
pub lead_cell: Option<(usize, usize)>,
}Expand description
Select a single cell in the table.
This one supports cell + column + row selection.
Fields§
§lead_cell: Option<(usize, usize)>Selected cell.
Implementations§
source§impl CellSelection
impl CellSelection
sourcepub fn new() -> CellSelection
pub fn new() -> CellSelection
New
sourcepub fn select_cell(&mut self, select: Option<(usize, usize)>)
pub fn select_cell(&mut self, select: Option<(usize, usize)>)
Select a cell.
sourcepub fn select_row(&mut self, select: Option<usize>)
pub fn select_row(&mut self, select: Option<usize>)
Select a row. Column stays the same.
sourcepub fn select_column(&mut self, select: Option<usize>)
pub fn select_column(&mut self, select: Option<usize>)
Select a column, row stays the same.
sourcepub fn select_clamped(
&mut self,
select: (usize, usize),
maximum: (usize, usize)
)
pub fn select_clamped( &mut self, select: (usize, usize), maximum: (usize, usize) )
Select a cell, clamp between 0 and maximum.
sourcepub fn next_row(&mut self, n: usize, maximum: usize)
pub fn next_row(&mut self, n: usize, maximum: usize)
Select the next row, clamp between 0 and maximum.
sourcepub fn next_column(&mut self, n: usize, maximum: usize)
pub fn next_column(&mut self, n: usize, maximum: usize)
Select the next column, clamp between 0 and maximum.
sourcepub fn prev_column(&mut self, n: usize)
pub fn prev_column(&mut self, n: usize)
Select the previous row, clamp between 0 and maximum.
Trait Implementations§
source§impl Clone for CellSelection
impl Clone for CellSelection
source§fn clone(&self) -> CellSelection
fn clone(&self) -> CellSelection
Returns a copy 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 CellSelection
impl Debug for CellSelection
source§impl Default for CellSelection
impl Default for CellSelection
source§fn default() -> CellSelection
fn default() -> CellSelection
Returns the “default value” for a type. Read more
source§impl TableSelection for CellSelection
impl TableSelection for CellSelection
source§fn is_selected_row(&self, row: usize) -> bool
fn is_selected_row(&self, row: usize) -> bool
Row is selected. This can be separate from
is_selected_cell.source§fn is_selected_column(&self, column: usize) -> bool
fn is_selected_column(&self, column: usize) -> bool
Column is selected. This can be separate from
is_selected_cell.Auto Trait Implementations§
impl Freeze for CellSelection
impl RefUnwindSafe for CellSelection
impl Send for CellSelection
impl Sync for CellSelection
impl Unpin for CellSelection
impl UnwindSafe for CellSelection
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