pub struct InlineStyle {
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub strikethrough: bool,
pub font_family: Option<String>,
pub font_size: Option<f64>,
pub text_color: Option<Color>,
pub highlight: Option<Color>,
}Expand description
Per-run inline character formatting.
Every Option field means “inherit the widget’s default” when None;
Some(_) overrides it. The four boolean attributes are absolute (a run is
either bold or not).
Fields§
§bold: boolBold weight (the resolver picks the matching face).
italic: boolItalic slant (the resolver picks the matching face).
underline: boolDraw an underline under the run.
strikethrough: boolDraw a line through the run.
font_family: Option<String>Font family name, or None to inherit the widget default family.
font_size: Option<f64>Font size in points, or None to inherit the widget default size.
text_color: Option<Color>Text colour, or None to inherit the theme’s text colour.
highlight: Option<Color>Highlight (background) colour behind the run, or None for none.
Trait Implementations§
Source§impl Clone for InlineStyle
impl Clone for InlineStyle
Source§fn clone(&self) -> InlineStyle
fn clone(&self) -> InlineStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InlineStyle
impl Debug for InlineStyle
Source§impl Default for InlineStyle
impl Default for InlineStyle
Source§fn default() -> InlineStyle
fn default() -> InlineStyle
Returns the “default value” for a type. Read more
Source§impl PartialEq for InlineStyle
impl PartialEq for InlineStyle
impl StructuralPartialEq for InlineStyle
Auto Trait Implementations§
impl Freeze for InlineStyle
impl RefUnwindSafe for InlineStyle
impl Send for InlineStyle
impl Sync for InlineStyle
impl Unpin for InlineStyle
impl UnsafeUnpin for InlineStyle
impl UnwindSafe for InlineStyle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().