<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkLabel">
<refmeta>
<refentrytitle role="top_of_page" id="GtkLabel.top_of_page">GtkLabel</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkLabel</refname>
<refpurpose>A widget that displays a small to medium amount of text</refpurpose>
</refnamediv>

<refsect1 id="GtkLabel.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-label-new">gtk_label_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-text">gtk_label_set_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-attributes">gtk_label_set_attributes</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-markup">gtk_label_set_markup</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-markup-with-mnemonic">gtk_label_set_markup_with_mnemonic</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-justify">gtk_label_set_justify</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-xalign">gtk_label_set_xalign</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-yalign">gtk_label_set_yalign</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-ellipsize">gtk_label_set_ellipsize</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-width-chars">gtk_label_set_width_chars</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-max-width-chars">gtk_label_set_max_width_chars</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-wrap">gtk_label_set_wrap</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-wrap-mode">gtk_label_set_wrap_mode</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-lines">gtk_label_set_lines</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-layout-offsets">gtk_label_get_layout_offsets</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-mnemonic-keyval">gtk_label_get_mnemonic_keyval</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-selectable">gtk_label_get_selectable</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-label-get-text">gtk_label_get_text</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-label-new-with-mnemonic">gtk_label_new_with_mnemonic</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-select-region">gtk_label_select_region</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-mnemonic-widget">gtk_label_set_mnemonic_widget</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-selectable">gtk_label_set_selectable</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-text-with-mnemonic">gtk_label_set_text_with_mnemonic</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoAttrList"><returnvalue>PangoAttrList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-label-get-attributes">gtk_label_get_attributes</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkJustification"><returnvalue>GtkJustification</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-justify">gtk_label_get_justify</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gfloat"><returnvalue>gfloat</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-xalign">gtk_label_get_xalign</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gfloat"><returnvalue>gfloat</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-yalign">gtk_label_get_yalign</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoEllipsizeMode"><returnvalue>PangoEllipsizeMode</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-ellipsize">gtk_label_get_ellipsize</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-width-chars">gtk_label_get_width_chars</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-max-width-chars">gtk_label_get_max_width_chars</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-label-get-label">gtk_label_get_label</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoLayout"><returnvalue>PangoLayout</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-label-get-layout">gtk_label_get_layout</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-wrap">gtk_label_get_wrap</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoWrapMode"><returnvalue>PangoWrapMode</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-wrap-mode">gtk_label_get_wrap_mode</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-lines">gtk_label_get_lines</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-label-get-mnemonic-widget">gtk_label_get_mnemonic_widget</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-selection-bounds">gtk_label_get_selection_bounds</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-use-markup">gtk_label_get_use_markup</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-use-underline">gtk_label_get_use_underline</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-get-single-line-mode">gtk_label_get_single_line_mode</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-label">gtk_label_set_label</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-use-markup">gtk_label_set_use_markup</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-use-underline">gtk_label_set_use_underline</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-single-line-mode">gtk_label_set_single_line_mode</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-label-get-current-uri">gtk_label_get_current_uri</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-label-set-extra-menu">gtk_label_set_extra_menu</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GMenuModel"><returnvalue>GMenuModel</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-label-get-extra-menu">gtk_label_get_extra_menu</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkLabel.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="PangoAttrList"><type>PangoAttrList</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkLabel--attributes">attributes</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link></entry><entry role="property_name"><link linkend="GtkLabel--ellipsize">ellipsize</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GMenuModel"><type>GMenuModel</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkLabel--extra-menu">extra-menu</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkJustification"><type>GtkJustification</type></link></entry><entry role="property_name"><link linkend="GtkLabel--justify">justify</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkLabel--label">label</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkLabel--lines">lines</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkLabel--max-width-chars">max-width-chars</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="GtkLabel--mnemonic-keyval">mnemonic-keyval</link></entry><entry role="property_flags">Read</entry></row>
<row><entry role="property_type"><link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkLabel--mnemonic-widget">mnemonic-widget</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkLabel--selectable">selectable</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkLabel--single-line-mode">single-line-mode</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkLabel--use-markup">use-markup</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkLabel--use-underline">use-underline</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkLabel--width-chars">width-chars</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkLabel--wrap">wrap</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="PangoWrapMode"><type>PangoWrapMode</type></link></entry><entry role="property_name"><link linkend="GtkLabel--wrap-mode">wrap-mode</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gfloat"><type>gfloat</type></link></entry><entry role="property_name"><link linkend="GtkLabel--xalign">xalign</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gfloat"><type>gfloat</type></link></entry><entry role="property_name"><link linkend="GtkLabel--yalign">yalign</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkLabel.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkLabel-activate-current-link">activate-current-link</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkLabel-activate-link">activate-link</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkLabel-copy-clipboard">copy-clipboard</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkLabel-move-cursor">move-cursor</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkLabel.actions" role="actions">
<title role="actions.title">Actions</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="actions_none" colwidth="150px"/>
<colspec colname="actions_name" colwidth="300px"/>
<colspec colname="actions_param" colwidth="200px"/>
<tbody>
<row><entry></entry><entry role="action_name"><link linkend="GtkLabel|link.copy">link.copy</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkLabel|link.open">link.open</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkLabel|selection.select-all">selection.select-all</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkLabel|selection.delete">selection.delete</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkLabel|clipboard.paste">clipboard.paste</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkLabel|clipboard.copy">clipboard.copy</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkLabel|clipboard.cut">clipboard.cut</link></entry><entry role="parameter_type"></entry></row>
<row><entry></entry><entry role="action_name"><link linkend="GtkLabel|menu.popup">menu.popup</link></entry><entry role="parameter_type"></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkLabel.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkLabel-struct">GtkLabel</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkLabel.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkLabel
</screen>
</refsect1>
<refsect1 id="GtkLabel.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkLabel implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>.</para>

</refsect1>

