Enum atk::TextAttribute
source · [−]#[non_exhaustive]
pub enum TextAttribute {
Show 30 variants
Invalid,
LeftMargin,
RightMargin,
Indent,
Invisible,
Editable,
PixelsAboveLines,
PixelsBelowLines,
PixelsInsideWrap,
BgFullHeight,
Rise,
Underline,
Strikethrough,
Size,
Scale,
Weight,
Language,
FamilyName,
BgColor,
FgColor,
BgStipple,
FgStipple,
WrapMode,
Direction,
Justification,
Stretch,
Variant,
Style,
TextPosition,
LastDefined,
// some variants omitted
}
Expand description
Describes the text attributes supported
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Invalid
Invalid attribute, like bad spelling or grammar.
LeftMargin
The pixel width of the left margin
RightMargin
The pixel width of the right margin
Indent
The number of pixels that the text is indented
Invisible
Either “true” or “false” indicating whether text is visible or not
Editable
Either “true” or “false” indicating whether text is editable or not
PixelsAboveLines
Pixels of blank space to leave above each newline-terminated line.
PixelsBelowLines
Pixels of blank space to leave below each newline-terminated line.
PixelsInsideWrap
Pixels of blank space to leave between wrapped lines inside the same newline-terminated line (paragraph).
BgFullHeight
“true” or “false” whether to make the background color for each character the height of the highest font used on the current line, or the height of the font used for the current character.
Rise
Number of pixels that the characters are risen above the baseline. See also ATK_TEXT_ATTR_TEXT_POSITION.
Underline
“none”, “single”, “double”, “low”, or “error”
Strikethrough
“true” or “false” whether the text is strikethrough
Size
The size of the characters in points. eg: 10
Scale
The scale of the characters. The value is a string representation of a double
Weight
The weight of the characters.
Language
The language used
FamilyName
The font family name
BgColor
The background color. The value is an RGB value of the format “u
,u
,u
”
FgColor
The foreground color. The value is an RGB value of the format “u
,u
,u
”
BgStipple
“true” if a GdkBitmap
is set for stippling the background color.
FgStipple
“true” if a GdkBitmap
is set for stippling the foreground color.
WrapMode
The wrap mode of the text, if any. Values are “none”, “char”, “word”, or “word_char”.
Direction
The direction of the text, if set. Values are “none”, “ltr” or “rtl”
Justification
The justification of the text, if set. Values are “left”, “right”, “center” or “fill”
Stretch
The stretch of the text, if set. Values are “ultra_condensed”, “extra_condensed”, “condensed”, “semi_condensed”, “normal”, “semi_expanded”, “expanded”, “extra_expanded” or “ultra_expanded”
Variant
The capitalization variant of the text, if set. Values are “normal” or “small_caps”
Style
The slant style of the text, if set. Values are “normal”, “oblique” or “italic”
TextPosition
The vertical position with respect to the baseline. Values are “baseline”, “super”, or “sub”. Note that a super or sub text attribute refers to position with respect to the baseline of the prior character.
LastDefined
not a valid text attribute, used for finding end of enumeration
Implementations
Trait Implementations
sourceimpl Clone for TextAttribute
impl Clone for TextAttribute
sourcefn clone(&self) -> TextAttribute
fn clone(&self) -> TextAttribute
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for TextAttribute
impl Debug for TextAttribute
sourceimpl Display for TextAttribute
impl Display for TextAttribute
sourceimpl<'a> FromValue<'a> for TextAttribute
impl<'a> FromValue<'a> for TextAttribute
type Checker = GenericValueTypeChecker<TextAttribute>
type Checker = GenericValueTypeChecker<TextAttribute>
sourceunsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Value
. Read moresourceimpl Hash for TextAttribute
impl Hash for TextAttribute
sourceimpl Ord for TextAttribute
impl Ord for TextAttribute
sourcefn cmp(&self, other: &TextAttribute) -> Ordering
fn cmp(&self, other: &TextAttribute) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl PartialEq<TextAttribute> for TextAttribute
impl PartialEq<TextAttribute> for TextAttribute
sourcefn eq(&self, other: &TextAttribute) -> bool
fn eq(&self, other: &TextAttribute) -> bool
sourceimpl PartialOrd<TextAttribute> for TextAttribute
impl PartialOrd<TextAttribute> for TextAttribute
sourcefn partial_cmp(&self, other: &TextAttribute) -> Option<Ordering>
fn partial_cmp(&self, other: &TextAttribute) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl StaticType for TextAttribute
impl StaticType for TextAttribute
sourcefn static_type() -> Type
fn static_type() -> Type
Self
.sourceimpl ToValue for TextAttribute
impl ToValue for TextAttribute
sourceimpl ValueType for TextAttribute
impl ValueType for TextAttribute
type Type = TextAttribute
type Type = TextAttribute
Type
from. Read moreimpl Copy for TextAttribute
impl Eq for TextAttribute
impl StructuralEq for TextAttribute
impl StructuralPartialEq for TextAttribute
Auto Trait Implementations
impl RefUnwindSafe for TextAttribute
impl Send for TextAttribute
impl Sync for TextAttribute
impl Unpin for TextAttribute
impl UnwindSafe for TextAttribute
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
sourceimpl<T> ToClosureReturnValue for Twhere
T: ToValue,
impl<T> ToClosureReturnValue for Twhere
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.