It derives from <GtkWidget>.
Displays a small amount of text.
Most labels are used to label another widget (such as an Entry).
<GtkLabel> supports the following keyboard
shortcuts, when the cursor is visible:
Additionally, the following signals have default keybindings:
<GtkLabel> defines a set of built-in actions:
clipboard.copy copies the text to the clipboard.
clipboard.cut doesn’t do anything, since text in labels can’t be
deleted.
clipboard.paste doesn’t do anything, since text in labels can’t
be edited.
link.open opens the link, when activated on a link inside the
label.
link.copy copies the link to the clipboard, when activated on a
link inside the label.
menu.popup opens the context menu.
selection.delete doesn’t do anything, since text in labels can’t
be deleted.
selection.select-all selects all of the text, if the label allows
selection.
label ├── [selection] ├── [link] ┊ ╰── [link]
<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
GtkShortcutsWindow, labels are used with the .keycap style class.
If the label has a selection, it gets a subnode with name selection.
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. In this case, label node also gets a .link style class.
The GtkLabel implementation of the GtkBuildable interface supports a
custom <attributes> element, which supports any number of
<attribute> elements. The <attribute> element has
attributes named “name“, “value“, “start“ and “end“ and allows you to
specify <PangoAttribute> values for this
label.
An example of a UI definition fragment specifying Pango attributes:
<object class="GtkLabel">
<attributes>
<attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
<attribute name="background" value="red" start="5" end="10"/>
</attributes>
</object>
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.
<GtkLabel> uses the Gtk.AccessibleRole.label
role.
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 "_File", to the functions label:new-with-mnemonic or label:set-text-with-mnemonic.
Mnemonics automatically activate any activatable widget the label is
inside, such as a <GtkButton>; if the label is not
inside the mnemonic’s target widget, you have to tell the label about
the target using label:set-mnemonic-widget.
Here’s a simple example where the label is inside a button:
// Pressing Alt+H will activate this button
GtkWidget *button = gtk_button_new ();
GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello");
gtk_button_set_child (GTK_BUTTON (button), label);
There’s a convenience function to create buttons with a mnemonic label already inside:
// Pressing Alt+H will activate this button
GtkWidget *button = gtk_button_new_with_mnemonic ("_Hello");
To create a mnemonic for a widget alongside the label, such as a
<GtkEntry>, you have to point the label at the entry
with label:set-mnemonic-widget:
// Pressing Alt+H will focus the entry
GtkWidget *entry = gtk_entry_new ();
GtkWidget *label = gtk_label_new_with_mnemonic ("_Hello");
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
To make it easy to format text in a label (changing colors, fonts, etc.), label text can be provided in a simple markup format:
Here’s how to create a label with a small font:
GtkWidget *label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), "<small>Small text</small>");
(See the Pango manual for complete documentation] of available tags,
parse-markup)
The markup passed to label:set-markup
must be valid XML; for example, literal <, > and &
characters must be escaped as <, >, and
&. If you pass text obtained from the user, file, or a
network to label:set-markup, you’ll want
to escape it with
markup-escape-text or
GLib.markup_printf_escaped.
Markup strings are just a convenient way to set the
<PangoAttrList> on a label;
label:set-attributes may be a simpler
way to set attributes in some cases. Be careful though;
<PangoAttrList> tends to cause
internationalization problems, unless you’re applying attributes to the
entire string (i.e. unless you set the range of each attribute to [0,
G_MAXINT)). The reason is that specifying the start_index
and end_index for a
<PangoAttribute> requires knowledge of the
exact string being displayed, so translations will cause problems.
Labels can be made selectable with label:set-selectable. 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.
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.
Labels can automatically wrap text if you call label:set-wrap.
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 widget:halign and widget:valign properties.
The label:width-chars and
label:max-width-chars
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.
GTK supports markup for clickable hyperlinks in addition to regular
Pango markup. The markup for links is borrowed from HTML, using the
<a> tag with “href“, “title“ and “class“ 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. The “class“ attribute is used as style class on the CSS node for
the link.
An example of inline links looks like this:
const char *text = "Go to the " "<a href=\"https://www.gtk.org\" title=\"<i>Our</i> website\">" "GTK website</a> for more..."; GtkWidget *label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (label), text);
It is possible to implement custom handling for links and their tooltips
with the label:activate-link
signal and the label:get-current-uri
function.
A list of style attributes to apply to the text of the label.
Its value is a <PangoAttrList>, or
#f.
Set it with (set! (label:attributes self) value).
The preferred place to ellipsize the string, if the label does not have enough room to display the entire string.
Note that setting this property to a value other than
[enum.Pango.EllipsizeMode.none] 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 notebook-page:tab-expand child property is set to true.
Other ways to set a label’s width are widget:set-size-request and label:set-width-chars.
Its value is a <PangoEllipsizeMode>
(or, to set it, one of its symbols).
Set it with (set! (label:ellipsize self) value).
A menu model whose contents will be appended to the context menu.
Its value is a <GMenuModel>, or #f.
Set it with (set! (label:extra-menu self) value).
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 label:xalign for
that.
Its value is a <GtkJustification> (or, to
set it, one of its symbols).
Set it with (set! (label:justify self) value).
The contents of the label.
If the string contains Pango markup (see
parse-markup), you will have to set the
label:use-markup property to
true in order for the label to display the markup attributes. See also
label:set-markup for a convenience
function that sets both this property and the label:use-markup property at the same time.
If the string contains underlines acting as mnemonics, you will have to
set the label:use-underline
property to true in order for the label to display them.
Its value is a string, or #f.
Set it with (set! (label:label self) value).
The number of lines to which an ellipsized, wrapping label should display before it gets ellipsized. This both prevents the label from ellipsizing before this many lines are displayed, and limits the height request of the label to this many lines.
::: warning Setting this property has unintuitive and unfortunate consequences for the minimum _width_ of the label. Specifically, if the height of the label is such that it fits a smaller number of lines than the value of this property, the label can not be ellipsized at all, which means it must be wide enough to fit all the text fully.
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.
Its value is a 32-bit integer.
Set it with (set! (label:lines self) value).
The desired maximum width of the label, in characters.
If this property is set to -1, the width will be calculated automatically.
See the section on text layout for details of how label:width-chars and label:max-width-chars determine the width of
ellipsized and wrapped labels.
Its value is a 32-bit integer.
Set it with (set! (label:max-width-chars self) value).
The mnemonic accelerator key for the label.
Its value is an unsigned 32-bit integer.
It is read only.
The widget to be activated when the labels mnemonic key is pressed.
Its value is a <GtkWidget>, or #f.
Set it with (set! (label:mnemonic-widget self) value).
Select the line wrapping for the natural size request.
This only affects the natural size requested. For the actual wrapping
used, see the label:wrap-mode
property.
The default is Gtk.NaturalWrapMode.inherit, which inherits the
behavior of the label:wrap-mode
property.
Its value is a <GtkNaturalWrapMode> (or,
to set it, one of its symbols).
Set it with (set! (label:natural-wrap-mode self) value).
Whether the label text can be selected with the mouse.
Its value is a boolean.
Set it with (set! (label:selectable self) value).
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.
Its value is a boolean.
Set it with (set! (label:single-line-mode self) value).
Custom tabs for this label.
Its value is a <PangoTabArray>, or
#f.
Set it with (set! (label:tabs self) value).
True if the text of the label includes Pango markup.
See parse-markup.
Its value is a boolean.
Set it with (set! (label:use-markup self) value).
True if the text of the label indicates a mnemonic with an _
before the mnemonic character.
Its value is a boolean.
Set it with (set! (label:use-underline self) value).
The desired width of the label, in characters.
If this property is set to -1, the width will be calculated automatically.
See the section on text layout for details of how label:width-chars and label:max-width-chars determine the width of
ellipsized and wrapped labels.
Its value is a 32-bit integer.
Set it with (set! (label:width-chars self) value).
True if the label text will wrap if it gets too wide.
Its value is a boolean.
Set it with (set! (label:wrap self) value).
Controls how the line wrapping is done.
This only affects the formatting if line wrapping is on (see the
label:wrap property). The default is
Pango.WrapMode.word, which means wrap on word boundaries.
For sizing behavior, also consider the label:natural-wrap-mode property.
Its value is a <PangoWrapMode> (or, to set
it, one of its symbols).
Set it with (set! (label:wrap-mode self) value).
The horizontal alignment of the label text inside its size allocation.
Compare this to widget:halign,
which determines how the labels size allocation is positioned in the
space available for the label.
Its value is a real number.
Set it with (set! (label:xalign self) value).
The vertical alignment of the label text inside its size allocation.
Compare this to widget:valign,
which determines how the labels size allocation is positioned in the
space available for the label.
Its value is a real number.
Set it with (set! (label:yalign self) value).
Gets the label’s attribute list.
This is the <PangoAttrList> that was set on
the label using label:set-attributes,
if any. This function does not reflect attributes that come from the
label’s markup (see label:set-markup). If
you want to get the effective attributes for the label, use
pango_layout_get_attributes (gtk_label_get_layout (self)).
Passed: a <GtkLabel>.
a label
Returned: a <PangoAttrList>, or #f.
the attribute list
Returns the URI for the 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.
This function is intended for use in a label:activate-link handler or for use in a
widget:query-tooltip handler.
Passed: a <GtkLabel>.
a label
Returned: a string, or #f.
the active URI
Returns the ellipsization mode of the label.
See label:set-ellipsize.
Passed: a <GtkLabel>.
a label
Returned: a <PangoEllipsizeMode>.
the ellipsization mode
Gets the extra menu model of the label.
See label:set-extra-menu.
Passed: a <GtkLabel>.
a label
Returned: a <GMenuModel>, or #f.
the menu model
Returns the justification of the label.
See label:set-justify.
Passed: a <GtkLabel>.
a label
Returned: a <GtkJustification>.
the justification value
Fetches the text from a label.
The returned text includes any embedded underlines indicating mnemonics
and Pango markup. (See label:get-text).
Passed: a <GtkLabel>.
a label
Returned: a string.
the text of the label widget
Gets the Pango layout used to display the label.
The layout is useful to e.g. convert text positions to pixel positions,
in combination with label:get-layout-offsets. The returned layout is
owned by the label so need not be freed by the caller. The
label is free to recreate its layout at any time, so it should be
considered read-only.
Passed: a <GtkLabel>.
a label
Returned: a <PangoLayout>.
the <PangoLayout> for this label
Obtains the coordinates where the label will draw its Pango layout.
The coordinates are useful to convert mouse events into coordinates
inside the <PangoLayout>, e.g. to take some
action if some part of the label is clicked. Remember when using the
<PangoLayout> functions you need to convert
to and from pixels using PANGO_PIXELS() or Pango.SCALE.
Passed: a <GtkLabel>.
a label
Returned: a 32-bit integer.
location to store X offset of layout
Returned: a 32-bit integer.
location to store Y offset of layout
Gets the number of lines to which an ellipsized, wrapping label should be limited.
See label:set-lines.
Passed: a <GtkLabel>.
a label
Returned: a 32-bit integer.
the number of lines
Retrieves the maximum width of the label in characters.
Passed: a <GtkLabel>.
a label
Returned: a 32-bit integer.
the maximum width of the label, in characters
Return the mnemonic accelerator.
If the label has been set so that it has a mnemonic key this function
returns the keyval used for the mnemonic accelerator. If there is no
mnemonic set up it returns GDK_KEY_VoidSymbol.
Passed: a <GtkLabel>.
a label
Returned: an unsigned 32-bit integer.
GDK keyval usable for accelerators, or GDK_KEY_VoidSymbol
Retrieves the mnemonic target of this label.
See label:set-mnemonic-widget.
Passed: a <GtkLabel>.
a label
Returned: a <GtkWidget>, or #f.
the target of the label’s mnemonic, or NULL if none has been set
and the default algorithm will be used.
Returns natural line wrap mode used by the label.
See label:set-natural-wrap-mode.
Passed: a <GtkLabel>.
a label
Returned: a <GtkNaturalWrapMode>.
the natural line wrap mode
Returns whether the label is selectable.
Passed: a <GtkLabel>.
a label
Returned: a boolean.
true if the user can copy text from the label
Gets the selected range of characters in the label.
The returned start and end positions are in characters.
Passed: a <GtkLabel>.
a label
Returned: a boolean.
true if selection is non-empty
Returned: a 32-bit integer.
return location for start of selection
Returned: a 32-bit integer.
return location for end of selection
Returns whether the label is in single line mode.
Passed: a <GtkLabel>.
a label
Returned: a boolean.
true if the label is in single line mode
Gets the tab stops for the label.
The returned array will be NULL if “standard” (8-space) tabs are
used.
Passed: a <GtkLabel>.
a label
Returned: a <PangoTabArray>, or #f.
copy of default tab array, or NULL if standard tabs are used
Gets the text of the label.
The returned text is as it appears on screen. This does not include any
embedded underlines indicating mnemonics or Pango markup. (See
label:get-label)
Passed: a <GtkLabel>.
a label
Returned: a string.
the text in the label widget
Returns whether the label’s text is interpreted as Pango markup.
See label:set-use-markup.
Passed: a <GtkLabel>.
a label
Returned: a boolean.
true if the label’s text will be parsed for markup
Returns whether underlines in the label indicate mnemonics.
Passed: a <GtkLabel>.
a label
Returned: a boolean.
true if underlines in the label indicate mnemonics
Retrieves the desired width of the label in characters.
Passed: a <GtkLabel>.
a label
Returned: a 32-bit integer.
the desired width of the label, in characters
Returns line wrap mode used by the label.
See label:set-wrap-mode.
Passed: a <GtkLabel>.
a label
Returned: a <PangoWrapMode>.
the line wrap mode
Returns whether lines in the label are automatically wrapped.
See label:set-wrap.
Passed: a <GtkLabel>.
a label
Returned: a boolean.
true if the lines of the label are automatically wrapped
Gets the xalign of the label.
See the label:xalign property.
Passed: a <GtkLabel>.
a label
Returned: a real number.
the xalign value
Gets the yalign of the label.
See the label:yalign property.
Passed: a <GtkLabel>.
a label
Returned: a real number.
the yalign value
Creates a new label with the given text inside it.
You can pass NULL to get an empty label widget.
Passed, or left out: a string, or #f.
the text of the label
Returned: a <GtkWidget>.
the new label
Creates a new label with the given text inside it, and a mnemonic.
If characters in str 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
label:set-mnemonic-widget.
If label:set-mnemonic-widget is
not called, then the first activatable ancestor of the label 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.
Passed, or left out: a string, or #f.
the text of the label, with an underscore in front of the mnemonic character
Returned: a <GtkWidget>.
the new label
Selects a range of characters in the label, if the label is selectable.
See label:set-selectable. If the
label is not selectable, this function has no effect. If
start-offset or end-offset are -1, then the end of the label
will be substituted.
Passed: a <GtkLabel>.
a label
Passed: a 32-bit integer.
start offset, in characters
Passed: a 32-bit integer.
end offset, in characters
Apply attributes to the label text.
The attributes set with this function will be applied and merged with
any other attributes previously effected by way of the label:use-underline or label:use-markup 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.
Passed: a <GtkLabel>.
a label
Passed, or left out: a <PangoAttrList>, or
#f.
a list of style attributes
Sets the mode used to ellipsize the text.
The text will be ellipsized if there is not enough space to render the entire string.
Passed: a <GtkLabel>.
a label
Passed: a <PangoEllipsizeMode>, or one
of its symbols.
the ellipsization mode
Sets a menu model to add to the context menu of the label.
Passed: a <GtkLabel>.
a label
Passed, or left out: a <GMenuModel>, or
#f.
a menu model
Sets the alignment of lines in the label relative to each other.
This function has no effect on labels containing only a single line.
Gtk.Justification.left is the default value when the widget is
first created with label:new.
If you instead want to set the alignment of the label as a whole, use
widget:set-halign instead.
Passed: a <GtkLabel>.
a label
Passed: a <GtkJustification>, or one of its
symbols.
the new justification
Sets the text of the label.
The label is interpreted as including embedded underlines and/or Pango
markup depending on the values of the label:use-underline and label:use-markup properties.
Passed: a <GtkLabel>.
a label
Passed: a string.
the new text to set for the label
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.
Passed: a <GtkLabel>.
a label
Passed: a 32-bit integer.
the desired number of lines, or -1
Sets the labels text and attributes from markup.
The string must be marked up with Pango markup (see
parse-markup).
If str is external data, you may need to escape it with
markup-escape-text or
GLib.markup_printf_escaped:
GtkWidget *self = gtk_label_new (NULL); const char *str = "..."; const char *format = "<span style=\"italic\">\%s</span>"; char *markup; markup = g_markup_printf_escaped (format, str); gtk_label_set_markup (GTK_LABEL (self), markup); g_free (markup);
This function sets the label:use-markup property to true.
Also see label:set-text.
Passed: a <GtkLabel>.
a label
Passed: a string.
the markup string
Sets the labels text, attributes and mnemonic from markup.
Parses str which is marked up with Pango markup (see
parse-markup), setting the label’s text
and attribute list based on the parse results. If characters in
str 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 label:set-mnemonic-widget.
Passed: a <GtkLabel>.
a label
Passed: a string.
the markup string
Sets the maximum width of the label in characters.
Passed: a <GtkLabel>.
a label
Passed: a 32-bit integer.
the new maximum width, in characters.
Associate the label with its mnemonic target.
If the label has been set so that it has a mnemonic key (using i.e.
label:set-markup-with-mnemonic,
label:set-text-with-mnemonic,
label:new-with-mnemonic or the
Gtk.Label: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 <GtkButton> or a
<GtkNotebook> tab) it is automatically associated
with the correct widget, but sometimes (i.e. when the target is a
<GtkEntry> next to the label) you need to set it
explicitly using this function.
The target widget will be accelerated by emitting the widget: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.
Passed: a <GtkLabel>.
a label
Passed, or left out: a <GtkWidget>, or #f.
the target widget
Selects the line wrapping for the natural size request.
This only affects the natural size requested, for the actual wrapping
used, see the label:wrap-mode
property.
Passed: a <GtkLabel>.
a label
Passed: a <GtkNaturalWrapMode>, or one of
its symbols.
the line wrapping mode
Makes text in the label selectable.
Selectable labels allow the user to select text from the label, for copy-and-paste.
Passed: a <GtkLabel>.
a label
Passed: a boolean.
true to allow selecting text in the label
Sets whether the label is in single line mode.
Passed: a <GtkLabel>.
a label
Passed: a boolean.
true to enable single line mode
Sets tab stops for the label.
Passed: a <GtkLabel>.
a label
Passed, or left out: a <PangoTabArray>, or
#f.
tab stops
Sets the text for the label.
It overwrites any text that was there before and clears any previously
set mnemonic accelerators, and sets the label:use-underline and label:use-markup properties to false.
Also see label:set-markup.
Passed: a <GtkLabel>.
a label
Passed: a string.
the text to show in self
Sets the text for the label, with mnemonics.
If characters in str 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 label:set-mnemonic-widget.
Passed: a <GtkLabel>.
a label
Passed: a string.
the text
Sets whether the text of the label contains markup.
See label:set-markup.
Passed: a <GtkLabel>.
a label
Passed: a boolean.
true if the label’s text should be parsed for markup.
Sets whether underlines in the text indicate mnemonics.
Passed: a <GtkLabel>.
a label
Passed: a boolean.
true if underlines in the text indicate mnemonics
Sets the desired width in characters of the label.
Passed: a <GtkLabel>.
a label
Passed: a 32-bit integer.
the new desired width, in characters.
Toggles line wrapping within the label.
True makes it break lines if text exceeds the widget’s size. false lets the text get cut off by the edge of the widget if it exceeds the widget size.
Note that setting line wrapping to true does not make the label wrap at
its parent widget’s width, because GTK widgets conceptually can’t make
their requisition depend on the parent widget’s size. For a label that
wraps at a specific position, set the label’s width using
widget:set-size-request.
Passed: a <GtkLabel>.
a label
Passed: a boolean.
whether to wrap lines
Controls how line wrapping is done.
This only affects the label if line wrapping is on. (See
label:set-wrap)
The default is Pango.WrapMode.word, which means wrap on word
boundaries.
For sizing behavior, also consider the label:natural-wrap-mode property.
Passed: a <GtkLabel>.
a label
Passed: a <PangoWrapMode>, or one of its
symbols.
the line wrapping mode
Sets the xalign of the label.
See the label:xalign property.
Passed: a <GtkLabel>.
a label
Passed: a real number.
the new xalign value, between 0 and 1
Sets the yalign of the label.
See the label:yalign property.
Passed: a <GtkLabel>.
a label
Passed: a real number.
the new yalign value, between 0 and 1
Connect a handler with (connect object label:activate-current-link
handler). It is called as (handler self).
Gets emitted when the user activates a link in the label.
The ::activate-current-link is a keybinding signal.
Applications may also emit the signal with
g_signal_emit_by_name() if they need to control activation of
URIs programmatically.
The default bindings for this signal are all forms of the Enter key.
Passed: a <GtkLabel>.
Connect a handler with (connect object label:activate-link
handler). It is called as (handler self uri) ⇒ %return.
Gets emitted to activate a URI.
Applications may connect to it to override the default behaviour, which
is to call file-launcher:launch.
Passed: a <GtkLabel>.
Passed: a string.
the URI that is activated
Returned: a boolean.
true if the link has been activated
Connect a handler with (connect object label:copy-clipboard
handler). It is called as (handler self).
Gets emitted to copy the selection to the clipboard.
The ::copy-clipboard signal is a keybinding signal.
The default binding for this signal is Ctrl+c.
Passed: a <GtkLabel>.
Connect a handler with (connect object label:move-cursor
handler). It is called as (handler self step count
extend-selection).
Gets emitted when the user initiates a cursor movement.
The ::move-cursor signal is a keybinding signal. If the cursor
is not visible in entry, this signal causes the viewport to be
moved instead.
Applications should not connect to it, but may emit it with
GObject.signal_emit_by_name if they need to control the cursor
programmatically.
The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifier does not. There are too many key combinations to list them all here.
Passed: a <GtkLabel>.
Passed: a <GtkMovementStep>.
the granularity of the move, as a
<GtkMovementStep>
Passed: a 32-bit integer.
the number of step units to move
Passed: a boolean.
true if the move should extend the selection