<refsect1 id="GtkLabel.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkLabel.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkLabel"><type>GtkLabel</type></link> widget displays a small amount of text. As the name
implies, most labels are used to label another widget such as a <link linkend="GtkButton"><type>GtkButton</type></link>.</para>
<refsect2><title>CSS nodes</title><informalexample><programlisting role="example"><![CDATA[
label
├── [selection]
├── [link]
┊
╰── [link]
]]></programlisting></informalexample>
<para></para>
<para>GtkLabel has a single CSS node with the name label. A wide variety
of style classes may be applied to labels, such as .title, .subtitle,
.dim-label, etc. In the <link linkend="GtkShortcutsWindow"><type>GtkShortcutsWindow</type></link>, labels are used wth the
.keycap style class.</para>
<para>If the label has a selection, it gets a subnode with name selection.</para>
<para>If the label has links, there is one subnode per link. These subnodes
carry the link or visited state depending on whether they have been
visited. In this case, label node also gets a .link style class.</para>
</refsect2>
<refsect2><title>GtkLabel as GtkBuildable</title><para>The GtkLabel implementation of the GtkBuildable interface supports a
custom &lt;attributes> element, which supports any number of &lt;attribute>
elements. The &lt;attribute> element has attributes named “name“, “value“,
“start“ and “end“ and allows you to specify <link linkend="PangoAttribute"><type>PangoAttribute</type></link> values for
this label.</para>
<para>An example of a UI definition fragment specifying Pango attributes:</para>
<informalexample><programlisting role="example"><![CDATA[
<object class="GtkLabel">
  <attributes>
    <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
    <attribute name="background" value="red" start="5" end="10"/>
  </attributes>
</object>
]]></programlisting></informalexample>
<para></para>
<para>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.</para>
</refsect2>
<refsect2><title>Mnemonics</title><para>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 <literal>"_File"</literal>, to the
functions <link linkend="gtk-label-new-with-mnemonic"><function>gtk_label_new_with_mnemonic()</function></link> or
<link linkend="gtk-label-set-text-with-mnemonic"><function>gtk_label_set_text_with_mnemonic()</function></link>.</para>
<para>Mnemonics automatically activate any activatable widget the label is
inside, such as a <link linkend="GtkButton"><type>GtkButton</type></link>; if the label is not inside the
mnemonic’s target widget, you have to tell the label about the target
using <link linkend="gtk-label-set-mnemonic-widget"><function>gtk_label_set_mnemonic_widget()</function></link>. Here’s a simple example where
the label is inside a button:</para>
<informalexample><programlisting role="example"><![CDATA[
  // Pressing Alt+H will activate this button
  GtkWidget *button = gtk_button_new ();
  GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello");
  gtk_button_set_child (GTK_BUTTON (button), label);
]]></programlisting></informalexample>
<para></para>
<para>There’s a convenience function to create buttons with a mnemonic label
already inside:</para>
<informalexample><programlisting role="example"><![CDATA[
  // Pressing Alt+H will activate this button
  GtkWidget *button = gtk_button_new_with_mnemonic ("_Hello");
]]></programlisting></informalexample>
<para></para>
<para>To create a mnemonic for a widget alongside the label, such as a
<link linkend="GtkEntry"><type>GtkEntry</type></link>, you have to point the label at the entry with
<link linkend="gtk-label-set-mnemonic-widget"><function>gtk_label_set_mnemonic_widget()</function></link>:</para>
<informalexample><programlisting role="example"><![CDATA[
  // Pressing Alt+H will focus the entry
  GtkWidget *entry = gtk_entry_new ();
  GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello");
  gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
]]></programlisting></informalexample>
<para></para>
</refsect2>
<refsect2><title>Markup (styled text)</title><para>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>.</para>
<para>Here’s how to create a label with a small font:</para>
<informalexample><programlisting role="example"><![CDATA[
  GtkWidget *label = gtk_label_new (NULL);
  gtk_label_set_markup (GTK_LABEL (label), "<small>Small text</small>");
]]></programlisting></informalexample>
<para></para>
<para>(See <link linkend="PangoMarkupFormat">complete documentation</link> of available
tags in the Pango manual.)</para>
<para>The markup passed to <link linkend="gtk-label-set-markup"><function>gtk_label_set_markup()</function></link> must be valid; for example,
literal &lt;, &gt; and &amp; characters must be escaped as &lt;, &gt;, and &amp;.
If you pass text obtained from the user, file, or a network to
<link linkend="gtk-label-set-markup"><function>gtk_label_set_markup()</function></link>, you’ll want to escape it with
<link linkend="g-markup-escape-text"><function>g_markup_escape_text()</function></link> or <link linkend="g-markup-printf-escaped"><function>g_markup_printf_escaped()</function></link>.</para>
<para>Markup strings are just a convenient way to set the <link linkend="PangoAttrList"><type>PangoAttrList</type></link> on
a label; <link linkend="gtk-label-set-attributes"><function>gtk_label_set_attributes()</function></link> may be a simpler way to set
attributes in some cases. Be careful though; <link linkend="PangoAttrList"><type>PangoAttrList</type></link> 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, <link linkend="G-MAXINT:CAPS"><literal>G_MAXINT</literal></link>)). The reason is that specifying the start_index and
end_index for a <link linkend="PangoAttribute"><type>PangoAttribute</type></link> requires knowledge of the exact string
being displayed, so translations will cause problems.</para>
</refsect2>
<refsect2><title>Selectable labels</title><para>Labels can be made selectable with <link linkend="gtk-label-set-selectable"><function>gtk_label_set_selectable()</function></link>.
Selectable labels allow the user to copy the label contents to
the clipboard. Only labels that contain useful-to-copy information
— such as error messages — should be made selectable.</para>
</refsect2>
<refsect2 id="label-text-layout"><title>Text layout</title><para>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.</para>
<para>Labels can automatically wrap text if you call
<link linkend="gtk-label-set-wrap"><function>gtk_label_set_wrap()</function></link>.</para>
<para>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 the <link linkend="GtkWidget--halign"><type>“halign”</type></link> and
<link linkend="GtkWidget--valign"><type>“valign”</type></link> properties.</para>
<para>The <link linkend="GtkLabel--width-chars"><type>“width-chars”</type></link> and <link linkend="GtkLabel--max-width-chars"><type>“max-width-chars”</type></link> 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.</para>
<para>Note that the interpretation of <link linkend="GtkLabel--width-chars"><type>“width-chars”</type></link> and
<link linkend="GtkLabel--max-width-chars"><type>“max-width-chars”</type></link> has changed a bit with the introduction of
<link linkend="geometry-management">width-for-height geometry management.</link></para>
</refsect2>
<refsect2><title>Links</title><para>GTK+ supports markup for clickable hyperlinks in addition
to regular Pango markup. The markup for links is borrowed from HTML,
using the <literal>&lt;a&gt;</literal> with “href“, “title“ and “class“ 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. The “class“
attribute is used as style class on the CSS node for the link.</para>
<para>An example looks like this:</para>
<informalexample><programlisting role="example"><![CDATA[
const gchar *text =
"Go to the"
"<a href=\"http://www.gtk.org title=\"<i>Our</i> website\">"
"GTK+ website</a> for more...";
GtkWidget *label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), text);
]]></programlisting></informalexample>
<para></para>
<para>It is possible to implement custom handling for links and their tooltips with
the <link linkend="GtkLabel-activate-link"><type>“activate-link”</type></link> signal and the <link linkend="gtk-label-get-current-uri"><function>gtk_label_get_current_uri()</function></link> function.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkLabel.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-label-new" role="function">
<title>gtk_label_new&#160;()</title>
<indexterm zone="gtk-label-new"><primary>gtk_label_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_label_new (<parameter>const <link linkend="gchar"><type>gchar</type></link> *str</parameter>);</programlisting>
<para>Creates a new label with the given text inside it. You can
pass <link linkend="NULL:CAPS"><literal>NULL</literal></link> to get an empty label widget.</para>
<refsect3 id="gtk-label-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>str</para></entry>
<entry role="parameter_description"><para>The text of the label. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-new.returns" role="returns">
<title>Returns</title>
<para> the new <link linkend="GtkLabel"><type>GtkLabel</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-text" role="function">
<title>gtk_label_set_text&#160;()</title>
<indexterm zone="gtk-label-set-text"><primary>gtk_label_set_text</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_text (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                    <parameter>const <link linkend="gchar"><type>gchar</type></link> *str</parameter>);</programlisting>
<para>Sets the text within the <link linkend="GtkLabel"><type>GtkLabel</type></link> widget. It overwrites any text that
was there before.  </para>
<para>This function will clear any previously set mnemonic accelerators, and
set the <link linkend="GtkLabel--use-underline"><type>“use-underline”</type></link> property to <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> as a side effect.</para>
<para>This function will set the <link linkend="GtkLabel--use-markup"><type>“use-markup”</type></link> property to <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
as a side effect.</para>
<para>See also: <link linkend="gtk-label-set-markup"><function>gtk_label_set_markup()</function></link></para>
<refsect3 id="gtk-label-set-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>str</para></entry>
<entry role="parameter_description"><para>The text you want to set</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-attributes" role="function">
<title>gtk_label_set_attributes&#160;()</title>
<indexterm zone="gtk-label-set-attributes"><primary>gtk_label_set_attributes</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_attributes (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                          <parameter><link linkend="PangoAttrList"><type>PangoAttrList</type></link> *attrs</parameter>);</programlisting>
<para>Sets a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>; the attributes in the list are applied to the
label text.</para>
<para>The attributes set with this function will be applied
and merged with any other attributes previously effected by way
of the <link linkend="GtkLabel--use-underline"><type>“use-underline”</type></link> or <link linkend="GtkLabel--use-markup"><type>“use-markup”</type></link> 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.</para>
<refsect3 id="gtk-label-set-attributes.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>attrs</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-markup" role="function">
<title>gtk_label_set_markup&#160;()</title>
<indexterm zone="gtk-label-set-markup"><primary>gtk_label_set_markup</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_markup (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                      <parameter>const <link linkend="gchar"><type>gchar</type></link> *str</parameter>);</programlisting>
<para>Parses <parameter>str</parameter>
 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.</para>
