<refentry id="GtkLabel">
<refmeta>
<refentrytitle>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><title>Synopsis</title>
<synopsis>

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


struct      <link linkend="GtkLabel-struct">GtkLabel</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-label-new">gtk_label_new</link>                   (const char *str);
void        <link linkend="gtk-label-set-text">gtk_label_set_text</link>              (<link linkend="GtkLabel">GtkLabel</link> *label,
                                             const char *str);
void        <link linkend="gtk-label-set-attributes">gtk_label_set_attributes</link>        (<link linkend="GtkLabel">GtkLabel</link> *label,
                                             <link linkend="PangoAttrList">PangoAttrList</link> *attrs);
void        <link linkend="gtk-label-set-markup">gtk_label_set_markup</link>            (<link linkend="GtkLabel">GtkLabel</link> *label,
                                             const <link linkend="gchar">gchar</link> *str);
void        <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);
void        <link linkend="gtk-label-set-pattern">gtk_label_set_pattern</link>           (<link linkend="GtkLabel">GtkLabel</link> *label,
                                             const <link linkend="gchar">gchar</link> *pattern);
void        <link linkend="gtk-label-set-justify">gtk_label_set_justify</link>           (<link linkend="GtkLabel">GtkLabel</link> *label,
                                             <link linkend="GtkJustification">GtkJustification</link> jtype);
void        <link linkend="gtk-label-get">gtk_label_get</link>                   (<link linkend="GtkLabel">GtkLabel</link> *label,
                                             char **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);
void        <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);
#define     <link linkend="gtk-label-set">gtk_label_set</link>
void        <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);
G_CONST_RETURN <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 char *str);
void        <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);
void        <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);
void        <link linkend="gtk-label-set-selectable">gtk_label_set_selectable</link>        (<link linkend="GtkLabel">GtkLabel</link> *label,
                                             <link linkend="gboolean">gboolean</link> setting);
void        <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);
G_CONST_RETURN <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="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);
void        <link linkend="gtk-label-set-label">gtk_label_set_label</link>             (<link linkend="GtkLabel">GtkLabel</link> *label,
                                             const <link linkend="gchar">gchar</link> *str);
void        <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);
void        <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);


</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----<link linkend="GtkObject">GtkObject</link>
         +----<link linkend="GtkWidget">GtkWidget</link>
               +----<link linkend="GtkMisc">GtkMisc</link>
                     +----GtkLabel
</synopsis>

</refsect1>

<refsect1>
<title>Properties</title>
<synopsis>

  &quot;<link linkend="GtkLabel--label">label</link>&quot;                <link linkend="gchararray">gchararray</link>           : Read / Write
  &quot;<link linkend="GtkLabel--attributes">attributes</link>&quot;           <link linkend="PangoAttrList">PangoAttrList</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--justify">justify</link>&quot;              <link linkend="GtkJustification">GtkJustification</link>     : Read / Write
  &quot;<link linkend="GtkLabel--pattern">pattern</link>&quot;              <link linkend="gchararray">gchararray</link>           : Write
  &quot;<link linkend="GtkLabel--wrap">wrap</link>&quot;                 <link linkend="gboolean">gboolean</link>             : Read / Write
  &quot;<link linkend="GtkLabel--selectable">selectable</link>&quot;           <link linkend="gboolean">gboolean</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--cursor-position">cursor-position</link>&quot;      <link linkend="gint">gint</link>                 : Read
  &quot;<link linkend="GtkLabel--selection-bound">selection-bound</link>&quot;      <link linkend="gint">gint</link>                 : Read
</synopsis>
</refsect1>

<refsect1>
<title>Signal Prototypes</title>
<synopsis>

