pub struct ReorderContext { /* private fields */ }Expand description
What a ReorderPolicy knows when a new display order is ready.
Implementations§
Source§impl ReorderContext
impl ReorderContext
Sourcepub fn held_since(&self) -> Instant
pub fn held_since(&self) -> Instant
When the shown order became outdated (equals now for a fresh one).
Sourcepub fn is_pointer_inside(&self) -> bool
pub fn is_pointer_inside(&self) -> bool
Returns true if the pointer is over the grid body.
Sourcepub fn is_user_action(&self) -> bool
pub fn is_user_action(&self) -> bool
Returns true if the new order comes from a user action (a sort click, a new view, a new data set) rather than from streaming data.
Returns true while the grid’s context menu is open. The built-in policies hold the order then, except for a user action: the rows of the menu’s target stay where they were.
Sourcepub fn is_tooltip_shown(&self) -> bool
pub fn is_tooltip_shown(&self) -> bool
Returns true while a cell tooltip is shown: GPUI built it for the hovered cell, which has not changed since, and no button was pressed. The built-in policies ignore it, since a resting pointer would hold the order without end; a policy of the application may hold on it.
Sourcepub fn is_editing(&self) -> bool
pub fn is_editing(&self) -> bool
Returns true while a cell editor is open: the built-in policies then hold the order, as for the context menu, unless the new order comes from a user action.
Sourcepub fn has_pending_edits(&self) -> bool
pub fn has_pending_edits(&self) -> bool
Returns true while commits wait for LiveGridState::resolve_edit
or for the store. The built-in policies ignore it; a policy may hold
on it.
Sourcepub fn is_drag_over(&self) -> bool
pub fn is_drag_over(&self) -> bool
Returns true while a row drag is over this grid’s rows. The built-in policies ignore it.
Sourcepub fn is_column_chooser_open(&self) -> bool
pub fn is_column_chooser_open(&self) -> bool
Returns true while the grid’s column chooser is open. The built-in policies ignore it.
Trait Implementations§
Source§impl Clone for ReorderContext
impl Clone for ReorderContext
Source§fn clone(&self) -> ReorderContext
fn clone(&self) -> ReorderContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReorderContext
impl Debug for ReorderContext
impl Copy for ReorderContext
Auto Trait Implementations§
impl Freeze for ReorderContext
impl RefUnwindSafe for ReorderContext
impl Send for ReorderContext
impl Sync for ReorderContext
impl Unpin for ReorderContext
impl UnsafeUnpin for ReorderContext
impl UnwindSafe for ReorderContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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