Index

Package: Label

Description

package Gtk.Label is

The Gtk.Label.Gtk_Label widget displays a small amount of text. As the name implies, most labels are used to label another widget such as a Gtk.Button.Gtk_Button, a Gtk.Menu_Item.Gtk_Menu_Item, or a Gtk.Combo_Box.Gtk_Combo_Box. == GtkLabel as GtkBuildable == The GtkLabel implementation of the GtkBuildable interface supports a custom <attributes> element, which supports any number of <attribute> elements. the <attribute> element has attributes named name, value, start and end and allows you to specify Pango.Attributes.Pango_Attribute values for this label. == A UI definition fragment specifying Pango attributes == <object class="GtkLabel"> <attributes> <attribute name="weight" value="PANGO_WEIGHT_BOLD"/> <attribute name="background" value="red" start="5" end="10"/>" </attributes> </object> The start and end attributes specify the range of characters to which the Pango attribute applies. If start and end are not specified, the attribute is applied to the whole text. Note that specifying ranges does not make much sense with translatable attributes. Use markup embedded in the translatable content instead. == Mnemonics == Labels may contain 'mnemonics'. Mnemonics are underlined characters in the label, used for keyboard navigation. Mnemonics are created by providing a string with an underscore before the mnemonic character, such as '"_File"', to the functions Gtk.Label.Gtk_New_With_Mnemonic or Gtk.Label.Set_Text_With_Mnemonic.

Mnemonics automatically activate any activatable widget the label is inside, such as a Gtk.Button.Gtk_Button; if the label is not inside the mnemonic's target widget, you have to tell the label about the target using Gtk.Label.Set_Mnemonic_Widget. Here's a simple example where the label is inside a button: // Pressing Alt+H will activate this button button = gtk_button_new (<!-- -->); label = gtk_label_new_with_mnemonic ("_Hello"); gtk_container_add (GTK_CONTAINER (button), label); There's a convenience function to create buttons with a mnemonic label already inside: // Pressing Alt+H will activate this button button = gtk_button_new_with_mnemonic ("_Hello"); To create a mnemonic for a widget alongside the label, such as a Gtk.GEntry.Gtk_Entry, you have to point the label at the entry with Gtk.Label.Set_Mnemonic_Widget: // Pressing Alt+H will focus the entry entry = gtk_entry_new (<!-- -->); label = gtk_label_new_with_mnemonic ("_Hello"); gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry); == Markup (styled text) == To make it easy to format text in a label (changing colors, fonts, etc.), label text can be provided in a simple <link linkend="PangoMarkupFormat">markup format</link>. Here's how to create a label with a small font: label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), "<small>Small text</small>"); (See <link linkend="PangoMarkupFormat">complete documentation</link> of available tags in the Pango manual.) The markup passed to Gtk.Label.Set_Markup must be valid; for example, literal <, > and &amp; characters must be escaped as \<, \gt;, and \&amp;.

If you pass text obtained from the user, file, or a network to Gtk.Label.Set_Markup, you'll want to escape it with g_markup_escape_text or g_markup_printf_escaped.

Markup strings are just a convenient way to set the Pango.Attributes.Pango_Attr_List on a label; Gtk.Label.Set_Attributes may be a simpler way to set attributes in some cases. Be careful though; Pango.Attributes.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.Attributes.Pango_Attribute requires knowledge of the exact string being displayed, so translations will cause problems. == Selectable labels == Labels can be made selectable with Gtk.Label.Set_Selectable. Selectable labels allow the user to copy the label contents to the clipboard. Only labels that contain useful-to-copy information &mdash; such as error messages &mdash; should be made selectable. == Text layout == A label can contain any number of paragraphs, but will have performance problems if it contains more than a small number. Paragraphs are separated by newlines or other paragraph separators understood by Pango.

Labels can automatically wrap text if you call Gtk.Label.Set_Line_Wrap.

Gtk.Label.Set_Justify sets how the lines in a label align with one another. If you want to set how the label as a whole aligns in its available space, see Gtk.Misc.Set_Alignment.

The Gtk.Label.Gtk_Label:width-chars and Gtk.Label.Gtk_Label:max-width-chars properties can be used to control the size allocation of ellipsized or wrapped labels. For ellipsizing labels, if either is specified (and less than the actual text size), it is used as the minimum width, and the actual text size is used as the natural width of the label. For wrapping labels, width-chars is used as the minimum width, if specified, and max-width-chars is used as the natural width. Even if max-width-chars specified, wrapping labels will be rewrapped to use all of the available width.

