Index

Package: Attributes

Description

package Pango.Attributes is
---------------------------------------------------------------------------- -- Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet -- Copyright (C) 2000-2014, AdaCore -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free -- Software Foundation; either version 3, or (at your option) any later -- version. This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- As a special exception under Section 7 of GPL version 3, you are granted -- additional permissions described in the GCC Runtime Library Exception, -- version 3.1, as published by the Free Software Foundation. -- -- You should have received a copy of the GNU General Public License and -- a copy of the GCC Runtime Library Exception along with this program; -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- <http://www.gnu.org/licenses/>. -- -- ----------------------------------------------------------------------------

Packages

Filter_User_Data (generic)

Classes

Pango_Attr_List

type Pango_Attr_List is new Glib.C_Boxed with null record;

Ancestors:

Primitive operations:

From_Object_Free
Insert_Before
Pango_Attr_List_New

Types

Pango_Attribute

type Pango_Attribute is private;

Pango_Attr_Filter_Func

type Pango_Attr_Filter_Func is access function (Attribute : Pango_Attribute) return Boolean;
Type of a function filtering a list of attributes. "attribute": a Pango attribute

Constants & Global variables

Null_Pango_Attr_List (Pango_Attr_List)

Null_Pango_Attr_List : constant Pango_Attr_List;

Subprograms & Entries

From_Object_Free

function From_Object_Free 
(B: access Pango_Attribute) return Pango_Attribute;

From_Object

function From_Object 
(Object: System.Address) return Pango_Attr_List;

From_Object_Free

function From_Object_Free 
(B: access Pango_Attr_List'Class) return Pango_Attr_List;

Gdk_New

procedure Gdk_New 
(Self: out Pango_Attr_List);
Create a new empty attribute list with a reference count of one.

Pango_Attr_List_New

function Pango_Attr_List_New return Pango_Attr_List;
Create a new empty attribute list with a reference count of one.

Get_Type

function Get_Type return Glib.GType;

Copy

function Copy 
(Self: Pango_Attr_List) return Pango_Attr_List;
Copy List and return an identical new list.

Destroy

procedure Destroy 
(Self: Pango_Attribute);

Equal

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. "attr2": another Pango.Attributes.Pango_Attribute

Change

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 a 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. "attr": the attribute to insert. Ownership of this value is assumed by the list.

Filter

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 "func": callback function; returns True if an attribute should be filtered out.

Insert

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. "attr": the attribute to insert. Ownership of this value is assumed by the list.

Insert_Before

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. "attr": the attribute to insert. Ownership of this value is assumed by the list.

Ref

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

Splice

procedure Splice 
(Self: Pango_Attr_List;
Other: Pango_Attr_List;
Pos: Gint;
Len: 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. "other": another Pango.Attributes.Pango_Attr_List "pos": the position in List at which to insert Other "len": 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)

Unref

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.

Attr_Underline_New

function Attr_Underline_New 
(Underline: Pango.Enums.Underline) return Pango_Attribute;

Attr_Background_New

function Attr_Background_New 
(Red: Guint16;
Green: Guint16;
Blue: Guint16) return Pango_Attribute;

Attr_Foreground_New

function Attr_Foreground_New 
(Red: Guint16;
Green: Guint16;
Blue: Guint16) return Pango_Attribute;

Attr_Family_New

function Attr_Family_New 
(Family: UTF8_String) return Pango_Attribute;
Create a new font family attribute. "family": the family or comma separated list of families

Attr_Strikethrough_New

function Attr_Strikethrough_New 
(Strikethrough: Boolean) return Pango_Attribute;
Create a new strike-through attribute. "strikethrough": True if the text should be struck-through.

Attr_Variant_New

function Attr_Variant_New 
(Variant: Pango.Enums.Variant) return Pango_Attribute;

Attr_Weight_New

function Attr_Weight_New 
(Weight: Pango.Enums.Weight) return Pango_Attribute;

Attr_Stretch_New

function Attr_Stretch_New 
(Stretch: Pango.Enums.Stretch) return Pango_Attribute;

Attr_Scale_New

function Attr_Scale_New 
(Scale_Factor: Gdouble) return Pango_Attribute;

Attr_Rise_New

function Attr_Rise_New 
(Rise: Gint) return Pango_Attribute;

Attr_Gravity_New

function Attr_Gravity_New 
(Gravity: Pango.Enums.Gravity) return Pango_Attribute;