Index

Package: Label

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

gtk-label.png
<testgtk>create_label.adb</testgtk>

Packages

Implements_Buildable (new Glib.Types.Implements)

Classes

Gtk_Label_Record

type Gtk_Label_Record is new Gtk_Misc_Record with null record;

Ancestors:

Immediate Children:

Primitive operations:

Get_Attributes
Get_Current_Uri
Get_Ellipsize
Get_Layout_Offsets
Get_Line_Wrap
Get_Line_Wrap_Mode
Get_Max_Width_Chars
Get_Mnemonic_Keyval
Get_Mnemonic_Widget
Get_Selectable
Get_Selection_Bounds
Get_Single_Line_Mode
Get_Track_Visited_Links
Get_Use_Markup
Get_Use_Underline
Get_Width_Chars
Glib.Object.Deallocate (Inherited)
Glib.Object.Get_Type (Inherited)
Glib.Object.Notify (Inherited)
Glib.Object.Ref (Inherited)
Glib.Object.Ref_Sink (Inherited)
Glib.Object.Unref (Inherited)
Gtk.Misc.Get_Alignment (Inherited)
Gtk.Misc.Get_Padding (Inherited)
Gtk.Misc.Set_Alignment (Inherited)
Gtk.Misc.Set_Padding (Inherited)
Gtk.Widget.Activate (Inherited)
Gtk.Widget.Add_Accelerator (Inherited)
Gtk.Widget.Add_Events (Inherited)
Gtk.Widget.Add_Mnemonic_Label (Inherited)
Gtk.Widget.Can_Activate_Accel (Inherited)
Gtk.Widget.Child_Notify (Inherited)
Gtk.Widget.Class_Path (Inherited)
Gtk.Widget.Class_Path_Reversed (Inherited)
Gtk.Widget.Create_Pango_Context (Inherited)
Gtk.Widget.Create_Pango_Layout (Inherited)
Gtk.Widget.Destroy (Inherited)
Gtk.Widget.Draw (Inherited)
Gtk.Widget.Ensure_Style (Inherited)
Gtk.Widget.Error_Bell (Inherited)
Gtk.Widget.Flag_Is_Set (Inherited)
Gtk.Widget.Flags (Inherited)
Gtk.Widget.Freeze_Child_Notify (Inherited)
Gtk.Widget.Get_Allocation_Height (Inherited)
Gtk.Widget.Get_Allocation_Width (Inherited)
Gtk.Widget.Get_Allocation_X (Inherited)
Gtk.Widget.Get_Allocation_Y (Inherited)
Gtk.Widget.Get_Ancestor (Inherited)
Gtk.Widget.Get_Child_Requisition (Inherited)
Gtk.Widget.Get_Child_Visible (Inherited)
Gtk.Widget.Get_Colormap (Inherited)
Gtk.Widget.Get_Composite_Name (Inherited)
Gtk.Widget.Get_Direction (Inherited)
Gtk.Widget.Get_Events (Inherited)
Gtk.Widget.Get_Extension_Events (Inherited)
Gtk.Widget.Get_Has_Tooltip (Inherited)
Gtk.Widget.Get_Name (Inherited)
Gtk.Widget.Get_No_Show_All (Inherited)
Gtk.Widget.Get_Pango_Context (Inherited)
Gtk.Widget.Get_Parent (Inherited)
Gtk.Widget.Get_Parent_Window (Inherited)
Gtk.Widget.Get_Pointer (Inherited)
Gtk.Widget.Get_Root_Window (Inherited)
Gtk.Widget.Get_Size_Request (Inherited)
Gtk.Widget.Get_Snapshot (Inherited)
Gtk.Widget.Get_State (Inherited)
Gtk.Widget.Get_Style (Inherited)
Gtk.Widget.Get_Tooltip_Markup (Inherited)
Gtk.Widget.Get_Tooltip_Text (Inherited)
Gtk.Widget.Get_Tooltip_Window (Inherited)
Gtk.Widget.Get_Toplevel (Inherited)
Gtk.Widget.Get_Visual (Inherited)
Gtk.Widget.Get_Window (Inherited)
Gtk.Widget.Grab_Default (Inherited)
Gtk.Widget.Grab_Focus (Inherited)
Gtk.Widget.Has_Screen (Inherited)
Gtk.Widget.Hide (Inherited)
Gtk.Widget.Hide_All (Inherited)
Gtk.Widget.Input_Shape_Combine_Mask (Inherited)
Gtk.Widget.Intersect (Inherited)
Gtk.Widget.Is_Ancestor (Inherited)
Gtk.Widget.Is_Composited (Inherited)
Gtk.Widget.Is_Focus (Inherited)
Gtk.Widget.Keynav_Failed (Inherited)
Gtk.Widget.List_Mnemonic_Labels (Inherited)
Gtk.Widget.Map (Inherited)
Gtk.Widget.Mnemonic_Activate (Inherited)
Gtk.Widget.Modify_Base (Inherited)
Gtk.Widget.Modify_Bg (Inherited)
Gtk.Widget.Modify_Cursor (Inherited)
Gtk.Widget.Modify_Fg (Inherited)
Gtk.Widget.Modify_Font (Inherited)
Gtk.Widget.Modify_Text (Inherited)
Gtk.Widget.Path (Inherited)
Gtk.Widget.Path_Reversed (Inherited)
Gtk.Widget.Queue_Clear (Inherited)
Gtk.Widget.Queue_Clear_Area (Inherited)
Gtk.Widget.Queue_Draw (Inherited)
Gtk.Widget.Queue_Draw_Area (Inherited)
Gtk.Widget.Queue_Resize (Inherited)
Gtk.Widget.Queue_Resize_No_Redraw (Inherited)
Gtk.Widget.Realize (Inherited)
Gtk.Widget.Region_Intersect (Inherited)
Gtk.Widget.Remove_Accelerator (Inherited)
Gtk.Widget.Remove_Mnemonic_Label (Inherited)
Gtk.Widget.Render_Icon (Inherited)
Gtk.Widget.Reparent (Inherited)
Gtk.Widget.Reset_Rc_Styles (Inherited)
Gtk.Widget.Reset_Shapes (Inherited)
Gtk.Widget.Restore_Default_Style (Inherited)
Gtk.Widget.Send_Expose (Inherited)
Gtk.Widget.Set_Accel_Path (Inherited)
Gtk.Widget.Set_App_Paintable (Inherited)
Gtk.Widget.Set_Child_Visible (Inherited)
Gtk.Widget.Set_Colormap (Inherited)
Gtk.Widget.Set_Composite_Name (Inherited)
Gtk.Widget.Set_Direction (Inherited)
Gtk.Widget.Set_Double_Buffered (Inherited)
Gtk.Widget.Set_Events (Inherited)
Gtk.Widget.Set_Extension_Events (Inherited)
Gtk.Widget.Set_Flags (Inherited)
Gtk.Widget.Set_Has_Tooltip (Inherited)
Gtk.Widget.Set_Name (Inherited)
Gtk.Widget.Set_No_Show_All (Inherited)
Gtk.Widget.Set_Parent (Inherited)
Gtk.Widget.Set_Parent_Window (Inherited)
Gtk.Widget.Set_Redraw_On_Allocate (Inherited)
Gtk.Widget.Set_Scroll_Adjustments (Inherited)
Gtk.Widget.Set_Sensitive (Inherited)
Gtk.Widget.Set_Size_Request (Inherited)
Gtk.Widget.Set_State (Inherited)
Gtk.Widget.Set_Style (Inherited)
Gtk.Widget.Set_Tooltip_Markup (Inherited)
Gtk.Widget.Set_Tooltip_Text (Inherited)
Gtk.Widget.Set_Tooltip_Window (Inherited)
Gtk.Widget.Set_UPosition (Inherited)
Gtk.Widget.Set_USize (Inherited)
Gtk.Widget.Set_Window (Inherited)
Gtk.Widget.Shape_Combine_Mask (Inherited)
Gtk.Widget.Show (Inherited)
Gtk.Widget.Show_All (Inherited)
Gtk.Widget.Show_Now (Inherited)
Gtk.Widget.Size_Allocate (Inherited)
Gtk.Widget.Size_Request (Inherited)
Gtk.Widget.Style_Get_Property (Inherited)
Gtk.Widget.Thaw_Child_Notify (Inherited)
Gtk.Widget.Trigger_Tooltip_Query (Inherited)
Gtk.Widget.Unmap (Inherited)
Gtk.Widget.Unrealize (Inherited)
Gtk.Widget.Unset_Flags (Inherited)
Select_Region
Set_Attributes
Set_Ellipsize
Set_Line_Wrap
Set_Line_Wrap_Mode
Set_Markup_With_Mnemonic
Set_Max_Width_Chars
Set_Mnemonic_Widget
Set_Selectable
Set_Single_Line_Mode
Set_Text_With_Mnemonic
Set_Track_Visited_Links
Set_Use_Markup
Set_Use_Underline
Set_Width_Chars

