3029 lines
154 KiB
HTML
3029 lines
154 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>GtkLabel: GTK+ 3 Reference Manual</title>
|
||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
|
||
<link rel="up" href="DisplayWidgets.html" title="Display Widgets">
|
||
<link rel="prev" href="DisplayWidgets.html" title="Display Widgets">
|
||
<link rel="next" href="GtkImage.html" title="GtkImage">
|
||
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
|
||
<link rel="stylesheet" href="style.css" type="text/css">
|
||
</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="5"><tr valign="middle">
|
||
<td width="100%" align="left" class="shortcuts">
|
||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||
<a href="#GtkLabel.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
|
||
<a href="#GtkLabel.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
|
||
<a href="#GtkLabel.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span>
|
||
<a href="#GtkLabel.properties" class="shortcut">Properties</a></span><span id="nav_signals"> <span class="dim">|</span>
|
||
<a href="#GtkLabel.signals" class="shortcut">Signals</a></span>
|
||
</td>
|
||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||
<td><a accesskey="u" href="DisplayWidgets.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||
<td><a accesskey="p" href="DisplayWidgets.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||
<td><a accesskey="n" href="GtkImage.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||
</tr></table>
|
||
<div class="refentry">
|
||
<a name="GtkLabel"></a><div class="titlepage"></div>
|
||
<div class="refnamediv"><table width="100%"><tr>
|
||
<td valign="top">
|
||
<h2><span class="refentrytitle"><a name="GtkLabel.top_of_page"></a>GtkLabel</span></h2>
|
||
<p>GtkLabel — A widget that displays a small to medium amount of text</p>
|
||
</td>
|
||
<td class="gallery_image" valign="top" align="right"><img src="label.png"></td>
|
||
</tr></table></div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.functions"></a><h2>Functions</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="functions_proto_type">
|
||
<col class="functions_proto_name">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-new" title="gtk_label_new ()">gtk_label_new</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-text" title="gtk_label_set_text ()">gtk_label_set_text</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-attributes" title="gtk_label_set_attributes ()">gtk_label_set_attributes</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-markup" title="gtk_label_set_markup ()">gtk_label_set_markup</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-markup-with-mnemonic" title="gtk_label_set_markup_with_mnemonic ()">gtk_label_set_markup_with_mnemonic</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-pattern" title="gtk_label_set_pattern ()">gtk_label_set_pattern</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-justify" title="gtk_label_set_justify ()">gtk_label_set_justify</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-xalign" title="gtk_label_set_xalign ()">gtk_label_set_xalign</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-yalign" title="gtk_label_set_yalign ()">gtk_label_set_yalign</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-ellipsize" title="gtk_label_set_ellipsize ()">gtk_label_set_ellipsize</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-width-chars" title="gtk_label_set_width_chars ()">gtk_label_set_width_chars</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-max-width-chars" title="gtk_label_set_max_width_chars ()">gtk_label_set_max_width_chars</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-line-wrap" title="gtk_label_set_line_wrap ()">gtk_label_set_line_wrap</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-line-wrap-mode" title="gtk_label_set_line_wrap_mode ()">gtk_label_set_line_wrap_mode</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-lines" title="gtk_label_set_lines ()">gtk_label_set_lines</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-layout-offsets" title="gtk_label_get_layout_offsets ()">gtk_label_get_layout_offsets</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">guint</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-mnemonic-keyval" title="gtk_label_get_mnemonic_keyval ()">gtk_label_get_mnemonic_keyval</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-selectable" title="gtk_label_get_selectable ()">gtk_label_get_selectable</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">const <span class="returnvalue">gchar</span> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-text" title="gtk_label_get_text ()">gtk_label_get_text</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-new-with-mnemonic" title="gtk_label_new_with_mnemonic ()">gtk_label_new_with_mnemonic</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-select-region" title="gtk_label_select_region ()">gtk_label_select_region</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-mnemonic-widget" title="gtk_label_set_mnemonic_widget ()">gtk_label_set_mnemonic_widget</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-selectable" title="gtk_label_set_selectable ()">gtk_label_set_selectable</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-text-with-mnemonic" title="gtk_label_set_text_with_mnemonic ()">gtk_label_set_text_with_mnemonic</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">PangoAttrList</span> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-attributes" title="gtk_label_get_attributes ()">gtk_label_get_attributes</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="gtk3-Standard-Enumerations.html#GtkJustification" title="enum GtkJustification"><span class="returnvalue">GtkJustification</span></a>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-justify" title="gtk_label_get_justify ()">gtk_label_get_justify</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gfloat</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-xalign" title="gtk_label_get_xalign ()">gtk_label_get_xalign</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gfloat</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-yalign" title="gtk_label_get_yalign ()">gtk_label_get_yalign</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">PangoEllipsizeMode</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-ellipsize" title="gtk_label_get_ellipsize ()">gtk_label_get_ellipsize</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gint</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-width-chars" title="gtk_label_get_width_chars ()">gtk_label_get_width_chars</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gint</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-max-width-chars" title="gtk_label_get_max_width_chars ()">gtk_label_get_max_width_chars</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">const <span class="returnvalue">gchar</span> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-label" title="gtk_label_get_label ()">gtk_label_get_label</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">PangoLayout</span> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-layout" title="gtk_label_get_layout ()">gtk_label_get_layout</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-line-wrap" title="gtk_label_get_line_wrap ()">gtk_label_get_line_wrap</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">PangoWrapMode</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-line-wrap-mode" title="gtk_label_get_line_wrap_mode ()">gtk_label_get_line_wrap_mode</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gint</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-lines" title="gtk_label_get_lines ()">gtk_label_get_lines</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-mnemonic-widget" title="gtk_label_get_mnemonic_widget ()">gtk_label_get_mnemonic_widget</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-selection-bounds" title="gtk_label_get_selection_bounds ()">gtk_label_get_selection_bounds</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-use-markup" title="gtk_label_get_use_markup ()">gtk_label_get_use_markup</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-use-underline" title="gtk_label_get_use_underline ()">gtk_label_get_use_underline</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-single-line-mode" title="gtk_label_get_single_line_mode ()">gtk_label_get_single_line_mode</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gdouble</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-angle" title="gtk_label_get_angle ()">gtk_label_get_angle</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-label" title="gtk_label_set_label ()">gtk_label_set_label</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-use-markup" title="gtk_label_set_use_markup ()">gtk_label_set_use_markup</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-use-underline" title="gtk_label_set_use_underline ()">gtk_label_set_use_underline</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-single-line-mode" title="gtk_label_set_single_line_mode ()">gtk_label_set_single_line_mode</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-angle" title="gtk_label_set_angle ()">gtk_label_set_angle</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">const <span class="returnvalue">gchar</span> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-current-uri" title="gtk_label_get_current_uri ()">gtk_label_get_current_uri</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-track-visited-links" title="gtk_label_set_track_visited_links ()">gtk_label_set_track_visited_links</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-track-visited-links" title="gtk_label_get_track_visited_links ()">gtk_label_get_track_visited_links</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.properties"></a><h2>Properties</h2>
|
||
<div class="informaltable"><table class="informaltable" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="properties_type">
|
||
<col width="300px" class="properties_name">
|
||
<col width="200px" class="properties_flags">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="property_type"><span class="type">double</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--angle" title="The “angle” property">angle</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<span class="type">PangoAttrList</span> *</td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--attributes" title="The “attributes” property">attributes</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--cursor-position" title="The “cursor-position” property">cursor-position</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">PangoEllipsizeMode</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--ellipsize" title="The “ellipsize” property">ellipsize</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><a class="link" href="gtk3-Standard-Enumerations.html#GtkJustification" title="enum GtkJustification"><span class="type">GtkJustification</span></a></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--justify" title="The “justify” property">justify</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<span class="type">char</span> *</td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--label" title="The “label” property">label</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--lines" title="The “lines” property">lines</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--max-width-chars" title="The “max-width-chars” property">max-width-chars</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">guint</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--mnemonic-keyval" title="The “mnemonic-keyval” property">mnemonic-keyval</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *</td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--mnemonic-widget" title="The “mnemonic-widget” property">mnemonic-widget</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<span class="type">char</span> *</td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--pattern" title="The “pattern” property">pattern</a></td>
|
||
<td class="property_flags">Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--selectable" title="The “selectable” property">selectable</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--selection-bound" title="The “selection-bound” property">selection-bound</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--single-line-mode" title="The “single-line-mode” property">single-line-mode</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--track-visited-links" title="The “track-visited-links” property">track-visited-links</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--use-markup" title="The “use-markup” property">use-markup</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--use-underline" title="The “use-underline” property">use-underline</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--width-chars" title="The “width-chars” property">width-chars</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--wrap" title="The “wrap” property">wrap</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">PangoWrapMode</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--wrap-mode" title="The “wrap-mode” property">wrap-mode</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">float</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--xalign" title="The “xalign” property">xalign</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">float</span></td>
|
||
<td class="property_name"><a class="link" href="GtkLabel.html#GtkLabel--yalign" title="The “yalign” property">yalign</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.signals"></a><h2>Signals</h2>
|
||
<div class="informaltable"><table class="informaltable" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="signal_proto_type">
|
||
<col width="300px" class="signal_proto_name">
|
||
<col width="200px" class="signal_proto_flags">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkLabel.html#GtkLabel-activate-current-link" title="The “activate-current-link” signal">activate-current-link</a></td>
|
||
<td class="signal_flags">Action</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">gboolean</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkLabel.html#GtkLabel-activate-link" title="The “activate-link” signal">activate-link</a></td>
|
||
<td class="signal_flags">Run Last</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkLabel.html#GtkLabel-copy-clipboard" title="The “copy-clipboard” signal">copy-clipboard</a></td>
|
||
<td class="signal_flags">Action</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkLabel.html#GtkLabel-move-cursor" title="The “move-cursor” signal">move-cursor</a></td>
|
||
<td class="signal_flags">Action</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkLabel.html#GtkLabel-populate-popup" title="The “populate-popup” signal">populate-popup</a></td>
|
||
<td class="signal_flags">Run Last</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.other"></a><h2>Types and Values</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="other_proto_type">
|
||
<col class="other_proto_name">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="datatype_keyword">struct</td>
|
||
<td class="function_name"><a class="link" href="GtkLabel.html#GtkLabel-struct" title="struct GtkLabel">GtkLabel</a></td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.object-hierarchy"></a><h2>Object Hierarchy</h2>
|
||
<pre class="screen"> GObject
|
||
<span class="lineart">╰──</span> GInitiallyUnowned
|
||
<span class="lineart">╰──</span> <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
|
||
<span class="lineart">╰──</span> <a class="link" href="GtkMisc.html" title="GtkMisc">GtkMisc</a>
|
||
<span class="lineart">╰──</span> GtkLabel
|
||
<span class="lineart">╰──</span> <a class="link" href="GtkAccelLabel.html" title="GtkAccelLabel">GtkAccelLabel</a>
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
|
||
<p>
|
||
GtkLabel implements
|
||
AtkImplementorIface and <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.includes"></a><h2>Includes</h2>
|
||
<pre class="synopsis">#include <gtk/gtk.h>
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.description"></a><h2>Description</h2>
|
||
<p>The <a class="link" 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 class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>, a <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a>, or a <a class="link" href="GtkComboBox.html" title="GtkComboBox"><span class="type">GtkComboBox</span></a>.</p>
|
||
<div class="refsect2">
|
||
<a name="id-1.3.8.2.10.3"></a><h3>CSS nodes</h3>
|
||
<div class="informalexample">
|
||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="listing_lines" align="right"><pre>1
|
||
2
|
||
3
|
||
4
|
||
5</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="n">label</span><span class="w"></span>
|
||
<span class="err">├──</span><span class="w"> </span><span class="p">[</span><span class="n">selection</span><span class="p">]</span><span class="w"></span>
|
||
<span class="err">├──</span><span class="w"> </span><span class="p">[</span><span class="n">link</span><span class="p">]</span><span class="w"></span>
|
||
<span class="err">┊</span><span class="w"></span>
|
||
<span class="err">╰──</span><span class="w"> </span><span class="p">[</span><span class="n">link</span><span class="p">]</span><span class="w"></span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<p>GtkLabel has a single CSS node with the name label. A wide variety
|
||
of style classes may be applied to labels, such as .title, .subtitle,
|
||
.dim-label, etc. In the <a class="link" href="GtkShortcutsWindow.html" title="GtkShortcutsWindow"><span class="type">GtkShortcutsWindow</span></a>, labels are used wth the
|
||
.keycap style class.</p>
|
||
<p>If the label has a selection, it gets a subnode with name selection.</p>
|
||
<p>If the label has links, there is one subnode per link. These subnodes
|
||
carry the link or visited state depending on whether they have been
|
||
visited.</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="id-1.3.8.2.10.4"></a><h3>GtkLabel as GtkBuildable</h3>
|
||
<p>The GtkLabel implementation of the GtkBuildable interface supports a
|
||
custom <code class="literal"><attributes></code> element, which supports any number of <code class="literal"><attribute></code>
|
||
elements. The <code class="literal"><attribute></code> element has attributes named “name“, “value“,
|
||
“start“ and “end“ and allows you to specify <span class="type">PangoAttribute</span> values for
|
||
this label.</p>
|
||
<p>An example of a UI definition fragment specifying Pango attributes:</p>
|
||
<div class="informalexample">
|
||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="listing_lines" align="right"><pre>1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="o"><</span><span class="n">object</span><span class="w"> </span><span class="n">class</span><span class="o">=</span><span class="s">"GtkLabel"</span><span class="o">></span><span class="w"></span>
|
||
<span class="w"> </span><span class="o"><</span><span class="n">attributes</span><span class="o">></span><span class="w"></span>
|
||
<span class="w"> </span><span class="o"><</span><span class="n">attribute</span><span class="w"> </span><span class="n">name</span><span class="o">=</span><span class="s">"weight"</span><span class="w"> </span><span class="n">value</span><span class="o">=</span><span class="s">"PANGO_WEIGHT_BOLD"</span><span class="o">/></span><span class="w"></span>
|
||
<span class="w"> </span><span class="o"><</span><span class="n">attribute</span><span class="w"> </span><span class="n">name</span><span class="o">=</span><span class="s">"background"</span><span class="w"> </span><span class="n">value</span><span class="o">=</span><span class="s">"red"</span><span class="w"> </span><span class="n">start</span><span class="o">=</span><span class="s">"5"</span><span class="w"> </span><span class="n">end</span><span class="o">=</span><span class="s">"10"</span><span class="o">/></span><span class="w"></span>
|
||
<span class="w"> </span><span class="o"></</span><span class="n">attributes</span><span class="o">></span><span class="w"></span>
|
||
<span class="o"></</span><span class="n">object</span><span class="o">></span><span class="w"></span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<p>The start and end attributes specify the range of characters to which the
|
||
Pango attribute applies. If start and end are not specified, the attribute is
|
||
applied to the whole text. Note that specifying ranges does not make much
|
||
sense with translatable attributes. Use markup embedded in the translatable
|
||
content instead.</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="id-1.3.8.2.10.5"></a><h3>Mnemonics</h3>
|
||
<p>Labels may contain “mnemonics”. Mnemonics are
|
||
underlined characters in the label, used for keyboard navigation.
|
||
Mnemonics are created by providing a string with an underscore before
|
||
the mnemonic character, such as <code class="literal">"_File"</code>, to the
|
||
functions <a class="link" href="GtkLabel.html#gtk-label-new-with-mnemonic" title="gtk_label_new_with_mnemonic ()"><code class="function">gtk_label_new_with_mnemonic()</code></a> or
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-text-with-mnemonic" title="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 class="link" 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 class="link" href="GtkLabel.html#gtk-label-set-mnemonic-widget" title="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">
|
||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="listing_lines" align="right"><pre>1
|
||
2
|
||
3
|
||
4</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="c1">// Pressing Alt+H will activate this button</span>
|
||
<span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_button_new</span><span class="w"> </span><span class="p">();</span><span class="w"></span>
|
||
<span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="s">"_Hello"</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">button</span><span class="p">),</span><span class="w"> </span><span class="n">label</span><span class="p">);</span><span class="w"></span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<p>There’s a convenience function to create buttons with a mnemonic label
|
||
already inside:</p>
|
||
<div class="informalexample">
|
||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="listing_lines" align="right"><pre>1
|
||
2</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="c1">// Pressing Alt+H will activate this button</span>
|
||
<span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">button</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_button_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="s">"_Hello"</span><span class="p">);</span><span class="w"></span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<p>To create a mnemonic for a widget alongside the label, such as a
|
||
<a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a>, you have to point the label at the entry with
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-mnemonic-widget" title="gtk_label_set_mnemonic_widget ()"><code class="function">gtk_label_set_mnemonic_widget()</code></a>:</p>
|
||
<div class="informalexample">
|
||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="listing_lines" align="right"><pre>1
|
||
2
|
||
3
|
||
4</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="c1">// Pressing Alt+H will focus the entry</span>
|
||
<span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">entry</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_entry_new</span><span class="w"> </span><span class="p">();</span><span class="w"></span>
|
||
<span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new_with_mnemonic</span><span class="w"> </span><span class="p">(</span><span class="s">"_Hello"</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">gtk_label_set_mnemonic_widget</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">entry</span><span class="p">);</span><span class="w"></span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="id-1.3.8.2.10.6"></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
|
||
markup format.</p>
|
||
<p>Here’s how to create a label with a small font:</p>
|
||
<div class="informalexample">
|
||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="listing_lines" align="right"><pre>1
|
||
2</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">gtk_label_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="s">"<small>Small text</small>"</span><span class="p">);</span><span class="w"></span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<p>(See complete documentation of available
|
||
tags in the Pango manual.)</p>
|
||
<p>The markup passed to <a class="link" href="GtkLabel.html#gtk-label-set-markup" title="gtk_label_set_markup ()"><code class="function">gtk_label_set_markup()</code></a> must be valid; for example,
|
||
literal <, > and & characters must be escaped as <, >, and &.
|
||
If you pass text obtained from the user, file, or a network to
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-markup" title="gtk_label_set_markup ()"><code class="function">gtk_label_set_markup()</code></a>, you’ll want to escape it with
|
||
<code class="function">g_markup_escape_text()</code> or <code class="function">g_markup_printf_escaped()</code>.</p>
|
||
<p>Markup strings are just a convenient way to set the <span class="type">PangoAttrList</span> on
|
||
a label; <a class="link" href="GtkLabel.html#gtk-label-set-attributes" title="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; <span class="type">PangoAttrList</span> 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, <code class="literal">G_MAXINT</code>)). The reason is that specifying the start_index and
|
||
end_index for a <span class="type">PangoAttribute</span> requires knowledge of the exact string
|
||
being displayed, so translations will cause problems.</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="id-1.3.8.2.10.7"></a><h3>Selectable labels</h3>
|
||
<p>Labels can be made selectable with <a class="link" href="GtkLabel.html#gtk-label-set-selectable" title="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">
|
||
<a name="label-text-layout"></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 class="link" href="GtkLabel.html#gtk-label-set-line-wrap" title="gtk_label_set_line_wrap ()"><code class="function">gtk_label_set_line_wrap()</code></a>.</p>
|
||
<p>gtk_label_set_justify() sets how the lines in a label align
|
||
with one another. If you want to set how the label as a whole
|
||
aligns in its available space, see the <a class="link" href="GtkWidget.html#GtkWidget--halign" title="The “halign” property"><span class="type">“halign”</span></a> and
|
||
<a class="link" href="GtkWidget.html#GtkWidget--valign" title="The “valign” property"><span class="type">“valign”</span></a> properties.</p>
|
||
<p>The <a class="link" href="GtkLabel.html#GtkLabel--width-chars" title="The “width-chars” property"><span class="type">“width-chars”</span></a> and <a class="link" href="GtkLabel.html#GtkLabel--max-width-chars" title="The “max-width-chars” property"><span class="type">“max-width-chars”</span></a> properties
|
||
can be used to control the size allocation of ellipsized or wrapped
|
||
labels. For ellipsizing labels, if either is specified (and less
|
||
than the actual text size), it is used as the minimum width, and the actual
|
||
text size is used as the natural width of the label. For wrapping labels,
|
||
width-chars is used as the minimum width, if specified, and max-width-chars
|
||
is used as the natural width. Even if max-width-chars specified, wrapping
|
||
labels will be rewrapped to use all of the available width.</p>
|
||
<p>Note that the interpretation of <a class="link" href="GtkLabel.html#GtkLabel--width-chars" title="The “width-chars” property"><span class="type">“width-chars”</span></a> and
|
||
<a class="link" href="GtkLabel.html#GtkLabel--max-width-chars" title="The “max-width-chars” property"><span class="type">“max-width-chars”</span></a> has changed a bit with the introduction of
|
||
<a class="link" href="GtkWidget.html#geometry-management" title="Height-for-width Geometry Management">width-for-height geometry management.</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="id-1.3.8.2.10.9"></a><h3>Links</h3>
|
||
<p>Since 2.18, GTK+ supports markup for clickable hyperlinks in addition
|
||
to regular Pango markup. The markup for links is borrowed from HTML,
|
||
using the <code class="literal"><a></code> with “href“ and “title“ attributes. GTK+ renders links
|
||
similar to the way they appear in web browsers, with colored, underlined
|
||
text. The “title“ attribute is displayed as a tooltip on the link.</p>
|
||
<p>An example looks like this:</p>
|
||
<div class="informalexample">
|
||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="listing_lines" align="right"><pre>1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="k">const</span><span class="w"> </span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">text</span><span class="w"> </span><span class="o">=</span><span class="w"></span>
|
||
<span class="s">"Go to the"</span><span class="w"></span>
|
||
<span class="s">"<a href=</span><span class="se">\"</span><span class="s">http://www.gtk.org title=</span><span class="se">\"</span><span class="s"><i>Our</i> website</span><span class="se">\"</span><span class="s">>"</span><span class="w"></span>
|
||
<span class="s">"GTK+ website</a> for more..."</span><span class="p">;</span><span class="w"></span>
|
||
<span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">gtk_label_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">text</span><span class="p">);</span><span class="w"></span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<p>It is possible to implement custom handling for links and their tooltips with
|
||
the <a class="link" href="GtkLabel.html#GtkLabel-activate-link" title="The “activate-link” signal"><span class="type">“activate-link”</span></a> signal and the <a class="link" href="GtkLabel.html#gtk-label-get-current-uri" title="gtk_label_get_current_uri ()"><code class="function">gtk_label_get_current_uri()</code></a> function.</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.functions_details"></a><h2>Functions</h2>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-new"></a><h3>gtk_label_new ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_label_new (<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</pre>
|
||
<p>Creates a new label with the given text inside it. You can
|
||
pass <code class="literal">NULL</code> to get an empty label widget.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-new.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>str</p></td>
|
||
<td class="parameter_description"><p>The text of the label. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-new.returns"></a><h4>Returns</h4>
|
||
<p> the new <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-text"></a><h3>gtk_label_set_text ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_text (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</pre>
|
||
<p>Sets the text within the <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> widget. It overwrites any text that
|
||
was there before. </p>
|
||
<p>This function will clear any previously set mnemonic accelerators, and
|
||
set the <a class="link" href="GtkLabel.html#GtkLabel--use-underline" title="The “use-underline” property"><span class="type">“use-underline”</span></a> property to <code class="literal">FALSE</code> as a side effect.</p>
|
||
<p>This function will set the <a class="link" href="GtkLabel.html#GtkLabel--use-markup" title="The “use-markup” property"><span class="type">“use-markup”</span></a> property to <code class="literal">FALSE</code>
|
||
as a side effect.</p>
|
||
<p>See also: <a class="link" href="GtkLabel.html#gtk-label-set-markup" title="gtk_label_set_markup ()"><code class="function">gtk_label_set_markup()</code></a></p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-text.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>str</p></td>
|
||
<td class="parameter_description"><p>The text you want to set</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-attributes"></a><h3>gtk_label_set_attributes ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_attributes (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">PangoAttrList</span> *attrs</code></em>);</pre>
|
||
<p>Sets a <span class="type">PangoAttrList</span>; the attributes in the list are applied to the
|
||
label text.</p>
|
||
<p>The attributes set with this function will be applied
|
||
and merged with any other attributes previously effected by way
|
||
of the <a class="link" href="GtkLabel.html#GtkLabel--use-underline" title="The “use-underline” property"><span class="type">“use-underline”</span></a> or <a class="link" href="GtkLabel.html#GtkLabel--use-markup" title="The “use-markup” property"><span class="type">“use-markup”</span></a> properties.
|
||
While it is not recommended to mix markup strings with manually set
|
||
attributes, if you must; know that the attributes will be applied
|
||
to the label after the markup string is parsed.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-attributes.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>attrs</p></td>
|
||
<td class="parameter_description"><p>a <span class="type">PangoAttrList</span>, or <code class="literal">NULL</code>. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-markup"></a><h3>gtk_label_set_markup ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_markup (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</pre>
|
||
<p>Parses <em class="parameter"><code>str</code></em>
|
||
which is marked up with the
|
||
Pango text markup language, setting the
|
||
label’s text and attribute list based on the parse results.</p>
|
||
<p>If the <em class="parameter"><code>str</code></em>
|
||
is external data, you may need to escape it with
|
||
<code class="function">g_markup_escape_text()</code> or <code class="function">g_markup_printf_escaped()</code>:</p>
|
||
<div class="informalexample">
|
||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="listing_lines" align="right"><pre>1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
7
|
||
8</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">);</span><span class="w"></span>
|
||
<span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">str</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"some text"</span><span class="p">;</span><span class="w"></span>
|
||
<span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"<span style=</span><span class="se">\"</span><span class="s">italic</span><span class="se">\"</span><span class="s">>\%s</span>"</span><span class="p">;</span><span class="w"></span>
|
||
<span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">markup</span><span class="p">;</span><span class="w"></span>
|
||
|
||
<span class="n">markup</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">g_markup_printf_escaped</span><span class="w"> </span><span class="p">(</span><span class="n">format</span><span class="p">,</span><span class="w"> </span><span class="n">str</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">gtk_label_set_markup</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">label</span><span class="p">),</span><span class="w"> </span><span class="n">markup</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">g_free</span><span class="w"> </span><span class="p">(</span><span class="n">markup</span><span class="p">);</span><span class="w"></span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<p>This function will set the <a class="link" href="GtkLabel.html#GtkLabel--use-markup" title="The “use-markup” property"><span class="type">“use-markup”</span></a> property to <code class="literal">TRUE</code> as
|
||
a side effect.</p>
|
||
<p>If you set the label contents using the <a class="link" href="GtkLabel.html#GtkLabel--label" title="The “label” property"><span class="type">“label”</span></a> property you
|
||
should also ensure that you set the <a class="link" href="GtkLabel.html#GtkLabel--use-markup" title="The “use-markup” property"><span class="type">“use-markup”</span></a> property
|
||
accordingly.</p>
|
||
<p>See also: <a class="link" href="GtkLabel.html#gtk-label-set-text" title="gtk_label_set_text ()"><code class="function">gtk_label_set_text()</code></a></p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-markup.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>str</p></td>
|
||
<td class="parameter_description"><p>a markup string (see Pango markup format)</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-markup-with-mnemonic"></a><h3>gtk_label_set_markup_with_mnemonic ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_markup_with_mnemonic (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</pre>
|
||
<p>Parses <em class="parameter"><code>str</code></em>
|
||
which is marked up with the
|
||
Pango text markup language,
|
||
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 class="link" href="GtkLabel.html#gtk-label-set-mnemonic-widget" title="gtk_label_set_mnemonic_widget ()"><code class="function">gtk_label_set_mnemonic_widget()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-markup-with-mnemonic.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>str</p></td>
|
||
<td class="parameter_description"><p>a markup string (see
|
||
Pango markup format)</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-pattern"></a><h3>gtk_label_set_pattern ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_pattern (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *pattern</code></em>);</pre>
|
||
<p>The pattern of underlines you want under the existing text within the
|
||
<a class="link" 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="refsect3">
|
||
<a name="gtk-label-set-pattern.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>The <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> you want to set the pattern to.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>pattern</p></td>
|
||
<td class="parameter_description"><p>The pattern as described above.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-justify"></a><h3>gtk_label_set_justify ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_justify (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkJustification" title="enum GtkJustification"><span class="type">GtkJustification</span></a> jtype</code></em>);</pre>
|
||
<p>Sets the alignment of the lines in the text of the label relative to
|
||
each other. <a class="link" href="gtk3-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 class="link" href="GtkLabel.html#gtk-label-new" title="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 class="link" href="GtkWidget.html#gtk-widget-set-halign" title="gtk_widget_set_halign ()"><code class="function">gtk_widget_set_halign()</code></a> instead.
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-justify" title="gtk_label_set_justify ()"><code class="function">gtk_label_set_justify()</code></a> has no effect on labels containing only a
|
||
single line.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-justify.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>jtype</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="gtk3-Standard-Enumerations.html#GtkJustification" title="enum GtkJustification"><span class="type">GtkJustification</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-xalign"></a><h3>gtk_label_set_xalign ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_xalign (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gfloat</span> xalign</code></em>);</pre>
|
||
<p>Sets the <a class="link" href="GtkLabel.html#GtkLabel--xalign" title="The “xalign” property"><span class="type">“xalign”</span></a> property for <em class="parameter"><code>label</code></em>
|
||
.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-xalign.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>xalign</p></td>
|
||
<td class="parameter_description"><p>the new xalign value, between 0 and 1</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-yalign"></a><h3>gtk_label_set_yalign ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_yalign (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gfloat</span> yalign</code></em>);</pre>
|
||
<p>Sets the <a class="link" href="GtkLabel.html#GtkLabel--yalign" title="The “yalign” property"><span class="type">“yalign”</span></a> property for <em class="parameter"><code>label</code></em>
|
||
.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-yalign.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>yalign</p></td>
|
||
<td class="parameter_description"><p>the new yalign value, between 0 and 1</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-ellipsize"></a><h3>gtk_label_set_ellipsize ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_ellipsize (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">PangoEllipsizeMode</span> mode</code></em>);</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>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-ellipsize.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>mode</p></td>
|
||
<td class="parameter_description"><p>a <span class="type">PangoEllipsizeMode</span></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-width-chars"></a><h3>gtk_label_set_width_chars ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_width_chars (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> n_chars</code></em>);</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>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-width-chars.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>n_chars</p></td>
|
||
<td class="parameter_description"><p>the new desired width, in characters.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-max-width-chars"></a><h3>gtk_label_set_max_width_chars ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_max_width_chars (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> n_chars</code></em>);</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>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-max-width-chars.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>n_chars</p></td>
|
||
<td class="parameter_description"><p>the new desired maximum width, in characters.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-line-wrap"></a><h3>gtk_label_set_line_wrap ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_line_wrap (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> wrap</code></em>);</pre>
|
||
<p>Toggles line wrapping within the <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> widget. <code class="literal">TRUE</code> makes it break
|
||
lines if text exceeds the widget’s size. <code class="literal">FALSE</code> 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 <code class="literal">TRUE</code> 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 class="link" href="GtkWidget.html#gtk-widget-set-size-request" title="gtk_widget_set_size_request ()"><code class="function">gtk_widget_set_size_request()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-line-wrap.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>wrap</p></td>
|
||
<td class="parameter_description"><p>the setting</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-line-wrap-mode"></a><h3>gtk_label_set_line_wrap_mode ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_line_wrap_mode (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">PangoWrapMode</span> wrap_mode</code></em>);</pre>
|
||
<p>If line wrapping is on (see <a class="link" href="GtkLabel.html#gtk-label-set-line-wrap" title="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 <code class="literal">PANGO_WRAP_WORD</code> which means
|
||
wrap on word boundaries.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-line-wrap-mode.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>wrap_mode</p></td>
|
||
<td class="parameter_description"><p>the line wrapping mode</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-lines"></a><h3>gtk_label_set_lines ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_lines (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> lines</code></em>);</pre>
|
||
<p>Sets the number of lines to which an ellipsized, wrapping label
|
||
should be limited. This has no effect if the label is not wrapping
|
||
or ellipsized. Set this to -1 if you don’t want to limit the
|
||
number of lines.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-lines.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>lines</p></td>
|
||
<td class="parameter_description"><p>the desired number of lines, or -1</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-layout-offsets"></a><h3>gtk_label_get_layout_offsets ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_get_layout_offsets (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> *x</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> *y</code></em>);</pre>
|
||
<p>Obtains the coordinates where the label will draw the <span class="type">PangoLayout</span>
|
||
representing the text in the label; useful to convert mouse events
|
||
into coordinates inside the <span class="type">PangoLayout</span>, e.g. to take some action
|
||
if some part of the label is clicked. Of course you will need to
|
||
create a <a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> to receive the events, and pack the label
|
||
inside it, since labels are windowless (they return <code class="literal">FALSE</code> from
|
||
<a class="link" href="GtkWidget.html#gtk-widget-get-has-window" title="gtk_widget_get_has_window ()"><code class="function">gtk_widget_get_has_window()</code></a>). Remember
|
||
when using the <span class="type">PangoLayout</span> functions you need to convert to
|
||
and from pixels using <code class="function">PANGO_PIXELS()</code> or <span class="type">PANGO_SCALE</span>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-layout-offsets.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>x</p></td>
|
||
<td class="parameter_description"><p>location to store X offset of layout, or <code class="literal">NULL</code>. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>y</p></td>
|
||
<td class="parameter_description"><p>location to store Y offset of layout, or <code class="literal">NULL</code>. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-mnemonic-keyval"></a><h3>gtk_label_get_mnemonic_keyval ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">guint</span>
|
||
gtk_label_get_mnemonic_keyval (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</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_KEY_VoidSymbol</span>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-mnemonic-keyval.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-mnemonic-keyval.returns"></a><h4>Returns</h4>
|
||
<p> GDK keyval usable for accelerators, or <span class="type">GDK_KEY_VoidSymbol</span></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-selectable"></a><h3>gtk_label_get_selectable ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_label_get_selectable (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Gets the value set by <a class="link" href="GtkLabel.html#gtk-label-set-selectable" title="gtk_label_set_selectable ()"><code class="function">gtk_label_set_selectable()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-selectable.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-selectable.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the user can copy text from the label</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-text"></a><h3>gtk_label_get_text ()</h3>
|
||
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
|
||
gtk_label_get_text (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</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 class="link" href="GtkLabel.html#gtk-label-get-label" title="gtk_label_get_label ()"><code class="function">gtk_label_get_label()</code></a>)</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-text.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-text.returns"></a><h4>Returns</h4>
|
||
<p> the text in the label widget. This is the internal
|
||
string used by the label, and must not be modified.</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-new-with-mnemonic"></a><h3>gtk_label_new_with_mnemonic ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_label_new_with_mnemonic (<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</pre>
|
||
<p>Creates a new <a class="link" 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 class="link" href="GtkLabel.html#gtk-label-set-mnemonic-widget" title="gtk_label_set_mnemonic_widget ()"><code class="function">gtk_label_set_mnemonic_widget()</code></a>.</p>
|
||
<p>If <a class="link" href="GtkLabel.html#gtk-label-set-mnemonic-widget" title="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 class="link" 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>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-new-with-mnemonic.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>str</p></td>
|
||
<td class="parameter_description"><p>The text of the label, with an underscore in front of the
|
||
mnemonic character. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-new-with-mnemonic.returns"></a><h4>Returns</h4>
|
||
<p> the new <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-select-region"></a><h3>gtk_label_select_region ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_select_region (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> start_offset</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> end_offset</code></em>);</pre>
|
||
<p>Selects a range of characters in the label, if the label is selectable.
|
||
See <a class="link" href="GtkLabel.html#gtk-label-set-selectable" title="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>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-select-region.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>start_offset</p></td>
|
||
<td class="parameter_description"><p>start offset (in characters not bytes)</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>end_offset</p></td>
|
||
<td class="parameter_description"><p>end offset (in characters not bytes)</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-mnemonic-widget"></a><h3>gtk_label_set_mnemonic_widget ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_mnemonic_widget (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
|
||
<p>If the label has been set so that it has an mnemonic key (using
|
||
i.e. <a class="link" href="GtkLabel.html#gtk-label-set-markup-with-mnemonic" title="gtk_label_set_markup_with_mnemonic ()"><code class="function">gtk_label_set_markup_with_mnemonic()</code></a>,
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-text-with-mnemonic" title="gtk_label_set_text_with_mnemonic ()"><code class="function">gtk_label_set_text_with_mnemonic()</code></a>, <a class="link" href="GtkLabel.html#gtk-label-new-with-mnemonic" title="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 class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> or a <a class="link" 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 class="link" 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 the
|
||
GtkWidget::mnemonic-activate signal on it. The default handler for
|
||
this signal will activate the widget if there are no mnemonic collisions
|
||
and toggle focus between the colliding widgets otherwise.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-mnemonic-widget.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>widget</p></td>
|
||
<td class="parameter_description"><p>the target <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>, or <code class="literal">NULL</code> to unset. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-selectable"></a><h3>gtk_label_set_selectable ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_selectable (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> setting</code></em>);</pre>
|
||
<p>Selectable labels allow the user to select text from the label, for
|
||
copy-and-paste.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-selectable.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>setting</p></td>
|
||
<td class="parameter_description"><p><code class="literal">TRUE</code> to allow selecting text in the label</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-text-with-mnemonic"></a><h3>gtk_label_set_text_with_mnemonic ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_text_with_mnemonic (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</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 class="link" href="GtkLabel.html#gtk-label-set-mnemonic-widget" title="gtk_label_set_mnemonic_widget ()"><code class="function">gtk_label_set_mnemonic_widget()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-text-with-mnemonic.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>str</p></td>
|
||
<td class="parameter_description"><p>a string</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-attributes"></a><h3>gtk_label_get_attributes ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">PangoAttrList</span> *
|
||
gtk_label_get_attributes (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Gets the attribute list that was set on the label using
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-attributes" title="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 class="link" href="GtkLabel.html#gtk-label-set-markup" title="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>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-attributes.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-attributes.returns"></a><h4>Returns</h4>
|
||
<p>the attribute list, or <code class="literal">NULL</code>
|
||
if none was set. </p>
|
||
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-justify"></a><h3>gtk_label_get_justify ()</h3>
|
||
<pre class="programlisting"><a class="link" href="gtk3-Standard-Enumerations.html#GtkJustification" title="enum GtkJustification"><span class="returnvalue">GtkJustification</span></a>
|
||
gtk_label_get_justify (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Returns the justification of the label. See <a class="link" href="GtkLabel.html#gtk-label-set-justify" title="gtk_label_set_justify ()"><code class="function">gtk_label_set_justify()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-justify.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-justify.returns"></a><h4>Returns</h4>
|
||
<p> <a class="link" href="gtk3-Standard-Enumerations.html#GtkJustification" title="enum GtkJustification"><span class="type">GtkJustification</span></a></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-xalign"></a><h3>gtk_label_get_xalign ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gfloat</span>
|
||
gtk_label_get_xalign (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Gets the <a class="link" href="GtkLabel.html#GtkLabel--xalign" title="The “xalign” property"><span class="type">“xalign”</span></a> property for <em class="parameter"><code>label</code></em>
|
||
.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-xalign.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-xalign.returns"></a><h4>Returns</h4>
|
||
<p> the xalign property</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-yalign"></a><h3>gtk_label_get_yalign ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gfloat</span>
|
||
gtk_label_get_yalign (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Gets the <a class="link" href="GtkLabel.html#GtkLabel--yalign" title="The “yalign” property"><span class="type">“yalign”</span></a> property for <em class="parameter"><code>label</code></em>
|
||
.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-yalign.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-yalign.returns"></a><h4>Returns</h4>
|
||
<p> the yalign property</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-ellipsize"></a><h3>gtk_label_get_ellipsize ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">PangoEllipsizeMode</span>
|
||
gtk_label_get_ellipsize (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Returns the ellipsizing position of the label. See <a class="link" href="GtkLabel.html#gtk-label-set-ellipsize" title="gtk_label_set_ellipsize ()"><code class="function">gtk_label_set_ellipsize()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-ellipsize.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-ellipsize.returns"></a><h4>Returns</h4>
|
||
<p> <span class="type">PangoEllipsizeMode</span></p>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-width-chars"></a><h3>gtk_label_get_width_chars ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gint</span>
|
||
gtk_label_get_width_chars (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Retrieves the desired width of <em class="parameter"><code>label</code></em>
|
||
, in characters. See
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-width-chars" title="gtk_label_set_width_chars ()"><code class="function">gtk_label_set_width_chars()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-width-chars.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-width-chars.returns"></a><h4>Returns</h4>
|
||
<p> the width of the label in characters.</p>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-max-width-chars"></a><h3>gtk_label_get_max_width_chars ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gint</span>
|
||
gtk_label_get_max_width_chars (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Retrieves the desired maximum width of <em class="parameter"><code>label</code></em>
|
||
, in characters. See
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-width-chars" title="gtk_label_set_width_chars ()"><code class="function">gtk_label_set_width_chars()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-max-width-chars.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-max-width-chars.returns"></a><h4>Returns</h4>
|
||
<p> the maximum width of the label in characters.</p>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-label"></a><h3>gtk_label_get_label ()</h3>
|
||
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
|
||
gtk_label_get_label (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Fetches the text from a label widget including any embedded
|
||
underlines indicating mnemonics and Pango markup. (See
|
||
<a class="link" href="GtkLabel.html#gtk-label-get-text" title="gtk_label_get_text ()"><code class="function">gtk_label_get_text()</code></a>).</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-label.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-label.returns"></a><h4>Returns</h4>
|
||
<p> the text of the label widget. This string is
|
||
owned by the widget and must not be modified or freed.</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-layout"></a><h3>gtk_label_get_layout ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">PangoLayout</span> *
|
||
gtk_label_get_layout (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Gets the <span class="type">PangoLayout</span> used to display the label.
|
||
The layout is useful to e.g. convert text positions to
|
||
pixel positions, in combination with <a class="link" href="GtkLabel.html#gtk-label-get-layout-offsets" title="gtk_label_get_layout_offsets ()"><code class="function">gtk_label_get_layout_offsets()</code></a>.
|
||
The returned layout is owned by the <em class="parameter"><code>label</code></em>
|
||
so need not be
|
||
freed by the caller. The <em class="parameter"><code>label</code></em>
|
||
is free to recreate its layout at
|
||
any time, so it should be considered read-only.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-layout.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-layout.returns"></a><h4>Returns</h4>
|
||
<p>the <span class="type">PangoLayout</span> for this label. </p>
|
||
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-line-wrap"></a><h3>gtk_label_get_line_wrap ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_label_get_line_wrap (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Returns whether lines in the label are automatically wrapped.
|
||
See <a class="link" href="GtkLabel.html#gtk-label-set-line-wrap" title="gtk_label_set_line_wrap ()"><code class="function">gtk_label_set_line_wrap()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-line-wrap.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-line-wrap.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the lines of the label are automatically wrapped.</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-line-wrap-mode"></a><h3>gtk_label_get_line_wrap_mode ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">PangoWrapMode</span>
|
||
gtk_label_get_line_wrap_mode (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Returns line wrap mode used by the label. See <a class="link" href="GtkLabel.html#gtk-label-set-line-wrap-mode" title="gtk_label_set_line_wrap_mode ()"><code class="function">gtk_label_set_line_wrap_mode()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-line-wrap-mode.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-line-wrap-mode.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the lines of the label are automatically wrapped.</p>
|
||
</div>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-lines"></a><h3>gtk_label_get_lines ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gint</span>
|
||
gtk_label_get_lines (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Gets the number of lines to which an ellipsized, wrapping
|
||
label should be limited. See <a class="link" href="GtkLabel.html#gtk-label-set-lines" title="gtk_label_set_lines ()"><code class="function">gtk_label_set_lines()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-lines.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-lines.returns"></a><h4>Returns</h4>
|
||
<p> The number of lines</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-mnemonic-widget"></a><h3>gtk_label_get_mnemonic_widget ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_label_get_mnemonic_widget (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Retrieves the target of the mnemonic (keyboard shortcut) of this
|
||
label. See <a class="link" href="GtkLabel.html#gtk-label-set-mnemonic-widget" title="gtk_label_set_mnemonic_widget ()"><code class="function">gtk_label_set_mnemonic_widget()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-mnemonic-widget.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-mnemonic-widget.returns"></a><h4>Returns</h4>
|
||
<p>the target of the label’s mnemonic,
|
||
or <code class="literal">NULL</code> if none has been set and the default algorithm will be used. </p>
|
||
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-selection-bounds"></a><h3>gtk_label_get_selection_bounds ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_label_get_selection_bounds (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> *start</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> *end</code></em>);</pre>
|
||
<p>Gets the selected range of characters in the label, returning <code class="literal">TRUE</code>
|
||
if there’s a selection.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-selection-bounds.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>start</p></td>
|
||
<td class="parameter_description"><p>return location for start of selection, as a character offset. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>end</p></td>
|
||
<td class="parameter_description"><p>return location for end of selection, as a character offset. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-selection-bounds.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if selection is non-empty</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-use-markup"></a><h3>gtk_label_get_use_markup ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_label_get_use_markup (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Returns whether the label’s text is interpreted as marked up with
|
||
the Pango text markup language.
|
||
See <a class="link" href="GtkLabel.html#gtk-label-set-use-markup" title="gtk_label_set_use_markup ()"><code class="function">gtk_label_set_use_markup()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-use-markup.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-use-markup.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the label’s text will be parsed for markup.</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-use-underline"></a><h3>gtk_label_get_use_underline ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_label_get_use_underline (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Returns whether an embedded underline in the label indicates a
|
||
mnemonic. See <a class="link" href="GtkLabel.html#gtk-label-set-use-underline" title="gtk_label_set_use_underline ()"><code class="function">gtk_label_set_use_underline()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-use-underline.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-use-underline.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> whether an embedded underline in the label indicates
|
||
the mnemonic accelerator keys.</p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-single-line-mode"></a><h3>gtk_label_get_single_line_mode ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_label_get_single_line_mode (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Returns whether the label is in single line mode.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-single-line-mode.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-single-line-mode.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> when the label is in single line mode.</p>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-angle"></a><h3>gtk_label_get_angle ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gdouble</span>
|
||
gtk_label_get_angle (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Gets the angle of rotation for the label. See
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-angle" title="gtk_label_set_angle ()"><code class="function">gtk_label_set_angle()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-angle.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-angle.returns"></a><h4>Returns</h4>
|
||
<p> the angle of rotation for the label</p>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-label"></a><h3>gtk_label_set_label ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_label (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</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 the <a class="link" href="GtkLabel.html#GtkLabel--use-underline" title="The “use-underline” property"><span class="type">“use-underline”</span></a> and
|
||
<a class="link" href="GtkLabel.html#GtkLabel--use-markup" title="The “use-markup” property"><span class="type">“use-markup”</span></a> properties.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-label.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>str</p></td>
|
||
<td class="parameter_description"><p>the new text to set for the label</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-use-markup"></a><h3>gtk_label_set_use_markup ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_use_markup (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> setting</code></em>);</pre>
|
||
<p>Sets whether the text of the label contains markup in
|
||
Pango’s text markup language.
|
||
See <a class="link" href="GtkLabel.html#gtk-label-set-markup" title="gtk_label_set_markup ()"><code class="function">gtk_label_set_markup()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-use-markup.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>setting</p></td>
|
||
<td class="parameter_description"><p><code class="literal">TRUE</code> if the label’s text should be parsed for markup.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-use-underline"></a><h3>gtk_label_set_use_underline ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_use_underline (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> setting</code></em>);</pre>
|
||
<p>If true, an underline in the text indicates the next character should be
|
||
used for the mnemonic accelerator key.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-use-underline.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>setting</p></td>
|
||
<td class="parameter_description"><p><code class="literal">TRUE</code> if underlines in the text indicate mnemonics</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-single-line-mode"></a><h3>gtk_label_set_single_line_mode ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_single_line_mode (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> single_line_mode</code></em>);</pre>
|
||
<p>Sets whether the label is in single line mode.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-single-line-mode.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>single_line_mode</p></td>
|
||
<td class="parameter_description"><p><code class="literal">TRUE</code> if the label should be in single line mode</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-angle"></a><h3>gtk_label_set_angle ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_angle (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gdouble</span> angle</code></em>);</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>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-angle.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>angle</p></td>
|
||
<td class="parameter_description"><p>the angle that the baseline of the label makes with
|
||
the horizontal, in degrees, measured counterclockwise</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-current-uri"></a><h3>gtk_label_get_current_uri ()</h3>
|
||
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
|
||
gtk_label_get_current_uri (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Returns the URI for the currently active link in the label.
|
||
The active link is the one under the mouse pointer or, in a
|
||
selectable label, the link in which the text cursor is currently
|
||
positioned.</p>
|
||
<p>This function is intended for use in a <a class="link" href="GtkLabel.html#GtkLabel-activate-link" title="The “activate-link” signal"><span class="type">“activate-link”</span></a> handler
|
||
or for use in a <a class="link" href="GtkWidget.html#GtkWidget-query-tooltip" title="The “query-tooltip” signal"><span class="type">“query-tooltip”</span></a> handler.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-current-uri.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-current-uri.returns"></a><h4>Returns</h4>
|
||
<p> the currently active URI. The string is owned by GTK+ and must
|
||
not be freed or modified.</p>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-set-track-visited-links"></a><h3>gtk_label_set_track_visited_links ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_label_set_track_visited_links (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> track_links</code></em>);</pre>
|
||
<p>Sets whether the label should keep track of clicked
|
||
links (and use a different color for them).</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-set-track-visited-links.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>track_links</p></td>
|
||
<td class="parameter_description"><p><code class="literal">TRUE</code> to track visited links</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-label-get-track-visited-links"></a><h3>gtk_label_get_track_visited_links ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_label_get_track_visited_links (<em class="parameter"><code><a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label</code></em>);</pre>
|
||
<p>Returns whether the label is currently keeping track
|
||
of clicked links.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-track-visited-links.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-label-get-track-visited-links.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if clicked links are remembered</p>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.other_details"></a><h2>Types and Values</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel-struct"></a><h3>struct GtkLabel</h3>
|
||
<pre class="programlisting">struct GtkLabel;</pre>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.property-details"></a><h2>Property Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--angle"></a><h3>The <code class="literal">“angle”</code> property</h3>
|
||
<pre class="programlisting"> “angle” <span class="type">double</span></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.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Allowed values: [0,360]</p>
|
||
<p>Default value: 0</p>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--attributes"></a><h3>The <code class="literal">“attributes”</code> property</h3>
|
||
<pre class="programlisting"> “attributes” <span class="type">PangoAttrList</span> *</pre>
|
||
<p>A list of style attributes to apply to the text of the label.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--cursor-position"></a><h3>The <code class="literal">“cursor-position”</code> property</h3>
|
||
<pre class="programlisting"> “cursor-position” <span class="type">int</span></pre>
|
||
<p>The current position of the insertion cursor in chars.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read</p>
|
||
<p>Allowed values: >= 0</p>
|
||
<p>Default value: 0</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--ellipsize"></a><h3>The <code class="literal">“ellipsize”</code> property</h3>
|
||
<pre class="programlisting"> “ellipsize” <span class="type">PangoEllipsizeMode</span></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">PangoEllipsizeMode</span>.</p>
|
||
<p>Note that setting this property to a value other than
|
||
<code class="literal">PANGO_ELLIPSIZE_NONE</code> has the side-effect that the label requests
|
||
only enough space to display the ellipsis "...". In particular, this
|
||
means that ellipsizing labels do not work well in notebook tabs, unless
|
||
the <a class="link" href="GtkNotebook.html" title="GtkNotebook"><span class="type">GtkNotebook</span></a> tab-expand child property is set to <code class="literal">TRUE</code>. Other ways
|
||
to set a label's width are <a class="link" href="GtkWidget.html#gtk-widget-set-size-request" title="gtk_widget_set_size_request ()"><code class="function">gtk_widget_set_size_request()</code></a> and
|
||
<a class="link" href="GtkLabel.html#gtk-label-set-width-chars" title="gtk_label_set_width_chars ()"><code class="function">gtk_label_set_width_chars()</code></a>.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: PANGO_ELLIPSIZE_NONE</p>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--justify"></a><h3>The <code class="literal">“justify”</code> property</h3>
|
||
<pre class="programlisting"> “justify” <a class="link" href="gtk3-Standard-Enumerations.html#GtkJustification" title="enum GtkJustification"><span class="type">GtkJustification</span></a></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 GtkLabel:xalign for that.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: GTK_JUSTIFY_LEFT</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--label"></a><h3>The <code class="literal">“label”</code> property</h3>
|
||
<pre class="programlisting"> “label” <span class="type">char</span> *</pre>
|
||
<p>The contents of the label.</p>
|
||
<p>If the string contains Pango XML markup, you will
|
||
have to set the <a class="link" href="GtkLabel.html#GtkLabel--use-markup" title="The “use-markup” property"><span class="type">“use-markup”</span></a> property to <code class="literal">TRUE</code> in order for the
|
||
label to display the markup attributes. See also <a class="link" href="GtkLabel.html#gtk-label-set-markup" title="gtk_label_set_markup ()"><code class="function">gtk_label_set_markup()</code></a>
|
||
for a convenience function that sets both this property and the
|
||
<a class="link" href="GtkLabel.html#GtkLabel--use-markup" title="The “use-markup” property"><span class="type">“use-markup”</span></a> property at the same time.</p>
|
||
<p>If the string contains underlines acting as mnemonics, you will have to
|
||
set the <a class="link" href="GtkLabel.html#GtkLabel--use-underline" title="The “use-underline” property"><span class="type">“use-underline”</span></a> property to <code class="literal">TRUE</code> in order for the label
|
||
to display them.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: ""</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--lines"></a><h3>The <code class="literal">“lines”</code> property</h3>
|
||
<pre class="programlisting"> “lines” <span class="type">int</span></pre>
|
||
<p>The number of lines to which an ellipsized, wrapping label
|
||
should be limited. This property has no effect if the
|
||
label is not wrapping or ellipsized. Set this property to
|
||
-1 if you don't want to limit the number of lines.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Allowed values: >= -1</p>
|
||
<p>Default value: -1</p>
|
||
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--max-width-chars"></a><h3>The <code class="literal">“max-width-chars”</code> property</h3>
|
||
<pre class="programlisting"> “max-width-chars” <span class="type">int</span></pre>
|
||
<p>The desired maximum width of the label, in characters. If this property
|
||
is set to -1, the width will be calculated automatically.</p>
|
||
<p>See the section on <a class="link" href="GtkLabel.html#label-text-layout" title="Text layout">text layout</a>
|
||
for details of how <a class="link" href="GtkLabel.html#GtkLabel--width-chars" title="The “width-chars” property"><span class="type">“width-chars”</span></a> and <a class="link" href="GtkLabel.html#GtkLabel--max-width-chars" title="The “max-width-chars” property"><span class="type">“max-width-chars”</span></a>
|
||
determine the width of ellipsized and wrapped labels.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Allowed values: >= -1</p>
|
||
<p>Default value: -1</p>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--mnemonic-keyval"></a><h3>The <code class="literal">“mnemonic-keyval”</code> property</h3>
|
||
<pre class="programlisting"> “mnemonic-keyval” <span class="type">guint</span></pre>
|
||
<p>The mnemonic accelerator key for this label.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read</p>
|
||
<p>Default value: 16777215</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--mnemonic-widget"></a><h3>The <code class="literal">“mnemonic-widget”</code> property</h3>
|
||
<pre class="programlisting"> “mnemonic-widget” <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *</pre>
|
||
<p>The widget to be activated when the label's mnemonic key is pressed.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--pattern"></a><h3>The <code class="literal">“pattern”</code> property</h3>
|
||
<pre class="programlisting"> “pattern” <span class="type">char</span> *</pre>
|
||
<p>A string with _ characters in positions correspond to characters in the text to underline.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Write</p>
|
||
<p>Default value: NULL</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--selectable"></a><h3>The <code class="literal">“selectable”</code> property</h3>
|
||
<pre class="programlisting"> “selectable” <span class="type">gboolean</span></pre>
|
||
<p>Whether the label text can be selected with the mouse.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: FALSE</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--selection-bound"></a><h3>The <code class="literal">“selection-bound”</code> property</h3>
|
||
<pre class="programlisting"> “selection-bound” <span class="type">int</span></pre>
|
||
<p>The position of the opposite end of the selection from the cursor in chars.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read</p>
|
||
<p>Allowed values: >= 0</p>
|
||
<p>Default value: 0</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--single-line-mode"></a><h3>The <code class="literal">“single-line-mode”</code> property</h3>
|
||
<pre class="programlisting"> “single-line-mode” <span class="type">gboolean</span></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>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: FALSE</p>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--track-visited-links"></a><h3>The <code class="literal">“track-visited-links”</code> property</h3>
|
||
<pre class="programlisting"> “track-visited-links” <span class="type">gboolean</span></pre>
|
||
<p>Set this property to <code class="literal">TRUE</code> to make the label track which links
|
||
have been visited. It will then apply the <a class="link" href="gtk3-Standard-Enumerations.html#GTK-STATE-FLAG-VISITED:CAPS"><span class="type">GTK_STATE_FLAG_VISITED</span></a>
|
||
when rendering this link, in addition to <a class="link" href="gtk3-Standard-Enumerations.html#GTK-STATE-FLAG-LINK:CAPS"><span class="type">GTK_STATE_FLAG_LINK</span></a>.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: TRUE</p>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--use-markup"></a><h3>The <code class="literal">“use-markup”</code> property</h3>
|
||
<pre class="programlisting"> “use-markup” <span class="type">gboolean</span></pre>
|
||
<p>The text of the label includes XML markup. See pango_parse_markup().</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: FALSE</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--use-underline"></a><h3>The <code class="literal">“use-underline”</code> property</h3>
|
||
<pre class="programlisting"> “use-underline” <span class="type">gboolean</span></pre>
|
||
<p>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: FALSE</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--width-chars"></a><h3>The <code class="literal">“width-chars”</code> property</h3>
|
||
<pre class="programlisting"> “width-chars” <span class="type">int</span></pre>
|
||
<p>The desired width of the label, in characters. If this property is set to
|
||
-1, the width will be calculated automatically.</p>
|
||
<p>See the section on <a class="link" href="GtkLabel.html#label-text-layout" title="Text layout">text layout</a>
|
||
for details of how <a class="link" href="GtkLabel.html#GtkLabel--width-chars" title="The “width-chars” property"><span class="type">“width-chars”</span></a> and <a class="link" href="GtkLabel.html#GtkLabel--max-width-chars" title="The “max-width-chars” property"><span class="type">“max-width-chars”</span></a>
|
||
determine the width of ellipsized and wrapped labels.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Allowed values: >= -1</p>
|
||
<p>Default value: -1</p>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--wrap"></a><h3>The <code class="literal">“wrap”</code> property</h3>
|
||
<pre class="programlisting"> “wrap” <span class="type">gboolean</span></pre>
|
||
<p>If set, wrap lines if the text becomes too wide.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: FALSE</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--wrap-mode"></a><h3>The <code class="literal">“wrap-mode”</code> property</h3>
|
||
<pre class="programlisting"> “wrap-mode” <span class="type">PangoWrapMode</span></pre>
|
||
<p>If line wrapping is on (see the <a class="link" href="GtkLabel.html#GtkLabel--wrap" title="The “wrap” property"><span class="type">“wrap”</span></a> property) this controls
|
||
how the line wrapping is done. The default is <code class="literal">PANGO_WRAP_WORD</code>, which
|
||
means wrap on word boundaries.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: PANGO_WRAP_WORD</p>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--xalign"></a><h3>The <code class="literal">“xalign”</code> property</h3>
|
||
<pre class="programlisting"> “xalign” <span class="type">float</span></pre>
|
||
<p>The xalign property determines the horizontal aligment of the label text
|
||
inside the labels size allocation. Compare this to <a class="link" href="GtkWidget.html#GtkWidget--halign" title="The “halign” property"><span class="type">“halign”</span></a>,
|
||
which determines how the labels size allocation is positioned in the
|
||
space available for the label.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Allowed values: [0,1]</p>
|
||
<p>Default value: 0.5</p>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel--yalign"></a><h3>The <code class="literal">“yalign”</code> property</h3>
|
||
<pre class="programlisting"> “yalign” <span class="type">float</span></pre>
|
||
<p>The yalign property determines the vertical aligment of the label text
|
||
inside the labels size allocation. Compare this to <a class="link" href="GtkWidget.html#GtkWidget--valign" title="The “valign” property"><span class="type">“valign”</span></a>,
|
||
which determines how the labels size allocation is positioned in the
|
||
space available for the label.</p>
|
||
<p>Owner: GtkLabel</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Allowed values: [0,1]</p>
|
||
<p>Default value: 0.5</p>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkLabel.signal-details"></a><h2>Signal Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel-activate-current-link"></a><h3>The <code class="literal">“activate-current-link”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>A <a class="link" href="gtk3-Bindings.html#GtkBindingSignal" title="struct GtkBindingSignal">keybinding signal</a>
|
||
which gets emitted when the user activates a link in the label.</p>
|
||
<p>Applications may also emit the signal with <code class="function">g_signal_emit_by_name()</code>
|
||
if they need to control activation of URIs programmatically.</p>
|
||
<p>The default bindings for this signal are all forms of the Enter key.</p>
|
||
<div class="refsect3">
|
||
<a name="GtkLabel-activate-current-link.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>The label on which the signal was emitted</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Action</p>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel-activate-link"></a><h3>The <code class="literal">“activate-link”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
user_function (<a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label,
|
||
<span class="type">char</span> *uri,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>The signal which gets emitted to activate a URI.
|
||
Applications may connect to it to override the default behaviour,
|
||
which is to call <a class="link" href="gtk3-Filesystem-utilities.html#gtk-show-uri-on-window" title="gtk_show_uri_on_window ()"><code class="function">gtk_show_uri_on_window()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="GtkLabel-activate-link.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>The label on which the signal was emitted</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>uri</p></td>
|
||
<td class="parameter_description"><p>the URI that is activated</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="GtkLabel-activate-link.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the link has been activated</p>
|
||
</div>
|
||
<p>Flags: Run Last</p>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel-copy-clipboard"></a><h3>The <code class="literal">“copy-clipboard”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>The ::copy-clipboard signal is a
|
||
<a class="link" href="gtk3-Bindings.html#GtkBindingSignal" title="struct GtkBindingSignal">keybinding signal</a>
|
||
which gets emitted to copy the selection to the clipboard.</p>
|
||
<p>The default binding for this signal is Ctrl-c.</p>
|
||
<div class="refsect3">
|
||
<a name="GtkLabel-copy-clipboard.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>the object which received the signal</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Action</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel-move-cursor"></a><h3>The <code class="literal">“move-cursor”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *entry,
|
||
<a class="link" href="gtk3-Standard-Enumerations.html#GtkMovementStep" title="enum GtkMovementStep"><span class="type">GtkMovementStep</span></a> step,
|
||
<span class="type">int</span> count,
|
||
<span class="type">gboolean</span> extend_selection,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>The ::move-cursor signal is a
|
||
<a class="link" href="gtk3-Bindings.html#GtkBindingSignal" title="struct GtkBindingSignal">keybinding signal</a>
|
||
which gets emitted when the user initiates a cursor movement.
|
||
If the cursor is not visible in <em class="parameter"><code>entry</code></em>
|
||
, this signal causes
|
||
the viewport to be moved instead.</p>
|
||
<p>Applications should not connect to it, but may emit it with
|
||
<code class="function">g_signal_emit_by_name()</code> if they need to control the cursor
|
||
programmatically.</p>
|
||
<p>The default bindings for this signal come in two variants,
|
||
the variant with the Shift modifier extends the selection,
|
||
the variant without the Shift modifer does not.
|
||
There are too many key combinations to list them all here.</p>
|
||
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
||
<li class="listitem"><p>Arrow keys move by individual characters/lines</p></li>
|
||
<li class="listitem"><p>Ctrl-arrow key combinations move by words/paragraphs</p></li>
|
||
<li class="listitem"><p>Home/End keys move to the ends of the buffer</p></li>
|
||
</ul></div>
|
||
<div class="refsect3">
|
||
<a name="GtkLabel-move-cursor.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>entry</p></td>
|
||
<td class="parameter_description"><p>the object which received the signal</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>step</p></td>
|
||
<td class="parameter_description"><p>the granularity of the move, as a <a class="link" href="gtk3-Standard-Enumerations.html#GtkMovementStep" title="enum GtkMovementStep"><span class="type">GtkMovementStep</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>count</p></td>
|
||
<td class="parameter_description"><p>the number of <em class="parameter"><code>step</code></em>
|
||
units to move</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>extend_selection</p></td>
|
||
<td class="parameter_description"><p><code class="literal">TRUE</code> if the move should extend the selection</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Action</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkLabel-populate-popup"></a><h3>The <code class="literal">“populate-popup”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> *label,
|
||
<a class="link" href="GtkMenu.html" title="GtkMenu"><span class="type">GtkMenu</span></a> *menu,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>The ::populate-popup signal gets emitted before showing the
|
||
context menu of the label. Note that only selectable labels
|
||
have context menus.</p>
|
||
<p>If you need to add items to the context menu, connect
|
||
to this signal and append your menuitems to the <em class="parameter"><code>menu</code></em>
|
||
.</p>
|
||
<div class="refsect3">
|
||
<a name="GtkLabel-populate-popup.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>label</p></td>
|
||
<td class="parameter_description"><p>The label on which the signal is emitted</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>menu</p></td>
|
||
<td class="parameter_description"><p>the menu that is being populated</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Run Last</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="footer">
|
||
<hr>Generated by GTK-Doc V1.33.1</div>
|
||
</body>
|
||
</html> |