Note: Note that the interpretation of Gtk.Label.Gtk_Label:width-chars and Gtk.Label.Gtk_Label:max-width-chars has changed a bit with the introduction of <link linkend="geometry-management">width-for-height geometry management.</link> == Links == Since 2.18, GTK+ supports markup for clickable hyperlinks in addition to regular Pango markup. The markup for links is borrowed from HTML, using the <tag>a</tag> with href and title attributes. GTK+ renders links similar to the way they appear in web browsers, with colored, underlined text. The title attribute is displayed as a tooltip on the link. An example looks like this: gtk_label_set_markup (label, "Go to the <a href="http://www.gtk.org" title="<i>Our</i> website">GTK+ website</a> for more..."); It is possible to implement custom handling for links and their tooltips with the Gtk.Label.Gtk_Label::activate-link signal and the Gtk.Label.Get_Current_Uri function.

Screenshot

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

Packages

Implements_Gtk_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_Device_Events (Inherited)
Gtk.Widget.Add_Events (Inherited)
Gtk.Widget.Add_Mnemonic_Label (Inherited)
Gtk.Widget.Add_Tick_Callback (Inherited)
Gtk.Widget.Can_Activate_Accel (Inherited)
Gtk.Widget.Child_Focus (Inherited)
Gtk.Widget.Child_Notify (Inherited)
Gtk.Widget.Compute_Expand (Inherited)
Gtk.Widget.Create_Pango_Context (Inherited)
Gtk.Widget.Create_Pango_Layout (Inherited)
Gtk.Widget.Destroy (Inherited)
Gtk.Widget.Destroyed (Inherited)
Gtk.Widget.Device_Is_Shadowed (Inherited)
Gtk.Widget.Drag_Check_Threshold (Inherited)
Gtk.Widget.Drag_Dest_Add_Image_Targets (Inherited)
Gtk.Widget.Drag_Dest_Add_Text_Targets (Inherited)
Gtk.Widget.Drag_Dest_Add_Uri_Targets (Inherited)
Gtk.Widget.Drag_Dest_Get_Track_Motion (Inherited)
Gtk.Widget.Drag_Dest_Set_Proxy (Inherited)
Gtk.Widget.Drag_Dest_Set_Track_Motion (Inherited)
Gtk.Widget.Drag_Dest_Unset (Inherited)
Gtk.Widget.Drag_Get_Data (Inherited)
Gtk.Widget.Drag_Highlight (Inherited)
Gtk.Widget.Drag_Source_Add_Image_Targets (Inherited)
Gtk.Widget.Drag_Source_Add_Uri_Targets (Inherited)
Gtk.Widget.Drag_Source_Set_Icon_Pixbuf (Inherited)
Gtk.Widget.Drag_Source_Unset (Inherited)
Gtk.Widget.Drag_Unhighlight (Inherited)
Gtk.Widget.Draw (Inherited)
Gtk.Widget.Ensure_Style (Inherited)
Gtk.Widget.Error_Bell (Inherited)
Gtk.Widget.Event (Inherited)
Gtk.Widget.Freeze_Child_Notify (Inherited)
Gtk.Widget.Get_Allocated_Height (Inherited)
Gtk.Widget.Get_Allocated_Width (Inherited)
Gtk.Widget.Get_Allocation (Inherited)
Gtk.Widget.Get_Ancestor (Inherited)
Gtk.Widget.Get_App_Paintable (Inherited)
Gtk.Widget.Get_Can_Default (Inherited)
Gtk.Widget.Get_Can_Focus (Inherited)
Gtk.Widget.Get_Child_Requisition (Inherited)
Gtk.Widget.Get_Child_Visible (Inherited)
Gtk.Widget.Get_Composite_Name (Inherited)
Gtk.Widget.Get_Device_Enabled (Inherited)
Gtk.Widget.Get_Device_Events (Inherited)
Gtk.Widget.Get_Direction (Inherited)
Gtk.Widget.Get_Display (Inherited)
Gtk.Widget.Get_Double_Buffered (Inherited)
Gtk.Widget.Get_Events (Inherited)
Gtk.Widget.Get_Frame_Clock (Inherited)
Gtk.Widget.Get_Halign (Inherited)
Gtk.Widget.Get_Has_Tooltip (Inherited)
Gtk.Widget.Get_Has_Window (Inherited)
Gtk.Widget.Get_Hexpand (Inherited)
Gtk.Widget.Get_Hexpand_Set (Inherited)
Gtk.Widget.Get_Mapped (Inherited)
Gtk.Widget.Get_Margin_Bottom (Inherited)
Gtk.Widget.Get_Margin_Left (Inherited)
Gtk.Widget.Get_Margin_Right (Inherited)
Gtk.Widget.Get_Margin_Top (Inherited)
Gtk.Widget.Get_Modifier_Mask (Inherited)
Gtk.Widget.Get_Name (Inherited)
Gtk.Widget.Get_No_Show_All (Inherited)
Gtk.Widget.Get_Opacity (Inherited)
Gtk.Widget.Get_Pango_Context (Inherited)
Gtk.Widget.Get_Parent (Inherited)
Gtk.Widget.Get_Parent_Window (Inherited)
Gtk.Widget.Get_Path (Inherited)
Gtk.Widget.Get_Pointer (Inherited)
Gtk.Widget.Get_Preferred_Height (Inherited)
Gtk.Widget.Get_Preferred_Height_For_Width (Inherited)
Gtk.Widget.Get_Preferred_Size (Inherited)
Gtk.Widget.Get_Preferred_Width (Inherited)
Gtk.Widget.Get_Preferred_Width_For_Height (Inherited)
Gtk.Widget.Get_Realized (Inherited)
Gtk.Widget.Get_Receives_Default (Inherited)
Gtk.Widget.Get_Request_Mode (Inherited)
Gtk.Widget.Get_Requisition (Inherited)
Gtk.Widget.Get_Root_Window (Inherited)
Gtk.Widget.Get_Screen (Inherited)
Gtk.Widget.Get_Sensitive (Inherited)
Gtk.Widget.Get_Size_Request (Inherited)
Gtk.Widget.Get_State (Inherited)
Gtk.Widget.Get_State_Flags (Inherited)
Gtk.Widget.Get_Style (Inherited)
Gtk.Widget.Get_Support_Multidevice (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_Valign (Inherited)
Gtk.Widget.Get_Vexpand (Inherited)
Gtk.Widget.Get_Vexpand_Set (Inherited)
Gtk.Widget.Get_Visible (Inherited)
Gtk.Widget.Get_Visual (Inherited)
Gtk.Widget.Get_Window (Inherited)
Gtk.Widget.Grab_Add (Inherited)
Gtk.Widget.Grab_Default (Inherited)
Gtk.Widget.Grab_Focus (Inherited)
Gtk.Widget.Grab_Remove (Inherited)
Gtk.Widget.Has_Default (Inherited)
Gtk.Widget.Has_Focus (Inherited)
Gtk.Widget.Has_Grab (Inherited)
Gtk.Widget.Has_Rc_Style (Inherited)
Gtk.Widget.Has_Screen (Inherited)
Gtk.Widget.Has_Visible_Focus (Inherited)
Gtk.Widget.Hide (Inherited)
Gtk.Widget.Hide_On_Delete (Inherited)
Gtk.Widget.In_Destruction (Inherited)
Gtk.Widget.Input_Shape_Combine_Region (Inherited)
Gtk.Widget.Intersect (Inherited)
Gtk.Widget.Is_Ancestor (Inherited)
Gtk.Widget.Is_Composited (Inherited)
Gtk.Widget.Is_Drawable (Inherited)
Gtk.Widget.Is_Focus (Inherited)
Gtk.Widget.Is_Sensitive (Inherited)
Gtk.Widget.Is_Toplevel (Inherited)
Gtk.Widget.Is_Visible (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.On_Accel_Closures_Changed (Inherited)
Gtk.Widget.On_Accel_Closures_Changed (Inherited)
Gtk.Widget.On_Button_Press_Event (Inherited)
Gtk.Widget.On_Button_Press_Event (Inherited)
Gtk.Widget.On_Button_Release_Event (Inherited)
Gtk.Widget.On_Button_Release_Event (Inherited)
Gtk.Widget.On_Can_Activate_Accel (Inherited)
Gtk.Widget.On_Can_Activate_Accel (Inherited)
Gtk.Widget.On_Child_Notify (Inherited)
Gtk.Widget.On_Child_Notify (Inherited)
Gtk.Widget.On_Composited_Changed (Inherited)
Gtk.Widget.On_Composited_Changed (Inherited)
Gtk.Widget.On_Configure_Event (Inherited)
Gtk.Widget.On_Configure_Event (Inherited)
Gtk.Widget.On_Damage_Event (Inherited)
Gtk.Widget.On_Damage_Event (Inherited)
Gtk.Widget.On_Delete_Event (Inherited)
Gtk.Widget.On_Delete_Event (Inherited)
Gtk.Widget.On_Destroy (Inherited)
Gtk.Widget.On_Destroy (Inherited)
Gtk.Widget.On_Destroy_Event (Inherited)
Gtk.Widget.On_Destroy_Event (Inherited)
Gtk.Widget.On_Direction_Changed (Inherited)
Gtk.Widget.On_Direction_Changed (Inherited)
Gtk.Widget.On_Drag_Begin (Inherited)
Gtk.Widget.On_Drag_Begin (Inherited)
Gtk.Widget.On_Drag_Data_Delete (Inherited)
Gtk.Widget.On_Drag_Data_Delete (Inherited)
Gtk.Widget.On_Drag_Data_Get (Inherited)
Gtk.Widget.On_Drag_Data_Get (Inherited)
Gtk.Widget.On_Drag_Data_Received (Inherited)
Gtk.Widget.On_Drag_Data_Received (Inherited)
Gtk.Widget.On_Drag_Drop (Inherited)
Gtk.Widget.On_Drag_Drop (Inherited)
Gtk.Widget.On_Drag_End (Inherited)
Gtk.Widget.On_Drag_End (Inherited)
Gtk.Widget.On_Drag_Failed (Inherited)
Gtk.Widget.On_Drag_Failed (Inherited)
Gtk.Widget.On_Drag_Leave (Inherited)
Gtk.Widget.On_Drag_Leave (Inherited)
Gtk.Widget.On_Drag_Motion (Inherited)
Gtk.Widget.On_Drag_Motion (Inherited)
Gtk.Widget.On_Draw (Inherited)
Gtk.Widget.On_Draw (Inherited)
Gtk.Widget.On_Enter_Notify_Event (Inherited)
Gtk.Widget.On_Enter_Notify_Event (Inherited)
Gtk.Widget.On_Event (Inherited)
Gtk.Widget.On_Event (Inherited)
Gtk.Widget.On_Event_After (Inherited)
Gtk.Widget.On_Event_After (Inherited)
Gtk.Widget.On_Focus (Inherited)
Gtk.Widget.On_Focus (Inherited)
Gtk.Widget.On_Focus_In_Event (Inherited)
Gtk.Widget.On_Focus_In_Event (Inherited)
Gtk.Widget.On_Focus_Out_Event (Inherited)
Gtk.Widget.On_Focus_Out_Event (Inherited)
Gtk.Widget.On_Grab_Broken_Event (Inherited)
Gtk.Widget.On_Grab_Broken_Event (Inherited)
Gtk.Widget.On_Grab_Focus (Inherited)
Gtk.Widget.On_Grab_Focus (Inherited)
Gtk.Widget.On_Grab_Notify (Inherited)
Gtk.Widget.On_Grab_Notify (Inherited)
Gtk.Widget.On_Hide (Inherited)
Gtk.Widget.On_Hide (Inherited)
Gtk.Widget.On_Hierarchy_Changed (Inherited)
Gtk.Widget.On_Hierarchy_Changed (Inherited)
Gtk.Widget.On_Key_Press_Event (Inherited)
Gtk.Widget.On_Key_Press_Event (Inherited)
Gtk.Widget.On_Key_Release_Event (Inherited)
Gtk.Widget.On_Key_Release_Event (Inherited)
Gtk.Widget.On_Keynav_Failed (Inherited)
Gtk.Widget.On_Keynav_Failed (Inherited)
Gtk.Widget.On_Leave_Notify_Event (Inherited)
Gtk.Widget.On_Leave_Notify_Event (Inherited)
Gtk.Widget.On_Map (Inherited)
Gtk.Widget.On_Map (Inherited)
Gtk.Widget.On_Map_Event (Inherited)
Gtk.Widget.On_Map_Event (Inherited)
Gtk.Widget.On_Mnemonic_Activate (Inherited)
Gtk.Widget.On_Mnemonic_Activate (Inherited)
Gtk.Widget.On_Motion_Notify_Event (Inherited)
Gtk.Widget.On_Motion_Notify_Event (Inherited)
Gtk.Widget.On_Move_Focus (Inherited)
Gtk.Widget.On_Move_Focus (Inherited)
Gtk.Widget.On_Parent_Set (Inherited)
Gtk.Widget.On_Parent_Set (Inherited)
Gtk.Widget.On_Popup_Menu (Inherited)
Gtk.Widget.On_Popup_Menu (Inherited)
Gtk.Widget.On_Property_Notify_Event (Inherited)
Gtk.Widget.On_Property_Notify_Event (Inherited)
Gtk.Widget.On_Proximity_In_Event (Inherited)
Gtk.Widget.On_Proximity_In_Event (Inherited)
Gtk.Widget.On_Proximity_Out_Event (Inherited)
Gtk.Widget.On_Proximity_Out_Event (Inherited)
Gtk.Widget.On_Query_Tooltip (Inherited)
Gtk.Widget.On_Query_Tooltip (Inherited)
Gtk.Widget.On_Realize (Inherited)
Gtk.Widget.On_Realize (Inherited)
Gtk.Widget.On_Screen_Changed (Inherited)
Gtk.Widget.On_Screen_Changed (Inherited)
Gtk.Widget.On_Scroll_Event (Inherited)
Gtk.Widget.On_Scroll_Event (Inherited)
Gtk.Widget.On_Selection_Clear_Event (Inherited)
Gtk.Widget.On_Selection_Clear_Event (Inherited)
Gtk.Widget.On_Selection_Get (Inherited)
Gtk.Widget.On_Selection_Get (Inherited)
Gtk.Widget.On_Selection_Notify_Event (Inherited)
Gtk.Widget.On_Selection_Notify_Event (Inherited)
Gtk.Widget.On_Selection_Received (Inherited)
Gtk.Widget.On_Selection_Received (Inherited)
Gtk.Widget.On_Selection_Request_Event (Inherited)
Gtk.Widget.On_Selection_Request_Event (Inherited)
Gtk.Widget.On_Show (Inherited)
Gtk.Widget.On_Show (Inherited)
Gtk.Widget.On_Show_Help (Inherited)
Gtk.Widget.On_Show_Help (Inherited)
Gtk.Widget.On_Size_Allocate (Inherited)
Gtk.Widget.On_Size_Allocate (Inherited)
Gtk.Widget.On_State_Changed (Inherited)
Gtk.Widget.On_State_Changed (Inherited)
Gtk.Widget.On_State_Flags_Changed (Inherited)
Gtk.Widget.On_State_Flags_Changed (Inherited)
Gtk.Widget.On_Style_Set (Inherited)
Gtk.Widget.On_Style_Set (Inherited)
Gtk.Widget.On_Style_Updated (Inherited)
Gtk.Widget.On_Style_Updated (Inherited)
Gtk.Widget.On_Touch_Event (Inherited)
Gtk.Widget.On_Touch_Event (Inherited)
Gtk.Widget.On_Unmap (Inherited)
Gtk.Widget.On_Unmap (Inherited)
Gtk.Widget.On_Unmap_Event (Inherited)
Gtk.Widget.On_Unmap_Event (Inherited)
Gtk.Widget.On_Unrealize (Inherited)
Gtk.Widget.On_Unrealize (Inherited)
Gtk.Widget.On_Visibility_Notify_Event (Inherited)
Gtk.Widget.On_Visibility_Notify_Event (Inherited)
Gtk.Widget.On_Window_State_Event (Inherited)
Gtk.Widget.On_Window_State_Event (Inherited)
Gtk.Widget.Override_Background_Color (Inherited)
Gtk.Widget.Override_Color (Inherited)
Gtk.Widget.Override_Cursor (Inherited)
Gtk.Widget.Override_Font (Inherited)
Gtk.Widget.Override_Symbolic_Color (Inherited)
Gtk.Widget.Queue_Compute_Expand (Inherited)
Gtk.Widget.Queue_Draw (Inherited)
Gtk.Widget.Queue_Draw_Area (Inherited)
Gtk.Widget.Queue_Draw_Region (Inherited)
Gtk.Widget.Queue_Resize (Inherited)
Gtk.Widget.Queue_Resize_No_Redraw (Inherited)
Gtk.Widget.Realize (Inherited)
Gtk.Widget.Region_Intersect (Inherited)
Gtk.Widget.Register_Window (Inherited)
Gtk.Widget.Remove_Accelerator (Inherited)
Gtk.Widget.Remove_Mnemonic_Label (Inherited)
Gtk.Widget.Remove_Tick_Callback (Inherited)
Gtk.Widget.Render_Icon (Inherited)
Gtk.Widget.Render_Icon_Pixbuf (Inherited)
Gtk.Widget.Reparent (Inherited)
Gtk.Widget.Reset_Rc_Styles (Inherited)
Gtk.Widget.Reset_Style (Inherited)
Gtk.Widget.Send_Expose (Inherited)
Gtk.Widget.Send_Focus_Change (Inherited)
Gtk.Widget.Set_Accel_Path (Inherited)
Gtk.Widget.Set_Allocation (Inherited)
Gtk.Widget.Set_App_Paintable (Inherited)
Gtk.Widget.Set_Can_Default (Inherited)
Gtk.Widget.Set_Can_Focus (Inherited)
Gtk.Widget.Set_Child_Visible (Inherited)
Gtk.Widget.Set_Composite_Name (Inherited)
Gtk.Widget.Set_Device_Enabled (Inherited)
Gtk.Widget.Set_Device_Events (Inherited)
Gtk.Widget.Set_Direction (Inherited)
Gtk.Widget.Set_Double_Buffered (Inherited)
Gtk.Widget.Set_Events (Inherited)
Gtk.Widget.Set_Halign (Inherited)
Gtk.Widget.Set_Has_Tooltip (Inherited)
Gtk.Widget.Set_Has_Window (Inherited)
Gtk.Widget.Set_Hexpand (Inherited)
Gtk.Widget.Set_Hexpand_Set (Inherited)
Gtk.Widget.Set_Mapped (Inherited)
Gtk.Widget.Set_Margin_Bottom (Inherited)
Gtk.Widget.Set_Margin_Left (Inherited)
Gtk.Widget.Set_Margin_Right (Inherited)
Gtk.Widget.Set_Margin_Top (Inherited)
Gtk.Widget.Set_Name (Inherited)
Gtk.Widget.Set_No_Show_All (Inherited)
Gtk.Widget.Set_Opacity (Inherited)
Gtk.Widget.Set_Parent (Inherited)
Gtk.Widget.Set_Parent_Window (Inherited)
Gtk.Widget.Set_Realized (Inherited)
Gtk.Widget.Set_Receives_Default (Inherited)
Gtk.Widget.Set_Redraw_On_Allocate (Inherited)
Gtk.Widget.Set_Sensitive (Inherited)
Gtk.Widget.Set_Size_Request (Inherited)
Gtk.Widget.Set_State (Inherited)
Gtk.Widget.Set_State_Flags (Inherited)
Gtk.Widget.Set_Style (Inherited)
Gtk.Widget.Set_Support_Multidevice (Inherited)
Gtk.Widget.Set_Tooltip_Markup (Inherited)
Gtk.Widget.Set_Tooltip_Text (Inherited)
Gtk.Widget.Set_Tooltip_Window (Inherited)
Gtk.Widget.Set_Valign (Inherited)
Gtk.Widget.Set_Vexpand (Inherited)
Gtk.Widget.Set_Vexpand_Set (Inherited)
Gtk.Widget.Set_Visible (Inherited)
Gtk.Widget.Set_Visual (Inherited)
Gtk.Widget.Set_Window (Inherited)
Gtk.Widget.Shape_Combine_Region (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_Attach (Inherited)
Gtk.Widget.Style_Get_Property (Inherited)
Gtk.Widget.Thaw_Child_Notify (Inherited)
Gtk.Widget.Translate_Coordinates (Inherited)
Gtk.Widget.Trigger_Tooltip_Query (Inherited)
Gtk.Widget.Unmap (Inherited)
Gtk.Widget.Unparent (Inherited)
Gtk.Widget.Unrealize (Inherited)
Gtk.Widget.Unregister_Window (Inherited)
Gtk.Widget.Unset_State_Flags (Inherited)
On_Activate_Current_Link
On_Activate_Current_Link
On_Activate_Link
On_Activate_Link
On_Copy_Clipboard
On_Copy_Clipboard
On_Move_Cursor
On_Move_Cursor
On_Populate_Popup
On_Populate_Popup
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;

Cb_Gtk_Label_Void

type Cb_Gtk_Label_Void is not null access procedure (Self : access Gtk_Label_Record'Class);

Cb_GObject_Void

type Cb_GObject_Void is not null access procedure
     (Self : access Glib.Object.GObject_Record'Class);

Cb_Gtk_Label_UTF8_String_Boolean

type Cb_Gtk_Label_UTF8_String_Boolean is not null access function
     (Self : access Gtk_Label_Record'Class;
      URI  : UTF8_String) return Boolean;

Cb_GObject_UTF8_String_Boolean

type Cb_GObject_UTF8_String_Boolean is not null access function
     (Self : access Glib.Object.GObject_Record'Class;
      URI  : UTF8_String) return Boolean;

Cb_Gtk_Label_Gtk_Movement_Step_Gint_Boolean_Void

type Cb_Gtk_Label_Gtk_Movement_Step_Gint_Boolean_Void is not null access procedure
     (Self             : access Gtk_Label_Record'Class;
      Step             : Gtk.Enums.Gtk_Movement_Step;
      Count            : Gint;
      Extend_Selection : Boolean);

Cb_GObject_Gtk_Movement_Step_Gint_Boolean_Void

type Cb_GObject_Gtk_Movement_Step_Gint_Boolean_Void is not null access procedure
     (Self             : access Glib.Object.GObject_Record'Class;
      Step             : Gtk.Enums.Gtk_Movement_Step;
      Count            : Gint;
      Extend_Selection : Boolean);

Cb_Gtk_Label_Gtk_Menu_Void

type Cb_Gtk_Label_Gtk_Menu_Void is not null access procedure
     (Self : access Gtk_Label_Record'Class;
      Menu : not null access Gtk.Menu.Gtk_Menu_Record'Class);

Cb_GObject_Gtk_Menu_Void

type Cb_GObject_Gtk_Menu_Void is not null access procedure
     (Self : access Glib.Object.GObject_Record'Class;
      Menu : not null access Gtk.Menu.Gtk_Menu_Record'Class);

Constants & Global variables

Angle_Property (Glib.Properties.Property_Double)

Angle_Property : constant Glib.Properties.Property_Double;
Type: Gdouble The angle that the baseline of the label makes with the horizontal, in degrees, measured counterclockwise. An angle of 90 reads from from bottom to top, an angle of 270, from top to bottom. Ignored if the label is selectable, wrapped, or ellipsized.

Cursor_Position_Property (Glib.Properties.Property_Int)

Cursor_Position_Property : constant Glib.Properties.Property_Int;

Ellipsize_Property (Pango.Layout.Property_Pango_Ellipsize_Mode)

Ellipsize_Property : constant Pango.Layout.Property_Pango_Ellipsize_Mode;
Type: Pango.Layout.Pango_Ellipsize_Mode The preferred place to ellipsize the string, if the label does not have enough room to display the entire string, specified as a Pango.Layout.Pango_Ellipsize_Mode. Note that setting this property to a value other than Pango.Layout.Ellipsize_None has the side-effect that the label requests only enough space to display the ellipsis "...". In particular, this means that ellipsizing labels do not work well in notebook tabs, unless the tab's Gtk.Notebook.Gtk_Notebook:tab-expand property is set to True. Other ways to set a label's width are Gtk.Widget.Set_Size_Request and Gtk.Label.Set_Width_Chars.

Max_Width_Chars_Property (Glib.Properties.Property_Int)

Max_Width_Chars_Property : constant Glib.Properties.Property_Int;
The desired maximum width of the label, in characters. If this property is set to -1, the width will be calculated automatically. See the section on <link linkend="label-text-layout">text layout</link> for details of how Gtk.Label.Gtk_Label:width-chars and Gtk.Label.Gtk_Label:max-width-chars determine the width of ellipsized and wrapped labels.

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;

Pattern_Property (Glib.Properties.Property_String)

Pattern_Property : constant Glib.Properties.Property_String;
Flags: write

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;
Whether the label is in single line mode. In single line mode, the height of the label does not depend on the actual text, it is always set to ascent + descent of the font. This can be an advantage in situations where resizing the label because of text changes would be distracting, e.g. in a statusbar.

Track_Visited_Links_Property (Glib.Properties.Property_Boolean)

Track_Visited_Links_Property : constant Glib.Properties.Property_Boolean;
Set this property to True to make the label track which links have been clicked. It will then apply the ::visited-link-color color, instead of ::link-color.

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;
The desired width of the label, in characters. If this property is set to -1, the width will be calculated automatically. See the section on <link linkend="label-text-layout">text layout</link> for details of how Gtk.Label.Gtk_Label:width-chars and Gtk.Label.Gtk_Label:max-width-chars determine the width of ellipsized and wrapped labels.

Wrap_Mode_Property (Pango.Enums.Property_Wrap_Mode)

Wrap_Mode_Property : constant Pango.Enums.Property_Wrap_Mode;
Type: Pango.Enums.Wrap_Mode If line wrapping is on (see the Gtk.Label.Gtk_Label:wrap property) this controls how the line wrapping is done. The default is Pango.Enums.Pango_Wrap_Word, which means wrap on word boundaries.

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: not null 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_Label_New

function Gtk_Label_New 
(Str: UTF8_String := "") return Gtk_Label;
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: not null 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

Gtk_Label_New_With_Mnemonic

function Gtk_Label_New_With_Mnemonic 
(Str: UTF8_String) return Gtk_Label;
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: not null access Gtk_Label_Record) return Gdouble;
Gets the angle of rotation for the label. See Gtk.Label.Set_Angle. Since: gtk+ 2.6

Set_Angle

procedure Set_Angle 
(Label: not null 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: not null access Gtk_Label_Record) return Pango.Attributes.Pango_Attr_List;
Gets the attribute list that was set on the label using Gtk.Label.Set_Attributes, if any. This function does not reflect attributes that come from the labels markup (see Gtk.Label.Set_Markup). If you want to get the effective attributes for the label, use pango_layout_get_attribute (gtk_label_get_layout (label)).

Set_Attributes

procedure Set_Attributes 
(Label: not null access Gtk_Label_Record;
Attrs: 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: not null 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. Since: gtk+ 2.18

Get_Ellipsize

function Get_Ellipsize 
(Label: not null access Gtk_Label_Record) return Pango.Layout.Pango_Ellipsize_Mode;
Returns the ellipsizing position of the label. See Gtk.Label.Set_Ellipsize. Since: gtk+ 2.6

Set_Ellipsize

procedure Set_Ellipsize 
(Label: not null access Gtk_Label_Record;
Mode: Pango.Layout.Pango_Ellipsize_Mode);
Sets the mode used to ellipsize (add an ellipsis: "...") to the text 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: not null access Gtk_Label_Record) return Gtk.Enums.Gtk_Justification;
Returns the justification of the label. See Gtk.Label.Set_Justify.

Set_Justify

procedure Set_Justify 
(Label: not null 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.Enums.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: not null access Gtk_Label_Record) return UTF8_String;
Fetches the text from a label widget including any embedded underlines indicating mnemonics and Pango markup. (See Gtk.Label.Get_Text).

Set_Label

procedure Set_Label 
(Label: not null 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: not null 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. The Label is free to recreate its layout at any time, so it should be considered read-only.

Get_Layout_Offsets

procedure Get_Layout_Offsets 
(Label: not null 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: not null access Gtk_Label_Record) return Boolean;
Returns whether lines in the label are automatically wrapped. See Gtk.Label.Set_Line_Wrap.

Set_Line_Wrap

procedure Set_Line_Wrap 
(Label: not null 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: not null access Gtk_Label_Record) return Pango.Enums.Wrap_Mode;
Returns line wrap mode used by the label. See Gtk.Label.Set_Line_Wrap_Mode. Since: gtk+ 2.10

Set_Line_Wrap_Mode

procedure Set_Line_Wrap_Mode 
(Label: not null access Gtk_Label_Record;
Wrap_Mode: Pango.Enums.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.Enums.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: not null access Gtk_Label_Record) return Gint;
Retrieves the desired maximum width of Label, in characters. See Gtk.Label.Set_Width_Chars. Since: gtk+ 2.6

Set_Max_Width_Chars

procedure Set_Max_Width_Chars 
(Label: not null 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: not null 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_KEY_Void_Symbol.

Get_Mnemonic_Widget

function Get_Mnemonic_Widget 
(Label: not null access Gtk_Label_Record) return Gtk.Widget.Gtk_Widget;
Retrieves the target of the mnemonic (keyboard shortcut) of this label. See Gtk.Label.Set_Mnemonic_Widget.

Set_Mnemonic_Widget

procedure Set_Mnemonic_Widget 
(Label: not null 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: not null access Gtk_Label_Record) return Boolean;
Gets the value set by Gtk.Label.Set_Selectable.

Set_Selectable

procedure Set_Selectable 
(Label: not null 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: not null 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: not null access Gtk_Label_Record) return Boolean;
Returns whether the label is in single line mode. Since: gtk+ 2.6

Set_Single_Line_Mode

procedure Set_Single_Line_Mode 
(Label: not null 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: not null access Gtk_Label_Record) return UTF8_String;
Fetches the text from a label widget, as displayed on the screen. This does not include any embedded underlines indicating mnemonics or Pango markup. (See Gtk.Label.Get_Label)

Set_Text

procedure Set_Text 
(Label: not null 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: not null access Gtk_Label_Record) return Boolean;
Returns whether the label is currently keeping track of clicked links. Since: gtk+ 2.18

Set_Track_Visited_Links

procedure Set_Track_Visited_Links 
(Label: not null 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: not null access Gtk_Label_Record) return Boolean;
Returns whether the label's text is interpreted as marked up with the <link linkend="PangoMarkupFormat">Pango text markup language</link>. See gtk_label_set_use_markup ().

Set_Use_Markup

procedure Set_Use_Markup 
(Label: not null 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: not null access Gtk_Label_Record) return Boolean;
Returns whether an embedded underline in the label indicates a mnemonic. See Gtk.Label.Set_Use_Underline.

Set_Use_Underline

procedure Set_Use_Underline 
(Label: not null 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: not null access Gtk_Label_Record) return Gint;
Retrieves the desired width of Label, in characters. See Gtk.Label.Set_Width_Chars. Since: gtk+ 2.6

Set_Width_Chars

procedure Set_Width_Chars 
(Label: not null 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.

Select_Region

procedure Select_Region 
(Label: not null 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 End_Offset are -1, then the end of the label will be substituted. "start_offset": start offset (in characters not bytes) "end_offset": end offset (in characters not bytes)

Set_Markup

procedure Set_Markup 
(Label: not null 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 ("<span style=\"italic\">%s</span>", 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: not null 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: not null 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". "pattern": The pattern as described above.

Set_Text_With_Mnemonic

procedure Set_Text_With_Mnemonic 
(Label: not null 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

On_Activate_Current_Link

procedure On_Activate_Current_Link 
(Self: not null access Gtk_Label_Record;
Call: Cb_Gtk_Label_Void;
After: Boolean := False);

On_Activate_Current_Link

procedure On_Activate_Current_Link 
(Self: not null access Gtk_Label_Record;
Call: Cb_GObject_Void;
Slot: not null access Glib.Object.GObject_Record'Class;
After: Boolean := False);
A <link linkend="keybinding-signals">keybinding signal</link> which gets emitted when the user activates a link in the label. Applications may also emit the signal with g_signal_emit_by_name if they need to control activation of URIs programmatically. The default bindings for this signal are all forms of the Enter key.

On_Activate_Link

procedure On_Activate_Link 
(Self: not null access Gtk_Label_Record;
Call: Cb_Gtk_Label_UTF8_String_Boolean;
After: Boolean := False);

On_Activate_Link

procedure On_Activate_Link 
(Self: not null access Gtk_Label_Record;
Call: Cb_GObject_UTF8_String_Boolean;
Slot: not null access Glib.Object.GObject_Record'Class;
After: Boolean := False);
The signal which gets emitted to activate a URI. Applications may connect to it to override the default behaviour, which is to call gtk_show_uri(). Callback parameters: -- "uri": the URI that is activated -- Returns True if the link has been activated

On_Copy_Clipboard

procedure On_Copy_Clipboard 
(Self: not null access Gtk_Label_Record;
Call: Cb_Gtk_Label_Void;
After: Boolean := False);

On_Copy_Clipboard

procedure On_Copy_Clipboard 
(Self: not null access Gtk_Label_Record;
Call: Cb_GObject_Void;
Slot: not null access Glib.Object.GObject_Record'Class;
After: Boolean := False);
The ::copy-clipboard signal is a <link linkend="keybinding-signals">keybinding signal</link> which gets emitted to copy the selection to the clipboard. The default binding for this signal is Ctrl-c.

On_Move_Cursor

procedure On_Move_Cursor 
(Self: not null access Gtk_Label_Record;
Call: Cb_Gtk_Label_Gtk_Movement_Step_Gint_Boolean_Void;
After: Boolean := False);

On_Move_Cursor

procedure On_Move_Cursor 
(Self: not null access Gtk_Label_Record;
Call: Cb_GObject_Gtk_Movement_Step_Gint_Boolean_Void;
Slot: not null access Glib.Object.GObject_Record'Class;
After: Boolean := False);
The ::move-cursor signal is a <link linkend="keybinding-signals">keybinding signal</link> which gets emitted when the user initiates a cursor movement. If the cursor is not visible in Entry, this signal causes the viewport to be moved instead. Applications should not connect to it, but may emit it with g_signal_emit_by_name if they need to control the cursor programmatically. The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifer does not. There are too many key combinations to list them all here. * Arrow keys move by individual characters/lines * Ctrl-arrow key combinations move by words/paragraphs * Home/End keys move to the ends of the buffer Callback parameters: -- "step": the granularity of the move, as a Gtk.Enums.Gtk_Movement_Step -- "count": the number of Step units to move -- "extend_selection": True if the move should extend the selection

On_Populate_Popup

procedure On_Populate_Popup 
(Self: not null access Gtk_Label_Record;
Call: Cb_Gtk_Label_Gtk_Menu_Void;
After: Boolean := False);

On_Populate_Popup

procedure On_Populate_Popup 
(Self: not null access Gtk_Label_Record;
Call: Cb_GObject_Gtk_Menu_Void;
Slot: not null access Glib.Object.GObject_Record'Class;
After: Boolean := False);
The ::populate-popup signal gets emitted before showing the context menu of the label. Note that only selectable labels have context menus. If you need to add items to the context menu, connect to this signal and append your menuitems to the Menu.