## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Label

- Goto spec source

# Description

    package Gtk.Label is

A Gtk_Label is a light widget associated with some text you want to display on the screen. You can change the text dynamically if needed.

The text can be on multiple lines if you separate each line with the ASCII.LF character. However, this is not the recommended way to display long texts (see the Gtk_Text widget instead). == Mnemonics == Labels may contain mnemonics. Mnemonics are underlined characters in the label, used for keyboard navigation. Mnemonics are created by providing string with an underscore before the mnemonic character, such as "_File", to the functions gtk_new_with_mnemonic or set_text_with_mnemonic().

Mnemonics automatically activate any activatable widget the label is inside, such as a Gtk_Button; if the label is not inside the mnemonic's target widget, you have to tell the label about the target using set_mnemonic_widget(). For instance: declare Button : Gtk_Button; Label : Gtk_Label; begin Gtk_New (Button); Gtk_New_With_Mnemonic (Label, "_File"); Add (Button, Label); end; However, there exists a convenience function in Gtk.Button to create such a button already. == Markup == To make it easy to format text in a label (changing colors, fonts, etc.), label text can be provided in a simple markup format. Here's how to create a label with a small font: Gtk_New (Label, "<small>hello</small>"); The markup must be valid, and <>& characters must be escaped with &lt; &gt; and &amp; Markup strings are just a convenient way to set the Pango_Attr_List on label; Set_Attributes() may be a simpler way to set attributes in some cases. Be careful though; Pango_Attr_List tends to cause internationalization problems, unless you're applying attributes to the entire string (i.e. unless you set the range of each attribute to [0, G_MAXINT)). The reason is that specifying the start_index and end_index for a Pango_Attribute requires knowledge of the exact string being displayed, so translations will cause problems. == Selectable labels == Labels can be made selectable with Set_Selectable. Selectable labels allow the user to copy the label contents to the clipboard. Only should be made selectable.

### Screenshot

<testgtk>create_label.adb</testgtk>

# Packages

### Implements_Buildable (new Glib.Types.Implements)

    package Implements_Buildable is new Glib.Types.Implements
         (Gtk.Buildable.Gtk_Buildable, Gtk_Label_Record, Gtk_Label);

# Classes

### Gtk_Label_Record

- Goto declaration in source

    type Gtk_Label_Record is new Gtk_Misc_Record with null record;

#### Ancestors:

Gtk.Misc.Gtk_Misc_Record
Gtk.Widget.Gtk_Widget_Record
Glib.Object.GObject_Record

#### Immediate Children:

Gtk.Accel_Label.Gtk_Accel_Label_Record
Gtk.Tips_Query.Gtk_Tips_Query_Record

#### Primitive operations:

Get_Angle

- To API doc
- To spec

Get_Attributes

- To API doc
- To spec

Get_Current_Uri

- To API doc
- To spec

Get_Ellipsize

- To API doc
- To spec

Get_Justify

- To API doc
- To spec

Get_Label

- To API doc
- To spec

Get_Layout

- To API doc
- To spec

Get_Layout_Offsets

- To API doc
- To spec

Get_Line_Wrap

- To API doc
- To spec

Get_Line_Wrap_Mode

- To API doc
- To spec

Get_Max_Width_Chars

- To API doc
- To spec

Get_Mnemonic_Keyval

- To API doc
- To spec

Get_Mnemonic_Widget

- To API doc
- To spec

Get_Selectable

- To API doc
- To spec

Get_Selection_Bounds

- To API doc
- To spec

Get_Single_Line_Mode

- To API doc
- To spec

Get_Text

- To API doc
- To spec

Get_Track_Visited_Links

- To API doc
- To spec

Get_Use_Markup

- To API doc
- To spec

Get_Use_Underline

- To API doc
- To spec

Get_Width_Chars

- To API doc
- To spec

Glib.Object.Deallocate

- To API doc
- To spec

(Inherited)
Glib.Object.Get_Type

- To API doc
- To spec

(Inherited)
Glib.Object.Notify

- To API doc
- To spec

(Inherited)
Glib.Object.Ref

- To API doc
- To spec

(Inherited)
Glib.Object.Ref_Sink

