pub struct CellStyleContext<'a, R: GridRow> { /* private fields */ }Expand description
What LiveGridDelegate::cell_style knows about a cell.
Implementations§
Source§impl<'a, R: GridRow> CellStyleContext<'a, R>
impl<'a, R: GridRow> CellStyleContext<'a, R>
Sourcepub fn change(&self) -> Option<CellChange>
pub fn change(&self) -> Option<CellChange>
The highlighted change, if the cell changed recently.
Sourcepub fn display_ix(&self) -> usize
pub fn display_ix(&self) -> usize
The display position of the row; for a pinned row, its position in its band.
Sourcepub fn pinned_edge(&self) -> Option<PinnedEdge>
pub fn pinned_edge(&self) -> Option<PinnedEdge>
The band of a pinned row, or None for a data row. Pinned rows are
painted with the theme’s table_foot colors; a style can tell them
apart here, e.g. to set off a total row.
Sourcepub fn is_selected(&self) -> bool
pub fn is_selected(&self) -> bool
Returns true if the cell is selected: in the row modes, if its row is. Pinned rows are never selected.
Sourcepub fn is_focused(&self) -> bool
pub fn is_focused(&self) -> bool
Returns true if this is the focused cell (the keyboard target), whether or not the grid has keyboard focus.
Sourcepub fn edit_state(&self) -> Option<&'a EditState>
pub fn edit_state(&self) -> Option<&'a EditState>
The cell’s edits: a value whose commit waits for an answer
(Pending: the grid paints it muted) or for the store (Accepted),
or a refused commit (Failed: the grid shows the error mark). None
for a cell with no edits. The style may paint over the grid’s look.
Auto Trait Implementations§
impl<'a, R> Freeze for CellStyleContext<'a, R>
impl<'a, R> !RefUnwindSafe for CellStyleContext<'a, R>
impl<'a, R> Send for CellStyleContext<'a, R>
impl<'a, R> Sync for CellStyleContext<'a, R>
impl<'a, R> Unpin for CellStyleContext<'a, R>
impl<'a, R> UnsafeUnpin for CellStyleContext<'a, R>
impl<'a, R> !UnwindSafe for CellStyleContext<'a, R>
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
§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