pub struct TableViewSelection { /* private fields */ }Expand description
The selected row of a TableView: at most one, as WinUI’s v1 has it.
The application makes one with TableViewSelection::new, gives it to the table with TableView::selection, and disposes it after the table. A table given none selects nothing.
Implementations§
Source§impl TableViewSelection
impl TableViewSelection
Sourcepub fn dispose(self: Handle<Self>, app: &mut App)
pub fn dispose(self: Handle<Self>, app: &mut App)
Releases the listeners, including the one on the source it follows; the selection is not used after.
Sourcepub fn select(self: Handle<Self>, app: &mut App, index: usize)
pub fn select(self: Handle<Self>, app: &mut App, index: usize)
Select: the row index of the view becomes the selection. Nothing while no table holds the selection, while its mode is None, or for an index past the rows: an existing selection is never cleared to signal a refusal.
Sourcepub fn deselect(self: Handle<Self>, app: &mut App, index: usize)
pub fn deselect(self: Handle<Self>, app: &mut App, index: usize)
Deselect: clears the selection only when index is the selected row, so a stale call cannot clear a newer one.
Sourcepub fn deselect_all(self: Handle<Self>, app: &mut App)
pub fn deselect_all(self: Handle<Self>, app: &mut App)
DeselectAll, whatever the selection mode.
Trait Implementations§
Source§impl ChangeNotifier for TableViewSelection
impl ChangeNotifier for TableViewSelection
fn change_notifier_data(&self) -> &ChangeNotifierData
fn change_notifier_data_mut(&mut self) -> &mut ChangeNotifierData
Source§fn will_add_listener(self: Handle<Self>, app: &mut App)
fn will_add_listener(self: Handle<Self>, app: &mut App)
Runs before the listener is stored. Dart overrides of
addListener that
work before super.addListener go here.Source§fn did_remove_listener(self: Handle<Self>, app: &mut App)
fn did_remove_listener(self: Handle<Self>, app: &mut App)
Runs after the listener is removed. Dart overrides of
removeListener that
work after super.removeListener go here.Auto Trait Implementations§
impl !RefUnwindSafe for TableViewSelection
impl !Send for TableViewSelection
impl !Sync for TableViewSelection
impl !UnwindSafe for TableViewSelection
impl Forget for TableViewSelection
impl Freeze for TableViewSelectionwhere
*const u8 is !null: Freeze,
PhantomData<Option<Listener>>: Freeze,
*const RcInner<Cell<usize>> is !null: Freeze,
PhantomData<RcInner<Cell<usize>>>: Freeze,
PhantomData<RangeInclusive<usize>>: Freeze,
NonZero<u32>: Freeze,
*const RcInner<dyn Fn(&App, usize) -> Option<usize>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&App, usize) -> Option<usize>>>: Freeze,
*const RcInner<dyn Fn(&mut App, Listener)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, Listener)>>: Freeze,
*const RcInner<dyn Fn(&mut App, &Listener)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, &Listener)>>: Freeze,
*const RcInner<dyn Fn(&App) -> Vec<ViewChange>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&App) -> Vec<ViewChange>>>: Freeze,
*const RcInner<dyn Fn(&App) -> usize> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&App) -> usize>>: Freeze,
*const RcInner<dyn Fn(&mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App)>>: Freeze,
*const (): Freeze,
impl Move for TableViewSelection
impl Unpin for TableViewSelectionwhere
*const u8 is !null: Unpin,
Rc<dyn Fn(&mut App)>: Unpin,
NonZero<u32>: Unpin,
*const (): Unpin,
Rc<Cell<usize>>: Unpin,
Rc<dyn Fn(&App, usize) -> Option<usize>>: Unpin,
Rc<dyn Fn(&mut App, Listener)>: Unpin,
Rc<dyn Fn(&mut App, &Listener)>: Unpin,
Rc<dyn Fn(&App) -> Vec<ViewChange>>: Unpin,
Rc<dyn Fn(&App) -> usize>: Unpin,
impl UnsafeUnpin for TableViewSelectionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Option<Listener>>: UnsafeUnpin,
*const RcInner<Cell<usize>> is !null: UnsafeUnpin,
PhantomData<RcInner<Cell<usize>>>: UnsafeUnpin,
PhantomData<RangeInclusive<usize>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
*const RcInner<dyn Fn(&App, usize) -> Option<usize>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&App, usize) -> Option<usize>>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, Listener)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, Listener)>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, &Listener)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, &Listener)>>: UnsafeUnpin,
*const RcInner<dyn Fn(&App) -> Vec<ViewChange>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&App) -> Vec<ViewChange>>>: UnsafeUnpin,
*const RcInner<dyn Fn(&App) -> usize> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&App) -> usize>>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin,
*const (): UnsafeUnpin,
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