GimpUi.Labeled

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned GimpUi.Labeled GimpUi.Labeled Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Grid Gtk.Grid Gtk.Container->Gtk.Grid Gtk.Grid->GimpUi.Labeled Gtk.Orientable->Gtk.Grid Gtk.Widget->Gtk.Container

Subclasses:

GimpUi.LabelColor, GimpUi.LabelEntry, GimpUi.LabelIntWidget, GimpUi.LabelSpin, GimpUi.LabelStringWidget

Methods

Inherited:

Gtk.Grid (21), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

get_label ()

get_text ()

set_text (text)

Virtual Methods

Inherited:

Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

do_mnemonic_widget_changed (widget)

Properties

Inherited:

Gtk.Grid (5), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)

Name

Type

Flags

Short Description

label

str

r/w

The text of the label part of this widget

Child Properties

Inherited:

Gtk.Grid (4)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Short Description

mnemonic-widget-changed

Fields

Inherited:

Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.Grid

r

Class Details

class GimpUi.Labeled(**kwargs)
Bases:

Gtk.Grid

Abstract:

No

Structure:

GimpUi.LabeledClass

This widget is a Gtk.Grid showing a Gtk.Label used as mnemonic on another widget.

get_label()
Returns:

The Gtk.Label contained in self.

Return type:

Gtk.Label

This function returns the Gtk.Label packed in self. This can be useful if you need to customize some aspects of the widget.

get_text()
Returns:

the label text as entered, which includes pango markup and mnemonics similarly to Gtk.Label.get_label().

Return type:

str

This function will return exactly what you entered with GimpUi.Labeled.set_text() or through the “label” property because this class expects labels to have mnemonics (and allows Pango formatting). To obtain instead the text as displayed with mnemonics and markup removed, call:

gtk_label_get_text (GTK_LABEL (gimp_labeled_get_label (@labeled)));

set_text(text)
Parameters:

text (str) – label text with Pango markup and mnemonic.

This is the equivalent of running Gtk.Label.set_markup_with_mnemonic() on the Gtk.Label as a GimpUi.Labeled expects a mnemonic. Pango markup are also allowed.

do_mnemonic_widget_changed(widget) virtual
Parameters:

widget (Gtk.Widget) –

Signal Details

GimpUi.Labeled.signals.mnemonic_widget_changed(labeled, object)
Signal Name:

mnemonic-widget-changed

Flags:

RUN_FIRST

Parameters:

Property Details

GimpUi.Labeled.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Label text with pango markup and mnemonic.

New in version 3.0.