<?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 index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
<refentry id="GtkLabel">
<refmeta>
<refentrytitle role="top_of_page" id="GtkLabel.top_of_page">GtkLabel</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkLabel</refname>
<refpurpose>A widget that displays a small to medium amount of text</refpurpose>
</refnamediv>

<refsynopsisdiv id="GtkLabel.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

#include &lt;gtk/gtk.h&gt;

                    <link linkend="GtkLabel-struct">GtkLabel</link>;
<link linkend="GtkWidget">GtkWidget</link>*          <link linkend="gtk-label-new">gtk_label_new</link>                       (const <link linkend="gchar">gchar</link> *str);
<link linkend="void">void</link>                <link linkend="gtk-label-set-text">gtk_label_set_text</link>                  (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *str);
<link linkend="void">void</link>                <link linkend="gtk-label-set-attributes">gtk_label_set_attributes</link>            (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="PangoAttrList">PangoAttrList</link> *attrs);
<link linkend="void">void</link>                <link linkend="gtk-label-set-markup">gtk_label_set_markup</link>                (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *str);
<link linkend="void">void</link>                <link linkend="gtk-label-set-markup-with-mnemonic">gtk_label_set_markup_with_mnemonic</link>  (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *str);
<link linkend="void">void</link>                <link linkend="gtk-label-set-pattern">gtk_label_set_pattern</link>               (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *pattern);
<link linkend="void">void</link>                <link linkend="gtk-label-set-justify">gtk_label_set_justify</link>               (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="GtkJustification">GtkJustification</link> jtype);
<link linkend="void">void</link>                <link linkend="gtk-label-set-ellipsize">gtk_label_set_ellipsize</link>             (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="PangoEllipsizeMode">PangoEllipsizeMode</link> mode);
<link linkend="void">void</link>                <link linkend="gtk-label-set-width-chars">gtk_label_set_width_chars</link>           (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gint">gint</link> n_chars);
<link linkend="void">void</link>                <link linkend="gtk-label-set-max-width-chars">gtk_label_set_max_width_chars</link>       (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gint">gint</link> n_chars);
<link linkend="void">void</link>                <link linkend="gtk-label-get">gtk_label_get</link>                       (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gchar">gchar</link> **str);
<link linkend="guint">guint</link>               <link linkend="gtk-label-parse-uline">gtk_label_parse_uline</link>               (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *string);
<link linkend="void">void</link>                <link linkend="gtk-label-set-line-wrap">gtk_label_set_line_wrap</link>             (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> wrap);
<link linkend="void">void</link>                <link linkend="gtk-label-set-line-wrap-mode">gtk_label_set_line_wrap_mode</link>        (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="PangoWrapMode">PangoWrapMode</link> wrap_mode);
#define             <link linkend="gtk-label-set">gtk_label_set</link>
<link linkend="void">void</link>                <link linkend="gtk-label-get-layout-offsets">gtk_label_get_layout_offsets</link>        (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gint">gint</link> *x,
                                                         <link linkend="gint">gint</link> *y);
<link linkend="guint">guint</link>               <link linkend="gtk-label-get-mnemonic-keyval">gtk_label_get_mnemonic_keyval</link>       (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-label-get-selectable">gtk_label_get_selectable</link>            (<link linkend="GtkLabel">GtkLabel</link> *label);
const <link linkend="gchar">gchar</link>*        <link linkend="gtk-label-get-text">gtk_label_get_text</link>                  (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="GtkWidget">GtkWidget</link>*          <link linkend="gtk-label-new-with-mnemonic">gtk_label_new_with_mnemonic</link>         (const <link linkend="gchar">gchar</link> *str);
<link linkend="void">void</link>                <link linkend="gtk-label-select-region">gtk_label_select_region</link>             (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gint">gint</link> start_offset,
                                                         <link linkend="gint">gint</link> end_offset);
<link linkend="void">void</link>                <link linkend="gtk-label-set-mnemonic-widget">gtk_label_set_mnemonic_widget</link>       (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="GtkWidget">GtkWidget</link> *widget);
<link linkend="void">void</link>                <link linkend="gtk-label-set-selectable">gtk_label_set_selectable</link>            (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> setting);
<link linkend="void">void</link>                <link linkend="gtk-label-set-text-with-mnemonic">gtk_label_set_text_with_mnemonic</link>    (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *str);
<link linkend="PangoAttrList">PangoAttrList</link> *     <link linkend="gtk-label-get-attributes">gtk_label_get_attributes</link>            (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="GtkJustification">GtkJustification</link>    <link linkend="gtk-label-get-justify">gtk_label_get_justify</link>               (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="PangoEllipsizeMode">PangoEllipsizeMode</link>  <link linkend="gtk-label-get-ellipsize">gtk_label_get_ellipsize</link>             (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="gint">gint</link>                <link linkend="gtk-label-get-width-chars">gtk_label_get_width_chars</link>           (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="gint">gint</link>                <link linkend="gtk-label-get-max-width-chars">gtk_label_get_max_width_chars</link>       (<link linkend="GtkLabel">GtkLabel</link> *label);
const <link linkend="gchar">gchar</link> *       <link linkend="gtk-label-get-label">gtk_label_get_label</link>                 (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="PangoLayout">PangoLayout</link> *       <link linkend="gtk-label-get-layout">gtk_label_get_layout</link>                (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-label-get-line-wrap">gtk_label_get_line_wrap</link>             (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="PangoWrapMode">PangoWrapMode</link>       <link linkend="gtk-label-get-line-wrap-mode">gtk_label_get_line_wrap_mode</link>        (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="GtkWidget">GtkWidget</link> *         <link linkend="gtk-label-get-mnemonic-widget">gtk_label_get_mnemonic_widget</link>       (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-label-get-selection-bounds">gtk_label_get_selection_bounds</link>      (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gint">gint</link> *start,
                                                         <link linkend="gint">gint</link> *end);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-label-get-use-markup">gtk_label_get_use_markup</link>            (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-label-get-use-underline">gtk_label_get_use_underline</link>         (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-label-get-single-line-mode">gtk_label_get_single_line_mode</link>      (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="gdouble">gdouble</link>             <link linkend="gtk-label-get-angle">gtk_label_get_angle</link>                 (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="void">void</link>                <link linkend="gtk-label-set-label">gtk_label_set_label</link>                 (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *str);
<link linkend="void">void</link>                <link linkend="gtk-label-set-use-markup">gtk_label_set_use_markup</link>            (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> setting);
<link linkend="void">void</link>                <link linkend="gtk-label-set-use-underline">gtk_label_set_use_underline</link>         (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> setting);
<link linkend="void">void</link>                <link linkend="gtk-label-set-single-line-mode">gtk_label_set_single_line_mode</link>      (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> single_line_mode);
<link linkend="void">void</link>                <link linkend="gtk-label-set-angle">gtk_label_set_angle</link>                 (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gdouble">gdouble</link> angle);
const <link linkend="gchar">gchar</link> *       <link linkend="gtk-label-get-current-uri">gtk_label_get_current_uri</link>           (<link linkend="GtkLabel">GtkLabel</link> *label);
<link linkend="void">void</link>                <link linkend="gtk-label-set-track-visited-links">gtk_label_set_track_visited_links</link>   (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> track_links);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-label-get-track-visited-links">gtk_label_get_track_visited_links</link>   (<link linkend="GtkLabel">GtkLabel</link> *label);
</synopsis>
</refsynopsisdiv>

<refsect1 id="GtkLabel.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
         +----<link linkend="GtkObject">GtkObject</link>
               +----<link linkend="GtkWidget">GtkWidget</link>
                     +----<link linkend="GtkMisc">GtkMisc</link>
                           +----GtkLabel
                                 +----<link linkend="GtkAccelLabel">GtkAccelLabel</link>
                                 +----<link linkend="GtkTipsQuery">GtkTipsQuery</link>
</synopsis>
</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> and  <link linkend="GtkBuildable">GtkBuildable</link>.</para>
</refsect1>


<refsect1 id="GtkLabel.properties" role="properties">
<title role="properties.title">Properties</title>
<synopsis>
  &quot;<link linkend="GtkLabel--angle">angle</link>&quot;                    <link linkend="gdouble">gdouble</link>               : Read / Write
  &quot;<link linkend="GtkLabel--attributes">attributes</link>&quot;               <link linkend="PangoAttrList">PangoAttrList</link>*        : Read / Write
  &quot;<link linkend="GtkLabel--cursor-position">cursor-position</link>&quot;          <link linkend="gint">gint</link>                  : Read
  &quot;<link linkend="GtkLabel--ellipsize">ellipsize</link>&quot;                <link linkend="PangoEllipsizeMode">PangoEllipsizeMode</link>    : Read / Write
  &quot;<link linkend="GtkLabel--justify">justify</link>&quot;                  <link linkend="GtkJustification">GtkJustification</link>      : Read / Write
  &quot;<link linkend="GtkLabel--label">label</link>&quot;                    <link linkend="gchar">gchar</link>*                : Read / Write
  &quot;<link linkend="GtkLabel--max-width-chars">max-width-chars</link>&quot;          <link linkend="gint">gint</link>                  : Read / Write
  &quot;<link linkend="GtkLabel--mnemonic-keyval">mnemonic-keyval</link>&quot;          <link linkend="guint">guint</link>                 : Read
  &quot;<link linkend="GtkLabel--mnemonic-widget">mnemonic-widget</link>&quot;          <link linkend="GtkWidget">GtkWidget</link>*            : Read / Write
  &quot;<link linkend="GtkLabel--pattern">pattern</link>&quot;                  <link linkend="gchar">gchar</link>*                : Write
  &quot;<link linkend="GtkLabel--selectable">selectable</link>&quot;               <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkLabel--selection-bound">selection-bound</link>&quot;          <link linkend="gint">gint</link>                  : Read
  &quot;<link linkend="GtkLabel--single-line-mode">single-line-mode</link>&quot;         <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkLabel--track-visited-links">track-visited-links</link>&quot;      <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkLabel--use-markup">use-markup</link>&quot;               <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkLabel--use-underline">use-underline</link>&quot;            <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkLabel--width-chars">width-chars</link>&quot;              <link linkend="gint">gint</link>                  : Read / Write
  &quot;<link linkend="GtkLabel--wrap">wrap</link>&quot;                     <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkLabel--wrap-mode">wrap-mode</link>&quot;                <link linkend="PangoWrapMode">PangoWrapMode</link>         : Read / Write
</synopsis>
</refsect1>

<refsect1 id="GtkLabel.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="GtkLabel-activate-current-link">activate-current-link</link>&quot;                          : Run Last / Action
  &quot;<link linkend="GtkLabel-activate-link">activate-link</link>&quot;                                  : Run Last
  &quot;<link linkend="GtkLabel-copy-clipboard">copy-clipboard</link>&quot;                                 : Run Last / Action
  &quot;<link linkend="GtkLabel-move-cursor">move-cursor</link>&quot;                                    : Run Last / Action
  &quot;<link linkend="GtkLabel-populate-popup">populate-popup</link>&quot;                                 : Run Last
</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>, a <link linkend="GtkMenuItem"><type>GtkMenuItem</type></link>, or a <link linkend="GtkOptionMenu"><type>GtkOptionMenu</type></link>.
</para>
<refsect2 id="GtkLabel-BUILDER-UI">
<title>GtkLabel as GtkBuildable</title>
<para>
The GtkLabel implementation of the GtkBuildable interface supports a
custom &lt;attributes&gt; element, which supports any number of &lt;attribute&gt;
elements. the &lt;attribute&gt; 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>
<example>
<title>A UI definition fragment specifying Pango attributes</title>
<programlisting><![CDATA[
<object class="GtkLabel">
  <attributes>
    <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
    <attribute name="background" value="red" start="5" end="10"/>"
  </attributes>
</object>
]]></programlisting>
</example>
<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 <firstterm>mnemonics</firstterm>. 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:
<informalexample>
<programlisting>
  /* Pressing Alt+H will activate this button */
  button = gtk_button_new (<!-- -->);
  label = gtk_label_new_with_mnemonic ("_Hello");
  gtk_container_add (GTK_CONTAINER (button), label);
</programlisting>
</informalexample>
There's a convenience function to create buttons with a mnemonic label
already inside:
<informalexample>
<programlisting>
  /* Pressing Alt+H will activate this button */
  button = gtk_button_new_with_mnemonic ("_Hello");
</programlisting>
</informalexample>
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>:
<informalexample>
<programlisting>
  /* Pressing Alt+H will focus the entry */
  entry = gtk_entry_new (<!-- -->);
  label = gtk_label_new_with_mnemonic ("_Hello");
  gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
</programlisting>
</informalexample>
</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>.
Here's how to create a label with a small font:
<informalexample>
<programlisting>
  label = gtk_label_new (NULL);
  gtk_label_set_markup (GTK_LABEL (label), "&lt;small&gt;Small text&lt;/small&gt;");
</programlisting>
</informalexample>
(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;/&amp; characters must be escaped as &amp;lt;,
&amp;gt;, and &amp;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, G_MAXINT)). 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
&mdash; such as error messages &mdash; should be made selectable.
</para>
</refsect2>
<refsect2>
<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-line-wrap"><function>gtk_label_set_line_wrap()</function></link>.
</para>
<para>
<link linkend="gtk-label-set-justify"><function>gtk_label_set_justify()</function></link> 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 <link linkend="gtk-misc-set-alignment"><function>gtk_misc_set_alignment()</function></link>.
</para>
</refsect2>
<refsect2>
<title>Links</title>
<para>
Since 2.18, GTK+ supports markup for clickable hyperlinks in addition
to regular Pango markup. The markup for links is borrowed from HTML, using the
<tag>a</tag> with href and title attributes. GTK+ renders links similar to the
way they appear in web browsers, with colored, underlined text. The title
attribute is displayed as a tooltip on the link. An example looks like this:
<informalexample><programlisting>
gtk_label_set_markup (label, "Go to the &lt;a href=\"http://www.gtk.org\" title=\"&amp;lt;i&amp;gt;Our&amp;/i&amp;gt; website\"&gt;GTK+ website&lt;/a&gt; for more...");
</programlisting></informalexample>
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.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkLabel-struct" role="struct">
<title>GtkLabel</title>
<indexterm zone="GtkLabel-struct"><primary sortas="Label">GtkLabel</primary></indexterm><programlisting>typedef struct _GtkLabel GtkLabel;</programlisting>
<para>
This should not be accessed directly.  Use the accessor functions as
described below.
</para></refsect2>
<refsect2 id="gtk-label-new" role="function">
<title>gtk_label_new ()</title>
<indexterm zone="gtk-label-new"><primary sortas="label_new">gtk_label_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*          gtk_label_new                       (const <link linkend="gchar">gchar</link> *str);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara> The text of the label
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-text" role="function">
<title>gtk_label_set_text ()</title>
<indexterm zone="gtk-label-set-text"><primary sortas="label_set_text">gtk_label_set_text</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_text                  (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *str);</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 will also clear any previously set mnemonic accelerators.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara> The text you want to set
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-attributes" role="function">
<title>gtk_label_set_attributes ()</title>
<indexterm zone="gtk-label-set-attributes"><primary sortas="label_set_attributes">gtk_label_set_attributes</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_attributes            (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="PangoAttrList">PangoAttrList</link> *attrs);</programlisting>
<para>
Sets a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>; the attributes in the list are applied to the
label text. 
</para>
<para>
<note><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></note></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attrs</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-markup" role="function">
<title>gtk_label_set_markup ()</title>
<indexterm zone="gtk-label-set-markup"><primary sortas="label_set_markup">gtk_label_set_markup</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_markup                (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *str);</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 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><!-- -->:
<informalexample><programlisting>
char *markup;
  
markup = g_markup_printf_escaped ("&lt;span style=\"italic\"&gt;&percnt;s&lt;/span&gt;", str);
gtk_label_set_markup (GTK_LABEL (label), markup);
g_free (markup);
</programlisting></informalexample></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara> a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-markup-with-mnemonic" role="function">
<title>gtk_label_set_markup_with_mnemonic ()</title>
<indexterm zone="gtk-label-set-markup-with-mnemonic"><primary sortas="label_set_markup_with_mnemonic">gtk_label_set_markup_with_mnemonic</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_markup_with_mnemonic  (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *str);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara> a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-pattern" role="function">
<title>gtk_label_set_pattern ()</title>
<indexterm zone="gtk-label-set-pattern"><primary sortas="label_set_pattern">gtk_label_set_pattern</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_pattern               (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *pattern);</programlisting>
<para>
The pattern of underlines you want under the existing text within the
<link linkend="GtkLabel"><type>GtkLabel</type></link> widget.  For example if the current text of the label says
&quot;FooBarBaz&quot; passing a pattern of &quot;___   ___&quot; will underline
&quot;Foo&quot; and &quot;Baz&quot; but not &quot;Bar&quot;.
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="GtkLabel"><type>GtkLabel</type></link> you want to set the pattern to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pattern</parameter>&#160;:</term>
<listitem><simpara>The pattern as described above.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-justify" role="function">
<title>gtk_label_set_justify ()</title>
<indexterm zone="gtk-label-set-justify"><primary sortas="label_set_justify">gtk_label_set_justify</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_justify               (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="GtkJustification">GtkJustification</link> jtype);</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-misc-set-alignment"><function>gtk_misc_set_alignment()</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>jtype</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkJustification"><type>GtkJustification</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-ellipsize" role="function" condition="since:2.6">
<title>gtk_label_set_ellipsize ()</title>
<indexterm zone="gtk-label-set-ellipsize" role="2.6"><primary sortas="label_set_ellipsize">gtk_label_set_ellipsize</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_ellipsize             (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="PangoEllipsizeMode">PangoEllipsizeMode</link> mode);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>mode</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-label-set-width-chars" role="function" condition="since:2.6">
<title>gtk_label_set_width_chars ()</title>
<indexterm zone="gtk-label-set-width-chars" role="2.6"><primary sortas="label_set_width_chars">gtk_label_set_width_chars</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_width_chars           (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gint">gint</link> n_chars);</programlisting>
<para>
Sets the desired width in characters of <parameter>label</parameter> to <parameter>n_chars</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_chars</parameter>&#160;:</term>
<listitem><simpara> the new desired width, in characters.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-label-set-max-width-chars" role="function" condition="since:2.6">
<title>gtk_label_set_max_width_chars ()</title>
<indexterm zone="gtk-label-set-max-width-chars" role="2.6"><primary sortas="label_set_max_width_chars">gtk_label_set_max_width_chars</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_max_width_chars       (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gint">gint</link> n_chars);</programlisting>
<para>
Sets the desired maximum width in characters of <parameter>label</parameter> to <parameter>n_chars</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_chars</parameter>&#160;:</term>
<listitem><simpara> the new desired maximum width, in characters.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-label-get" role="function" condition="deprecated:Use gtk_label_get_text() instead.">
<title>gtk_label_get ()</title>
<indexterm zone="gtk-label-get" role="deprecated"><primary sortas="label_get">gtk_label_get</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_get                       (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gchar">gchar</link> **str);</programlisting>
<warning><para><literal>gtk_label_get</literal> is deprecated and should not be used in newly-written code. Use <link linkend="gtk-label-get-text"><function>gtk_label_get_text()</function></link> instead.</para></warning>
<para>
Gets the current string of text within the <link linkend="GtkLabel"><type>GtkLabel</type></link> and writes it to
the given <parameter>str</parameter> argument.  It does not make a copy of this string so you
must not write to it.
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="GtkLabel"><type>GtkLabel</type></link> widget you want to get the text from.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara>The reference to the pointer you want to point to the text.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-parse-uline" role="function" condition="deprecated:Use gtk_label_set_use_underline() instead.">
<title>gtk_label_parse_uline ()</title>
<indexterm zone="gtk-label-parse-uline" role="deprecated"><primary sortas="label_parse_uline">gtk_label_parse_uline</primary></indexterm><programlisting><link linkend="guint">guint</link>               gtk_label_parse_uline               (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *string);</programlisting>
<warning><para><literal>gtk_label_parse_uline</literal> is deprecated and should not be used in newly-written code. Use <link linkend="gtk-label-set-use-underline"><function>gtk_label_set_use_underline()</function></link> instead.</para></warning>
<para>
Parses the given string for underscores and converts the next
character to an underlined character.  The last character that
was underlined will have its lower-cased accelerator keyval returned  (i.e.
&quot;_File&quot; would return the keyval for &quot;f&quot;.  This is
probably only used within the GTK+ library itself for menu items and such.
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara>The <link linkend="GtkLabel"><type>GtkLabel</type></link> you want to affect.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>string</parameter>&#160;:</term>
<listitem><simpara>The string you want to parse for underlines.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The lowercase keyval of the last character underlined.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-line-wrap" role="function">
<title>gtk_label_set_line_wrap ()</title>
<indexterm zone="gtk-label-set-line-wrap"><primary sortas="label_set_line_wrap">gtk_label_set_line_wrap</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_line_wrap             (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> wrap);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>wrap</parameter>&#160;:</term>
<listitem><simpara> the setting
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-line-wrap-mode" role="function" condition="since:2.10">
<title>gtk_label_set_line_wrap_mode ()</title>
<indexterm zone="gtk-label-set-line-wrap-mode" role="2.10"><primary sortas="label_set_line_wrap_mode">gtk_label_set_line_wrap_mode</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_line_wrap_mode        (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="PangoWrapMode">PangoWrapMode</link> wrap_mode);</programlisting>
<para>
If line wrapping is on (see <link linkend="gtk-label-set-line-wrap"><function>gtk_label_set_line_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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>wrap_mode</parameter>&#160;:</term>
<listitem><simpara> the line wrapping mode
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.10</para></refsect2>
<refsect2 id="gtk-label-set" role="macro" condition="deprecated:Use gtk_label_set_text() instead.">
<title>gtk_label_set</title>
<indexterm zone="gtk-label-set" role="deprecated"><primary sortas="label_set">gtk_label_set</primary></indexterm><programlisting>#define  gtk_label_set           gtk_label_set_text
</programlisting>
<warning><para><literal>gtk_label_set</literal> is deprecated and should not be used in newly-written code. Use <link linkend="gtk-label-set-text"><function>gtk_label_set_text()</function></link> instead.</para></warning>
<para>
Sets the text within the GtkLabel widget.
</para></refsect2>
<refsect2 id="gtk-label-get-layout-offsets" role="function">
<title>gtk_label_get_layout_offsets ()</title>
<indexterm zone="gtk-label-get-layout-offsets"><primary sortas="label_get_layout_offsets">gtk_label_get_layout_offsets</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_get_layout_offsets        (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gint">gint</link> *x,
                                                         <link linkend="gint">gint</link> *y);</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. Of course you will need to
create a <link linkend="GtkEventBox"><type>GtkEventBox</type></link> to receive the events, and pack the label
inside it, since labels are a <link linkend="GTK-NO-WINDOW--CAPS"><type>GTK_NO_WINDOW</type></link> widget. 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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>x</parameter>&#160;:</term>
<listitem><simpara> location to store X offset of layout, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>y</parameter>&#160;:</term>
<listitem><simpara> location to store Y offset of layout, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-mnemonic-keyval" role="function">
<title>gtk_label_get_mnemonic_keyval ()</title>
<indexterm zone="gtk-label-get-mnemonic-keyval"><primary sortas="label_get_mnemonic_keyval">gtk_label_get_mnemonic_keyval</primary></indexterm><programlisting><link linkend="guint">guint</link>               gtk_label_get_mnemonic_keyval       (<link linkend="GtkLabel">GtkLabel</link> *label);</programlisting>
<para>
If the label has been set so that it has an mnemonic key this function
returns the keyval used for the mnemonic accelerator. If there is no
mnemonic set up it returns <link linkend="GDK-VoidSymbol"><type>GDK_VoidSymbol</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> GDK keyval usable for accelerators, or <link linkend="GDK-VoidSymbol"><type>GDK_VoidSymbol</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-selectable" role="function">
<title>gtk_label_get_selectable ()</title>
<indexterm zone="gtk-label-get-selectable"><primary sortas="label_get_selectable">gtk_label_get_selectable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_label_get_selectable            (<link linkend="GtkLabel">GtkLabel</link> *label);</programlisting>
<para>
Gets the value set by <link linkend="gtk-label-set-selectable"><function>gtk_label_set_selectable()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the user can copy text from the label
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-text" role="function">
<title>gtk_label_get_text ()</title>
<indexterm zone="gtk-label-get-text"><primary sortas="label_get_text">gtk_label_get_text</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>*        gtk_label_get_text                  (<link linkend="GtkLabel">GtkLabel</link> *label);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the text in the label widget. This is the internal
  string used by the label, and must not be modified.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-new-with-mnemonic" role="function">
<title>gtk_label_new_with_mnemonic ()</title>
<indexterm zone="gtk-label-new-with-mnemonic"><primary sortas="label_new_with_mnemonic">gtk_label_new_with_mnemonic</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*          gtk_label_new_with_mnemonic         (const <link linkend="gchar">gchar</link> *str);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara> The text of the label, with an underscore in front of the
      mnemonic character
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the new <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-select-region" role="function">
<title>gtk_label_select_region ()</title>
<indexterm zone="gtk-label-select-region"><primary sortas="label_select_region">gtk_label_select_region</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_select_region             (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gint">gint</link> start_offset,
                                                         <link linkend="gint">gint</link> end_offset);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start_offset</parameter>&#160;:</term>
<listitem><simpara> start offset (in characters not bytes)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end_offset</parameter>&#160;:</term>
<listitem><simpara> end offset (in characters not bytes)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-mnemonic-widget" role="function">
<title>gtk_label_set_mnemonic_widget ()</title>
<indexterm zone="gtk-label-set-mnemonic-widget"><primary sortas="label_set_mnemonic_widget">gtk_label_set_mnemonic_widget</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_mnemonic_widget       (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="GtkWidget">GtkWidget</link> *widget);</programlisting>
<para>
If the label has been set so that it has an 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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>widget</parameter>&#160;:</term>
<listitem><simpara> the target <link linkend="GtkWidget"><type>GtkWidget</type></link> 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-selectable" role="function">
<title>gtk_label_set_selectable ()</title>
<indexterm zone="gtk-label-set-selectable"><primary sortas="label_set_selectable">gtk_label_set_selectable</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_selectable            (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> setting);</programlisting>
<para>
Selectable labels allow the user to select text from the label, for
copy-and-paste.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>setting</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> to allow selecting text in the label
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-text-with-mnemonic" role="function">
<title>gtk_label_set_text_with_mnemonic ()</title>
<indexterm zone="gtk-label-set-text-with-mnemonic"><primary sortas="label_set_text_with_mnemonic">gtk_label_set_text_with_mnemonic</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_text_with_mnemonic    (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *str);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara> a string
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-attributes" role="function">
<title>gtk_label_get_attributes ()</title>
<indexterm zone="gtk-label-get-attributes"><primary sortas="label_get_attributes">gtk_label_get_attributes</primary></indexterm><programlisting><link linkend="PangoAttrList">PangoAttrList</link> *     gtk_label_get_attributes            (<link linkend="GtkLabel">GtkLabel</link> *label);</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 (label)).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the attribute list, or <link linkend="NULL--CAPS"><literal>NULL</literal></link> if none was set.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-justify" role="function">
<title>gtk_label_get_justify ()</title>
<indexterm zone="gtk-label-get-justify"><primary sortas="label_get_justify">gtk_label_get_justify</primary></indexterm><programlisting><link linkend="GtkJustification">GtkJustification</link>    gtk_label_get_justify               (<link linkend="GtkLabel">GtkLabel</link> *label);</programlisting>
<para>
Returns the justification of the label. See <link linkend="gtk-label-set-justify"><function>gtk_label_set_justify()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="GtkJustification"><type>GtkJustification</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-ellipsize" role="function" condition="since:2.6">
<title>gtk_label_get_ellipsize ()</title>
<indexterm zone="gtk-label-get-ellipsize" role="2.6"><primary sortas="label_get_ellipsize">gtk_label_get_ellipsize</primary></indexterm><programlisting><link linkend="PangoEllipsizeMode">PangoEllipsizeMode</link>  gtk_label_get_ellipsize             (<link linkend="GtkLabel">GtkLabel</link> *label);</programlisting>
<para>
Returns the ellipsizing position of the label. See <link linkend="gtk-label-set-ellipsize"><function>gtk_label_set_ellipsize()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="PangoEllipsizeMode"><type>PangoEllipsizeMode</type></link>

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-label-get-width-chars" role="function" condition="since:2.6">
<title>gtk_label_get_width_chars ()</title>
<indexterm zone="gtk-label-get-width-chars" role="2.6"><primary sortas="label_get_width_chars">gtk_label_get_width_chars</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_label_get_width_chars           (<link linkend="GtkLabel">GtkLabel</link> *label);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the width of the label in characters.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-label-get-max-width-chars" role="function" condition="since:2.6">
<title>gtk_label_get_max_width_chars ()</title>
<indexterm zone="gtk-label-get-max-width-chars" role="2.6"><primary sortas="label_get_max_width_chars">gtk_label_get_max_width_chars</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_label_get_max_width_chars       (<link linkend="GtkLabel">GtkLabel</link> *label);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the maximum width of the label in characters.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-label-get-label" role="function">
<title>gtk_label_get_label ()</title>
<indexterm zone="gtk-label-get-label"><primary sortas="label_get_label">gtk_label_get_label</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> *       gtk_label_get_label                 (<link linkend="GtkLabel">GtkLabel</link> *label);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the text of the label widget. This string is
  owned by the widget and must not be modified or freed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-layout" role="function">
<title>gtk_label_get_layout ()</title>
<indexterm zone="gtk-label-get-layout"><primary sortas="label_get_layout">gtk_label_get_layout</primary></indexterm><programlisting><link linkend="PangoLayout">PangoLayout</link> *       gtk_label_get_layout                (<link linkend="GtkLabel">GtkLabel</link> *label);</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 label so need not be
freed by the caller.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="PangoLayout"><type>PangoLayout</type></link> for this label
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-line-wrap" role="function">
<title>gtk_label_get_line_wrap ()</title>
<indexterm zone="gtk-label-get-line-wrap"><primary sortas="label_get_line_wrap">gtk_label_get_line_wrap</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_label_get_line_wrap             (<link linkend="GtkLabel">GtkLabel</link> *label);</programlisting>
<para>
Returns whether lines in the label are automatically wrapped. 
See <link linkend="gtk-label-set-line-wrap"><function>gtk_label_set_line_wrap()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the lines of the label are automatically wrapped.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-line-wrap-mode" role="function" condition="since:2.10">
<title>gtk_label_get_line_wrap_mode ()</title>
<indexterm zone="gtk-label-get-line-wrap-mode" role="2.10"><primary sortas="label_get_line_wrap_mode">gtk_label_get_line_wrap_mode</primary></indexterm><programlisting><link linkend="PangoWrapMode">PangoWrapMode</link>       gtk_label_get_line_wrap_mode        (<link linkend="GtkLabel">GtkLabel</link> *label);</programlisting>
<para>
Returns line wrap mode used by the label. See <link linkend="gtk-label-set-line-wrap-mode"><function>gtk_label_set_line_wrap_mode()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the lines of the label are automatically wrapped.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.10</para></refsect2>
<refsect2 id="gtk-label-get-mnemonic-widget" role="function">
<title>gtk_label_get_mnemonic_widget ()</title>
<indexterm zone="gtk-label-get-mnemonic-widget"><primary sortas="label_get_mnemonic_widget">gtk_label_get_mnemonic_widget</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> *         gtk_label_get_mnemonic_widget       (<link linkend="GtkLabel">GtkLabel</link> *label);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> 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.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-selection-bounds" role="function">
<title>gtk_label_get_selection_bounds ()</title>
<indexterm zone="gtk-label-get-selection-bounds"><primary sortas="label_get_selection_bounds">gtk_label_get_selection_bounds</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_label_get_selection_bounds      (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gint">gint</link> *start,
                                                         <link linkend="gint">gint</link> *end);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start</parameter>&#160;:</term>
<listitem><simpara> return location for start of selection, as a character offset
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end</parameter>&#160;:</term>
<listitem><simpara> return location for end of selection, as a character offset
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if selection is non-empty
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-use-markup" role="function">
<title>gtk_label_get_use_markup ()</title>
<indexterm zone="gtk-label-get-use-markup"><primary sortas="label_get_use_markup">gtk_label_get_use_markup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_label_get_use_markup            (<link linkend="GtkLabel">GtkLabel</link> *label);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the label's text will be parsed for markup.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-use-underline" role="function">
<title>gtk_label_get_use_underline ()</title>
<indexterm zone="gtk-label-get-use-underline"><primary sortas="label_get_use_underline">gtk_label_get_use_underline</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_label_get_use_underline         (<link linkend="GtkLabel">GtkLabel</link> *label);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> whether an embedded underline in the label indicates
              the mnemonic accelerator keys.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-get-single-line-mode" role="function" condition="since:2.6">
<title>gtk_label_get_single_line_mode ()</title>
<indexterm zone="gtk-label-get-single-line-mode" role="2.6"><primary sortas="label_get_single_line_mode">gtk_label_get_single_line_mode</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_label_get_single_line_mode      (<link linkend="GtkLabel">GtkLabel</link> *label);</programlisting>
<para>
Returns whether the label is in single line mode.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> when the label is in single line mode.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-label-get-angle" role="function" condition="since:2.6">
<title>gtk_label_get_angle ()</title>
<indexterm zone="gtk-label-get-angle" role="2.6"><primary sortas="label_get_angle">gtk_label_get_angle</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link>             gtk_label_get_angle                 (<link linkend="GtkLabel">GtkLabel</link> *label);</programlisting>
<para>
Gets the angle of rotation for the label. See
<link linkend="gtk-label-set-angle"><function>gtk_label_set_angle()</function></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the angle of rotation for the label

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-label-set-label" role="function">
<title>gtk_label_set_label ()</title>
<indexterm zone="gtk-label-set-label"><primary sortas="label_set_label">gtk_label_set_label</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_label                 (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         const <link linkend="gchar">gchar</link> *str);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara> the new text to set for the label
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-use-markup" role="function">
<title>gtk_label_set_use_markup ()</title>
<indexterm zone="gtk-label-set-use-markup"><primary sortas="label_set_use_markup">gtk_label_set_use_markup</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_use_markup            (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> setting);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>setting</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the label's text should be parsed for markup.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-use-underline" role="function">
<title>gtk_label_set_use_underline ()</title>
<indexterm zone="gtk-label-set-use-underline"><primary sortas="label_set_use_underline">gtk_label_set_use_underline</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_use_underline         (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> setting);</programlisting>
<para>
If true, an underline in the text indicates the next character should be
used for the mnemonic accelerator key.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>setting</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if underlines in the text indicate mnemonics
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-label-set-single-line-mode" role="function" condition="since:2.6">
<title>gtk_label_set_single_line_mode ()</title>
<indexterm zone="gtk-label-set-single-line-mode" role="2.6"><primary sortas="label_set_single_line_mode">gtk_label_set_single_line_mode</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_single_line_mode      (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> single_line_mode);</programlisting>
<para>
Sets whether the label is in single line mode.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>single_line_mode</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the label should be in single line mode
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-label-set-angle" role="function" condition="since:2.6">
<title>gtk_label_set_angle ()</title>
<indexterm zone="gtk-label-set-angle" role="2.6"><primary sortas="label_set_angle">gtk_label_set_angle</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_angle                 (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gdouble">gdouble</link> angle);</programlisting>
<para>
Sets the angle of rotation for the label. An angle of 90 reads from
from bottom to top, an angle of 270, from top to bottom. The angle
setting for the label is ignored if the label is selectable,
wrapped, or ellipsized.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>angle</parameter>&#160;:</term>
<listitem><simpara> the angle that the baseline of the label makes with
  the horizontal, in degrees, measured counterclockwise
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.6</para></refsect2>
<refsect2 id="gtk-label-get-current-uri" role="function" condition="since:2.18">
<title>gtk_label_get_current_uri ()</title>
<indexterm zone="gtk-label-get-current-uri" role="2.18"><primary sortas="label_get_current_uri">gtk_label_get_current_uri</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link> *       gtk_label_get_current_uri           (<link linkend="GtkLabel">GtkLabel</link> *label);</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-link-activate"><type>"link-activate"</type></link> handler
or for use in a <link linkend="GtkWidget-query-tooltip"><type>"query-tooltip"</type></link> handler.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the currently active URI. The string is owned by GTK+ and must
  not be freed or modified.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.18</para></refsect2>
<refsect2 id="gtk-label-set-track-visited-links" role="function" condition="since:2.18">
<title>gtk_label_set_track_visited_links ()</title>
<indexterm zone="gtk-label-set-track-visited-links" role="2.18"><primary sortas="label_set_track_visited_links">gtk_label_set_track_visited_links</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_label_set_track_visited_links   (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                         <link linkend="gboolean">gboolean</link> track_links);</programlisting>
<para>
Sets whether the label should keep track of clicked
links (and use a different color for them).</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>track_links</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> to track visited links
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.18</para></refsect2>
<refsect2 id="gtk-label-get-track-visited-links" role="function" condition="since:2.18">
<title>gtk_label_get_track_visited_links ()</title>
<indexterm zone="gtk-label-get-track-visited-links" role="2.18"><primary sortas="label_get_track_visited_links">gtk_label_get_track_visited_links</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_label_get_track_visited_links   (<link linkend="GtkLabel">GtkLabel</link> *label);</programlisting>
<para>
Returns whether the label is currently keeping track
of clicked links.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkLabel"><type>GtkLabel</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if clicked links are remembered

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 2.18</para></refsect2>

</refsect1>
<refsect1 id="GtkLabel.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkLabel--angle" role="property"><title>The <literal>&quot;angle&quot;</literal> property</title>
<indexterm zone="GtkLabel--angle" role="2.6"><primary sortas="Label:angle">GtkLabel:angle</primary></indexterm><programlisting>  &quot;angle&quot;                    <link linkend="gdouble">gdouble</link>               : Read / Write</programlisting>
<para>
The angle that the baseline of the label makes with the horizontal,
in degrees, measured counterclockwise. An angle of 90 reads from
from bottom to top, an angle of 270, from top to bottom. Ignored
if the label is selectable, wrapped, or ellipsized.</para>
<para>
</para><para>Allowed values: [0,360]</para>
<para>Default value: 0</para>
<para>Since 2.6</para>
</refsect2>
<refsect2 id="GtkLabel--attributes" role="property"><title>The <literal>&quot;attributes&quot;</literal> property</title>
<indexterm zone="GtkLabel--attributes"><primary sortas="Label:attributes">GtkLabel:attributes</primary></indexterm><programlisting>  &quot;attributes&quot;               <link linkend="PangoAttrList">PangoAttrList</link>*        : Read / Write</programlisting>
<para>A list of style attributes to apply to the text of the label.</para></refsect2>
<refsect2 id="GtkLabel--cursor-position" role="property"><title>The <literal>&quot;cursor-position&quot;</literal> property</title>
<indexterm zone="GtkLabel--cursor-position"><primary sortas="Label:cursor-position">GtkLabel:cursor-position</primary></indexterm><programlisting>  &quot;cursor-position&quot;          <link linkend="gint">gint</link>                  : Read</programlisting>
<para>The current position of the insertion cursor in chars.</para><para>Allowed values: &gt;= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkLabel--ellipsize" role="property"><title>The <literal>&quot;ellipsize&quot;</literal> property</title>
<indexterm zone="GtkLabel--ellipsize" role="2.6"><primary sortas="Label:ellipsize">GtkLabel:ellipsize</primary></indexterm><programlisting>  &quot;ellipsize&quot;                <link linkend="PangoEllipsizeMode">PangoEllipsizeMode</link>    : Read / Write</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="PangoEllisizeMode"><type>PangoEllisizeMode</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 tab's <link linkend="GtkNotebook--tab-expand"><type>"tab-expand"</type></link> 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>
</para><para>Default value: PANGO_ELLIPSIZE_NONE</para>
<para>Since 2.6</para>
</refsect2>
<refsect2 id="GtkLabel--justify" role="property"><title>The <literal>&quot;justify&quot;</literal> property</title>
<indexterm zone="GtkLabel--justify"><primary sortas="Label:justify">GtkLabel:justify</primary></indexterm><programlisting>  &quot;justify&quot;                  <link linkend="GtkJustification">GtkJustification</link>      : Read / Write</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 GtkMisc::xalign for that.</para><para>Default value: GTK_JUSTIFY_LEFT</para>
</refsect2>
<refsect2 id="GtkLabel--label" role="property"><title>The <literal>&quot;label&quot;</literal> property</title>
<indexterm zone="GtkLabel--label"><primary sortas="Label:label">GtkLabel:label</primary></indexterm><programlisting>  &quot;label&quot;                    <link linkend="gchar">gchar</link>*                : Read / Write</programlisting>
<para>The text of the label.</para><para>Default value: ""</para>
</refsect2>
<refsect2 id="GtkLabel--max-width-chars" role="property"><title>The <literal>&quot;max-width-chars&quot;</literal> property</title>
<indexterm zone="GtkLabel--max-width-chars" role="2.6"><primary sortas="Label:max-width-chars">GtkLabel:max-width-chars</primary></indexterm><programlisting>  &quot;max-width-chars&quot;          <link linkend="gint">gint</link>                  : Read / Write</programlisting>
<para>
The desired maximum width of the label, in characters. If this property 
is set to -1, the width will be calculated automatically, otherwise the 
label will request space for no more than the requested number of 
characters. If the <link linkend="GtkLabel--width-chars"><type>"width-chars"</type></link> property is set to a positive 
value, then the "max-width-chars" property is ignored.</para>
<para>
</para><para>Allowed values: &gt;= G_MAXULONG</para>
<para>Default value: -1</para>
<para>Since 2.6</para>
</refsect2>
<refsect2 id="GtkLabel--mnemonic-keyval" role="property"><title>The <literal>&quot;mnemonic-keyval&quot;</literal> property</title>
<indexterm zone="GtkLabel--mnemonic-keyval"><primary sortas="Label:mnemonic-keyval">GtkLabel:mnemonic-keyval</primary></indexterm><programlisting>  &quot;mnemonic-keyval&quot;          <link linkend="guint">guint</link>                 : Read</programlisting>
<para>The mnemonic accelerator key for this label.</para><para>Default value: 16777215</para>
</refsect2>
<refsect2 id="GtkLabel--mnemonic-widget" role="property"><title>The <literal>&quot;mnemonic-widget&quot;</literal> property</title>
<indexterm zone="GtkLabel--mnemonic-widget"><primary sortas="Label:mnemonic-widget">GtkLabel:mnemonic-widget</primary></indexterm><programlisting>  &quot;mnemonic-widget&quot;          <link linkend="GtkWidget">GtkWidget</link>*            : Read / Write</programlisting>
<para>The widget to be activated when the label's mnemonic key is pressed.</para></refsect2>
<refsect2 id="GtkLabel--pattern" role="property"><title>The <literal>&quot;pattern&quot;</literal> property</title>
<indexterm zone="GtkLabel--pattern"><primary sortas="Label:pattern">GtkLabel:pattern</primary></indexterm><programlisting>  &quot;pattern&quot;                  <link linkend="gchar">gchar</link>*                : Write</programlisting>
<para>A string with _ characters in positions correspond to characters in the text to underline.</para><para>Default value: NULL</para>
</refsect2>
<refsect2 id="GtkLabel--selectable" role="property"><title>The <literal>&quot;selectable&quot;</literal> property</title>
<indexterm zone="GtkLabel--selectable"><primary sortas="Label:selectable">GtkLabel:selectable</primary></indexterm><programlisting>  &quot;selectable&quot;               <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>Whether the label text can be selected with the mouse.</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkLabel--selection-bound" role="property"><title>The <literal>&quot;selection-bound&quot;</literal> property</title>
<indexterm zone="GtkLabel--selection-bound"><primary sortas="Label:selection-bound">GtkLabel:selection-bound</primary></indexterm><programlisting>  &quot;selection-bound&quot;          <link linkend="gint">gint</link>                  : Read</programlisting>
<para>The position of the opposite end of the selection from the cursor in chars.</para><para>Allowed values: &gt;= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkLabel--single-line-mode" role="property"><title>The <literal>&quot;single-line-mode&quot;</literal> property</title>
<indexterm zone="GtkLabel--single-line-mode" role="2.6"><primary sortas="Label:single-line-mode">GtkLabel:single-line-mode</primary></indexterm><programlisting>  &quot;single-line-mode&quot;         <link linkend="gboolean">gboolean</link>              : Read / Write</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>
</para><para>Default value: FALSE</para>
<para>Since 2.6</para>
</refsect2>
<refsect2 id="GtkLabel--track-visited-links" role="property"><title>The <literal>&quot;track-visited-links&quot;</literal> property</title>
<indexterm zone="GtkLabel--track-visited-links" role="2.18"><primary sortas="Label:track-visited-links">GtkLabel:track-visited-links</primary></indexterm><programlisting>  &quot;track-visited-links&quot;      <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>
Set this property to <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> to make the label track which links
have been clicked. It will then apply the ::visited-link-color
color, instead of ::link-color.</para>
<para>
</para><para>Default value: TRUE</para>
<para>Since 2.18</para>
</refsect2>
<refsect2 id="GtkLabel--use-markup" role="property"><title>The <literal>&quot;use-markup&quot;</literal> property</title>
<indexterm zone="GtkLabel--use-markup"><primary sortas="Label:use-markup">GtkLabel:use-markup</primary></indexterm><programlisting>  &quot;use-markup&quot;               <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>The text of the label includes XML markup. See pango_parse_markup().</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkLabel--use-underline" role="property"><title>The <literal>&quot;use-underline&quot;</literal> property</title>
<indexterm zone="GtkLabel--use-underline"><primary sortas="Label:use-underline">GtkLabel:use-underline</primary></indexterm><programlisting>  &quot;use-underline&quot;            <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkLabel--width-chars" role="property"><title>The <literal>&quot;width-chars&quot;</literal> property</title>
<indexterm zone="GtkLabel--width-chars" role="2.6"><primary sortas="Label:width-chars">GtkLabel:width-chars</primary></indexterm><programlisting>  &quot;width-chars&quot;              <link linkend="gint">gint</link>                  : Read / Write</programlisting>
<para>
The desired width of the label, in characters. If this property is set to
-1, the width will be calculated automatically, otherwise the label will
request either 3 characters or the property value, whichever is greater.
If the "width-chars" property is set to a positive value, then the 
<link linkend="GtkLabel--max-width-chars"><type>"max-width-chars"</type></link> property is ignored.</para>
<para>
</para><para>Allowed values: &gt;= G_MAXULONG</para>
<para>Default value: -1</para>
<para>Since 2.6</para>
</refsect2>
<refsect2 id="GtkLabel--wrap" role="property"><title>The <literal>&quot;wrap&quot;</literal> property</title>
<indexterm zone="GtkLabel--wrap"><primary sortas="Label:wrap">GtkLabel:wrap</primary></indexterm><programlisting>  &quot;wrap&quot;                     <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>If set, wrap lines if the text becomes too wide.</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkLabel--wrap-mode" role="property"><title>The <literal>&quot;wrap-mode&quot;</literal> property</title>
<indexterm zone="GtkLabel--wrap-mode" role="2.10"><primary sortas="Label:wrap-mode">GtkLabel:wrap-mode</primary></indexterm><programlisting>  &quot;wrap-mode&quot;                <link linkend="PangoWrapMode">PangoWrapMode</link>         : Read / Write</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>
</para><para>Default value: PANGO_WRAP_WORD</para>
<para>Since 2.10</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>&quot;activate-current-link&quot;</literal> signal</title>
<indexterm zone="GtkLabel-activate-current-link" role="2.18"><primary sortas="Label::activate-current-link">GtkLabel::activate-current-link</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                        <link linkend="gpointer">gpointer</link>  user_data)      : Run Last / Action</programlisting>
<para>
A <link linkend="keybinding-signals">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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> The label on which the signal was emitted
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist><para>Since 2.18</para></refsect2><refsect2 id="GtkLabel-activate-link" role="signal"><title>The <literal>&quot;activate-link&quot;</literal> signal</title>
<indexterm zone="GtkLabel-activate-link" role="2.18"><primary sortas="Label::activate-link">GtkLabel::activate-link</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            user_function                      (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                        <link linkend="gchar">gchar</link>    *uri,
                                                        <link linkend="gpointer">gpointer</link>  user_data)      : Run Last</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> The label on which the signal was emitted
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri</parameter>&#160;:</term>
<listitem><simpara> the URI that is activated
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the link has been activated
</simpara></listitem></varlistentry>
</variablelist><para>Since 2.18</para></refsect2><refsect2 id="GtkLabel-copy-clipboard" role="signal"><title>The <literal>&quot;copy-clipboard&quot;</literal> signal</title>
<indexterm zone="GtkLabel-copy-clipboard"><primary sortas="Label::copy-clipboard">GtkLabel::copy-clipboard</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                        <link linkend="gpointer">gpointer</link>  user_data)      : Run Last / Action</programlisting>
<para>
The ::copy-clipboard signal is a
<link linkend="keybinding-signals">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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> the object which received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkLabel-move-cursor" role="signal"><title>The <literal>&quot;move-cursor&quot;</literal> signal</title>
<indexterm zone="GtkLabel-move-cursor"><primary sortas="Label::move-cursor">GtkLabel::move-cursor</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkLabel">GtkLabel</link>       *entry,
                                                        <link linkend="GtkMovementStep">GtkMovementStep</link> step,
                                                        <link linkend="gint">gint</link>            count,
                                                        <link linkend="gboolean">gboolean</link>        extend_selection,
                                                        <link linkend="gpointer">gpointer</link>        user_data)             : Run Last / Action</programlisting>
<para>
The ::move-cursor signal is a
<link linkend="keybinding-signals">keybinding signal</link>
which gets emitted when the user initiates a cursor movement.
If the cursor is not visible in <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.
<itemizedlist>
<listitem>Arrow keys move by individual characters/lines</listitem>
<listitem>Ctrl-arrow key combinations move by words/paragraphs</listitem>
<listitem>Home/End keys move to the ends of the buffer</listitem>
</itemizedlist></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>entry</parameter>&#160;:</term>
<listitem><simpara> the object which received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>step</parameter>&#160;:</term>
<listitem><simpara> the granularity of the move, as a <link linkend="GtkMovementStep"><type>GtkMovementStep</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>count</parameter>&#160;:</term>
<listitem><simpara> the number of <parameter>step</parameter> units to move
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extend_selection</parameter>&#160;:</term>
<listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the move should extend the selection
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkLabel-populate-popup" role="signal"><title>The <literal>&quot;populate-popup&quot;</literal> signal</title>
<indexterm zone="GtkLabel-populate-popup"><primary sortas="Label::populate-popup">GtkLabel::populate-popup</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkLabel">GtkLabel</link> *label,
                                                        <link linkend="GtkMenu">GtkMenu</link>  *menu,
                                                        <link linkend="gpointer">gpointer</link>  user_data)      : Run Last</programlisting>
<para>
The ::populate-popup signal gets emitted before showing the
context menu of the label. Note that only selectable labels
have context menus.
</para>
<para>
If you need to add items to the context menu, connect
to this signal and append your menuitems to the <parameter>menu</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>label</parameter>&#160;:</term>
<listitem><simpara> The label on which the signal is emitted
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>menu</parameter>&#160;:</term>
<listitem><simpara> the menu that is being populated
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>



</refentry>