Types

Gtk_Label

type Gtk_Label is access all Gtk_Label_Record'Class;

Constants & Global variables

Cursor_Position_Property (Glib.Properties.Property_Int)

Cursor_Position_Property : constant Glib.Properties.Property_Int;

Max_Width_Chars_Property (Glib.Properties.Property_Int)

Max_Width_Chars_Property : constant Glib.Properties.Property_Int;

Mnemonic_Keyval_Property (Glib.Properties.Property_Uint)

Mnemonic_Keyval_Property : constant Glib.Properties.Property_Uint;

Mnemonic_Widget_Property (Glib.Properties.Property_Object)

Mnemonic_Widget_Property : constant Glib.Properties.Property_Object;

Selection_Bound_Property (Glib.Properties.Property_Int)

Selection_Bound_Property : constant Glib.Properties.Property_Int;

Single_Line_Mode_Property (Glib.Properties.Property_Boolean)

Single_Line_Mode_Property : constant Glib.Properties.Property_Boolean;

Track_Visited_Links_Property (Glib.Properties.Property_Boolean)

Track_Visited_Links_Property : constant Glib.Properties.Property_Boolean;

Use_Underline_Property (Glib.Properties.Property_Boolean)

Use_Underline_Property : constant Glib.Properties.Property_Boolean;

