type Pango_Layout_Record is new Glib.Object.GObject_Record with private;
type Pango_Layout is access all Pango_Layout_Record'Class;
type Pango_Ellipsize_Mode is (Ellipsize_None, Ellipsize_Start, Ellipsize_Middle, Ellipsize_End);
type Pango_Layout_Line is new Glib.C_Proxy;
procedure Gdk_New
( | Layout | : out Pango_Layout; |
Context | : access Pango.Context.Pango_Context_Record'Class); |
function Get_Context
( | Layout | : access Pango_Layout_Record) return Pango.Context.Pango_Context; |
procedure Set_Font_Description
( | Layout | : access Pango_Layout_Record; |
Font | : Pango.Font.Pango_Font_Description); |
procedure Context_Changed
( | Layout | : access Pango_Layout_Record); |
function Get_Line
( | Layout | : access Pango_Layout_Record; |
Line | : Natural) return Pango_Layout_Line; |
procedure Line_Unref
( | Line | : Pango_Layout_Line); |
function Line_Index_To_X
( | Line | : Pango_Layout_Line; |
Index | : Integer; | |
Trailing | : Integer) return Glib.Gint; |
procedure Get_Extents
( | Layout | : access Pango_Layout_Record; |
Ink_Rect | : out Gdk.Rectangle.Gdk_Rectangle; | |
Logical_Rect | : out Gdk.Rectangle.Gdk_Rectangle); |
procedure Get_Size
( | Layout | : access Pango_Layout_Record; |
Width | : out Glib.Gint; | |
Height | : out Glib.Gint); |
procedure Get_Pixel_Extents
( | Layout | : access Pango_Layout_Record; |
Ink_Rect | : out Gdk.Rectangle.Gdk_Rectangle; | |
Logical_Rect | : out Gdk.Rectangle.Gdk_Rectangle); |
procedure Get_Pixel_Size
( | Layout | : access Pango_Layout_Record; |
Width | : out Glib.Gint; | |
Height | : out Glib.Gint); |
procedure XY_To_Index
( | Layout | : access Pango_Layout_Record; |
X_Pango, Y_Pango | : Glib.Gint; | |
Byte_Index | : out Integer; | |
Trailing | : out Integer; | |
Exact | : out Boolean); |
procedure Set_Text
( | Layout | : access Pango_Layout_Record; |
Text | : String); |
function Get_Text
( | Layout | : access Pango_Layout_Record) return String; |
function Get_Text
( | Layout | : access Pango_Layout_Record) return Gtkada.Types.Chars_Ptr; |
function Get_Line_Count
( | Layout | : access Pango_Layout_Record) return Glib.Gint; |
procedure Set_Markup
( | Layout | : access Pango_Layout_Record; |
Markup | : Glib.UTF8_String); |
procedure Set_Justify
( | Layout | : access Pango_Layout_Record; |
Justify | : Boolean); |
function Get_Justify
( | Layout | : access Pango_Layout_Record) return Boolean; |
procedure Set_Alignment
( | Layout | : access Pango_Layout_Record'Class; |
Alignment | : Pango_Alignment); |
function Get_Alignment
( | Layout | : access Pango_Layout_Record) return Pango_Alignment; |
procedure Set_Width
( | Layout | : access Pango_Layout_Record; |
Width | : Glib.Gint); |
function Get_Width
( | Layout | : access Pango_Layout_Record) return Glib.Gint; |
procedure Set_Wrap
( | Layout | : access Pango_Layout_Record; |
Mode | : Pango_Wrap_Mode); |
function Get_Wrap
( | Layout | : access Pango_Layout_Record) return Pango_Wrap_Mode; |
procedure Set_Tabs
( | Layout | : access Pango_Layout_Record; |
Tabs | : Pango.Tabs.Pango_Tab_Array); |
function Get_Tabs
( | Layout | : access Pango_Layout_Record) return Pango.Tabs.Pango_Tab_Array; |
procedure Set_Attributes
( | Layout | : access Pango_Layout_Record; |
Attributes | : Pango.Attributes.Pango_Attr_List); |
function Get_Attributes
( | Layout | : access Pango_Layout_Record) return Pango.Attributes.Pango_Attr_List; |
This package provides a high-level object that is capable of arranging text in a visually correct manner. It supports international character sets, although all strings should be Utf8, supports left-to-right and right-to-left writing systems, is capable of handling multi-line texts, and properly aligns tab characters in the text.
This is the base type that is used in the standard gtk+ widget for all the widgets that display some text on the screen.
Since it works directly with Pango.Font.Pango_Font_Description fonts, it is also much better at handling resizing of text, wrapping,... than direct calls to Gdk.Drawable.Draw_Text.
The idea is that this widget is used to compute the layout of the characters (ie their screen position). It doesn't do any rendering, however, and should be used in conjonction with Gdk.Drawable.Draw_Layout to actually display something on the screen.
This widget is independent from any specific drawing systems, and might for instance be used to create postscript documents, for direct access to the win32 API,...
This widget represents one of the fundamental additions to gtk+ 2.0 over what previously existed in the gtk+ 1.x series. It obsoletes the package Gdk.Font, which should only be used for legacy applications.