- To API doc
- To spec

(Inherited)
Glib.Object.Unref

- To API doc
- To spec

(Inherited)
Gtk.Misc.Get_Alignment

- To API doc
- To spec

(Inherited)
Gtk.Misc.Get_Padding

- To API doc
- To spec

(Inherited)
Gtk.Misc.Set_Alignment

- To API doc
- To spec

(Inherited)
Gtk.Misc.Set_Padding

- To API doc
- To spec

(Inherited)
Gtk.Widget.Activate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Accelerator

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Add_Mnemonic_Label

- To API doc
- To spec

(Inherited)
Gtk.Widget.Can_Activate_Accel

- To API doc
- To spec

(Inherited)
Gtk.Widget.Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Class_Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Class_Path_Reversed

- To API doc
- To spec

(Inherited)
Gtk.Widget.Create_Pango_Context

- To API doc
- To spec

(Inherited)
Gtk.Widget.Create_Pango_Layout

- To API doc
- To spec

(Inherited)
Gtk.Widget.Destroy

- To API doc
- To spec

(Inherited)
Gtk.Widget.Draw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Ensure_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Error_Bell

- To API doc
- To spec

(Inherited)
Gtk.Widget.Flag_Is_Set

- To API doc
- To spec

(Inherited)
Gtk.Widget.Flags

- To API doc
- To spec

(Inherited)
Gtk.Widget.Freeze_Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Height

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Width

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_X

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Allocation_Y

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Ancestor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Child_Requisition

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Child_Visible

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Colormap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Composite_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Direction

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Extension_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Has_Tooltip

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_No_Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Pango_Context

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Parent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Parent_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Pointer

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Root_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Snapshot

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_State

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Markup

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Tooltip_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Toplevel

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Visual

- To API doc
- To spec

(Inherited)
Gtk.Widget.Get_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Grab_Default

- To API doc
- To spec

(Inherited)
Gtk.Widget.Grab_Focus

- To API doc
- To spec

(Inherited)
Gtk.Widget.Has_Screen

- To API doc
- To spec

(Inherited)
Gtk.Widget.Hide

- To API doc
- To spec

(Inherited)
Gtk.Widget.Hide_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Input_Shape_Combine_Mask

- To API doc
- To spec

(Inherited)
Gtk.Widget.Intersect

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Ancestor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Composited

- To API doc
- To spec

(Inherited)
Gtk.Widget.Is_Focus

- To API doc
- To spec

(Inherited)
Gtk.Widget.Keynav_Failed

- To API doc
- To spec

(Inherited)
Gtk.Widget.List_Mnemonic_Labels

- To API doc
- To spec

(Inherited)
Gtk.Widget.Map

- To API doc
- To spec

(Inherited)
Gtk.Widget.Mnemonic_Activate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Base

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Bg

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Cursor

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Fg

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Font

- To API doc
- To spec

(Inherited)
Gtk.Widget.Modify_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Path_Reversed

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Clear

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Clear_Area

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Draw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Draw_Area

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Resize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Queue_Resize_No_Redraw

- To API doc
- To spec

(Inherited)
Gtk.Widget.Realize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Region_Intersect

- To API doc
- To spec

(Inherited)
Gtk.Widget.Remove_Accelerator

- To API doc
- To spec

(Inherited)
Gtk.Widget.Remove_Mnemonic_Label

- To API doc
- To spec

(Inherited)
Gtk.Widget.Render_Icon

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reparent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reset_Rc_Styles

- To API doc
- To spec

(Inherited)
Gtk.Widget.Reset_Shapes

- To API doc
- To spec

(Inherited)
Gtk.Widget.Restore_Default_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Send_Expose

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Accel_Path

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_App_Paintable

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Child_Visible

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Colormap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Composite_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Direction

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Double_Buffered

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Extension_Events

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Flags

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Has_Tooltip

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Name

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_No_Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Parent

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Parent_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Redraw_On_Allocate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Scroll_Adjustments

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Sensitive

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_State

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Style

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Markup

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Text

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Tooltip_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_UPosition

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_USize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Set_Window

- To API doc
- To spec

(Inherited)
Gtk.Widget.Shape_Combine_Mask

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show_All

