Struct touch_selection::Selection
source · [−]pub struct Selection<P, C: SelectionSet> {
pub selected: C,
pub grab: Option<GrabInfo<P, C::Index>>,
}
Fields
selected: C
grab: Option<GrabInfo<P, C::Index>>
Implementations
sourceimpl<P: Copy, C: SelectionSet> Selection<P, C>where
C::Index: Copy,
impl<P: Copy, C: SelectionSet> Selection<P, C>where
C::Index: Copy,
pub fn new(selected: C) -> Self
pub fn press<S: Selector<Position = P>>(
&mut self,
pos: P,
cursor: P,
selector: &S,
selectable: &S::Selectable
)where
S::Selectable: Selectable<Index = C::Index>,
pub fn release<S: Selector<Position = P>>(
&mut self,
pos: P,
selector: &S,
selectable: &mut S::Selectable
)where
S::Selectable: Selectable<Index = C::Index>,
pub fn on_moved<S: Selector<Position = P>>(&mut self, cursor: P, selector: &S)
Trait Implementations
sourceimpl<P: Default, C: Default + SelectionSet> Default for Selection<P, C>where
C::Index: Default,
impl<P: Default, C: Default + SelectionSet> Default for Selection<P, C>where
C::Index: Default,
sourceimpl<'a, P, S: SelectionSet> IntoIterator for &'a Selection<P, S>where
&'a S: IntoIterator,
impl<'a, P, S: SelectionSet> IntoIterator for &'a Selection<P, S>where
&'a S: IntoIterator,
sourceimpl<P, S: SelectionSet + IntoIterator> IntoIterator for Selection<P, S>
impl<P, S: SelectionSet + IntoIterator> IntoIterator for Selection<P, S>
type Item = <S as IntoIterator>::Item
type Item = <S as IntoIterator>::Item
The type of the elements being iterated over.
type IntoIter = <S as IntoIterator>::IntoIter
type IntoIter = <S as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
Auto Trait Implementations
impl<P, C> RefUnwindSafe for Selection<P, C>where
C: RefUnwindSafe,
P: RefUnwindSafe,
<C as SelectionSet>::Index: RefUnwindSafe,
impl<P, C> Send for Selection<P, C>where
C: Send,
P: Send,
<C as SelectionSet>::Index: Send,
impl<P, C> Sync for Selection<P, C>where
C: Sync,
P: Sync,
<C as SelectionSet>::Index: Sync,
impl<P, C> Unpin for Selection<P, C>where
C: Unpin,
P: Unpin,
<C as SelectionSet>::Index: Unpin,
impl<P, C> UnwindSafe for Selection<P, C>where
C: UnwindSafe,
P: UnwindSafe,
<C as SelectionSet>::Index: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more