Struct gtk4::TextTagBuilder[][src]

pub struct TextTagBuilder { /* fields omitted */ }
Expand description

A builder-pattern type to construct TextTag objects.

Implementations

Create a new TextTagBuilder.

Build the TextTag.

Whether the margins accumulate or override each other.

When set to true the margins of this tag are added to the margins of any other non-accumulative margins present. When set to false the margins override one another (the default).

Whether breaks are allowed.

Background color as a string.

Whether the background color fills the entire line height or only the height of the tagged characters.

Background color as a gdk::RGBA.

Text direction, e.g. right-to-left or left-to-right.

Whether the text can be modified by the user.

Whether font fallback is enabled.

When set to true, other fonts will be substituted where the current font is missing glyphs.

Name of the font family, e.g. Sans, Helvetica, Times, Monospace.

Font description as string, e.g. "Sans Italic 12".

Note that the initial value of this property depends on the internals of pango::FontDescription.

Font description as a pango::FontDescription.

OpenType font features, as a string.

Foreground color as a string.

Foreground color as a gdk::RGBA.

Amount to indent the paragraph, in pixels.

Whether to insert hyphens at breaks.

Whether this text is hidden.

Note that there may still be problems with the support for invisible text, in particular when navigating programmatically inside a buffer containing invisible segments.

Lett, right, or center justification.

The language this text is in, as an ISO code.

Pango can use this as a hint when rendering the text. If not set, an appropriate default will be used.

Note that the initial value of this property depends on the current locale, see also default_language().

Width of the left margin in pixels.

Extra spacing between graphemes, in Pango units.

The name used to refer to the tag.

None for anonymous tags.

This property modifies the color of overlines.

If not set, overlines will use the foreground color.

The paragraph background color as a string.

The paragraph background color as a gdk::RGBA.

Pixels of blank space above paragraphs.

Pixels of blank space below paragraphs.

Pixels of blank space between wrapped lines in a paragraph.

Width of the right margin, in pixels.

Offset of text above the baseline, in Pango units.

Negative values go below the baseline.

Font size as a scale factor relative to the default font size.

This properly adapts to theme changes, etc. so is recommended. Pango predefines some scales such as PANGO_SCALE_X_LARGE.

How to render invisible characters.

Font size in Pango units.

Font size in points.

Font stretch as a pango::Stretch, e.g. pango::Stretch::Condensed.

Whether to strike through the text.

This property modifies the color of strikeouts.

If not set, strikeouts will use the foreground color.

If the property::TextTag::strikethrough-rgba property has been set.

Font style as a pango::Style, e.g. pango::Style::Italic.

Custom tabs for this text.

Style of underline for this text.

This property modifies the color of underlines.

If not set, underlines will use the foreground color.

If property::TextTag::underline is set to pango::Underline::Error, an alternate color may be applied instead of the foreground. Setting this property will always override those defaults.

If the property::TextTag::underline-rgba property has been set.

Font variant as a pango::Variant, e.g. pango::Variant::SmallCaps.

Font weight as an integer.

Whether to wrap lines never, at word boundaries, or at character boundaries.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.