1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 A widget that displays a small to medium amount of text.
7 <!-- ##### SECTION Long_Description ##### -->
9 The #GtkLabel widget is usually used directly by the programmer to display
\r
10 word(s) describing an adjacent widget or its use. It is also used internally
\r
11 by Gtk+ as #GtkButton labels, #GtkMenu items, and many other widgets which
\r
15 <!-- ##### SECTION See_Also ##### -->
20 <!-- ##### STRUCT GtkLabel ##### -->
22 This should not be accessed directly. Use the accessor functions as
\r
27 <!-- ##### FUNCTION gtk_label_new ##### -->
29 Creates a new label with the given string of text inside it. You can
\r
30 pass NULL to get an empty label widget.
\r
33 @str: The string you want to display in the #GtkLabel
34 @Returns: The newly allocated #GtkLabel widget
37 <!-- ##### FUNCTION gtk_label_set_text ##### -->
39 Sets the text within the #GtkLabel widget. It overwrites any text that
\r
40 was there before. Note that underlines that were there before do not
\r
41 get overwritten. If you want to erase underlines just send NULL to
\r
42 gtk_label_set_pattern().
\r
45 @label: The #GtkLabel you want to set the text for.
46 @str: The text you want to add.
49 <!-- ##### FUNCTION gtk_label_set_attributes ##### -->
58 <!-- ##### FUNCTION gtk_label_set_markup ##### -->
67 <!-- ##### FUNCTION gtk_label_set_markup_with_mnemonic ##### -->
76 <!-- ##### FUNCTION gtk_label_set_pattern ##### -->
78 The pattern of underlines you want under the existing text within the
\r
79 #GtkLabel widget. For example if the current text of the label says
\r
80 "FooBarBaz" passing a pattern of "___ ___" will underline
\r
81 "Foo" and "Baz" but not "Bar".
\r
84 @label: The #GtkLabel you want to set the pattern to.
85 @pattern: The pattern as described above.
88 <!-- ##### FUNCTION gtk_label_set_justify ##### -->
90 Set where the text within the #GtkLabel will align to. This can be one of
\r
91 four values: GTK_JUSTIFY_LEFT, GTK_JUSTIFY_RIGHT, GTK_JUSTIFY_CENTER,
\r
92 and GTK_JUSTIFY_FILL. GTK_JUSTIFY_CENTER is the default value when the
\r
93 widget is first created with gtk_label_new().
\r
96 @label: The #GtkLabel widget you want to set justification for.
97 @jtype: The #GtkJustification type as described above.
100 <!-- ##### FUNCTION gtk_label_get ##### -->
102 Gets the current string of text within the #GtkLabel and writes it to
\r
103 the given str argument. It does not make a copy of this string so you
\r
104 must not write to it.
\r
107 @label: The #GtkLabel widget you want to get the text from.
108 @str: The reference to the pointer you want to point to the text.
111 <!-- ##### FUNCTION gtk_label_parse_uline ##### -->
113 Parses the given string for underscores and converts the next
\r
114 character to an underlined character. The last character that
\r
115 was underlined will have its lower-cased accelerator keyval returned (i.e.
\r
116 "_File" would return the keyval for "f". This is
\r
117 probably only used within the Gtk+ library itself for menu items and such.
\r
120 @label: The #GtkLabel you want to affect.
121 @string: The string you want to parse for underlines.
122 @Returns: The lowercase keyval of the last character underlined.
125 <!-- ##### FUNCTION gtk_label_set_line_wrap ##### -->
127 Toggles line wrapping within the #GtkLabel widget. TRUE makes it break
\r
128 lines if text exceeds the widget's size. FALSE lets the text get cut off
\r
129 by the edge of the widget if it exceeds the widget size.
\r
132 @label: The #GtkLabel you want to set line wrapping for.
133 @wrap: TRUE turns it on; FALSE turns it off.
136 <!-- ##### MACRO gtk_label_set ##### -->
138 Aliases gtk_label_set_text. Probably used for backward compatibility with
\r
144 <!-- ##### FUNCTION gtk_label_get_layout_offsets ##### -->
154 <!-- ##### FUNCTION gtk_label_get_mnemonic_keyval ##### -->
163 <!-- ##### FUNCTION gtk_label_get_selectable ##### -->
172 <!-- ##### FUNCTION gtk_label_get_text ##### -->
181 <!-- ##### FUNCTION gtk_label_new_with_mnemonic ##### -->
190 <!-- ##### FUNCTION gtk_label_select_region ##### -->
200 <!-- ##### FUNCTION gtk_label_set_mnemonic_widget ##### -->
209 <!-- ##### FUNCTION gtk_label_set_selectable ##### -->
218 <!-- ##### FUNCTION gtk_label_set_text_with_mnemonic ##### -->
225 <!-- # Unused Parameters # -->
229 <!-- ##### FUNCTION gtk_label_get_attributes ##### -->
238 <!-- ##### FUNCTION gtk_label_get_justify ##### -->
247 <!-- ##### FUNCTION gtk_label_get_label ##### -->
256 <!-- ##### FUNCTION gtk_label_get_layout ##### -->
265 <!-- ##### FUNCTION gtk_label_get_line_wrap ##### -->
274 <!-- ##### FUNCTION gtk_label_get_mnemonic_widget ##### -->
283 <!-- ##### FUNCTION gtk_label_get_selection_bounds ##### -->
294 <!-- ##### FUNCTION gtk_label_get_use_markup ##### -->
303 <!-- ##### FUNCTION gtk_label_get_use_underline ##### -->
312 <!-- ##### FUNCTION gtk_label_set_label ##### -->
321 <!-- ##### FUNCTION gtk_label_set_use_markup ##### -->
330 <!-- ##### FUNCTION gtk_label_set_use_underline ##### -->
339 <!-- ##### SIGNAL GtkLabel::copy-clipboard ##### -->
344 @label: the object which received the signal.
346 <!-- ##### SIGNAL GtkLabel::move-cursor ##### -->
351 @label: the object which received the signal.
356 <!-- ##### SIGNAL GtkLabel::populate-popup ##### -->
361 @label: the object which received the signal.
364 <!-- ##### ARG GtkLabel:label ##### -->
366 The actual label text. Do not write to this pointer, it is not copied.
\r
369 <!-- ##### ARG GtkLabel:attributes ##### -->
374 <!-- ##### ARG GtkLabel:use-markup ##### -->
379 <!-- ##### ARG GtkLabel:use-underline ##### -->
384 <!-- ##### ARG GtkLabel:justify ##### -->
386 The #GtkJustification setting. See gtk_label_set_justify() for more info.
\r
389 <!-- ##### ARG GtkLabel:pattern ##### -->
391 The pattern of underlines under the existing text. Do not change the
\r
392 pointer, it isn't copied.
\r
395 <!-- ##### ARG GtkLabel:wrap ##### -->
400 <!-- ##### ARG GtkLabel:selectable ##### -->
405 <!-- ##### ARG GtkLabel:mnemonic-keyval ##### -->
410 <!-- ##### ARG GtkLabel:mnemonic-widget ##### -->
415 <!-- ##### ARG GtkLabel:cursor-position ##### -->
420 <!-- ##### ARG GtkLabel:selection-bound ##### -->