PgAttribute

The #PangoAttribute structure represents the common portions of all attributes. Particular types of attributes include this structure as their initial portion. The common portion of the attribute holds the range to which the value in the type-specific part of the attribute applies and should be initialized using pango_attribute_init(). By default an attribute will have an all-inclusive range of [0,%G_MAXUINT].

class PgAttribute {}

Constructors

this
this(PangoAttribute* pangoAttribute, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

copy
PgAttribute copy()

Make a copy of an attribute.

destroy
void destroy()

Destroy a #PangoAttribute and free all associated memory.

equal
bool equal(PgAttribute attr2)

Compare two attributes for equality. This compares only the actual value of the two attributes and not the ranges that the attributes apply to.

getPgAttributeStruct
PangoAttribute* getPgAttributeStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

init
void init(PangoAttrClass* klass)

Initializes @attr's klass to @klass, it's start_index to %PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING and end_index to %PANGO_ATTR_INDEX_TO_TEXT_END such that the attribute applies to the entire text by default.

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

backgroundAlphaNew
PgAttribute backgroundAlphaNew(ushort alpha)

Create a new background alpha attribute.

backgroundNew
PgAttribute backgroundNew(ushort red, ushort green, ushort blue)

Create a new background color attribute.

fallbackNew
PgAttribute fallbackNew(bool enableFallback)

Create a new font fallback attribute.

familyNew
PgAttribute familyNew(string family)

Create a new font family attribute.

foregroundAlphaNew
PgAttribute foregroundAlphaNew(ushort alpha)

Create a new foreground alpha attribute.

foregroundNew
PgAttribute foregroundNew(ushort red, ushort green, ushort blue)

Create a new foreground color attribute.

gravityHintNew
PgAttribute gravityHintNew(PangoGravityHint hint)

Create a new gravity hint attribute.

gravityNew
PgAttribute gravityNew(PangoGravity gravity)

Create a new gravity attribute.

letterSpacingNew
PgAttribute letterSpacingNew(int letterSpacing)

Create a new letter-spacing attribute.

markupParserFinish
bool markupParserFinish(SimpleXML context, PgAttributeList attrList, string text, dchar accelChar)

After feeding a pango markup parser some data with g_markup_parse_context_parse(), use this function to get the list of pango attributes and text out of the markup. This function will not free @context, use g_markup_parse_context_free() to do so.

markupParserNew
SimpleXML markupParserNew(dchar accelMarker)

Parses marked-up text (see <link linkend="PangoMarkupFormat">markup format</link>) to create a plain-text string and an attribute list.

parseMarkup
bool parseMarkup(string markupText, int length, dchar accelMarker, PgAttributeList attrList, string text, dchar accelChar)

Parses marked-up text (see <link linkend="PangoMarkupFormat">markup format</link>) to create a plain-text string and an attribute list.

riseNew
PgAttribute riseNew(int rise)

Create a new baseline displacement attribute.

scaleNew
PgAttribute scaleNew(double scaleFactor)

Create a new font size scale attribute. The base font for the affected text will have its size multiplied by @scale_factor.

stretchNew
PgAttribute stretchNew(PangoStretch stretch)

Create a new font stretch attribute

strikethroughColorNew
PgAttribute strikethroughColorNew(ushort red, ushort green, ushort blue)

Create a new strikethrough color attribute. This attribute modifies the color of strikethrough lines. If not set, strikethrough lines will use the foreground color.

strikethroughNew
PgAttribute strikethroughNew(bool strikethrough)

Create a new strike-through attribute.

styleNew
PgAttribute styleNew(PangoStyle style)

Create a new font slant style attribute.

typeGetName
string typeGetName(PangoAttrType type)

Fetches the attribute type name passed in when registering the type using pango_attr_type_register().

typeRegister
PangoAttrType typeRegister(string name)

Allocate a new attribute type ID. The attribute type name can be accessed later by using pango_attr_type_get_name().

underlineColorNew
PgAttribute underlineColorNew(ushort red, ushort green, ushort blue)

Create a new underline color attribute. This attribute modifies the color of underlines. If not set, underlines will use the foreground color.

underlineNew
PgAttribute underlineNew(PangoUnderline underline)

Create a new underline-style attribute.

variantNew
PgAttribute variantNew(PangoVariant variant)

Create a new font variant attribute (normal or small caps)

weightNew
PgAttribute weightNew(PangoWeight weight)

Create a new font weight attribute.

Variables

ownedRef
bool ownedRef;
Undocumented in source.
pangoAttribute
PangoAttribute* pangoAttribute;

the main Gtk struct

Meta