&quot;<link linkend="GtkLabel-copy-clipboard">copy-clipboard</link>&quot;
            void        user_function      (<link linkend="GtkLabel">GtkLabel</link> *label,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkLabel-move-cursor">move-cursor</link>&quot;
            void        user_function      (<link linkend="GtkLabel">GtkLabel</link> *label,
                                            <link linkend="GtkMovementStep">GtkMovementStep</link> arg1,
                                            <link linkend="gint">gint</link> arg2,
                                            <link linkend="gboolean">gboolean</link> arg3,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GtkLabel-populate-popup">populate-popup</link>&quot;
            void        user_function      (<link linkend="GtkLabel">GtkLabel</link> *label,
                                            <link linkend="GtkMenu">GtkMenu</link> *arg1,
                                            <link linkend="gpointer">gpointer</link> user_data);
</synopsis>
</refsect1>


<refsect1>
<title>Description</title>
<para>
The <link linkend="GtkLabel">GtkLabel</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">GtkButton</link>, a <link linkend="GtkMenuItem">GtkMenuItem</link>, or a <link linkend="GtkOptionMenu">GtkOptionMenu</link>.
</para>

<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">gtk_label_new_with_mnemonic</link>() or
<link linkend="gtk-label-set-text-with-mnemonic">gtk_label_set_text_with_mnemonic</link>().
</para>

<para>
Mnemonics automatically activate any activatable widget the label is
inside, such as a <link linkend="GtkButton">GtkButton</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">gtk_label_set_mnemonic_widget</link>(). Here's a simple example where
the label is inside a button:

<informalexample>
<programlisting>
  /* Pressing Alt+H will activate this button */
  button = <link linkend="gtk-button-new">gtk_button_new</link>();
  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">GtkEntry</link>, you have to point the label at the entry with 
<link linkend="gtk-label-set-mnemonic-widget">gtk_label_set_mnemonic_widget</link>():
<informalexample>
<programlisting>
  /* Pressing Alt+H will focus the entry */
  entry = <link linkend="gtk-entry-new">gtk_entry_new</link>();
  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">gtk_label_set_markup</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">gtk_label_set_markup</link>(), 
you'll want to escape it with <link linkend="g-markup-escape-text">g_markup_escape_text</link>().
</para>
<para>
Markup strings are just a convenient way to set the <link linkend="PangoAttrList">PangoAttrList</link> on
a label; <link linkend="gtk-label-set-attributes">gtk_label_set_attributes</link>() may be a simpler way to set
attributes in some cases. Be careful though; <link linkend="PangoAttrList">PangoAttrList</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">PangoAttribute</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">gtk_label_set_selectable</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">gtk_label_set_line_wrap</link>().
</para>
<para>
<link linkend="gtk-label-set-justify">gtk_label_set_justify</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">gtk_misc_set_alignment</link>().
</para>

</refsect2>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GtkLabel-struct">struct GtkLabel</title>
<programlisting>struct GtkLabel;</programlisting>
<para>
This should not be accessed directly.  Use the accessor functions as
described below.
</para></refsect2>
<refsect2>
<title><anchor id="gtk-label-new">gtk_label_new ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_label_new                   (const char *str);</programlisting>
<para>
Creates a new label with the given text inside it. You can
pass <literal>NULL</literal> to get an empty label widget.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>str</parameter>&nbsp;:</entry>
<entry> The text of the label
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the new <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-text">gtk_label_set_text ()</title>
<programlisting>void        gtk_label_set_text              (<link linkend="GtkLabel">GtkLabel</link> *label,
                                             const char *str);</programlisting>
<para>
Sets the text within the <link linkend="GtkLabel">GtkLabel</link> widget.  It overwrites any text that
was there before.  
</para>
<para>
This will also clear any previously set mnemonic accelerators.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>str</parameter>&nbsp;:</entry>
<entry> The text you want to set.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-attributes">gtk_label_set_attributes ()</title>
<programlisting>void        gtk_label_set_attributes        (<link linkend="GtkLabel">GtkLabel</link> *label,
                                             <link linkend="PangoAttrList">PangoAttrList</link> *attrs);</programlisting>
<para>
Sets a <link linkend="PangoAttrList">PangoAttrList</link>; the attributes in the list are applied to the
label text. The attributes set with this function will be ignored
if label->use_underline or label->use_markup is <literal>TRUE</literal>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>attrs</parameter>&nbsp;:</entry>
<entry> a <link linkend="PangoAttrList">PangoAttrList</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-markup">gtk_label_set_markup ()</title>
<programlisting>void        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.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>str</parameter>&nbsp;:</entry>
<entry> a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-markup-with-mnemonic">gtk_label_set_markup_with_mnemonic ()</title>
<programlisting>void        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">gtk_label_set_mnemonic_widget</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>str</parameter>&nbsp;:</entry>
<entry> a markup string (see <link linkend="PangoMarkupFormat">Pango markup format</link>)
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-pattern">gtk_label_set_pattern ()</title>
<programlisting>void        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">GtkLabel</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><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry>The <link linkend="GtkLabel">GtkLabel</link> you want to set the pattern to.
</entry></row>
<row><entry align="right"><parameter>pattern</parameter>&nbsp;:</entry>
<entry>The pattern as described above.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-justify">gtk_label_set_justify ()</title>
<programlisting>void        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.  <literal>GTK_JUSTIFY_LEFT</literal> is the default value when the
widget is first created with <link linkend="gtk-label-new">gtk_label_new</link>(). If you instead want
to set the alignment of the label as a whole, use
<link linkend="gtk-misc-set-alignment">gtk_misc_set_alignment</link>() instead. <link linkend="gtk-label-set-justify">gtk_label_set_justify</link>() has no
effect on labels containing only a single line.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>jtype</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkJustification">GtkJustification</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get">gtk_label_get ()</title>
<programlisting>void        gtk_label_get                   (<link linkend="GtkLabel">GtkLabel</link> *label,
                                             char **str);</programlisting>
<warning>
<para>
<literal>gtk_label_get</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Gets the current string of text within the <link linkend="GtkLabel">GtkLabel</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><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry>The <link linkend="GtkLabel">GtkLabel</link> widget you want to get the text from.
</entry></row>
<row><entry align="right"><parameter>str</parameter>&nbsp;:</entry>
<entry>The reference to the pointer you want to point to the text.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-parse-uline">gtk_label_parse_uline ()</title>
<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.
</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><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry>The <link linkend="GtkLabel">GtkLabel</link> you want to affect.
</entry></row>
<row><entry align="right"><parameter>string</parameter>&nbsp;:</entry>
<entry>The string you want to parse for underlines.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>The lowercase keyval of the last character underlined.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-line-wrap">gtk_label_set_line_wrap ()</title>
<programlisting>void        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">GtkLabel</link> widget.  <literal>TRUE</literal> makes it break
lines if text exceeds the widget's size.  <literal>FALSE</literal> lets the text get cut off
by the edge of the widget if it exceeds the widget size.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>wrap</parameter>&nbsp;:</entry>
<entry> the setting
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set">gtk_label_set</title>
<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.
</para>
</warning>
<para>
Aliases <link linkend="gtk-label-set-text">gtk_label_set_text</link>().  Probably used for backward compatibility with
Gtk+ 1.0.x.
</para></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-layout-offsets">gtk_label_get_layout_offsets ()</title>
<programlisting>void        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">PangoLayout</link>
representing the text in the label; useful to convert mouse events
into coordinates inside the <link linkend="PangoLayout">PangoLayout</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">GtkEventBox</link> to receive the events, and pack the label
inside it, since labels are a <link linkend="GTK-NO-WINDOW-CAPS">GTK_NO_WINDOW</link> widget. Remember
when using the <link linkend="PangoLayout">PangoLayout</link> functions you need to convert to
and from pixels using <link linkend="PANGO-PIXELS-CAPS">PANGO_PIXELS</link>() or <link linkend="PANGO-SCALE-CAPS">PANGO_SCALE</link>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>x</parameter>&nbsp;:</entry>
<entry> location to store X offset of layout, or <literal>NULL</literal>
</entry></row>
<row><entry align="right"><parameter>y</parameter>&nbsp;:</entry>
<entry> location to store Y offset of layout, or <literal>NULL</literal>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-mnemonic-keyval">gtk_label_get_mnemonic_keyval ()</title>
<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">GDK_VoidSymbol</link>.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> GDK keyval usable for accelerators, or <link linkend="GDK-VoidSymbol">GDK_VoidSymbol</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-selectable">gtk_label_get_selectable ()</title>
<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">gtk_label_set_selectable</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the user can copy text from the label
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-text">gtk_label_get_text ()</title>
<programlisting>G_CONST_RETURN <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">gtk_label_get_label</link>())</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the text in the label widget. This is the internal
  string used by the label, and must not be modified.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-new-with-mnemonic">gtk_label_new_with_mnemonic ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_label_new_with_mnemonic     (const char *str);</programlisting>
<para>
Creates a new <link linkend="GtkLabel">GtkLabel</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">gtk_label_set_mnemonic_widget</link>().
</para>
<para>
If <link linkend="gtk-label-set-mnemonic-widget">gtk_label_set_mnemonic_widget</link>()
is not called, then the first activatable ancestor of the <link linkend="GtkLabel">GtkLabel</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><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>str</parameter>&nbsp;:</entry>
<entry> The text of the label, with an underscore in front of the
      mnemonic character
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the new <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-select-region">gtk_label_select_region ()</title>
<programlisting>void        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">gtk_label_set_selectable</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><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>start_offset</parameter>&nbsp;:</entry>
<entry> start offset (in characters not bytes)
</entry></row>
<row><entry align="right"><parameter>end_offset</parameter>&nbsp;:</entry>
<entry> end offset (in characters not bytes)
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-mnemonic-widget">gtk_label_set_mnemonic_widget ()</title>
<programlisting>void        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">gtk_label_set_markup_with_mnemonic</link>(),
<link linkend="gtk-label-set-text-with-mnemonic">gtk_label_set_text_with_mnemonic</link>(), <link linkend="gtk-label-new-with-mnemonic">gtk_label_new_with_mnemonic</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">GtkButton</link> or a <link linkend="GtkNotebook">GtkNotebook</link> tab) it is
automatically associated with the correct widget, but sometimes
(i.e. when the target is a <link linkend="GtkEntry">GtkEntry</link> next to the label) you need to
set it explicitly using this function.
</para>
<para>
The target widget will be accelerated by emitting "mnemonic_activate" 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><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>widget</parameter>&nbsp;:</entry>
<entry> the target <link linkend="GtkWidget">GtkWidget</link> 
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-selectable">gtk_label_set_selectable ()</title>
<programlisting>void        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><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>setting</parameter>&nbsp;:</entry>
<entry> <literal>TRUE</literal> to allow selecting text in the label
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-text-with-mnemonic">gtk_label_set_text_with_mnemonic ()</title>
<programlisting>void        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">gtk_label_set_mnemonic_widget</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>str</parameter>&nbsp;:</entry>
<entry> a string
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-attributes">gtk_label_get_attributes ()</title>
<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">gtk_label_set_attributes</link>(), if any. This function does
not reflect attributes that come from the labels markup
(see <link linkend="gtk-label-set-markup">gtk_label_set_markup</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><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the attribute list, or <literal>NULL</literal> if none was set.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-justify">gtk_label_get_justify ()</title>
<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">gtk_label_set_justify</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <link linkend="GtkJustification">GtkJustification</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-label">gtk_label_get_label ()</title>
<programlisting>G_CONST_RETURN <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">gtk_label_get_text</link>()).</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the text of the label widget. This string is
  owned by the widget and must not be modified or freed.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-layout">gtk_label_get_layout ()</title>
<programlisting><link linkend="PangoLayout">PangoLayout</link>* gtk_label_get_layout           (<link linkend="GtkLabel">GtkLabel</link> *label);</programlisting>
<para>
Gets the <link linkend="PangoLayout">PangoLayout</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">gtk_label_get_layout_offsets</link>().
The returned layout is owned by the label so need not be
freed by the caller.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the <link linkend="PangoLayout">PangoLayout</link> for this label
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-line-wrap">gtk_label_get_line_wrap ()</title>
<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">gtk_label_set_line_wrap</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the lines of the label are automatically wrapped.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-mnemonic-widget">gtk_label_get_mnemonic_widget ()</title>
<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">gtk_label_set_mnemonic_widget</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the target of the label's mnemonic, or <literal>NULL</literal> if none
              has been set and the default algorithm will be used.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-selection-bounds">gtk_label_get_selection_bounds ()</title>
<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 <literal>TRUE</literal>
if there's a selection.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>start</parameter>&nbsp;:</entry>
<entry> return location for start of selection, as a character offset
</entry></row>
<row><entry align="right"><parameter>end</parameter>&nbsp;:</entry>
<entry> return location for end of selection, as a character offset
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if selection is non-empty
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-use-markup">gtk_label_get_use_markup ()</title>
<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">gtk_label_set_use_markup</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> if the label's text will be parsed for markup.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-get-use-underline">gtk_label_get_use_underline ()</title>
<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">gtk_label_set_use_underline</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> <literal>TRUE</literal> whether an embedded underline in the label indicates
              the mnemonic accelerator keys.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-label">gtk_label_set_label ()</title>
<programlisting>void        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 label->use_underline and label->use_markup.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>str</parameter>&nbsp;:</entry>
<entry> the new text to set for the label
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-use-markup">gtk_label_set_use_markup ()</title>
<programlisting>void        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">gtk_label_set_markup</link>().</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>setting</parameter>&nbsp;:</entry>
<entry> <literal>TRUE</literal> if the label's text should be parsed for markup.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-label-set-use-underline">gtk_label_set_use_underline ()</title>
<programlisting>void        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><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkLabel">GtkLabel</link>
</entry></row>
<row><entry align="right"><parameter>setting</parameter>&nbsp;:</entry>
<entry> <literal>TRUE</literal> if underlines in the text indicate mnemonics
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>
<refsect1>
<title>Properties</title>
<variablelist>
<varlistentry><term><anchor id="GtkLabel--label">&quot;<literal>label</literal>&quot; (<link linkend="gchararray">gchararray</link> : Read / Write)</term>
<listitem>
<para>
The actual label text.  Do not write to this pointer, it is not copied.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkLabel--attributes">&quot;<literal>attributes</literal>&quot; (<link linkend="PangoAttrList">PangoAttrList</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkLabel--use-markup">&quot;<literal>use-markup</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkLabel--use-underline">&quot;<literal>use-underline</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkLabel--justify">&quot;<literal>justify</literal>&quot; (<link linkend="GtkJustification">GtkJustification</link> : Read / Write)</term>
<listitem>
<para>
The <link linkend="GtkJustification">GtkJustification</link> setting.  See <link linkend="gtk-label-set-justify">gtk_label_set_justify</link>() for more info.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkLabel--pattern">&quot;<literal>pattern</literal>&quot; (<link linkend="gchararray">gchararray</link> : Write)</term>
<listitem>
<para>
The pattern of underlines under the existing text.  Do not change the
pointer, it isn't copied.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkLabel--wrap">&quot;<literal>wrap</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkLabel--selectable">&quot;<literal>selectable</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkLabel--mnemonic-keyval">&quot;<literal>mnemonic-keyval</literal>&quot; (<link linkend="guint">guint</link> : Read)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkLabel--mnemonic-widget">&quot;<literal>mnemonic-widget</literal>&quot; (<link linkend="GtkWidget">GtkWidget</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkLabel--cursor-position">&quot;<literal>cursor-position</literal>&quot; (<link linkend="gint">gint</link> : Read)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkLabel--selection-bound">&quot;<literal>selection-bound</literal>&quot; (<link linkend="gint">gint</link> : Read)</term>
<listitem>
<para>

</para></listitem></varlistentry>

</variablelist>
</refsect1>

<refsect1>
<title>Signals</title>
<refsect2><title><anchor id="GtkLabel-copy-clipboard">The &quot;copy-clipboard&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkLabel">GtkLabel</link> *label,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry>the object which received the signal.

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkLabel-move-cursor">The &quot;move-cursor&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkLabel">GtkLabel</link> *label,
                                            <link linkend="GtkMovementStep">GtkMovementStep</link> arg1,
                                            <link linkend="gint">gint</link> arg2,
                                            <link linkend="gboolean">gboolean</link> arg3,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>arg1</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>arg2</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>arg3</parameter>&nbsp;:</entry>
<entry>

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GtkLabel-populate-popup">The &quot;populate-popup&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GtkLabel">GtkLabel</link> *label,
                                            <link linkend="GtkMenu">GtkMenu</link> *arg1,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>arg1</parameter>&nbsp;:</entry>
<entry>

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2>
</refsect1>



</refentry>