Width_Chars_Property (Glib.Properties.Property_Int)

Width_Chars_Property : constant Glib.Properties.Property_Int;

Signal_Activate_Current_Link (Glib.Signal_Name)

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

Signal_Activate_Link (Glib.Signal_Name)

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

Signal_Copy_Clipboard (Glib.Signal_Name)

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

Signal_Move_Cursor (Glib.Signal_Name)

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

Signal_Populate_Popup (Glib.Signal_Name)

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

Subprograms & Entries

Gtk_New

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

Initialize

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

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

Initialize_With_Mnemonic

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

function Get_Type return Glib.GType;

Get_Angle

function Get_Angle 
(Label: access Gtk_Label_Record) return Gdouble;

Set_Angle

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

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

Set_Attributes

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

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

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

Set_Ellipsize

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

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

Set_Justify

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

function Get_Label 
(Label: access Gtk_Label_Record) return UTF8_String;

Set_Label

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

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

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

function Get_Line_Wrap 
(Label: access Gtk_Label_Record) return Boolean;

Set_Line_Wrap

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

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

Set_Line_Wrap_Mode

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

function Get_Max_Width_Chars 
(Label: access Gtk_Label_Record) return Gint;

Set_Max_Width_Chars

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

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

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

Set_Mnemonic_Widget

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

function Get_Selectable 
(Label: access Gtk_Label_Record) return Boolean;

Set_Selectable

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

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

function Get_Single_Line_Mode 
(Label: access Gtk_Label_Record) return Boolean;

Set_Single_Line_Mode

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

function Get_Text 
(Label: access Gtk_Label_Record) return UTF8_String;

Set_Text

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

function Get_Track_Visited_Links 
(Label: access Gtk_Label_Record) return Boolean;

Set_Track_Visited_Links

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

function Get_Use_Markup 
(Label: access Gtk_Label_Record) return Boolean;

Set_Use_Markup

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

function Get_Use_Underline 
(Label: access Gtk_Label_Record) return Boolean;

Set_Use_Underline

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

function Get_Width_Chars 
(Label: access Gtk_Label_Record) return Gint;

Set_Width_Chars

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

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

Select_Region

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

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

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

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

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