#[non_exhaustive]pub enum AttrType {
Show 38 variants
Invalid,
Language,
Family,
Style,
Weight,
Variant,
Stretch,
Size,
FontDesc,
Foreground,
Background,
Underline,
Strikethrough,
Rise,
Shape,
Scale,
Fallback,
LetterSpacing,
UnderlineColor,
StrikethroughColor,
AbsoluteSize,
Gravity,
GravityHint,
FontFeatures,
ForegroundAlpha,
BackgroundAlpha,
AllowBreaks,
Show,
InsertHyphens,
Overline,
OverlineColor,
LineHeight,
AbsoluteLineHeight,
TextTransform,
Word,
Sentence,
BaselineShift,
FontScale,
}
Expand description
The AttrType
distinguishes between different types of attributes.
Along with the predefined values, it is possible to allocate additional
values for custom attributes using register()
. The predefined
values are given below. The type of structure used to store the attribute is
listed in parentheses after the description.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Invalid
does not happen
Language
language (AttrLanguage
)
Family
font family name list (AttrString
)
Style
font slant style (AttrInt
)
Weight
font weight (AttrInt
)
Variant
font variant (normal or small caps) (AttrInt
)
Stretch
font stretch (AttrInt
)
Size
font size in points scaled by PANGO_SCALE
(AttrInt
)
FontDesc
font description (AttrFontDesc
)
Foreground
foreground color (AttrColor
)
Background
background color (AttrColor
)
Underline
whether the text has an underline (AttrInt
)
Strikethrough
whether the text is struck-through (AttrInt
)
Rise
baseline displacement (AttrInt
)
Shape
shape (AttrShape
)
Scale
font size scale factor (AttrFloat
)
Fallback
whether fallback is enabled (AttrInt
)
LetterSpacing
letter spacing (AttrInt
)
UnderlineColor
underline color (AttrColor
)
StrikethroughColor
strikethrough color (AttrColor
)
AbsoluteSize
font size in pixels scaled by PANGO_SCALE
(AttrInt
)
Gravity
base text gravity (AttrInt
)
GravityHint
gravity hint (AttrInt
)
FontFeatures
OpenType font features (AttrFontFeatures
). Since 1.38
ForegroundAlpha
foreground alpha (AttrInt
). Since 1.38
BackgroundAlpha
background alpha (AttrInt
). Since 1.38
AllowBreaks
whether breaks are allowed (AttrInt
). Since 1.44
Show
how to render invisible characters (AttrInt
). Since 1.44
InsertHyphens
whether to insert hyphens at intra-word line breaks (AttrInt
). Since 1.44
Overline
whether the text has an overline (AttrInt
). Since 1.46
OverlineColor
overline color (AttrColor
). Since 1.46
LineHeight
v1_50
only.line height factor (AttrFloat
). Since: 1.50
AbsoluteLineHeight
v1_50
only.line height (AttrInt
). Since: 1.50
TextTransform
v1_50
only.Word
v1_50
only.override segmentation to classify the range of the attribute as a single word (AttrInt
). Since 1.50
Sentence
v1_50
only.override segmentation to classify the range of the attribute as a single sentence (AttrInt
). Since 1.50
BaselineShift
v1_50
only.baseline displacement (AttrInt
). Since 1.50
FontScale
v1_50
only.font-relative size change (AttrInt
). Since 1.50
Implementations§
Trait Implementations§
Source§impl<'a> FromValue<'a> for AttrType
impl<'a> FromValue<'a> for AttrType
Source§type Checker = GenericValueTypeChecker<AttrType>
type Checker = GenericValueTypeChecker<AttrType>
Source§unsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Value
. Read moreSource§impl HasParamSpec for AttrType
impl HasParamSpec for AttrType
Source§impl Ord for AttrType
impl Ord for AttrType
Source§impl PartialOrd for AttrType
impl PartialOrd for AttrType
Source§impl StaticType for AttrType
impl StaticType for AttrType
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Copy for AttrType
impl Eq for AttrType
impl StructuralPartialEq for AttrType
Auto Trait Implementations§
impl Freeze for AttrType
impl RefUnwindSafe for AttrType
impl Send for AttrType
impl Sync for AttrType
impl Unpin for AttrType
impl UnwindSafe for AttrType
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,
Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
Source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
Source§fn ensure_type()
fn ensure_type()
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.