<para>If the <parameter>str</parameter>
 is external data, you may need to escape it with
<link linkend="g-markup-escape-text"><function>g_markup_escape_text()</function></link> or <link linkend="g-markup-printf-escaped"><function>g_markup_printf_escaped()</function></link>:</para>
<informalexample><programlisting role="example"><![CDATA[
GtkWidget *self = gtk_label_new (NULL);
const char *str = "...";
const char *format = "<span style=\"italic\">\%s</span>";
char *markup;

markup = g_markup_printf_escaped (format, str);
gtk_label_set_markup (GTK_LABEL (self), markup);
g_free (markup);
]]></programlisting></informalexample>
<para></para>
<para>This function will set the <link linkend="GtkLabel--use-markup"><type>“use-markup”</type></link> property to <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> as
a side effect.</para>
<para>If you set the label contents using the <link linkend="GtkLabel--label"><type>“label”</type></link> property you
should also ensure that you set the <link linkend="GtkLabel--use-markup"><type>“use-markup”</type></link> property
accordingly.</para>
<para>See also: <link linkend="gtk-label-set-text"><function>gtk_label_set_text()</function></link></para>
<refsect3 id="gtk-label-set-markup.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>str</para></entry>
<entry role="parameter_description"><para>a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-markup-with-mnemonic" role="function">
<title>gtk_label_set_markup_with_mnemonic&#160;()</title>
<indexterm zone="gtk-label-set-markup-with-mnemonic"><primary>gtk_label_set_markup_with_mnemonic</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_markup_with_mnemonic (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                                    <parameter>const <link linkend="gchar"><type>gchar</type></link> *str</parameter>);</programlisting>
<para>Parses <parameter>str</parameter>
 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 <parameter>str</parameter>
 are preceded by an underscore, they are underlined
indicating that they represent a keyboard accelerator called a mnemonic.</para>
<para>The mnemonic key can be used to activate another widget, chosen
automatically, or explicitly using <link linkend="gtk-label-set-mnemonic-widget"><function>gtk_label_set_mnemonic_widget()</function></link>.</para>
<refsect3 id="gtk-label-set-markup-with-mnemonic.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>str</para></entry>
<entry role="parameter_description"><para>a markup string (see
<link linkend="PangoMarkupFormat">Pango markup format</link>)</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-justify" role="function">
<title>gtk_label_set_justify&#160;()</title>
<indexterm zone="gtk-label-set-justify"><primary>gtk_label_set_justify</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_justify (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                       <parameter><link linkend="GtkJustification"><type>GtkJustification</type></link> jtype</parameter>);</programlisting>
<para>Sets the alignment of the lines in the text of the label relative to
each other. <link linkend="GTK-JUSTIFY-LEFT:CAPS"><literal>GTK_JUSTIFY_LEFT</literal></link> is the default value when the widget is
first created with <link linkend="gtk-label-new"><function>gtk_label_new()</function></link>. If you instead want to set the
alignment of the label as a whole, use <link linkend="gtk-widget-set-halign"><function>gtk_widget_set_halign()</function></link> instead.
<link linkend="gtk-label-set-justify"><function>gtk_label_set_justify()</function></link> has no effect on labels containing only a
single line.</para>
<refsect3 id="gtk-label-set-justify.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>jtype</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkJustification"><type>GtkJustification</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-xalign" role="function">
<title>gtk_label_set_xalign&#160;()</title>
<indexterm zone="gtk-label-set-xalign"><primary>gtk_label_set_xalign</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_xalign (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                      <parameter><link linkend="gfloat"><type>gfloat</type></link> xalign</parameter>);</programlisting>
<para>Sets the <link linkend="GtkLabel--xalign"><type>“xalign”</type></link> property for <parameter>label</parameter>
.</para>
<refsect3 id="gtk-label-set-xalign.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>xalign</para></entry>
<entry role="parameter_description"><para>the new xalign value, between 0 and 1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-yalign" role="function">
<title>gtk_label_set_yalign&#160;()</title>
<indexterm zone="gtk-label-set-yalign"><primary>gtk_label_set_yalign</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_yalign (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                      <parameter><link linkend="gfloat"><type>gfloat</type></link> yalign</parameter>);</programlisting>
<para>Sets the <link linkend="GtkLabel--yalign"><type>“yalign”</type></link> property for <parameter>label</parameter>
.</para>
<refsect3 id="gtk-label-set-yalign.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>yalign</para></entry>
<entry role="parameter_description"><para>the new yalign value, between 0 and 1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-ellipsize" role="function">
<title>gtk_label_set_ellipsize&#160;()</title>
<indexterm zone="gtk-label-set-ellipsize"><primary>gtk_label_set_ellipsize</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_ellipsize (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                         <parameter><link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link> mode</parameter>);</programlisting>
<para>Sets the mode used to ellipsize (add an ellipsis: "...") to the text 
if there is not enough space to render the entire string.</para>
<refsect3 id="gtk-label-set-ellipsize.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mode</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-width-chars" role="function">
<title>gtk_label_set_width_chars&#160;()</title>
<indexterm zone="gtk-label-set-width-chars"><primary>gtk_label_set_width_chars</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_width_chars (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                           <parameter><link linkend="int"><type>int</type></link> n_chars</parameter>);</programlisting>
<para>Sets the desired width in characters of <parameter>label</parameter>
 to <parameter>n_chars</parameter>
.</para>
<refsect3 id="gtk-label-set-width-chars.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>n_chars</para></entry>
<entry role="parameter_description"><para>the new desired width, in characters.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-max-width-chars" role="function">
<title>gtk_label_set_max_width_chars&#160;()</title>
<indexterm zone="gtk-label-set-max-width-chars"><primary>gtk_label_set_max_width_chars</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_max_width_chars (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                               <parameter><link linkend="int"><type>int</type></link> n_chars</parameter>);</programlisting>
<para>Sets the desired maximum width in characters of <parameter>label</parameter>
 to <parameter>n_chars</parameter>
.</para>
<refsect3 id="gtk-label-set-max-width-chars.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>n_chars</para></entry>
<entry role="parameter_description"><para>the new desired maximum width, in characters.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-wrap" role="function">
<title>gtk_label_set_wrap&#160;()</title>
<indexterm zone="gtk-label-set-wrap"><primary>gtk_label_set_wrap</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_wrap (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                    <parameter><link linkend="gboolean"><type>gboolean</type></link> wrap</parameter>);</programlisting>
<para>Toggles line wrapping within the <link linkend="GtkLabel"><type>GtkLabel</type></link> widget. <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> makes it break
lines if text exceeds the widget’s size. <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> lets the text get cut off
by the edge of the widget if it exceeds the widget size.</para>
<para>Note that setting line wrapping to <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> 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 <link linkend="gtk-widget-set-size-request"><function>gtk_widget_set_size_request()</function></link>.</para>
<refsect3 id="gtk-label-set-wrap.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>wrap</para></entry>
<entry role="parameter_description"><para>the setting</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-wrap-mode" role="function">
<title>gtk_label_set_wrap_mode&#160;()</title>
<indexterm zone="gtk-label-set-wrap-mode"><primary>gtk_label_set_wrap_mode</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_wrap_mode (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                         <parameter><link linkend="PangoWrapMode"><type>PangoWrapMode</type></link> wrap_mode</parameter>);</programlisting>
<para>If line wrapping is on (see <link linkend="gtk-label-set-wrap"><function>gtk_label_set_wrap()</function></link>) this controls how
the line wrapping is done. The default is <link linkend="PANGO-WRAP-WORD:CAPS"><literal>PANGO_WRAP_WORD</literal></link> which means
wrap on word boundaries.</para>
<refsect3 id="gtk-label-set-wrap-mode.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>wrap_mode</para></entry>
<entry role="parameter_description"><para>the line wrapping mode</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-lines" role="function">
<title>gtk_label_set_lines&#160;()</title>
<indexterm zone="gtk-label-set-lines"><primary>gtk_label_set_lines</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_lines (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                     <parameter><link linkend="gint"><type>gint</type></link> lines</parameter>);</programlisting>
<para>Sets the number of lines to which an ellipsized, wrapping label
should be limited. This has no effect if the label is not wrapping
or ellipsized. Set this to -1 if you don’t want to limit the
number of lines.</para>
<refsect3 id="gtk-label-set-lines.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>lines</para></entry>
<entry role="parameter_description"><para>the desired number of lines, or -1</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-layout-offsets" role="function">
<title>gtk_label_get_layout_offsets&#160;()</title>
<indexterm zone="gtk-label-get-layout-offsets"><primary>gtk_label_get_layout_offsets</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_get_layout_offsets (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                              <parameter><link linkend="gint"><type>gint</type></link> *x</parameter>,
                              <parameter><link linkend="gint"><type>gint</type></link> *y</parameter>);</programlisting>