- To API doc
- To spec

(Inherited)
Gtk.Widget.Show_Now

- To API doc
- To spec

(Inherited)
Gtk.Widget.Size_Allocate

- To API doc
- To spec

(Inherited)
Gtk.Widget.Size_Request

- To API doc
- To spec

(Inherited)
Gtk.Widget.Style_Get_Property

- To API doc
- To spec

(Inherited)
Gtk.Widget.Thaw_Child_Notify

- To API doc
- To spec

(Inherited)
Gtk.Widget.Trigger_Tooltip_Query

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unmap

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unrealize

- To API doc
- To spec

(Inherited)
Gtk.Widget.Unset_Flags

- To API doc
- To spec

(Inherited)
Parse_Uline

- To API doc
- To spec

Select_Region

- To API doc
- To spec

Set_Angle

- To API doc
- To spec

Set_Attributes

- To API doc
- To spec

Set_Ellipsize

- To API doc
- To spec

Set_Justify

- To API doc
- To spec

Set_Label

- To API doc
- To spec

Set_Line_Wrap

- To API doc
- To spec

Set_Line_Wrap_Mode

- To API doc
- To spec

Set_Markup

- To API doc
- To spec

Set_Markup_With_Mnemonic

- To API doc
- To spec

Set_Max_Width_Chars

- To API doc
- To spec

Set_Mnemonic_Widget

- To API doc
- To spec

Set_Pattern

- To API doc
- To spec

Set_Selectable

- To API doc
- To spec

Set_Single_Line_Mode

- To API doc
- To spec

Set_Text

- To API doc
- To spec

Set_Text_With_Mnemonic

- To API doc
- To spec

Set_Track_Visited_Links

- To API doc
- To spec

Set_Use_Markup

- To API doc
- To spec

Set_Use_Underline

- To API doc
- To spec

Set_Width_Chars

- To API doc
- To spec

# Types

### Gtk_Label

- Goto declaration in source

    type Gtk_Label is access all Gtk_Label_Record'Class;

# Constants & Global variables

### Angle_Property

- Goto declaration in source

(Glib.Properties.Property_Double)

    Angle_Property : constant Glib.Properties.Property_Double;

### Cursor_Position_Property

- Goto declaration in source

(Glib.Properties.Property_Int)

    Cursor_Position_Property : constant Glib.Properties.Property_Int;

### Justify_Property

- Goto declaration in source

(Gtk.Enums.Property_Gtk_Justification)

    Justify_Property : constant Gtk.Enums.Property_Gtk_Justification;

### Label_Property

- Goto declaration in source

(Glib.Properties.Property_String)

    Label_Property : constant Glib.Properties.Property_String;

### Max_Width_Chars_Property

- Goto declaration in source

(Glib.Properties.Property_Int)

    Max_Width_Chars_Property : constant Glib.Properties.Property_Int;

### Mnemonic_Keyval_Property

- Goto declaration in source

(Glib.Properties.Property_Uint)

    Mnemonic_Keyval_Property : constant Glib.Properties.Property_Uint;

### Mnemonic_Widget_Property

- Goto declaration in source

(Glib.Properties.Property_Object)

    Mnemonic_Widget_Property : constant Glib.Properties.Property_Object;

### Pattern_Property

- Goto declaration in source

(Glib.Properties.Property_String)

    Pattern_Property : constant Glib.Properties.Property_String;

### Selectable_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Selectable_Property : constant Glib.Properties.Property_Boolean;

### Selection_Bound_Property

- Goto declaration in source

(Glib.Properties.Property_Int)

    Selection_Bound_Property : constant Glib.Properties.Property_Int;

### Single_Line_Mode_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Single_Line_Mode_Property : constant Glib.Properties.Property_Boolean;

### Track_Visited_Links_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Track_Visited_Links_Property : constant Glib.Properties.Property_Boolean;

### Use_Markup_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Use_Markup_Property : constant Glib.Properties.Property_Boolean;

### Use_Underline_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Use_Underline_Property : constant Glib.Properties.Property_Boolean;

### Width_Chars_Property

- Goto declaration in source

(Glib.Properties.Property_Int)

    Width_Chars_Property : constant Glib.Properties.Property_Int;

