The Pango.Attributes.Pango_Attribute 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].
function Attr_Background_New
(Red : Guint16;
Green : Guint16;
Blue : Guint16) return Pango_Attribute
Create a new background color attribute.
the red value (ranging from 0 to 65535)
the green value
the blue value
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
function Attr_Family_New (Family : UTF8_String) return Pango_Attribute
Create a new font family attribute.
the family or comma separated list of families
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
function Attr_Foreground_New
(Red : Guint16;
Green : Guint16;
Blue : Guint16) return Pango_Attribute
Create a new foreground color attribute.
the red value (ranging from 0 to 65535)
the green value
the blue value
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
function Attr_Gravity_New
(Gravity : Pango.Enums.Gravity) return Pango_Attribute
Create a new gravity attribute. Since: gtk+ 1.16
the gravity value; should not be Pango.Enums.Pango_Gravity_Auto.
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
function Attr_Rise_New (Rise : Glib.Gint) return Pango_Attribute
Create a new baseline displacement attribute.
the amount that the text should be displaced vertically, in Pango units. Positive values displace the text upwards.
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
function Attr_Scale_New (Scale_Factor : Gdouble) return Pango_Attribute
Create a new font size scale attribute. The base font for the affected text will have its size multiplied by Scale_Factor.
factor to scale the font
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
function Attr_Stretch_New
(Stretch : Pango.Enums.Stretch) return Pango_Attribute
Create a new font stretch attribute
the stretch
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
function Attr_Strikethrough_New
(Strikethrough : Boolean) return Pango_Attribute
Create a new strike-through attribute.
True if the text should be struck-through.
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
function Attr_Underline_New
(Underline : Pango.Enums.Underline) return Pango_Attribute
Create a new underline-style attribute.
the underline style.
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
function Attr_Variant_New
(Variant : Pango.Enums.Variant) return Pango_Attribute
Create a new font variant attribute (normal or small caps)
the variant
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
function Attr_Weight_New
(Weight : Pango.Enums.Weight) return Pango_Attribute
Create a new font weight attribute.
the weight
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
procedure Change (Self : Pango_Attr_List; Attr : Pango_Attribute)
Insert the given attribute into the Pango.Attributes.Pango_Attr_List. It will replace any attributes of the same type on that segment and be merged with any adjoining attributes that are identical. This function is slower than Pango.Attributes.Insert for creating an attribute list in order (potentially much slower for large lists). However, Pango.Attributes.Insert is not suitable for continually changing a set of attributes since it never removes or combines existing attributes.
the attribute to insert. Ownership of this value is assumed by the list.
function Convert (R : Pango.Attributes.Pango_Attribute) return System.Address
function Convert (R : System.Address) return Pango.Attributes.Pango_Attribute
function Copy (Self : Pango_Attr_List) return Pango_Attr_List
Copy List and return an identical new list.
the newly allocated Pango.Attributes.Pango_Attr_List, with a reference count of one, which should be freed with Pango.Attributes.Unref. Returns null if List was null.
function Copy (Self : Pango_Attribute) return Pango_Attribute
Make a copy of an attribute.
the newly allocated Pango.Attributes.Pango_Attribute, which should be freed with Pango.Attributes.Destroy.
procedure Destroy (Self : Pango_Attribute)
Destroy a Pango.Attributes.Pango_Attribute and free all associated memory.
function Equal
(Self : Pango_Attribute;
Attr2 : Pango_Attribute) return Boolean
Compare two attributes for equality. This compares only the actual value of the two attributes and not the ranges that the attributes apply to.
another Pango.Attributes.Pango_Attribute
True if the two attributes have the same value.
function Filter
(Self : Pango_Attr_List;
Func : Pango_Attr_Filter_Func) return Pango_Attr_List
Given a Pango.Attributes.Pango_Attr_List and callback function, removes any elements of List for which Func returns True and inserts them into a new list. Since: gtk+ 1.2
callback function; returns True if an attribute should be filtered out.
the new Pango.Attributes.Pango_Attr_List or null if no attributes of the given types were found.
function From_Object (Object : System.Address) return Pango_Attr_List
function From_Object_Free (B : access Pango_Attr_List'Class) return Pango_Attr_List
function From_Object_Free (B : access Pango_Attribute) return Pango_Attribute
The Pango.Attributes.Pango_Attribute 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].
procedure Gdk_New (Self : out Pango_Attr_List)
Create a new empty attribute list with a reference count of one.
function Get_Type_Attr_List return Glib.GType
function Get_Type_Attribute return Glib.GType
procedure Insert (Self : Pango_Attr_List; Attr : Pango_Attribute)
Insert the given attribute into the Pango.Attributes.Pango_Attr_List. It will be inserted after all other attributes with a matching Start_Index.
the attribute to insert. Ownership of this value is assumed by the list.
procedure Insert_Before (Self : Pango_Attr_List; Attr : Pango_Attribute)
Insert the given attribute into the Pango.Attributes.Pango_Attr_List. It will be inserted before all other attributes with a matching Start_Index.
the attribute to insert. Ownership of this value is assumed by the list.
Null_Pango_Attr_List : constant Pango_Attr_List;
type Pango_Attr_Filter_Func is access function (Attribute : Pango_Attribute) return Boolean;
Type of a function filtering a list of attributes.
a Pango attribute
True if the attribute should be selected for filtering, False otherwise.
type Pango_Attr_List is new Glib.C_Boxed with null record;
function Pango_Attr_List_New return Pango_Attr_List
Create a new empty attribute list with a reference count of one.
type Pango_Attribute is new Glib.C_Proxy;
The Pango.Attributes.Pango_Attribute 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].
package Pango_Attribute_SList is new Generic_SList (Pango.Attributes.Pango_Attribute);
function Ref (Self : Pango_Attr_List) return Pango_Attr_List
Increase the reference count of the given attribute list by one. Since: gtk+ 1.10
The attribute list passed in
procedure Splice
(Self : Pango_Attr_List;
Other : Pango_Attr_List;
Pos : Glib.Gint;
Len : Glib.Gint)
This function opens up a hole in List, fills it in with attributes from the left, and then merges Other on top of the hole. This operation is equivalent to stretching every attribute that applies at position Pos in List by an amount Len, and then calling Pango.Attributes.Change with a copy of each attribute in Other in sequence (offset in position by Pos). This operation proves useful for, for instance, inserting a pre-edit string in the middle of an edit buffer.
another Pango.Attributes.Pango_Attr_List
the position in List at which to insert Other
the length of the spliced segment. (Note that this must be specified since the attributes in Other may only be present at some subsection of this range)
procedure Unref (Self : Pango_Attr_List)
Decrease the reference count of the given attribute list by one. If the result is zero, free the attribute list and the attributes it contains.
procedure Update
(Self : Pango_Attr_List;
Pos : Glib.Gint;
Remove : Glib.Gint;
Add : Glib.Gint)
Update indices of attributes in List for a change in the text they refer to. The change that this function applies is removing Remove bytes at position Pos and inserting Add bytes instead. Attributes that fall entirely in the (Pos, Pos + Remove) range are removed. Attributes that start or end inside the (Pos, Pos + Remove) range are shortened to reflect the removal. Attributes start and end positions are updated if they are behind Pos + Remove. Since: gtk+ 1.44
the position of the change
the number of removed bytes
the number of added bytes