GimpUi.LabelSpin

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.LabelSpin GimpUi.LabelSpin GimpUi.Labeled GimpUi.Labeled GimpUi.Labeled->GimpUi.LabelSpin 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.ScaleEntry

Methods

Inherited:

GimpUi.Labeled (3), 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)

class

new (text, value, lower, upper, digits)

get_spin_button ()

get_value ()

set_digits (digits)

set_increments (step, page)

set_value (value)

Virtual Methods

Inherited:

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

do_value_changed ()

Properties

Inherited:

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

Name

Type

Flags

Short Description

digits

int

r/w

The number of decimal places to display

lower

float

r/w/c

Minimum value

upper

float

r/w/c

Max value

value

float

r/w

Current value

Child Properties

Inherited:

Gtk.Grid (4)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

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

Name

Short Description

value-changed

Fields

Inherited:

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

Name

Type

Access

Description

parent_instance

GimpUi.Labeled

r

Class Details

class GimpUi.LabelSpin(**kwargs)
Bases:

GimpUi.Labeled

Abstract:

No

Structure:

GimpUi.LabelSpinClass

This widget is a subclass of GimpUi.Labeled with a GimpUi.SpinButton.

classmethod new(text, value, lower, upper, digits)
Parameters:
  • text (str) – The text for the Gtk.Label.

  • value (float) – The initial value.

  • lower (float) – The lower boundary.

  • upper (float) – The upper boundary.

  • digits (int) – The number of decimal digits.

Returns:

The new GimpUi.LabelSpin widget.

Return type:

Gtk.Widget

Suitable increment values are estimated based on the [lower, upper] range. If digits is -1, then it will also be estimated based on the same range. Digits estimation will always be at least 1, so if you want to show integer values only, set 0 explicitly.

get_spin_button()
Returns:

The GimpUi.SpinButton contained in self.

Return type:

Gtk.Widget

This function returns the GimpUi.SpinButton packed in self.

get_value()
Returns:

The value currently set.

Return type:

float

This function returns the value shown by self.

set_digits(digits)
Parameters:

digits (int) – the number of decimal places to display.

Set the number of decimal place to display in the self's entry. If digits is -1, then it will also be estimated based on self's range. Digits estimation will always be at least 1, so if you want to show integer values only, set 0 explicitly.

set_increments(step, page)
Parameters:
  • step (float) – the step increment.

  • page (float) – the page increment.

Set the step and page increments of the spin button. By default, these increment values are automatically computed depending on the range based on common usage. So you will likely not need to run this for most case. Yet if you want specific increments (which the widget cannot guess), you can call this function.

set_value(value)
Parameters:

value (float) – A new value.

This function sets the value shown by self.

do_value_changed() virtual

Signal Details

GimpUi.LabelSpin.signals.value_changed(label_spin)
Signal Name:

value-changed

Flags:

RUN_FIRST

Parameters:

label_spin (GimpUi.LabelSpin) – The object which received the signal

Property Details

GimpUi.LabelSpin.props.digits
Name:

digits

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE

The number of decimal places to display. If -1, then the number is estimated.

New in version 3.0.

GimpUi.LabelSpin.props.lower
Name:

lower

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE, CONSTRUCT

The lower bound of the spin button.

New in version 3.0.

GimpUi.LabelSpin.props.upper
Name:

upper

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE, CONSTRUCT

The upper bound of the spin button.

New in version 3.0.

GimpUi.LabelSpin.props.value
Name:

value

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE

The currently set value.

New in version 3.0.