GtkLabel

A widget that displays a small to medium amount of text.

Object Hierarchy

GObject
`--
GtkObject
       `-- GtkWidget
              `-- GtkMisc
                     `-- GtkLabel

Direct subclasses

Description

The GtkLabel widget displays a small amount of text. As the name implies, most labels are used to label another widget such as a GtkButton, a GtkMenuItem, or a GtkOptionMenu.

You can have control over the way a GtkLabel will be displayed with some methods such as set_justify() or set_width_chars() . If you wish to define an alignment (note that align and justify are not the same thing) or padding for a GtkLabel, you can insert it into a GtkAlignment container.

Constructor

GtkLabel ([string string = NULL [, boolean parse_mnemonic = FALSE]]);
-- Creates a new GtkLabel.

Methods

get()
  DEPRECATED. Gets the string of the label.
get_angle()
  Gets the angle of rotation for the label.
get_attributes()
 
get_ellipsize()
  Returns the ellipsization mode is used to shorten the text.
get_justify()
  Returns the justification of the label.
get_label()
  Fetches the text including any embedded underlines indicating mnemonics and Pango markup.
get_layout()
  Gets the PangoLayout used to display the label.
get_layout_offsets()
  Obtains the coordinates where the label will draw the PangoLayout.
get_line_wrap()
  Returns whether lines in the label are automatically wrapped.
get_max_width_chars()
  Returns the maximum width in characters.
get_mnemonic_keyval()
  Returns the keyval of the mnemonic key if set.
get_mnemonic_widget()
  Retrieves the target of the mnemonic (keyboard shortcut) of this label.
get_selectable()
  Checks it the user can select text in the label.
get_selection_bounds()
  Gets the selected range of characters in the label.
get_single_line_mode()
  Returns if the label displays only one line.
get_text()
  Fetches the text from a label widget, as displayed on the screen.
get_use_markup()
  Returns whether the label's text is interpreted as marked up with the Pango text markup language.
get_use_underline()
  Returns whether an embedded underline in the label indicates a mnemonic.
get_width_chars()
  Retrieves the desired width of the label, in characters.
parse_uline()
  DEPRECATED. Parses the given string for underscores and converts the next character to an underlined character.
select_region()
  Selects a range of characters in the label, if the label is selectable.
set()
  DEPRECATED. Alias for set_text() .
set_angle()
  Sets the angle of rotation for the label.
set_attributes()
 
set_ellipsize()
  Sets the ellipsization mode used to make the text fit the width.
set_justify()
  Sets the alignment of the lines in the text of the label relative to each other.
set_label()
  Sets the text of the label incl. Pango markup.
set_line_wrap()
  Toggles line wrapping within the GtkLabel widget.
set_markup()
  Set the label text with a pango marked up string.
set_markup_with_mnemonic()
  Set the label text and mnemonic with a pango marked up string.
set_max_width_chars()
  Sets the desired maximum width in characters.
set_mnemonic_widget()
  Returns the widget associated with the mnemonic key.
set_pattern()
  The pattern of underlines you want under the existing text within the GtkLabel widget.
set_selectable()
  Selectable labels allow the user to select text from the label, for copy-and-paste.
set_single_line_mode()
  Sets whether the label is in single line mode.
set_text()
  Sets the text within the label.
set_text_with_mnemonic()
  Sets the label's text and parses underscores to a mnemonic.
set_use_markup()
  Sets whether the text of the label contains markup in Pango's text markup language.
set_use_underline()
  If an underline shall be used for the mnemonic accelerator key.
set_width_chars()
  Sets the desired width of the label, in characters.

Signals

"copy-clipboard"
 
"move-cursor"
 
"populate-popup"