pub struct CellStyle { /* private fields */ }Expand description
Style of one cell, filled by the grid’s change paint
(ChangePaint) and then by
LiveGridDelegate::cell_style. Unset fields use the theme.
Implementations§
Source§impl CellStyle
impl CellStyle
Sourcepub fn set_background(&mut self, color: Hsla)
pub fn set_background(&mut self, color: Hsla)
Sets the background.
Sourcepub fn set_foreground(&mut self, color: Hsla)
pub fn set_foreground(&mut self, color: Hsla)
Sets the text colour.
Sourcepub fn background(&self) -> Option<Hsla>
pub fn background(&self) -> Option<Hsla>
The background, if set.
Sourcepub fn foreground(&self) -> Option<Hsla>
pub fn foreground(&self) -> Option<Hsla>
The text colour, if set.
Sourcepub fn set_font_weight(&mut self, weight: FontWeight)
pub fn set_font_weight(&mut self, weight: FontWeight)
Sets the weight of the cell’s text, such as FontWeight::BOLD for a
total. Each weight is cached apart, so a bold cell does not make
other cells shape their text again.
Sourcepub fn font_weight(&self) -> Option<FontWeight>
pub fn font_weight(&self) -> Option<FontWeight>
The weight of the cell’s text; None is the grid’s font.
Sourcepub fn set_trend(&mut self, trend: Option<ChangeDirection>)
pub fn set_trend(&mut self, trend: Option<ChangeDirection>)
Shows an arrow for the direction of the last change, or none.
DirectionalChanges sets it for a hot
cell that rose or fell; a style may set or clear it. The arrow takes
a lane on the side opposite the text’s alignment: the text does not
move, it only has less room.
Sourcepub fn trend(&self) -> Option<ChangeDirection>
pub fn trend(&self) -> Option<ChangeDirection>
The direction the cell shows an arrow for.
Sourcepub fn set_error_mark(&mut self, shown: bool)
pub fn set_error_mark(&mut self, shown: bool)
Shows or hides the error mark of a refused edit: an icon in the trend
arrow’s lane, which it takes from the arrow. The grid sets it on a
cell whose commit failed (EditState::Failed); false hides it.
Sourcepub fn has_error_mark(&self) -> bool
pub fn has_error_mark(&self) -> bool
Returns true if the error mark of a refused edit shows.
Trait Implementations§
impl Copy for CellStyle
Auto Trait Implementations§
impl Freeze for CellStyle
impl RefUnwindSafe for CellStyle
impl Send for CellStyle
impl Sync for CellStyle
impl Unpin for CellStyle
impl UnsafeUnpin for CellStyle
impl UnwindSafe for CellStyle
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().