<para>Obtains the coordinates where the label will draw the <link linkend="PangoLayout"><type>PangoLayout</type></link>
representing the text in the label; useful to convert mouse events
into coordinates inside the <link linkend="PangoLayout"><type>PangoLayout</type></link>, e.g. to take some action
if some part of the label is clicked. Remember
when using the <link linkend="PangoLayout"><type>PangoLayout</type></link> functions you need to convert to
and from pixels using <link linkend="PANGO-PIXELS:CAPS"><function>PANGO_PIXELS()</function></link> or <link linkend="PANGO-SCALE:CAPS"><type>PANGO_SCALE</type></link>.</para>
<refsect3 id="gtk-label-get-layout-offsets.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>location to store X offset of layout, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>optional</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>location to store Y offset of layout, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>optional</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-mnemonic-keyval" role="function">
<title>gtk_label_get_mnemonic_keyval&#160;()</title>
<indexterm zone="gtk-label-get-mnemonic-keyval"><primary>gtk_label_get_mnemonic_keyval</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gtk_label_get_mnemonic_keyval (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>If the label has been set so that it has a mnemonic key this function
returns the keyval used for the mnemonic accelerator. If there is no
mnemonic set up it returns <link linkend="GDK-KEY-VoidSymbol"><type>GDK_KEY_VoidSymbol</type></link>.</para>
<refsect3 id="gtk-label-get-mnemonic-keyval.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-mnemonic-keyval.returns" role="returns">
<title>Returns</title>
<para> GDK keyval usable for accelerators, or <link linkend="GDK-KEY-VoidSymbol"><type>GDK_KEY_VoidSymbol</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-selectable" role="function">
<title>gtk_label_get_selectable&#160;()</title>
<indexterm zone="gtk-label-get-selectable"><primary>gtk_label_get_selectable</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_label_get_selectable (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Gets the value set by <link linkend="gtk-label-set-selectable"><function>gtk_label_set_selectable()</function></link>.</para>
<refsect3 id="gtk-label-get-selectable.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-selectable.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the user can copy text from the label</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-text" role="function">
<title>gtk_label_get_text&#160;()</title>
<indexterm zone="gtk-label-get-text"><primary>gtk_label_get_text</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_label_get_text (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>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 <link linkend="gtk-label-get-label"><function>gtk_label_get_label()</function></link>)</para>
<refsect3 id="gtk-label-get-text.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-text.returns" role="returns">
<title>Returns</title>
<para> the text in the label widget. This is the internal
string used by the label, and must not be modified.</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-new-with-mnemonic" role="function">
<title>gtk_label_new_with_mnemonic&#160;()</title>
<indexterm zone="gtk-label-new-with-mnemonic"><primary>gtk_label_new_with_mnemonic</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_label_new_with_mnemonic (<parameter>const <link linkend="gchar"><type>gchar</type></link> *str</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkLabel"><type>GtkLabel</type></link>, containing the text in <parameter>str</parameter>
.</para>
<para>If characters in <parameter>str</parameter>
 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
<link linkend="gtk-label-set-mnemonic-widget"><function>gtk_label_set_mnemonic_widget()</function></link>.</para>
<para>If <link linkend="gtk-label-set-mnemonic-widget"><function>gtk_label_set_mnemonic_widget()</function></link> is not called, then the first 
activatable ancestor of the <link linkend="GtkLabel"><type>GtkLabel</type></link> 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.</para>
<refsect3 id="gtk-label-new-with-mnemonic.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>str</para></entry>
<entry role="parameter_description"><para>The text of the label, with an underscore in front of the
mnemonic character. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-new-with-mnemonic.returns" role="returns">
<title>Returns</title>
<para> the new <link linkend="GtkLabel"><type>GtkLabel</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-label-select-region" role="function">
<title>gtk_label_select_region&#160;()</title>
<indexterm zone="gtk-label-select-region"><primary>gtk_label_select_region</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_select_region (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                         <parameter><link linkend="gint"><type>gint</type></link> start_offset</parameter>,
                         <parameter><link linkend="gint"><type>gint</type></link> end_offset</parameter>);</programlisting>
<para>Selects a range of characters in the label, if the label is selectable.
See <link linkend="gtk-label-set-selectable"><function>gtk_label_set_selectable()</function></link>. If the label is not selectable,
this function has no effect. If <parameter>start_offset</parameter>
 or
<parameter>end_offset</parameter>
 are -1, then the end of the label will be substituted.</para>
<refsect3 id="gtk-label-select-region.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start_offset</para></entry>
<entry role="parameter_description"><para>start offset (in characters not bytes)</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end_offset</para></entry>
<entry role="parameter_description"><para>end offset (in characters not bytes)</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-mnemonic-widget" role="function">
<title>gtk_label_set_mnemonic_widget&#160;()</title>
<indexterm zone="gtk-label-set-mnemonic-widget"><primary>gtk_label_set_mnemonic_widget</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_mnemonic_widget (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                               <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>);</programlisting>
<para>If the label has been set so that it has a mnemonic key (using
i.e. <link linkend="gtk-label-set-markup-with-mnemonic"><function>gtk_label_set_markup_with_mnemonic()</function></link>,
<link linkend="gtk-label-set-text-with-mnemonic"><function>gtk_label_set_text_with_mnemonic()</function></link>, <link linkend="gtk-label-new-with-mnemonic"><function>gtk_label_new_with_mnemonic()</function></link>
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 <link linkend="GtkButton"><type>GtkButton</type></link> or a <link linkend="GtkNotebook"><type>GtkNotebook</type></link> tab) it is
automatically associated with the correct widget, but sometimes
(i.e. when the target is a <link linkend="GtkEntry"><type>GtkEntry</type></link> next to the label) you need to
set it explicitly using this function.</para>
<para>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.</para>
<refsect3 id="gtk-label-set-mnemonic-widget.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>the target <link linkend="GtkWidget"><type>GtkWidget</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to unset. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-selectable" role="function">
<title>gtk_label_set_selectable&#160;()</title>
<indexterm zone="gtk-label-set-selectable"><primary>gtk_label_set_selectable</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_selectable (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                          <parameter><link linkend="gboolean"><type>gboolean</type></link> setting</parameter>);</programlisting>
<para>Selectable labels allow the user to select text from the label, for
copy-and-paste.</para>
<refsect3 id="gtk-label-set-selectable.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>setting</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to allow selecting text in the label</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-text-with-mnemonic" role="function">
<title>gtk_label_set_text_with_mnemonic&#160;()</title>
<indexterm zone="gtk-label-set-text-with-mnemonic"><primary>gtk_label_set_text_with_mnemonic</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_text_with_mnemonic (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                                  <parameter>const <link linkend="gchar"><type>gchar</type></link> *str</parameter>);</programlisting>
<para>Sets the label’s text from the string <parameter>str</parameter>
.
If characters in <parameter>str</parameter>
 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 <link linkend="gtk-label-set-mnemonic-widget"><function>gtk_label_set_mnemonic_widget()</function></link>.</para>
<refsect3 id="gtk-label-set-text-with-mnemonic.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>str</para></entry>
<entry role="parameter_description"><para>a string</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-attributes" role="function">
<title>gtk_label_get_attributes&#160;()</title>
<indexterm zone="gtk-label-get-attributes"><primary>gtk_label_get_attributes</primary></indexterm>
<programlisting language="C"><link linkend="PangoAttrList"><returnvalue>PangoAttrList</returnvalue></link>&#160;*
gtk_label_get_attributes (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Gets the attribute list that was set on the label using
<link linkend="gtk-label-set-attributes"><function>gtk_label_set_attributes()</function></link>, if any. This function does
not reflect attributes that come from the labels markup
(see <link linkend="gtk-label-set-markup"><function>gtk_label_set_markup()</function></link>). If you want to get the
effective attributes for the label, use
pango_layout_get_attribute (gtk_label_get_layout (self)).</para>
<refsect3 id="gtk-label-get-attributes.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-attributes.returns" role="returns">
<title>Returns</title>
<para>the attribute list, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
if none was set. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-justify" role="function">
<title>gtk_label_get_justify&#160;()</title>
<indexterm zone="gtk-label-get-justify"><primary>gtk_label_get_justify</primary></indexterm>
<programlisting language="C"><link linkend="GtkJustification"><returnvalue>GtkJustification</returnvalue></link>
gtk_label_get_justify (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Returns the justification of the label. See <link linkend="gtk-label-set-justify"><function>gtk_label_set_justify()</function></link>.</para>
<refsect3 id="gtk-label-get-justify.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-justify.returns" role="returns">
<title>Returns</title>
<para> <link linkend="GtkJustification"><type>GtkJustification</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-xalign" role="function">
<title>gtk_label_get_xalign&#160;()</title>
<indexterm zone="gtk-label-get-xalign"><primary>gtk_label_get_xalign</primary></indexterm>
<programlisting language="C"><link linkend="gfloat"><returnvalue>gfloat</returnvalue></link>
gtk_label_get_xalign (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Gets the <link linkend="GtkLabel--xalign"><type>“xalign”</type></link> property for <parameter>label</parameter>
.</para>
<refsect3 id="gtk-label-get-xalign.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-xalign.returns" role="returns">
<title>Returns</title>
<para> the xalign property</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-yalign" role="function">
<title>gtk_label_get_yalign&#160;()</title>
<indexterm zone="gtk-label-get-yalign"><primary>gtk_label_get_yalign</primary></indexterm>
<programlisting language="C"><link linkend="gfloat"><returnvalue>gfloat</returnvalue></link>
gtk_label_get_yalign (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Gets the <link linkend="GtkLabel--yalign"><type>“yalign”</type></link> property for <parameter>label</parameter>
.</para>
<refsect3 id="gtk-label-get-yalign.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-yalign.returns" role="returns">
<title>Returns</title>
<para> the yalign property</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-ellipsize" role="function">
<title>gtk_label_get_ellipsize&#160;()</title>
<indexterm zone="gtk-label-get-ellipsize"><primary>gtk_label_get_ellipsize</primary></indexterm>
<programlisting language="C"><link linkend="PangoEllipsizeMode"><returnvalue>PangoEllipsizeMode</returnvalue></link>
gtk_label_get_ellipsize (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Returns the ellipsizing position of the label. See <link linkend="gtk-label-set-ellipsize"><function>gtk_label_set_ellipsize()</function></link>.</para>
<refsect3 id="gtk-label-get-ellipsize.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-ellipsize.returns" role="returns">
<title>Returns</title>
<para> <link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-width-chars" role="function">
<title>gtk_label_get_width_chars&#160;()</title>
<indexterm zone="gtk-label-get-width-chars"><primary>gtk_label_get_width_chars</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_label_get_width_chars (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Retrieves the desired width of <parameter>label</parameter>
, in characters. See
<link linkend="gtk-label-set-width-chars"><function>gtk_label_set_width_chars()</function></link>.</para>
<refsect3 id="gtk-label-get-width-chars.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-width-chars.returns" role="returns">
<title>Returns</title>
<para> the width of the label in characters.</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-max-width-chars" role="function">
<title>gtk_label_get_max_width_chars&#160;()</title>
<indexterm zone="gtk-label-get-max-width-chars"><primary>gtk_label_get_max_width_chars</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_label_get_max_width_chars (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Retrieves the desired maximum width of <parameter>label</parameter>
, in characters. See
<link linkend="gtk-label-set-width-chars"><function>gtk_label_set_width_chars()</function></link>.</para>
<refsect3 id="gtk-label-get-max-width-chars.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-max-width-chars.returns" role="returns">
<title>Returns</title>
<para> the maximum width of the label in characters.</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-label" role="function">
<title>gtk_label_get_label&#160;()</title>
<indexterm zone="gtk-label-get-label"><primary>gtk_label_get_label</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_label_get_label (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Fetches the text from a label widget including any embedded
underlines indicating mnemonics and Pango markup. (See
<link linkend="gtk-label-get-text"><function>gtk_label_get_text()</function></link>).</para>
<refsect3 id="gtk-label-get-label.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-label.returns" role="returns">
<title>Returns</title>
<para> the text of the label widget. This string is
owned by the widget and must not be modified or freed.</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-layout" role="function">
<title>gtk_label_get_layout&#160;()</title>
<indexterm zone="gtk-label-get-layout"><primary>gtk_label_get_layout</primary></indexterm>
<programlisting language="C"><link linkend="PangoLayout"><returnvalue>PangoLayout</returnvalue></link>&#160;*
gtk_label_get_layout (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Gets the <link linkend="PangoLayout"><type>PangoLayout</type></link> used to display the label.
The layout is useful to e.g. convert text positions to
pixel positions, in combination with <link linkend="gtk-label-get-layout-offsets"><function>gtk_label_get_layout_offsets()</function></link>.
The returned layout is owned by the <parameter>label</parameter>
 so need not be
freed by the caller. The <parameter>label</parameter>
 is free to recreate its layout at
any time, so it should be considered read-only.</para>
<refsect3 id="gtk-label-get-layout.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-layout.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="PangoLayout"><type>PangoLayout</type></link> for this label. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-wrap" role="function">
<title>gtk_label_get_wrap&#160;()</title>
<indexterm zone="gtk-label-get-wrap"><primary>gtk_label_get_wrap</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_label_get_wrap (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Returns whether lines in the label are automatically wrapped.
See <link linkend="gtk-label-set-wrap"><function>gtk_label_set_wrap()</function></link>.</para>
<refsect3 id="gtk-label-get-wrap.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-wrap.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the lines of the label are automatically wrapped.</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-wrap-mode" role="function">
<title>gtk_label_get_wrap_mode&#160;()</title>
<indexterm zone="gtk-label-get-wrap-mode"><primary>gtk_label_get_wrap_mode</primary></indexterm>
<programlisting language="C"><link linkend="PangoWrapMode"><returnvalue>PangoWrapMode</returnvalue></link>
gtk_label_get_wrap_mode (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Returns line wrap mode used by the label. See <link linkend="gtk-label-set-wrap-mode"><function>gtk_label_set_wrap_mode()</function></link>.</para>
<refsect3 id="gtk-label-get-wrap-mode.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-wrap-mode.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the lines of the label are automatically wrapped.</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-lines" role="function">
<title>gtk_label_get_lines&#160;()</title>
<indexterm zone="gtk-label-get-lines"><primary>gtk_label_get_lines</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_label_get_lines (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Gets the number of lines to which an ellipsized, wrapping
label should be limited. See <link linkend="gtk-label-set-lines"><function>gtk_label_set_lines()</function></link>.</para>
<refsect3 id="gtk-label-get-lines.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-lines.returns" role="returns">
<title>Returns</title>
<para> The number of lines</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-mnemonic-widget" role="function">
<title>gtk_label_get_mnemonic_widget&#160;()</title>
<indexterm zone="gtk-label-get-mnemonic-widget"><primary>gtk_label_get_mnemonic_widget</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_label_get_mnemonic_widget (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Retrieves the target of the mnemonic (keyboard shortcut) of this
label. See <link linkend="gtk-label-set-mnemonic-widget"><function>gtk_label_set_mnemonic_widget()</function></link>.</para>
<refsect3 id="gtk-label-get-mnemonic-widget.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-mnemonic-widget.returns" role="returns">
<title>Returns</title>
<para>the target of the label’s mnemonic,
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if none has been set and the default algorithm will be used. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-selection-bounds" role="function">
<title>gtk_label_get_selection_bounds&#160;()</title>
<indexterm zone="gtk-label-get-selection-bounds"><primary>gtk_label_get_selection_bounds</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_label_get_selection_bounds (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                                <parameter><link linkend="gint"><type>gint</type></link> *start</parameter>,
                                <parameter><link linkend="gint"><type>gint</type></link> *end</parameter>);</programlisting>
<para>Gets the selected range of characters in the label, returning <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>
if there’s a selection.</para>
<refsect3 id="gtk-label-get-selection-bounds.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>return location for start of selection, as a character offset. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>return location for end of selection, as a character offset. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-selection-bounds.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if selection is non-empty</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-use-markup" role="function">
<title>gtk_label_get_use_markup&#160;()</title>
<indexterm zone="gtk-label-get-use-markup"><primary>gtk_label_get_use_markup</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_label_get_use_markup (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Returns whether the label’s text is interpreted as marked up with
the <link linkend="PangoMarkupFormat">Pango text markup language</link>.
See <link linkend="gtk-label-set-use-markup"><function>gtk_label_set_use_markup()</function></link>.</para>
<refsect3 id="gtk-label-get-use-markup.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-use-markup.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the label’s text will be parsed for markup.</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-use-underline" role="function">
<title>gtk_label_get_use_underline&#160;()</title>
<indexterm zone="gtk-label-get-use-underline"><primary>gtk_label_get_use_underline</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_label_get_use_underline (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Returns whether an embedded underline in the label indicates a
mnemonic. See <link linkend="gtk-label-set-use-underline"><function>gtk_label_set_use_underline()</function></link>.</para>
<refsect3 id="gtk-label-get-use-underline.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-use-underline.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> whether an embedded underline in the label indicates
the mnemonic accelerator keys.</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-single-line-mode" role="function">
<title>gtk_label_get_single_line_mode&#160;()</title>
<indexterm zone="gtk-label-get-single-line-mode"><primary>gtk_label_get_single_line_mode</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_label_get_single_line_mode (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Returns whether the label is in single line mode.</para>
<refsect3 id="gtk-label-get-single-line-mode.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-single-line-mode.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> when the label is in single line mode.</para>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-label" role="function">
<title>gtk_label_set_label&#160;()</title>
<indexterm zone="gtk-label-set-label"><primary>gtk_label_set_label</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_label (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                     <parameter>const <link linkend="gchar"><type>gchar</type></link> *str</parameter>);</programlisting>
<para>Sets the text of the label. The label is interpreted as
including embedded underlines and/or Pango markup depending
on the values of the <link linkend="GtkLabel--use-underline"><type>“use-underline”</type></link> and
<link linkend="GtkLabel--use-markup"><type>“use-markup”</type></link> properties.</para>
<refsect3 id="gtk-label-set-label.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>str</para></entry>
<entry role="parameter_description"><para>the new text to set for the label</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-use-markup" role="function">
<title>gtk_label_set_use_markup&#160;()</title>
<indexterm zone="gtk-label-set-use-markup"><primary>gtk_label_set_use_markup</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_use_markup (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                          <parameter><link linkend="gboolean"><type>gboolean</type></link> setting</parameter>);</programlisting>
<para>Sets whether the text of the label contains markup in
<link linkend="PangoMarkupFormat">Pango’s text markup language</link>.
See <link linkend="gtk-label-set-markup"><function>gtk_label_set_markup()</function></link>.</para>
<refsect3 id="gtk-label-set-use-markup.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>setting</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the label’s text should be parsed for markup.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-use-underline" role="function">
<title>gtk_label_set_use_underline&#160;()</title>
<indexterm zone="gtk-label-set-use-underline"><primary>gtk_label_set_use_underline</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_use_underline (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                             <parameter><link linkend="gboolean"><type>gboolean</type></link> setting</parameter>);</programlisting>
<para>If true, an underline in the text indicates the next character should be
used for the mnemonic accelerator key.</para>
<refsect3 id="gtk-label-set-use-underline.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>setting</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if underlines in the text indicate mnemonics</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-single-line-mode" role="function">
<title>gtk_label_set_single_line_mode&#160;()</title>
<indexterm zone="gtk-label-set-single-line-mode"><primary>gtk_label_set_single_line_mode</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_single_line_mode (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                                <parameter><link linkend="gboolean"><type>gboolean</type></link> single_line_mode</parameter>);</programlisting>
<para>Sets whether the label is in single line mode.</para>
<refsect3 id="gtk-label-set-single-line-mode.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>single_line_mode</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the label should be in single line mode</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-current-uri" role="function">
<title>gtk_label_get_current_uri&#160;()</title>
<indexterm zone="gtk-label-get-current-uri"><primary>gtk_label_get_current_uri</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_label_get_current_uri (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>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.</para>
<para>This function is intended for use in a <link linkend="GtkLabel-activate-link"><type>“activate-link”</type></link> handler
or for use in a <link linkend="GtkWidget-query-tooltip"><type>“query-tooltip”</type></link> handler.</para>
<refsect3 id="gtk-label-get-current-uri.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-current-uri.returns" role="returns">
<title>Returns</title>
<para>the currently active URI or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if there is none.
The string is owned by GTK+ and must not be freed or modified. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-label-set-extra-menu" role="function">
<title>gtk_label_set_extra_menu&#160;()</title>
<indexterm zone="gtk-label-set-extra-menu"><primary>gtk_label_set_extra_menu</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_label_set_extra_menu (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>,
                          <parameter><link linkend="GMenuModel"><type>GMenuModel</type></link> *model</parameter>);</programlisting>
<para>Sets a menu model to add when constructing
the context menu for <parameter>label</parameter>
.</para>
<refsect3 id="gtk-label-set-extra-menu.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>model</para></entry>
<entry role="parameter_description"><para>a <link linkend="GMenuModel"><type>GMenuModel</type></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-label-get-extra-menu" role="function">
<title>gtk_label_get_extra_menu&#160;()</title>
<indexterm zone="gtk-label-get-extra-menu"><primary>gtk_label_get_extra_menu</primary></indexterm>
<programlisting language="C"><link linkend="GMenuModel"><returnvalue>GMenuModel</returnvalue></link>&#160;*
gtk_label_get_extra_menu (<parameter><link linkend="GtkLabel"><type>GtkLabel</type></link> *self</parameter>);</programlisting>
<para>Gets the menu model set with <link linkend="gtk-label-set-extra-menu"><function>gtk_label_set_extra_menu()</function></link>.</para>
<refsect3 id="gtk-label-get-extra-menu.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkLabel"><type>GtkLabel</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-label-get-extra-menu.returns" role="returns">
<title>Returns</title>
<para>(nullable): the menu model. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkLabel.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkLabel-struct" role="struct">
<title>GtkLabel</title>
<indexterm zone="GtkLabel-struct"><primary>GtkLabel</primary></indexterm>
<programlisting language="C">typedef struct _GtkLabel GtkLabel;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkLabel.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkLabel--attributes" role="property"><title>The <literal>“attributes”</literal> property</title>
<indexterm zone="GtkLabel--attributes"><primary>GtkLabel:attributes</primary></indexterm>
<programlisting>  “attributes”               <link linkend="PangoAttrList"><type>PangoAttrList</type></link>&#160;*</programlisting>
<para>A list of style attributes to apply to the text of the label.</para><para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkLabel--ellipsize" role="property"><title>The <literal>“ellipsize”</literal> property</title>
<indexterm zone="GtkLabel--ellipsize"><primary>GtkLabel:ellipsize</primary></indexterm>
<programlisting>  “ellipsize”                <link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link></programlisting>
<para>The preferred place to ellipsize the string, if the label does
not have enough room to display the entire string, specified as a
<link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link>.</para>
<para>Note that setting this property to a value other than
<link linkend="PANGO-ELLIPSIZE-NONE:CAPS"><literal>PANGO_ELLIPSIZE_NONE</literal></link> 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 <link linkend="GtkNotebook"><type>GtkNotebook</type></link> tab-expand child property is set to <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>. Other ways
to set a label's width are <link linkend="gtk-widget-set-size-request"><function>gtk_widget_set_size_request()</function></link> and
<link linkend="gtk-label-set-width-chars"><function>gtk_label_set_width_chars()</function></link>.</para>
<para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Default value: PANGO_ELLIPSIZE_NONE</para>
</refsect2>
<refsect2 id="GtkLabel--extra-menu" role="property"><title>The <literal>“extra-menu”</literal> property</title>
<indexterm zone="GtkLabel--extra-menu"><primary>GtkLabel:extra-menu</primary></indexterm>
<programlisting>  “extra-menu”               <link linkend="GMenuModel"><type>GMenuModel</type></link>&#160;*</programlisting>
<para>A menu model whose contents will be appended to
the context menu.</para>
<para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkLabel--justify" role="property"><title>The <literal>“justify”</literal> property</title>
<indexterm zone="GtkLabel--justify"><primary>GtkLabel:justify</primary></indexterm>
<programlisting>  “justify”                  <link linkend="GtkJustification"><type>GtkJustification</type></link></programlisting>
<para>The alignment of the lines in the text of the label relative to each other. This does NOT affect the alignment of the label within its allocation. See GtkLabel:xalign for that.</para><para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_JUSTIFY_LEFT</para>
</refsect2>
<refsect2 id="GtkLabel--label" role="property"><title>The <literal>“label”</literal> property</title>
<indexterm zone="GtkLabel--label"><primary>GtkLabel:label</primary></indexterm>
<programlisting>  “label”                    <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The contents of the label.</para>
<para>If the string contains <link linkend="PangoMarkupFormat">Pango XML markup</link>, you will
have to set the <link linkend="GtkLabel--use-markup"><type>“use-markup”</type></link> property to <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> in order for the
label to display the markup attributes. See also <link linkend="gtk-label-set-markup"><function>gtk_label_set_markup()</function></link>
for a convenience function that sets both this property and the
<link linkend="GtkLabel--use-markup"><type>“use-markup”</type></link> property at the same time.</para>
<para>If the string contains underlines acting as mnemonics, you will have to
set the <link linkend="GtkLabel--use-underline"><type>“use-underline”</type></link> property to <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> in order for the label
to display them.</para>
<para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Default value: ""</para>
</refsect2>
<refsect2 id="GtkLabel--lines" role="property"><title>The <literal>“lines”</literal> property</title>
<indexterm zone="GtkLabel--lines"><primary>GtkLabel:lines</primary></indexterm>
<programlisting>  “lines”                    <link linkend="gint"><type>gint</type></link></programlisting>
<para>The number of lines to which an ellipsized, wrapping label
should be limited. This property has no effect if the
label is not wrapping or ellipsized. Set this property to
-1 if you don't want to limit the number of lines.</para>
<para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Allowed values: &gt;= -1</para>
<para>Default value: -1</para>
</refsect2>
<refsect2 id="GtkLabel--max-width-chars" role="property"><title>The <literal>“max-width-chars”</literal> property</title>
<indexterm zone="GtkLabel--max-width-chars"><primary>GtkLabel:max-width-chars</primary></indexterm>
<programlisting>  “max-width-chars”          <link linkend="gint"><type>gint</type></link></programlisting>
<para>The desired maximum width of the label, in characters. If this property
is set to -1, the width will be calculated automatically.</para>
<para>See the section on <link linkend="label-text-layout">text layout</link>
for details of how <link linkend="GtkLabel--width-chars"><type>“width-chars”</type></link> and <link linkend="GtkLabel--max-width-chars"><type>“max-width-chars”</type></link>
determine the width of ellipsized and wrapped labels.</para>
<para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Allowed values: &gt;= -1</para>
<para>Default value: -1</para>
</refsect2>
<refsect2 id="GtkLabel--mnemonic-keyval" role="property"><title>The <literal>“mnemonic-keyval”</literal> property</title>
<indexterm zone="GtkLabel--mnemonic-keyval"><primary>GtkLabel:mnemonic-keyval</primary></indexterm>
<programlisting>  “mnemonic-keyval”          <link linkend="guint"><type>guint</type></link></programlisting>
<para>The mnemonic accelerator key for this label.</para><para>Owner: GtkLabel</para>
<para>Flags: Read</para>
<para>Default value: 16777215</para>
</refsect2>
<refsect2 id="GtkLabel--mnemonic-widget" role="property"><title>The <literal>“mnemonic-widget”</literal> property</title>
<indexterm zone="GtkLabel--mnemonic-widget"><primary>GtkLabel:mnemonic-widget</primary></indexterm>
<programlisting>  “mnemonic-widget”          <link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</programlisting>
<para>The widget to be activated when the label’s mnemonic key is pressed.</para><para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkLabel--selectable" role="property"><title>The <literal>“selectable”</literal> property</title>
<indexterm zone="GtkLabel--selectable"><primary>GtkLabel:selectable</primary></indexterm>
<programlisting>  “selectable”               <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether the label text can be selected with the mouse.</para><para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkLabel--single-line-mode" role="property"><title>The <literal>“single-line-mode”</literal> property</title>
<indexterm zone="GtkLabel--single-line-mode"><primary>GtkLabel:single-line-mode</primary></indexterm>
<programlisting>  “single-line-mode”         <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>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.</para>
<para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkLabel--use-markup" role="property"><title>The <literal>“use-markup”</literal> property</title>
<indexterm zone="GtkLabel--use-markup"><primary>GtkLabel:use-markup</primary></indexterm>
<programlisting>  “use-markup”               <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>The text of the label includes XML markup. See pango_parse_markup().</para><para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkLabel--use-underline" role="property"><title>The <literal>“use-underline”</literal> property</title>
<indexterm zone="GtkLabel--use-underline"><primary>GtkLabel:use-underline</primary></indexterm>
<programlisting>  “use-underline”            <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</para><para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkLabel--width-chars" role="property"><title>The <literal>“width-chars”</literal> property</title>
<indexterm zone="GtkLabel--width-chars"><primary>GtkLabel:width-chars</primary></indexterm>
<programlisting>  “width-chars”              <link linkend="gint"><type>gint</type></link></programlisting>
<para>The desired width of the label, in characters. If this property is set to
-1, the width will be calculated automatically.</para>
<para>See the section on <link linkend="label-text-layout">text layout</link>
for details of how <link linkend="GtkLabel--width-chars"><type>“width-chars”</type></link> and <link linkend="GtkLabel--max-width-chars"><type>“max-width-chars”</type></link>
determine the width of ellipsized and wrapped labels.</para>
<para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Allowed values: &gt;= -1</para>
<para>Default value: -1</para>
</refsect2>
<refsect2 id="GtkLabel--wrap" role="property"><title>The <literal>“wrap”</literal> property</title>
<indexterm zone="GtkLabel--wrap"><primary>GtkLabel:wrap</primary></indexterm>
<programlisting>  “wrap”                     <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>If set, wrap lines if the text becomes too wide.</para><para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkLabel--wrap-mode" role="property"><title>The <literal>“wrap-mode”</literal> property</title>
<indexterm zone="GtkLabel--wrap-mode"><primary>GtkLabel:wrap-mode</primary></indexterm>
<programlisting>  “wrap-mode”                <link linkend="PangoWrapMode"><type>PangoWrapMode</type></link></programlisting>
<para>If line wrapping is on (see the <link linkend="GtkLabel--wrap"><type>“wrap”</type></link> property) this controls
how the line wrapping is done. The default is <link linkend="PANGO-WRAP-WORD:CAPS"><literal>PANGO_WRAP_WORD</literal></link>, which
means wrap on word boundaries.</para>
<para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Default value: PANGO_WRAP_WORD</para>
</refsect2>
<refsect2 id="GtkLabel--xalign" role="property"><title>The <literal>“xalign”</literal> property</title>
<indexterm zone="GtkLabel--xalign"><primary>GtkLabel:xalign</primary></indexterm>
<programlisting>  “xalign”                   <link linkend="gfloat"><type>gfloat</type></link></programlisting>
<para>The xalign property determines the horizontal aligment of the label text
inside the labels size allocation. Compare this to <link linkend="GtkWidget--halign"><type>“halign”</type></link>,
which determines how the labels size allocation is positioned in the
space available for the label.</para>
<para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Allowed values: [0,1]</para>
<para>Default value: 0.5</para>
</refsect2>
<refsect2 id="GtkLabel--yalign" role="property"><title>The <literal>“yalign”</literal> property</title>
<indexterm zone="GtkLabel--yalign"><primary>GtkLabel:yalign</primary></indexterm>
<programlisting>  “yalign”                   <link linkend="gfloat"><type>gfloat</type></link></programlisting>
<para>The yalign property determines the vertical aligment of the label text
inside the labels size allocation. Compare this to <link linkend="GtkWidget--valign"><type>“valign”</type></link>,
which determines how the labels size allocation is positioned in the
space available for the label.</para>
<para>Owner: GtkLabel</para>
<para>Flags: Read / Write</para>
<para>Allowed values: [0,1]</para>
<para>Default value: 0.5</para>
</refsect2>

</refsect1>
<refsect1 id="GtkLabel.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkLabel-activate-current-link" role="signal"><title>The <literal>“activate-current-link”</literal> signal</title>
<indexterm zone="GtkLabel-activate-current-link"><primary>GtkLabel::activate-current-link</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkLabel"><type>GtkLabel</type></link> *self,
               <link linkend="gpointer"><type>gpointer</type></link>  user_data)</programlisting>
<para>A <link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted when the user activates a link in the label.</para>
<para>Applications may also emit the signal with <link linkend="g-signal-emit-by-name"><function>g_signal_emit_by_name()</function></link>
if they need to control activation of URIs programmatically.</para>
<para>The default bindings for this signal are all forms of the Enter key.</para>
<refsect3 id="GtkLabel-activate-current-link.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>The label on which the signal was emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkLabel-activate-link" role="signal"><title>The <literal>“activate-link”</literal> signal</title>
<indexterm zone="GtkLabel-activate-link"><primary>GtkLabel::activate-link</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
user_function (<link linkend="GtkLabel"><type>GtkLabel</type></link> *self,
               <link linkend="gchar"><type>gchar</type></link>    *uri,
               <link linkend="gpointer"><type>gpointer</type></link>  user_data)</programlisting>
<para>The signal which gets emitted to activate a URI.
Applications may connect to it to override the default behaviour,
which is to call <link linkend="gtk-show-uri"><function>gtk_show_uri()</function></link>.</para>
<refsect3 id="GtkLabel-activate-link.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>The label on which the signal was emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>uri</para></entry>
<entry role="parameter_description"><para>the URI that is activated</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="GtkLabel-activate-link.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the link has been activated</para>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkLabel-copy-clipboard" role="signal"><title>The <literal>“copy-clipboard”</literal> signal</title>
<indexterm zone="GtkLabel-copy-clipboard"><primary>GtkLabel::copy-clipboard</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkLabel"><type>GtkLabel</type></link> *self,
               <link linkend="gpointer"><type>gpointer</type></link>  user_data)</programlisting>
<para>The ::copy-clipboard signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted to copy the selection to the clipboard.</para>
<para>The default binding for this signal is Ctrl-c.</para>
<refsect3 id="GtkLabel-copy-clipboard.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkLabel-move-cursor" role="signal"><title>The <literal>“move-cursor”</literal> signal</title>
<indexterm zone="GtkLabel-move-cursor"><primary>GtkLabel::move-cursor</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkLabel"><type>GtkLabel</type></link>       *entry,
               <link linkend="GtkMovementStep"><type>GtkMovementStep</type></link> step,
               <link linkend="gint"><type>gint</type></link>            count,
               <link linkend="gboolean"><type>gboolean</type></link>        extend_selection,
               <link linkend="gpointer"><type>gpointer</type></link>        user_data)</programlisting>
<para>The ::move-cursor signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted when the user initiates a cursor movement.
If the cursor is not visible in <parameter>entry</parameter>
, this signal causes
the viewport to be moved instead.</para>
<para>Applications should not connect to it, but may emit it with
<link linkend="g-signal-emit-by-name"><function>g_signal_emit_by_name()</function></link> if they need to control the cursor
programmatically.</para>
<para>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.</para>
<itemizedlist>
<listitem><para>Arrow keys move by individual characters/lines</para></listitem>
<listitem><para>Ctrl-arrow key combinations move by words/paragraphs</para></listitem>
<listitem><para>Home/End keys move to the ends of the buffer</para></listitem>
</itemizedlist>
<refsect3 id="GtkLabel-move-cursor.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>entry</para></entry>
<entry role="parameter_description"><para>the object which received the signal</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>step</para></entry>
<entry role="parameter_description"><para>the granularity of the move, as a <link linkend="GtkMovementStep"><type>GtkMovementStep</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>count</para></entry>
<entry role="parameter_description"><para>the number of <parameter>step</parameter>
units to move</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>extend_selection</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the move should extend the selection</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkLabel.action-details" role="action_details">
<title role="action_details.title">Action Details</title>
<refsect2 id="GtkLabel|link.copy" role="action"><title>The <literal>“link.copy”</literal> action</title>
<indexterm zone="GtkLabel|link.copy"><primary>GtkLabel|link.copy</primary></indexterm>
<para>Copies the link to the clipboard, when activated on a link
inside the label.</para>
</refsect2>
<refsect2 id="GtkLabel|link.open" role="action"><title>The <literal>“link.open”</literal> action</title>
<indexterm zone="GtkLabel|link.open"><primary>GtkLabel|link.open</primary></indexterm>
<para>Opens the link, when activated on a link inside the label.</para>
</refsect2>
<refsect2 id="GtkLabel|selection.select-all" role="action"><title>The <literal>“selection.select-all”</literal> action</title>
<indexterm zone="GtkLabel|selection.select-all"><primary>GtkLabel|selection.select-all</primary></indexterm>
<para>Selects all of the text, if the label allows selection.</para>
</refsect2>
<refsect2 id="GtkLabel|selection.delete" role="action"><title>The <literal>“selection.delete”</literal> action</title>
<indexterm zone="GtkLabel|selection.delete"><primary>GtkLabel|selection.delete</primary></indexterm>
<para>Doesn't do anything, since text in labels can't be deleted.</para>
</refsect2>
<refsect2 id="GtkLabel|clipboard.paste" role="action"><title>The <literal>“clipboard.paste”</literal> action</title>
<indexterm zone="GtkLabel|clipboard.paste"><primary>GtkLabel|clipboard.paste</primary></indexterm>
<para>Doesn't do anything, since text in labels can't be edited.</para>
</refsect2>
<refsect2 id="GtkLabel|clipboard.copy" role="action"><title>The <literal>“clipboard.copy”</literal> action</title>
<indexterm zone="GtkLabel|clipboard.copy"><primary>GtkLabel|clipboard.copy</primary></indexterm>
<para>Copies the text to the clipboard.</para>
</refsect2>
<refsect2 id="GtkLabel|clipboard.cut" role="action"><title>The <literal>“clipboard.cut”</literal> action</title>
<indexterm zone="GtkLabel|clipboard.cut"><primary>GtkLabel|clipboard.cut</primary></indexterm>
<para>Doesn't do anything, since text in labels can't be deleted.</para>
</refsect2>
<refsect2 id="GtkLabel|menu.popup" role="action"><title>The <literal>“menu.popup”</literal> action</title>
<indexterm zone="GtkLabel|menu.popup"><primary>GtkLabel|menu.popup</primary></indexterm>
<para>Opens the context menu.</para>
</refsect2>

</refsect1>

</refentry>