### Wrap_Property

- Goto declaration in source

(Glib.Properties.Property_Boolean)

    Wrap_Property : constant Glib.Properties.Property_Boolean;

### Signal_Activate_Current_Link

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Activate_Current_Link : constant Glib.Signal_Name := "activate-current-link";

### Signal_Activate_Link

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Activate_Link : constant Glib.Signal_Name := "activate-link";

### Signal_Copy_Clipboard

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Copy_Clipboard : constant Glib.Signal_Name := "copy-clipboard";

### Signal_Move_Cursor

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Move_Cursor : constant Glib.Signal_Name := "move-cursor";

### Signal_Populate_Popup

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Populate_Popup : constant Glib.Signal_Name := "populate-popup";

# Subprograms & Entries

### Gtk_New

- Goto spec in source

    procedure Gtk_New (Label: out Gtk_Label;Str: UTF8_String := "");

### Initialize

- Goto spec in source

    procedure Initialize (Label: access Gtk_Label_Record'Class;Str: UTF8_String := "");

Creates a new label with the given text inside it. You can pass null to get an empty label widget. "str": The text of the label

### Gtk_New_With_Mnemonic

- Goto spec in source

    procedure Gtk_New_With_Mnemonic (Label: out Gtk_Label;Str: UTF8_String);

### Initialize_With_Mnemonic

- Goto spec in source

    procedure Initialize_With_Mnemonic (Label: access Gtk_Label_Record'Class;Str: UTF8_String);

Creates a new Gtk.Label.Gtk_Label, containing the text in Str. If characters in Str are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use '__' (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic. The mnemonic key can be used to activate another widget, chosen automatically, or explicitly using Gtk.Label.Set_Mnemonic_Widget. If Gtk.Label.Set_Mnemonic_Widget is not called, then the first activatable ancestor of the Gtk.Label.Gtk_Label will be chosen as the mnemonic widget. For instance, if the label is inside a button or menu item, the button or menu item will automatically become the mnemonic widget and be activated by the mnemonic. "str": The text of the label, with an underscore in front of the mnemonic character

### Get_Type

- Goto spec in source
- Goto body in source

    function Get_Type return Glib.GType;

### Get_Angle

- Goto spec in source

    function Get_Angle (Label: access Gtk_Label_Record) return Gdouble;

### Set_Angle

- Goto spec in source

    procedure Set_Angle (Label: access Gtk_Label_Record;Angle: Gdouble);

Sets the angle of rotation for the label. An angle of 90 reads from from bottom to top, an angle of 270, from top to bottom. The angle setting for the label is ignored if the label is selectable, wrapped, or ellipsized. Since: gtk+ 2.6 "angle": the angle that the baseline of the label makes with the horizontal, in degrees, measured counterclockwise

### Get_Attributes

- Goto spec in source

    function Get_Attributes (Label: access Gtk_Label_Record) return Pango.Attributes.Pango_Attr_List;

### Set_Attributes

- Goto spec in source

    procedure Set_Attributes (Label: access Gtk_Label_Record;Attrs: out Pango.Attributes.Pango_Attr_List);

Sets a Pango.Attributes.Pango_Attr_List; the attributes in the list are applied to the label text. Note: The attributes set with this function will be applied and merged with any other attributes previously effected by way of the Gtk.Label.Gtk_Label:use-underline or Gtk.Label.Gtk_Label:use-markup properties. While it is not recommended to mix markup strings with manually set attributes, if you must; know that the attributes will be applied to the label after the markup string is parsed. "attrs": a Pango.Attributes.Pango_Attr_List

### Get_Current_Uri

- Goto spec in source

    function Get_Current_Uri (Label: access Gtk_Label_Record) return UTF8_String;

Returns the URI for the currently active link in the label. The active link is the one under the mouse pointer or, in a selectable label, the link in which the text cursor is currently positioned. This function is intended for use in a Gtk.Label.Gtk_Label::activate-link handler or for use in a Gtk.Widget.Gtk_Widget::query-tooltip handler. not be freed or modified. Since: gtk+ 2.18

### Get_Ellipsize

- Goto spec in source

    function Get_Ellipsize (Label: access Gtk_Label_Record) return Pango.Layout.Pango_Ellipsize_Mode;

### Set_Ellipsize

- Goto spec in source

    procedure Set_Ellipsize (Label: access Gtk_Label_Record;Mode: Pango.Layout.Pango_Ellipsize_Mode);

if there is not enough space to render the entire string. Since: gtk+ 2.6 "mode": a Pango.Layout.Pango_Ellipsize_Mode

### Get_Justify

- Goto spec in source

    function Get_Justify (Label: access Gtk_Label_Record) return Gtk.Enums.Gtk_Justification;

### Set_Justify

- Goto spec in source

    procedure Set_Justify (Label: access Gtk_Label_Record;Jtype: Gtk.Enums.Gtk_Justification);

Sets the alignment of the lines in the text of the label relative to each other. %GTK_JUSTIFY_LEFT is the default value when the widget is first created with Gtk.Label.Gtk_New. If you instead want to set the alignment of the label as a whole, use Gtk.Misc.Set_Alignment instead. Gtk.Label.Set_Justify has no effect on labels containing only a single line. "jtype": a Gtk.Enums.Gtk_Justification

### Get_Label

- Goto spec in source

    function Get_Label (Label: access Gtk_Label_Record) return UTF8_String;

### Set_Label

- Goto spec in source

    procedure Set_Label (Label: access Gtk_Label_Record;Str: UTF8_String);

Sets the text of the label. The label is interpreted as including embedded underlines and/or Pango markup depending on the values of the Gtk.Label.Gtk_Label:use-underline" and Gtk.Label.Gtk_Label:use-markup properties. "str": the new text to set for the label

### Get_Layout

- Goto spec in source

    function Get_Layout (Label: access Gtk_Label_Record) return Pango.Layout.Pango_Layout;

Gets the Pango.Layout.Pango_Layout used to display the label. The layout is useful to e.g. convert text positions to pixel positions, in combination with Gtk.Label.Get_Layout_Offsets. The returned layout is owned by the label so need not be freed by the caller.

### Get_Layout_Offsets

- Goto spec in source

    procedure Get_Layout_Offsets (Label: access Gtk_Label_Record;X: out Gint;Y: out Gint);

Obtains the coordinates where the label will draw the Pango.Layout.Pango_Layout representing the text in the label; useful to convert mouse events into coordinates inside the Pango.Layout.Pango_Layout, e.g. to take some action if some part of the label is clicked. Of course you will need to create a Gtk.Event_Box.Gtk_Event_Box to receive the events, and pack the label inside it, since labels are a GTK_NO_WINDOW widget. Remember when using the Pango.Layout.Pango_Layout functions you need to convert to and from pixels using PANGO_PIXELS or PANGO_SCALE. "x": location to store X offset of layout, or null "y": location to store Y offset of layout, or null

### Get_Line_Wrap

- Goto spec in source

    function Get_Line_Wrap (Label: access Gtk_Label_Record) return Boolean;

### Set_Line_Wrap

- Goto spec in source

    procedure Set_Line_Wrap (Label: access Gtk_Label_Record;Wrap: Boolean);

Toggles line wrapping within the Gtk.Label.Gtk_Label widget. True makes it break lines if text exceeds the widget's size. False lets the text get cut off by the edge of the widget if it exceeds the widget size. Note that setting line wrapping to True does not make the label wrap at its parent container's width, because GTK+ widgets conceptually can't make their requisition depend on the parent container's size. For a label that wraps at a specific position, set the label's width using Gtk.Widget.Set_Size_Request. "wrap": the setting

### Get_Line_Wrap_Mode

- Goto spec in source

    function Get_Line_Wrap_Mode (Label: access Gtk_Label_Record) return Pango.Layout.Pango_Wrap_Mode;

### Set_Line_Wrap_Mode

- Goto spec in source

    procedure Set_Line_Wrap_Mode (Label: access Gtk_Label_Record;Wrap_Mode: Pango.Layout.Pango_Wrap_Mode);

If line wrapping is on (see Gtk.Label.Set_Line_Wrap) this controls how the line wrapping is done. The default is %PANGO_WRAP_WORD which means wrap on word boundaries. Since: gtk+ 2.10 "wrap_mode": the line wrapping mode

### Get_Max_Width_Chars

- Goto spec in source

    function Get_Max_Width_Chars (Label: access Gtk_Label_Record) return Gint;

### Set_Max_Width_Chars

- Goto spec in source

    procedure Set_Max_Width_Chars (Label: access Gtk_Label_Record;N_Chars: Gint);

Sets the desired maximum width in characters of Label to N_Chars. Since: gtk+ 2.6 "n_chars": the new desired maximum width, in characters.

### Get_Mnemonic_Keyval

- Goto spec in source

    function Get_Mnemonic_Keyval (Label: access Gtk_Label_Record) return Guint;

If the label has been set so that it has an mnemonic key this function returns the keyval used for the mnemonic accelerator. If there is no mnemonic set up it returns GDK_VoidSymbol.

### Get_Mnemonic_Widget

- Goto spec in source

    function Get_Mnemonic_Widget (Label: access Gtk_Label_Record) return Gtk.Widget.Gtk_Widget;

### Set_Mnemonic_Widget

- Goto spec in source

    procedure Set_Mnemonic_Widget (Label: access Gtk_Label_Record;Widget: access Gtk.Widget.Gtk_Widget_Record'Class);

If the label has been set so that it has an mnemonic key (using i.e. Gtk.Label.Set_Markup_With_Mnemonic, Gtk.Label.Set_Text_With_Mnemonic, Gtk.Label.Gtk_New_With_Mnemonic or the "use_underline" property) the label can be associated with a widget that is the target of the mnemonic. When the label is inside a widget (like a Gtk.Button.Gtk_Button or a Gtk.Notebook.Gtk_Notebook tab) it is automatically associated with the correct widget, but sometimes (i.e. when the target is a Gtk.GEntry.Gtk_Entry next to the label) you need to set it explicitly using this function. The target widget will be accelerated by emitting the GtkWidget::mnemonic-activate signal on it. The default handler for this signal will activate the widget if there are no mnemonic collisions and toggle focus between the colliding widgets otherwise. "widget": the target Gtk.Widget.Gtk_Widget

### Get_Selectable

- Goto spec in source

    function Get_Selectable (Label: access Gtk_Label_Record) return Boolean;

### Set_Selectable

- Goto spec in source

    procedure Set_Selectable (Label: access Gtk_Label_Record;Setting: Boolean);

Selectable labels allow the user to select text from the label, for copy-and-paste. "setting": True to allow selecting text in the label

### Get_Selection_Bounds

- Goto spec in source

    procedure Get_Selection_Bounds (Label: access Gtk_Label_Record;Start: out Gint;The_End: out Gint;Has_Selection: out Boolean);

Gets the selected range of characters in the label, returning True if there's a selection. "start": return location for start of selection, as a character offset "end": return location for end of selection, as a character offset

### Get_Single_Line_Mode

- Goto spec in source

    function Get_Single_Line_Mode (Label: access Gtk_Label_Record) return Boolean;

### Set_Single_Line_Mode

- Goto spec in source

    procedure Set_Single_Line_Mode (Label: access Gtk_Label_Record;Single_Line_Mode: Boolean);

Sets whether the label is in single line mode. Since: gtk+ 2.6 "single_line_mode": True if the label should be in single line mode

### Get_Text

- Goto spec in source

    function Get_Text (Label: access Gtk_Label_Record) return UTF8_String;

### Set_Text

- Goto spec in source

    procedure Set_Text (Label: access Gtk_Label_Record;Str: UTF8_String);

Sets the text within the Gtk.Label.Gtk_Label widget. It overwrites any text that was there before. This will also clear any previously set mnemonic accelerators. "str": The text you want to set

### Get_Track_Visited_Links

- Goto spec in source

    function Get_Track_Visited_Links (Label: access Gtk_Label_Record) return Boolean;

### Set_Track_Visited_Links

- Goto spec in source

    procedure Set_Track_Visited_Links (Label: access Gtk_Label_Record;Track_Links: Boolean);

Sets whether the label should keep track of clicked links (and use a different color for them). Since: gtk+ 2.18 "track_links": True to track visited links

### Get_Use_Markup

- Goto spec in source

    function Get_Use_Markup (Label: access Gtk_Label_Record) return Boolean;

### Set_Use_Markup

- Goto spec in source

    procedure Set_Use_Markup (Label: access Gtk_Label_Record;Setting: Boolean);

Sets whether the text of the label contains markup in <link linkend="PangoMarkupFormat">Pango's text markup language</link>. See Gtk.Label.Set_Markup. "setting": True if the label's text should be parsed for markup.

### Get_Use_Underline

- Goto spec in source

    function Get_Use_Underline (Label: access Gtk_Label_Record) return Boolean;

### Set_Use_Underline

- Goto spec in source

    procedure Set_Use_Underline (Label: access Gtk_Label_Record;Setting: Boolean);

If true, an underline in the text indicates the next character should be used for the mnemonic accelerator key. "setting": True if underlines in the text indicate mnemonics

### Get_Width_Chars

- Goto spec in source

    function Get_Width_Chars (Label: access Gtk_Label_Record) return Gint;

### Set_Width_Chars

- Goto spec in source

    procedure Set_Width_Chars (Label: access Gtk_Label_Record;N_Chars: Gint);

Sets the desired width in characters of Label to N_Chars. Since: gtk+ 2.6 "n_chars": the new desired width, in characters.

### Parse_Uline

- Goto spec in source

    function Parse_Uline (Label: access Gtk_Label_Record;String: UTF8_String) return Guint;

### Select_Region

- Goto spec in source

    procedure Select_Region (Label: access Gtk_Label_Record;Start_Offset: Gint := -1;End_Offset: Gint := -1);

Selects a range of characters in the label, if the label is selectable. See Gtk.Label.Set_Selectable. If the label is not selectable, this function has no effect. If Start_Offset or "start_offset": start offset (in characters not bytes) "end_offset": end offset (in characters not bytes)

### Set_Markup

- Goto spec in source

    procedure Set_Markup (Label: access Gtk_Label_Record;Str: UTF8_String);

Parses Str which is marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>, setting the label's text and attribute list based on the parse results. If the Str is external data, you may need to escape it with g_markup_escape_text or g_markup_printf_escaped<!-- -->: |[ char *markup; markup = g_markup_printf_escaped ("&lt;span style=\"italic\"&gt;&percnt;s&lt;/span&gt;", str); gtk_label_set_markup (GTK_LABEL (label), markup); g_free (markup); ]| "str": a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)

### Set_Markup_With_Mnemonic

- Goto spec in source

    procedure Set_Markup_With_Mnemonic (Label: access Gtk_Label_Record;Str: UTF8_String);

Parses Str which is marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>, setting the label's text and attribute list based on the parse results. If characters in Str are preceded by an underscore, they are underlined indicating that they represent a keyboard accelerator called a mnemonic. The mnemonic key can be used to activate another widget, chosen automatically, or explicitly using Gtk.Label.Set_Mnemonic_Widget. "str": a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)

### Set_Pattern

- Goto spec in source

    procedure Set_Pattern (Label: access Gtk_Label_Record;Pattern: UTF8_String);

Change the underlines pattern. Pattern is a simple string made of underscore and space characters, matching the ones in the string. GtkAda will underline every letter that matches an underscore. An empty string disables the underlines. example: If the text is FooBarBaz and the Pattern is "___ ___" then both "Foo" and "Baz" will be underlined, but not "Bar".

### Set_Text_With_Mnemonic

- Goto spec in source

    procedure Set_Text_With_Mnemonic (Label: access Gtk_Label_Record;Str: UTF8_String);

Sets the label's text from the string Str. If characters in Str are preceded by an underscore, they are underlined indicating that they represent a keyboard accelerator called a mnemonic. The mnemonic key can be used to activate another widget, chosen automatically, or explicitly using Gtk.Label.Set_Mnemonic_Widget. "str": a string

### +

- Goto spec in source

    function "+" (Widget: access Gtk_Label_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Buildable.To_Interface;

### -

- Goto spec in source

    function "-" (Interf: Gtk.Buildable.Gtk_Buildable) return Gtk_Label renames Implements_Buildable.To_Object;