|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21585/root/usr/share/gtk-doc/html/gtk/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GtkLabel</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="DisplayWidgets.html" title="Display Widgets">
<link rel="prev" href="GtkImage.html" title="GtkImage">
<link rel="next" href="GtkProgressBar.html" title="GtkProgressBar">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and
GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkImage.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="DisplayWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="GtkProgressBar.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2865833" class="shortcut">Top</a>
 | 
<a href="#id2867603" class="shortcut">Description</a>
 | 
<a href="#id2867049" class="shortcut">Object Hierarchy</a>
 | 
<a href="#id2867118" class="shortcut">Implemented Interfaces</a>
 | 
<a href="#id2867141" class="shortcut">Properties</a>
 | 
<a href="#id2867458" class="shortcut">Signals</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="GtkLabel"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2865833"></a><span class="refentrytitle">GtkLabel</span>
</h2>
<p>GtkLabel — A widget that displays a small to medium amount of text</p>
</td>
<td valign="top" align="right"><img src="label.png"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
#include <gtk/gtk.h>
<a href="GtkLabel.html#GtkLabel-struct">GtkLabel</a>;
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkLabel.html#gtk-label-new">gtk_label_new</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);
void <a href="GtkLabel.html#gtk-label-set-text">gtk_label_set_text</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);
void <a href="GtkLabel.html#gtk-label-set-attributes">gtk_label_set_attributes</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../pango/pango-Text-Attributes.html#PangoAttrList"
>PangoAttrList</a> *attrs);
void <a href="GtkLabel.html#gtk-label-set-markup">gtk_label_set_markup</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);
void <a href="GtkLabel.html#gtk-label-set-markup-with-mnemonic">gtk_label_set_markup_with_mnemonic</a>
(<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);
void <a href="GtkLabel.html#gtk-label-set-pattern">gtk_label_set_pattern</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *pattern);
void <a href="GtkLabel.html#gtk-label-set-justify">gtk_label_set_justify</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a href="gtk-Standard-Enumerations.html#GtkJustification">GtkJustification</a> jtype);
void <a href="GtkLabel.html#gtk-label-set-ellipsize">gtk_label_set_ellipsize</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"
>PangoEllipsizeMode</a> mode);
void <a href="GtkLabel.html#gtk-label-set-width-chars">gtk_label_set_width_chars</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_chars);
void <a href="GtkLabel.html#gtk-label-set-max-width-chars">gtk_label_set_max_width_chars</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_chars);
void <a href="GtkLabel.html#gtk-label-get">gtk_label_get</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **str);
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <a href="GtkLabel.html#gtk-label-parse-uline">gtk_label_parse_uline</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *string);
void <a href="GtkLabel.html#gtk-label-set-line-wrap">gtk_label_set_line_wrap</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> wrap);
void <a href="GtkLabel.html#gtk-label-set-line-wrap-mode">gtk_label_set_line_wrap_mode</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../pango/pango-Layout-Objects.html#PangoWrapMode"
>PangoWrapMode</a> wrap_mode);
#define <a href="GtkLabel.html#gtk-label-set">gtk_label_set</a>
void <a href="GtkLabel.html#gtk-label-get-layout-offsets">gtk_label_get_layout_offsets</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *x,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *y);
<a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <a href="GtkLabel.html#gtk-label-get-mnemonic-keyval">gtk_label_get_mnemonic_keyval</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GtkLabel.html#gtk-label-get-selectable">gtk_label_get_selectable</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="GtkLabel.html#gtk-label-get-text">gtk_label_get_text</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkLabel.html#gtk-label-new-with-mnemonic">gtk_label_new_with_mnemonic</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);
void <a href="GtkLabel.html#gtk-label-select-region">gtk_label_select_region</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> start_offset,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> end_offset);
void <a href="GtkLabel.html#gtk-label-set-mnemonic-widget">gtk_label_set_mnemonic_widget</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);
void <a href="GtkLabel.html#gtk-label-set-selectable">gtk_label_set_selectable</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);
void <a href="GtkLabel.html#gtk-label-set-text-with-mnemonic">gtk_label_set_text_with_mnemonic</a>
(<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);
<a
href="../pango/pango-Text-Attributes.html#PangoAttrList"
>PangoAttrList</a>* <a href="GtkLabel.html#gtk-label-get-attributes">gtk_label_get_attributes</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a href="gtk-Standard-Enumerations.html#GtkJustification">GtkJustification</a> <a href="GtkLabel.html#gtk-label-get-justify">gtk_label_get_justify</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a
href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"
>PangoEllipsizeMode</a> <a href="GtkLabel.html#gtk-label-get-ellipsize">gtk_label_get_ellipsize</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="GtkLabel.html#gtk-label-get-width-chars">gtk_label_get_width_chars</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <a href="GtkLabel.html#gtk-label-get-max-width-chars">gtk_label_get_max_width_chars</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="GtkLabel.html#gtk-label-get-label">gtk_label_get_label</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a
href="../pango/pango-Layout-Objects.html#PangoLayout"
>PangoLayout</a>* <a href="GtkLabel.html#gtk-label-get-layout">gtk_label_get_layout</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GtkLabel.html#gtk-label-get-line-wrap">gtk_label_get_line_wrap</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a
href="../pango/pango-Layout-Objects.html#PangoWrapMode"
>PangoWrapMode</a> <a href="GtkLabel.html#gtk-label-get-line-wrap-mode">gtk_label_get_line_wrap_mode</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkLabel.html#gtk-label-get-mnemonic-widget">gtk_label_get_mnemonic_widget</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GtkLabel.html#gtk-label-get-selection-bounds">gtk_label_get_selection_bounds</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *start,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *end);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GtkLabel.html#gtk-label-get-use-markup">gtk_label_get_use_markup</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GtkLabel.html#gtk-label-get-use-underline">gtk_label_get_use_underline</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GtkLabel.html#gtk-label-get-single-line-mode">gtk_label_get_single_line_mode</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
<a
href="../glib/glib-Basic-Types.html#gdouble"
>gdouble</a> <a href="GtkLabel.html#gtk-label-get-angle">gtk_label_get_angle</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);
void <a href="GtkLabel.html#gtk-label-set-label">gtk_label_set_label</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);
void <a href="GtkLabel.html#gtk-label-set-use-markup">gtk_label_set_use_markup</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);
void <a href="GtkLabel.html#gtk-label-set-use-underline">gtk_label_set_use_underline</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);
void <a href="GtkLabel.html#gtk-label-set-single-line-mode">gtk_label_set_single_line_mode</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> single_line_mode);
void <a href="GtkLabel.html#gtk-label-set-angle">gtk_label_set_angle</a> (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gdouble"
>gdouble</a> angle);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2867049"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----<a
href="../gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned"
>GInitiallyUnowned</a>
+----<a href="GtkObject.html" title="GtkObject">GtkObject</a>
+----<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
+----<a href="GtkMisc.html" title="GtkMisc">GtkMisc</a>
+----GtkLabel
+----<a href="GtkAccelLabel.html" title="GtkAccelLabel">GtkAccelLabel</a>
+----<a href="GtkTipsQuery.html" title="GtkTipsQuery">GtkTipsQuery</a>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2867118"></a><h2>Implemented Interfaces</h2>
<p>
GtkLabel implements
AtkImplementorIface.</p>
</div>
<div class="refsect1" lang="en">
<a name="id2867141"></a><h2>Properties</h2>
<pre class="synopsis">
"<a href="GtkLabel.html#GtkLabel--angle">angle</a>" <a
href="../glib/glib-Basic-Types.html#gdouble"
>gdouble</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--attributes">attributes</a>" <a
href="../pango/pango-Text-Attributes.html#PangoAttrList"
>PangoAttrList</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--cursor-position">cursor-position</a>" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read
"<a href="GtkLabel.html#GtkLabel--ellipsize">ellipsize</a>" <a
href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"
>PangoEllipsizeMode</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--justify">justify</a>" <a href="gtk-Standard-Enumerations.html#GtkJustification">GtkJustification</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--label">label</a>" <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--max-width-chars">max-width-chars</a>" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--mnemonic-keyval">mnemonic-keyval</a>" <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> : Read
"<a href="GtkLabel.html#GtkLabel--mnemonic-widget">mnemonic-widget</a>" <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--pattern">pattern</a>" <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a> : Write
"<a href="GtkLabel.html#GtkLabel--selectable">selectable</a>" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--selection-bound">selection-bound</a>" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read
"<a href="GtkLabel.html#GtkLabel--single-line-mode">single-line-mode</a>" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--use-markup">use-markup</a>" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--use-underline">use-underline</a>" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--width-chars">width-chars</a>" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--wrap">wrap</a>" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write
"<a href="GtkLabel.html#GtkLabel--wrap-mode">wrap-mode</a>" <a
href="../pango/pango-Layout-Objects.html#PangoWrapMode"
>PangoWrapMode</a> : Read / Write
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2867458"></a><h2>Signals</h2>
<pre class="synopsis">
"<a href="GtkLabel.html#GtkLabel-copy-clipboard">copy-clipboard</a>"
void user_function (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last / Action
"<a href="GtkLabel.html#GtkLabel-move-cursor">move-cursor</a>"
void user_function (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a href="gtk-Standard-Enumerations.html#GtkMovementStep">GtkMovementStep</a> *arg1,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> arg2,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> arg3,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last / Action
"<a href="GtkLabel.html#GtkLabel-populate-popup">populate-popup</a>"
void user_function (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *arg1,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2867603"></a><h2>Description</h2>
<p>
The <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> widget displays a small amount of text. As the name
implies, most labels are used to label another widget such as a
<a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>, a <a href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a>, or a <a href="GtkOptionMenu.html" title="GtkOptionMenu"><span class="type">GtkOptionMenu</span></a>.
</p>
<div class="refsect2" lang="en">
<a name="id2867650"></a><h3>Mnemonics</h3>
<p>
Labels may contain <em class="firstterm">mnemonics</em>. 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 <code class="literal">"_File"</code>, to the
functions <a href="GtkLabel.html#gtk-label-new-with-mnemonic"><code class="function">gtk_label_new_with_mnemonic()</code></a> or
<a href="GtkLabel.html#gtk-label-set-text-with-mnemonic"><code class="function">gtk_label_set_text_with_mnemonic()</code></a>.
</p>
<p>
Mnemonics automatically activate any activatable widget the label is
inside, such as a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>; if the label is not inside the
mnemonic's target widget, you have to tell the label about the target
using <a href="GtkLabel.html#gtk-label-set-mnemonic-widget"><code class="function">gtk_label_set_mnemonic_widget()</code></a>. Here's a simple example where
the label is inside a button:
</p>
<div class="informalexample"><pre class="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);
</pre></div>
<p>
There's a convenience function to create buttons with a mnemonic label
already inside:
</p>
<div class="informalexample"><pre class="programlisting">
/* Pressing Alt+H will activate this button */
button = gtk_button_new_with_mnemonic ("_Hello");
</pre></div>
<p>
To create a mnemonic for a widget alongside the label, such as a
<a href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a>, you have to point the label at the entry with
<a href="GtkLabel.html#gtk-label-set-mnemonic-widget"><code class="function">gtk_label_set_mnemonic_widget()</code></a>:
</p>
<div class="informalexample"><pre class="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);
</pre></div>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2867786"></a><h3>Markup (styled text)</h3>
<p>
To make it easy to format text in a label (changing colors, fonts,
etc.), label text can be provided in a simple <a
href="../pango/PangoMarkupFormat.html"
>markup format</a>.
Here's how to create a label with a small font:
</p>
<div class="informalexample"><pre class="programlisting">
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), "<small>Small text</small>");
</pre></div>
<p>
(See <a
href="../pango/PangoMarkupFormat.html"
>complete documentation</a> of available
tags in the Pango manual.)
</p>
<p>
The markup passed to <a href="GtkLabel.html#gtk-label-set-markup"><code class="function">gtk_label_set_markup()</code></a> must be valid; for example,
literal </>/& characters must be escaped as &lt;,
&gt;, and &amp;. If you pass text obtained from the user, file,
or a network to <a href="GtkLabel.html#gtk-label-set-markup"><code class="function">gtk_label_set_markup()</code></a>, you'll want to escape it with
<a
href="../glib/glib-Simple-XML-Subset-Parser.html#g-markup-escape-text"
><code class="function">g_markup_escape_text()</code></a> or <a
href="../glib/glib-Simple-XML-Subset-Parser.html#g-markup-printf-escaped"
><code class="function">g_markup_printf_escaped()</code></a>.
</p>
<p>
Markup strings are just a convenient way to set the <a
href="../pango/pango-Text-Attributes.html#PangoAttrList"
><span class="type">PangoAttrList</span></a> on
a label; <a href="GtkLabel.html#gtk-label-set-attributes"><code class="function">gtk_label_set_attributes()</code></a> may be a simpler way to set
attributes in some cases. Be careful though; <a
href="../pango/pango-Text-Attributes.html#PangoAttrList"
><span class="type">PangoAttrList</span></a> 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 <a
href="../pango/pango-Text-Attributes.html#PangoAttribute"
><span class="type">PangoAttribute</span></a> requires knowledge of the exact string
being displayed, so translations will cause problems.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2867924"></a><h3>Selectable labels</h3>
<p>
Labels can be made selectable with <a href="GtkLabel.html#gtk-label-set-selectable"><code class="function">gtk_label_set_selectable()</code></a>.
Selectable labels allow the user to copy the label contents to
the clipboard. Only labels that contain useful-to-copy information
— such as error messages — should be made selectable.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2867945"></a><h3>Text layout</h3>
<p>
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.
</p>
<p>
Labels can automatically wrap text if you call
<a href="GtkLabel.html#gtk-label-set-line-wrap"><code class="function">gtk_label_set_line_wrap()</code></a>.
</p>
<p>
<a href="GtkLabel.html#gtk-label-set-justify"><code class="function">gtk_label_set_justify()</code></a> 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 <a href="GtkMisc.html#gtk-misc-set-alignment"><code class="function">gtk_misc_set_alignment()</code></a>.
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2868007"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2868018"></a><h3>
<a name="GtkLabel-struct"></a>GtkLabel</h3>
<a class="indexterm" name="id2868031"></a><pre class="programlisting">typedef struct _GtkLabel GtkLabel;</pre>
<p>
This should not be accessed directly. Use the accessor functions as
described below.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2868047"></a><h3>
<a name="gtk-label-new"></a>gtk_label_new ()</h3>
<a class="indexterm" name="id2868060"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_label_new (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);</pre>
<p>
Creates a new label with the given text inside it. You can
pass <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> to get an empty label widget.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td> The text of the label
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the new <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2868139"></a><h3>
<a name="gtk-label-set-text"></a>gtk_label_set_text ()</h3>
<a class="indexterm" name="id2868152"></a><pre class="programlisting">void gtk_label_set_text (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);</pre>
<p>
Sets the text within the <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> widget. It overwrites any text that
was there before.
</p>
<p>
This will also clear any previously set mnemonic accelerators.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td> The text you want to set.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2868244"></a><h3>
<a name="gtk-label-set-attributes"></a>gtk_label_set_attributes ()</h3>
<a class="indexterm" name="id2868258"></a><pre class="programlisting">void gtk_label_set_attributes (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../pango/pango-Text-Attributes.html#PangoAttrList"
>PangoAttrList</a> *attrs);</pre>
<p>
Sets a <a
href="../pango/pango-Text-Attributes.html#PangoAttrList"
><span class="type">PangoAttrList</span></a>; the attributes in the list are applied to the
label text. The attributes set with this function will be ignored
if the "use_underline" property or the "use_markup" property
is <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attrs</code></em> :</span></td>
<td> a <a
href="../pango/pango-Text-Attributes.html#PangoAttrList"
><span class="type">PangoAttrList</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2868366"></a><h3>
<a name="gtk-label-set-markup"></a>gtk_label_set_markup ()</h3>
<a class="indexterm" name="id2868379"></a><pre class="programlisting">void gtk_label_set_markup (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);</pre>
<p>
Parses <em class="parameter"><code>str</code></em> which is marked up with the <a
href="../pango/PangoMarkupFormat.html"
>Pango text markup language</a>, setting the
label's text and attribute list based on the parse results. If the <em class="parameter"><code>str</code></em> is
external data, you may need to escape it with <a
href="../glib/glib-Simple-XML-Subset-Parser.html#g-markup-escape-text"
><code class="function">g_markup_escape_text()</code></a> or
<a
href="../glib/glib-Simple-XML-Subset-Parser.html#g-markup-printf-escaped"
><code class="function">g_markup_printf_escaped()</code></a>:
</p>
<div class="informalexample"><pre class="programlisting">
char *markup;
markup = g_markup_printf_escaped ("<span style=\"italic\">%s</span>", str);
gtk_label_set_markup (GTK_LABEL (label), markup);
g_free (markup);
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td> a markup string (see <a
href="../pango/PangoMarkupFormat.html"
>Pango markup format</a>)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2868524"></a><h3>
<a name="gtk-label-set-markup-with-mnemonic"></a>gtk_label_set_markup_with_mnemonic ()</h3>
<a class="indexterm" name="id2868539"></a><pre class="programlisting">void gtk_label_set_markup_with_mnemonic
(<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);</pre>
<p>
Parses <em class="parameter"><code>str</code></em> which is marked up with the <a
href="../pango/PangoMarkupFormat.html"
>Pango text markup language</a>,
setting the label's text and attribute list based on the parse results.
If characters in <em class="parameter"><code>str</code></em> are preceded by an underscore, they are underlined
indicating that they represent a keyboard accelerator called a mnemonic.
</p>
<p>
The mnemonic key can be used to activate another widget, chosen automatically,
or explicitly using <a href="GtkLabel.html#gtk-label-set-mnemonic-widget"><code class="function">gtk_label_set_mnemonic_widget()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td> a markup string (see <a
href="../pango/PangoMarkupFormat.html"
>Pango markup format</a>)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2868664"></a><h3>
<a name="gtk-label-set-pattern"></a>gtk_label_set_pattern ()</h3>
<a class="indexterm" name="id2868677"></a><pre class="programlisting">void gtk_label_set_pattern (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *pattern);</pre>
<p>
The pattern of underlines you want under the existing text within the
<a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> widget. For example if the current text of the label says
"FooBarBaz" passing a pattern of "___ ___" will underline
"Foo" and "Baz" but not "Bar".
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td>The <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> you want to set the pattern to.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>pattern</code></em> :</span></td>
<td>The pattern as described above.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2868767"></a><h3>
<a name="gtk-label-set-justify"></a>gtk_label_set_justify ()</h3>
<a class="indexterm" name="id2868780"></a><pre class="programlisting">void gtk_label_set_justify (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a href="gtk-Standard-Enumerations.html#GtkJustification">GtkJustification</a> jtype);</pre>
<p>
Sets the alignment of the lines in the text of the label relative to
each other. <a href="gtk-Standard-Enumerations.html#GTK-JUSTIFY-LEFT:CAPS"><code class="literal">GTK_JUSTIFY_LEFT</code></a> is the default value when the
widget is first created with <a href="GtkLabel.html#gtk-label-new"><code class="function">gtk_label_new()</code></a>. If you instead want
to set the alignment of the label as a whole, use
<a href="GtkMisc.html#gtk-misc-set-alignment"><code class="function">gtk_misc_set_alignment()</code></a> instead. <a href="GtkLabel.html#gtk-label-set-justify"><code class="function">gtk_label_set_justify()</code></a> has no
effect on labels containing only a single line.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>jtype</code></em> :</span></td>
<td> a <a href="gtk-Standard-Enumerations.html#GtkJustification"><span class="type">GtkJustification</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2868916"></a><h3>
<a name="gtk-label-set-ellipsize"></a>gtk_label_set_ellipsize ()</h3>
<a class="indexterm" name="id2868931"></a><pre class="programlisting">void gtk_label_set_ellipsize (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"
>PangoEllipsizeMode</a> mode);</pre>
<p>
Sets the mode used to ellipsize (add an ellipsis: "...") to the text if there
is not enough space to render the entire string.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mode</code></em> :</span></td>
<td> a <a
href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"
><span class="type">PangoEllipsizeMode</span></a>
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2869024"></a><h3>
<a name="gtk-label-set-width-chars"></a>gtk_label_set_width_chars ()</h3>
<a class="indexterm" name="id2869040"></a><pre class="programlisting">void gtk_label_set_width_chars (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_chars);</pre>
<p>
Sets the desired width in characters of <em class="parameter"><code>label</code></em> to <em class="parameter"><code>n_chars</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_chars</code></em> :</span></td>
<td> the new desired width, in characters.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2869136"></a><h3>
<a name="gtk-label-set-max-width-chars"></a>gtk_label_set_max_width_chars ()</h3>
<a class="indexterm" name="id2869151"></a><pre class="programlisting">void gtk_label_set_max_width_chars (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_chars);</pre>
<p>
Sets the desired maximum width in characters of <em class="parameter"><code>label</code></em> to <em class="parameter"><code>n_chars</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_chars</code></em> :</span></td>
<td> the new desired maximum width, in characters.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2869247"></a><h3>
<a name="gtk-label-get"></a>gtk_label_get ()</h3>
<a class="indexterm" name="id2869262"></a><pre class="programlisting">void gtk_label_get (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> **str);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_label_get</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Gets the current string of text within the <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> and writes it to
the given <em class="parameter"><code>str</code></em> argument. It does not make a copy of this string so you
must not write to it.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td>The <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> widget you want to get the text from.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td>The reference to the pointer you want to point to the text.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2869368"></a><h3>
<a name="gtk-label-parse-uline"></a>gtk_label_parse_uline ()</h3>
<a class="indexterm" name="id2869384"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> gtk_label_parse_uline (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *string);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_label_parse_uline</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
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.
"_File" would return the keyval for "f". This is
probably only used within the Gtk+ library itself for menu items and such.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td>The <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> you want to affect.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>string</code></em> :</span></td>
<td>The string you want to parse for underlines.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>The lowercase keyval of the last character underlined.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2869491"></a><h3>
<a name="gtk-label-set-line-wrap"></a>gtk_label_set_line_wrap ()</h3>
<a class="indexterm" name="id2869504"></a><pre class="programlisting">void gtk_label_set_line_wrap (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> wrap);</pre>
<p>
Toggles line wrapping within the <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> widget. <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> makes it break
lines if text exceeds the widget's size. <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> lets the text get cut off
by the edge of the widget if it exceeds the widget size.
</p>
<p>
Note that setting line wrapping to <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> 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 <a href="GtkWidget.html#gtk-widget-set-size-request"><code class="function">gtk_widget_set_size_request()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>wrap</code></em> :</span></td>
<td> the setting
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2869644"></a><h3>
<a name="gtk-label-set-line-wrap-mode"></a>gtk_label_set_line_wrap_mode ()</h3>
<a class="indexterm" name="id2869659"></a><pre class="programlisting">void gtk_label_set_line_wrap_mode (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../pango/pango-Layout-Objects.html#PangoWrapMode"
>PangoWrapMode</a> wrap_mode);</pre>
<p>
If line wrapping is on (see <a href="GtkLabel.html#gtk-label-set-line-wrap"><code class="function">gtk_label_set_line_wrap()</code></a>) this controls how
the line wrapping is done. The default is <a
href="../pango/pango-Layout-Objects.html#PANGO-WRAP-WORD:CAPS"
><code class="literal">PANGO_WRAP_WORD</code></a> which means
wrap on word boundaries.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>wrap_mode</code></em> :</span></td>
<td> the line wrapping mode
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2869769"></a><h3>
<a name="gtk-label-set"></a>gtk_label_set</h3>
<a class="indexterm" name="id2869783"></a><pre class="programlisting">#define gtk_label_set gtk_label_set_text
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_label_set</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Aliases <a href="GtkLabel.html#gtk-label-set-text"><code class="function">gtk_label_set_text()</code></a>. Probably used for backward compatibility with
Gtk+ 1.0.x.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2869824"></a><h3>
<a name="gtk-label-get-layout-offsets"></a>gtk_label_get_layout_offsets ()</h3>
<a class="indexterm" name="id2869837"></a><pre class="programlisting">void gtk_label_get_layout_offsets (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *x,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *y);</pre>
<p>
Obtains the coordinates where the label will draw the <a
href="../pango/pango-Layout-Objects.html#PangoLayout"
><span class="type">PangoLayout</span></a>
representing the text in the label; useful to convert mouse events
into coordinates inside the <a
href="../pango/pango-Layout-Objects.html#PangoLayout"
><span class="type">PangoLayout</span></a>, e.g. to take some action
if some part of the label is clicked. Of course you will need to
create a <a href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> to receive the events, and pack the label
inside it, since labels are a <a href="GtkWidget.html#GTK-NO-WINDOW:CAPS"><span class="type">GTK_NO_WINDOW</span></a> widget. Remember
when using the <a
href="../pango/pango-Layout-Objects.html#PangoLayout"
><span class="type">PangoLayout</span></a> functions you need to convert to
and from pixels using <a
href="../pango/pango-Glyph-Storage.html#PANGO-PIXELS:CAPS"
><code class="function">PANGO_PIXELS()</code></a> or <a
href="../pango/pango-Glyph-Storage.html#PANGO-SCALE:CAPS"
><span class="type">PANGO_SCALE</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>x</code></em> :</span></td>
<td> location to store X offset of layout, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>y</code></em> :</span></td>
<td> location to store Y offset of layout, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2870027"></a><h3>
<a name="gtk-label-get-mnemonic-keyval"></a>gtk_label_get_mnemonic_keyval ()</h3>
<a class="indexterm" name="id2870041"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> gtk_label_get_mnemonic_keyval (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
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 <span class="type">GDK_VoidSymbol</span>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> GDK keyval usable for accelerators, or <span class="type">GDK_VoidSymbol</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2870129"></a><h3>
<a name="gtk-label-get-selectable"></a>gtk_label_get_selectable ()</h3>
<a class="indexterm" name="id2870141"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_label_get_selectable (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Gets the value set by <a href="GtkLabel.html#gtk-label-set-selectable"><code class="function">gtk_label_set_selectable()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the user can copy text from the label
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2870231"></a><h3>
<a name="gtk-label-get-text"></a>gtk_label_get_text ()</h3>
<a class="indexterm" name="id2870244"></a><pre class="programlisting">const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gtk_label_get_text (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
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 <a href="GtkLabel.html#gtk-label-get-label"><code class="function">gtk_label_get_label()</code></a>)</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the text in the label widget. This is the internal
string used by the label, and must not be modified.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2870327"></a><h3>
<a name="gtk-label-new-with-mnemonic"></a>gtk_label_new_with_mnemonic ()</h3>
<a class="indexterm" name="id2870341"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_label_new_with_mnemonic (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);</pre>
<p>
Creates a new <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>, containing the text in <em class="parameter"><code>str</code></em>.
</p>
<p>
If characters in <em class="parameter"><code>str</code></em> 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
<a href="GtkLabel.html#gtk-label-set-mnemonic-widget"><code class="function">gtk_label_set_mnemonic_widget()</code></a>.
</p>
<p>
If <a href="GtkLabel.html#gtk-label-set-mnemonic-widget"><code class="function">gtk_label_set_mnemonic_widget()</code></a>
is not called, then the first activatable ancestor of the <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
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.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td> The text of the label, with an underscore in front of the
mnemonic character
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the new <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2870476"></a><h3>
<a name="gtk-label-select-region"></a>gtk_label_select_region ()</h3>
<a class="indexterm" name="id2870489"></a><pre class="programlisting">void gtk_label_select_region (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> start_offset,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> end_offset);</pre>
<p>
Selects a range of characters in the label, if the label is selectable.
See <a href="GtkLabel.html#gtk-label-set-selectable"><code class="function">gtk_label_set_selectable()</code></a>. If the label is not selectable,
this function has no effect. If <em class="parameter"><code>start_offset</code></em> or
<em class="parameter"><code>end_offset</code></em> are -1, then the end of the label will be substituted.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>start_offset</code></em> :</span></td>
<td> start offset (in characters not bytes)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>end_offset</code></em> :</span></td>
<td> end offset (in characters not bytes)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2870616"></a><h3>
<a name="gtk-label-set-mnemonic-widget"></a>gtk_label_set_mnemonic_widget ()</h3>
<a class="indexterm" name="id2870630"></a><pre class="programlisting">void gtk_label_set_mnemonic_widget (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget);</pre>
<p>
If the label has been set so that it has an mnemonic key (using
i.e. <a href="GtkLabel.html#gtk-label-set-markup-with-mnemonic"><code class="function">gtk_label_set_markup_with_mnemonic()</code></a>,
<a href="GtkLabel.html#gtk-label-set-text-with-mnemonic"><code class="function">gtk_label_set_text_with_mnemonic()</code></a>, <a href="GtkLabel.html#gtk-label-new-with-mnemonic"><code class="function">gtk_label_new_with_mnemonic()</code></a>
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 <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> or a <a href="GtkNotebook.html" title="GtkNotebook"><span class="type">GtkNotebook</span></a> tab) it is
automatically associated with the correct widget, but sometimes
(i.e. when the target is a <a href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> next to the label) you need to
set it explicitly using this function.
</p>
<p>
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.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em> :</span></td>
<td> the target <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2870788"></a><h3>
<a name="gtk-label-set-selectable"></a>gtk_label_set_selectable ()</h3>
<a class="indexterm" name="id2870801"></a><pre class="programlisting">void gtk_label_set_selectable (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);</pre>
<p>
Selectable labels allow the user to select text from the label, for
copy-and-paste.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>setting</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> to allow selecting text in the label
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2870891"></a><h3>
<a name="gtk-label-set-text-with-mnemonic"></a>gtk_label_set_text_with_mnemonic ()</h3>
<a class="indexterm" name="id2870905"></a><pre class="programlisting">void gtk_label_set_text_with_mnemonic
(<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);</pre>
<p>
Sets the label's text from the string <em class="parameter"><code>str</code></em>.
If characters in <em class="parameter"><code>str</code></em> 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 <a href="GtkLabel.html#gtk-label-set-mnemonic-widget"><code class="function">gtk_label_set_mnemonic_widget()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td> a string
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2871011"></a><h3>
<a name="gtk-label-get-attributes"></a>gtk_label_get_attributes ()</h3>
<a class="indexterm" name="id2871024"></a><pre class="programlisting"><a
href="../pango/pango-Text-Attributes.html#PangoAttrList"
>PangoAttrList</a>* gtk_label_get_attributes (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Gets the attribute list that was set on the label using
<a href="GtkLabel.html#gtk-label-set-attributes"><code class="function">gtk_label_set_attributes()</code></a>, if any. This function does
not reflect attributes that come from the labels markup
(see <a href="GtkLabel.html#gtk-label-set-markup"><code class="function">gtk_label_set_markup()</code></a>). If you want to get the
effective attributes for the label, use
pango_layout_get_attribute (gtk_label_get_layout (label)).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the attribute list, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if none was set.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2871129"></a><h3>
<a name="gtk-label-get-justify"></a>gtk_label_get_justify ()</h3>
<a class="indexterm" name="id2871142"></a><pre class="programlisting"><a href="gtk-Standard-Enumerations.html#GtkJustification">GtkJustification</a> gtk_label_get_justify (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Returns the justification of the label. See <a href="GtkLabel.html#gtk-label-set-justify"><code class="function">gtk_label_set_justify()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a href="gtk-Standard-Enumerations.html#GtkJustification"><span class="type">GtkJustification</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2871230"></a><h3>
<a name="gtk-label-get-ellipsize"></a>gtk_label_get_ellipsize ()</h3>
<a class="indexterm" name="id2871245"></a><pre class="programlisting"><a
href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"
>PangoEllipsizeMode</a> gtk_label_get_ellipsize (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Returns the ellipsizing position of the label. See <a href="GtkLabel.html#gtk-label-set-ellipsize"><code class="function">gtk_label_set_ellipsize()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"
><span class="type">PangoEllipsizeMode</span></a>
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2871337"></a><h3>
<a name="gtk-label-get-width-chars"></a>gtk_label_get_width_chars ()</h3>
<a class="indexterm" name="id2871353"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gtk_label_get_width_chars (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Retrieves the desired width of <em class="parameter"><code>label</code></em>, in characters. See
<a href="GtkLabel.html#gtk-label-set-width-chars"><code class="function">gtk_label_set_width_chars()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the width of the label in characters.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2871442"></a><h3>
<a name="gtk-label-get-max-width-chars"></a>gtk_label_get_max_width_chars ()</h3>
<a class="indexterm" name="id2871458"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> gtk_label_get_max_width_chars (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Retrieves the desired maximum width of <em class="parameter"><code>label</code></em>, in characters. See
<a href="GtkLabel.html#gtk-label-set-width-chars"><code class="function">gtk_label_set_width_chars()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the maximum width of the label in characters.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2871548"></a><h3>
<a name="gtk-label-get-label"></a>gtk_label_get_label ()</h3>
<a class="indexterm" name="id2871562"></a><pre class="programlisting">const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gtk_label_get_label (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Fetches the text from a label widget including any embedded
underlines indicating mnemonics and Pango markup. (See
<a href="GtkLabel.html#gtk-label-get-text"><code class="function">gtk_label_get_text()</code></a>).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the text of the label widget. This string is
owned by the widget and must not be modified or freed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2871644"></a><h3>
<a name="gtk-label-get-layout"></a>gtk_label_get_layout ()</h3>
<a class="indexterm" name="id2871657"></a><pre class="programlisting"><a
href="../pango/pango-Layout-Objects.html#PangoLayout"
>PangoLayout</a>* gtk_label_get_layout (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Gets the <a
href="../pango/pango-Layout-Objects.html#PangoLayout"
><span class="type">PangoLayout</span></a> used to display the label.
The layout is useful to e.g. convert text positions to
pixel positions, in combination with <a href="GtkLabel.html#gtk-label-get-layout-offsets"><code class="function">gtk_label_get_layout_offsets()</code></a>.
The returned layout is owned by the label so need not be
freed by the caller.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the <a
href="../pango/pango-Layout-Objects.html#PangoLayout"
><span class="type">PangoLayout</span></a> for this label
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2871755"></a><h3>
<a name="gtk-label-get-line-wrap"></a>gtk_label_get_line_wrap ()</h3>
<a class="indexterm" name="id2871768"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_label_get_line_wrap (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Returns whether lines in the label are automatically wrapped. See <a href="GtkLabel.html#gtk-label-set-line-wrap"><code class="function">gtk_label_set_line_wrap()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the lines of the label are automatically wrapped.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2871858"></a><h3>
<a name="gtk-label-get-line-wrap-mode"></a>gtk_label_get_line_wrap_mode ()</h3>
<a class="indexterm" name="id2871874"></a><pre class="programlisting"><a
href="../pango/pango-Layout-Objects.html#PangoWrapMode"
>PangoWrapMode</a> gtk_label_get_line_wrap_mode (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Returns line wrap mode used by the label. See <a href="GtkLabel.html#gtk-label-set-line-wrap-mode"><code class="function">gtk_label_set_line_wrap_mode()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the lines of the label are automatically wrapped.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2871969"></a><h3>
<a name="gtk-label-get-mnemonic-widget"></a>gtk_label_get_mnemonic_widget ()</h3>
<a class="indexterm" name="id2871983"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_label_get_mnemonic_widget (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Retrieves the target of the mnemonic (keyboard shortcut) of this
label. See <a href="GtkLabel.html#gtk-label-set-mnemonic-widget"><code class="function">gtk_label_set_mnemonic_widget()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the target of the label's mnemonic, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if none
has been set and the default algorithm will be used.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2872075"></a><h3>
<a name="gtk-label-get-selection-bounds"></a>gtk_label_get_selection_bounds ()</h3>
<a class="indexterm" name="id2872088"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_label_get_selection_bounds (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *start,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *end);</pre>
<p>
Gets the selected range of characters in the label, returning <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>
if there's a selection.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>start</code></em> :</span></td>
<td> return location for start of selection, as a character offset
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>end</code></em> :</span></td>
<td> return location for end of selection, as a character offset
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if selection is non-empty
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2872223"></a><h3>
<a name="gtk-label-get-use-markup"></a>gtk_label_get_use_markup ()</h3>
<a class="indexterm" name="id2872236"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_label_get_use_markup (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Returns whether the label's text is interpreted as marked up with
the <a
href="../pango/PangoMarkupFormat.html"
>Pango text markup
language</a>. See <a href="GtkLabel.html#gtk-label-set-use-markup"><code class="function">gtk_label_set_use_markup()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the label's text will be parsed for markup.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2872333"></a><h3>
<a name="gtk-label-get-use-underline"></a>gtk_label_get_use_underline ()</h3>
<a class="indexterm" name="id2872347"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_label_get_use_underline (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Returns whether an embedded underline in the label indicates a
mnemonic. See <a href="GtkLabel.html#gtk-label-set-use-underline"><code class="function">gtk_label_set_use_underline()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> whether an embedded underline in the label indicates
the mnemonic accelerator keys.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2872438"></a><h3>
<a name="gtk-label-get-single-line-mode"></a>gtk_label_get_single_line_mode ()</h3>
<a class="indexterm" name="id2872453"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gtk_label_get_single_line_mode (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Returns whether the label is in single line mode.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> when the label is in single line mode.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2872536"></a><h3>
<a name="gtk-label-get-angle"></a>gtk_label_get_angle ()</h3>
<a class="indexterm" name="id2872551"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gdouble"
>gdouble</a> gtk_label_get_angle (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label);</pre>
<p>
Gets the angle of rotation for the label. See
gtk_label_set_angle.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the angle of rotation for the label
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2872624"></a><h3>
<a name="gtk-label-set-label"></a>gtk_label_set_label ()</h3>
<a class="indexterm" name="id2872637"></a><pre class="programlisting">void gtk_label_set_label (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);</pre>
<p>
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.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>str</code></em> :</span></td>
<td> the new text to set for the label
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2872718"></a><h3>
<a name="gtk-label-set-use-markup"></a>gtk_label_set_use_markup ()</h3>
<a class="indexterm" name="id2872731"></a><pre class="programlisting">void gtk_label_set_use_markup (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);</pre>
<p>
Sets whether the text of the label contains markup in <a
href="../pango/PangoMarkupFormat.html"
>Pango's text markup
language</a>. See <a href="GtkLabel.html#gtk-label-set-markup"><code class="function">gtk_label_set_markup()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>setting</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the label's text should be parsed for markup.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2872840"></a><h3>
<a name="gtk-label-set-use-underline"></a>gtk_label_set_use_underline ()</h3>
<a class="indexterm" name="id2872854"></a><pre class="programlisting">void gtk_label_set_use_underline (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> setting);</pre>
<p>
If true, an underline in the text indicates the next character should be
used for the mnemonic accelerator key.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>setting</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if underlines in the text indicate mnemonics
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2872944"></a><h3>
<a name="gtk-label-set-single-line-mode"></a>gtk_label_set_single_line_mode ()</h3>
<a class="indexterm" name="id2872960"></a><pre class="programlisting">void gtk_label_set_single_line_mode (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> single_line_mode);</pre>
<p>
Sets whether the label is in single line mode.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>single_line_mode</code></em> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the label should be in single line mode
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873055"></a><h3>
<a name="gtk-label-set-angle"></a>gtk_label_set_angle ()</h3>
<a class="indexterm" name="id2873070"></a><pre class="programlisting">void gtk_label_set_angle (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gdouble"
>gdouble</a> angle);</pre>
<p>
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.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td> a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>angle</code></em> :</span></td>
<td> the angle that the baseline of the label makes with
the horizontal, in degrees, measured counterclockwise
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.6
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2873159"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="id2873169"></a><h3>
<a name="GtkLabel--angle"></a>The "<code class="literal">angle</code>" property</h3>
<a class="indexterm" name="id2873185"></a><pre class="programlisting"> "angle" <a
href="../glib/glib-Basic-Types.html#gdouble"
>gdouble</a> : Read / Write</pre>
<p>
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.</p>
<p>
</p>
<p>Allowed values: [0,360]</p>
<p>Default value: 0</p>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873227"></a><h3>
<a name="GtkLabel--attributes"></a>The "<code class="literal">attributes</code>" property</h3>
<a class="indexterm" name="id2873244"></a><pre class="programlisting"> "attributes" <a
href="../pango/pango-Text-Attributes.html#PangoAttrList"
>PangoAttrList</a> : Read / Write</pre>
<p>A list of style attributes to apply to the text of the label.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873268"></a><h3>
<a name="GtkLabel--cursor-position"></a>The "<code class="literal">cursor-position</code>" property</h3>
<a class="indexterm" name="id2873284"></a><pre class="programlisting"> "cursor-position" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read</pre>
<p>The current position of the insertion cursor in chars.</p>
<p>Allowed values: >= 0</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873315"></a><h3>
<a name="GtkLabel--ellipsize"></a>The "<code class="literal">ellipsize</code>" property</h3>
<a class="indexterm" name="id2873331"></a><pre class="programlisting"> "ellipsize" <a
href="../pango/pango-Layout-Objects.html#PangoEllipsizeMode"
>PangoEllipsizeMode</a> : Read / Write</pre>
<p>
The preferred place to ellipsize the string, if the label does not have
enough room to display the entire string, specified as a <span class="type">PangoEllisizeMode</span>.
</p>
<p>
Note that setting this property to a value other than <a
href="../pango/pango-Layout-Objects.html#PANGO-ELLIPSIZE-NONE:CAPS"
><code class="literal">PANGO_ELLIPSIZE_NONE</code></a>
has the side-effect that the label requests only enough space to display the
ellipsis "...". In particular, this means that ellipsizing labels don't
work well in notebook tabs, unless the tab's ::tab-expand property is set
to <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a>. Other means to set a label's width are
<a href="GtkWidget.html#gtk-widget-set-size-request"><code class="function">gtk_widget_set_size_request()</code></a> and <a href="GtkLabel.html#gtk-label-set-width-chars"><code class="function">gtk_label_set_width_chars()</code></a>.</p>
<p>
</p>
<p>Default value: PANGO_ELLIPSIZE_NONE</p>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873430"></a><h3>
<a name="GtkLabel--justify"></a>The "<code class="literal">justify</code>" property</h3>
<a class="indexterm" name="id2873446"></a><pre class="programlisting"> "justify" <a href="gtk-Standard-Enumerations.html#GtkJustification">GtkJustification</a> : Read / Write</pre>
<p>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.</p>
<p>Default value: GTK_JUSTIFY_LEFT</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873476"></a><h3>
<a name="GtkLabel--label"></a>The "<code class="literal">label</code>" property</h3>
<a class="indexterm" name="id2873492"></a><pre class="programlisting"> "label" <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a> : Read / Write</pre>
<p>The text of the label.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873518"></a><h3>
<a name="GtkLabel--max-width-chars"></a>The "<code class="literal">max-width-chars</code>" property</h3>
<a class="indexterm" name="id2873534"></a><pre class="programlisting"> "max-width-chars" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read / Write</pre>
<p>
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 width-chars property is set to a positive value,
then the max-width-chars property is ignored.</p>
<p>
</p>
<p>Allowed values: >= -1</p>
<p>Default value: -1</p>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873578"></a><h3>
<a name="GtkLabel--mnemonic-keyval"></a>The "<code class="literal">mnemonic-keyval</code>" property</h3>
<a class="indexterm" name="id2873594"></a><pre class="programlisting"> "mnemonic-keyval" <a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> : Read</pre>
<p>The mnemonic accelerator key for this label.</p>
<p>Default value: 16777215</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873621"></a><h3>
<a name="GtkLabel--mnemonic-widget"></a>The "<code class="literal">mnemonic-widget</code>" property</h3>
<a class="indexterm" name="id2873637"></a><pre class="programlisting"> "mnemonic-widget" <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> : Read / Write</pre>
<p>The widget to be activated when the label's mnemonic key is pressed.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873661"></a><h3>
<a name="GtkLabel--pattern"></a>The "<code class="literal">pattern</code>" property</h3>
<a class="indexterm" name="id2873677"></a><pre class="programlisting"> "pattern" <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a> : Write</pre>
<p>A string with _ characters in positions correspond to characters in the text to underline.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873704"></a><h3>
<a name="GtkLabel--selectable"></a>The "<code class="literal">selectable</code>" property</h3>
<a class="indexterm" name="id2873720"></a><pre class="programlisting"> "selectable" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write</pre>
<p>Whether the label text can be selected with the mouse.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873747"></a><h3>
<a name="GtkLabel--selection-bound"></a>The "<code class="literal">selection-bound</code>" property</h3>
<a class="indexterm" name="id2873763"></a><pre class="programlisting"> "selection-bound" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read</pre>
<p>The position of the opposite end of the selection from the cursor in chars.</p>
<p>Allowed values: >= 0</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873794"></a><h3>
<a name="GtkLabel--single-line-mode"></a>The "<code class="literal">single-line-mode</code>" property</h3>
<a class="indexterm" name="id2873811"></a><pre class="programlisting"> "single-line-mode" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write</pre>
<p>
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.</p>
<p>
</p>
<p>Default value: FALSE</p>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873851"></a><h3>
<a name="GtkLabel--use-markup"></a>The "<code class="literal">use-markup</code>" property</h3>
<a class="indexterm" name="id2873867"></a><pre class="programlisting"> "use-markup" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write</pre>
<p>The text of the label includes XML markup. See pango_parse_markup().</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873894"></a><h3>
<a name="GtkLabel--use-underline"></a>The "<code class="literal">use-underline</code>" property</h3>
<a class="indexterm" name="id2873910"></a><pre class="programlisting"> "use-underline" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write</pre>
<p>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873938"></a><h3>
<a name="GtkLabel--width-chars"></a>The "<code class="literal">width-chars</code>" property</h3>
<a class="indexterm" name="id2873955"></a><pre class="programlisting"> "width-chars" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> : Read / Write</pre>
<p>
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
max-width-chars property is ignored.</p>
<p>
</p>
<p>Allowed values: >= -1</p>
<p>Default value: -1</p>
<p>Since 2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2873999"></a><h3>
<a name="GtkLabel--wrap"></a>The "<code class="literal">wrap</code>" property</h3>
<a class="indexterm" name="id2874015"></a><pre class="programlisting"> "wrap" <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> : Read / Write</pre>
<p>If set, wrap lines if the text becomes too wide.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2874043"></a><h3>
<a name="GtkLabel--wrap-mode"></a>The "<code class="literal">wrap-mode</code>" property</h3>
<a class="indexterm" name="id2874059"></a><pre class="programlisting"> "wrap-mode" <a
href="../pango/pango-Layout-Objects.html#PangoWrapMode"
>PangoWrapMode</a> : Read / Write</pre>
<p>
If line wrapping is on (see the wrap property) this controls how
the line wrapping is done. The default is <a
href="../pango/pango-Layout-Objects.html#PANGO-WRAP-WORD:CAPS"
><code class="literal">PANGO_WRAP_WORD</code></a> which means
wrap on word boundaries.</p>
<p>
</p>
<p>Default value: PANGO_WRAP_WORD</p>
<p>Since 2.10
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2874109"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="id2874120"></a><h3>
<a name="GtkLabel-copy-clipboard"></a>The "copy-clipboard" signal</h3>
<a class="indexterm" name="id2874130"></a><pre class="programlisting">void user_function (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last / Action</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td>the object which received the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2874198"></a><h3>
<a name="GtkLabel-move-cursor"></a>The "move-cursor" signal</h3>
<a class="indexterm" name="id2874209"></a><pre class="programlisting">void user_function (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a href="gtk-Standard-Enumerations.html#GtkMovementStep">GtkMovementStep</a> *arg1,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> arg2,
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> arg3,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last / Action</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td>the object which received the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg1</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg2</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg3</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2874341"></a><h3>
<a name="GtkLabel-populate-popup"></a>The "populate-popup" signal</h3>
<a class="indexterm" name="id2874351"></a><pre class="programlisting">void user_function (<a href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,
<a href="GtkMenu.html" title="GtkMenu">GtkMenu</a> *arg1,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run last</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em> :</span></td>
<td>the object which received the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>arg1</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>