GimpUi.SpinButton

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.CellEditable Gtk.CellEditable GObject.GInterface->Gtk.CellEditable Gtk.Editable Gtk.Editable GObject.GInterface->Gtk.Editable 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.SpinButton GimpUi.SpinButton Gtk.Buildable->Gtk.Widget Gtk.Entry Gtk.Entry Gtk.CellEditable->Gtk.Entry Gtk.Editable->Gtk.Entry Gtk.SpinButton Gtk.SpinButton Gtk.Entry->Gtk.SpinButton Gtk.Orientable->Gtk.SpinButton Gtk.SpinButton->GimpUi.SpinButton Gtk.Widget->Gtk.Entry

Subclasses:

GimpUi.SpinScale

Methods

Inherited:

Gtk.SpinButton (24), Gtk.Entry (76), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.CellEditable (3), Gtk.Editable (13), Gtk.Orientable (2)

Structs:

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

class

new (adjustment, climb_rate, digits)

class

new_with_range (min, max, step)

Virtual Methods

Inherited:

Gtk.SpinButton (5), Gtk.Entry (14), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.CellEditable (3), Gtk.Editable (10)

Properties

Inherited:

Gtk.SpinButton (8), Gtk.Entry (51), Gtk.Widget (39), Gtk.CellEditable (1), Gtk.Orientable (1)

Style Properties

Inherited:

Gtk.SpinButton (1), Gtk.Entry (4), Gtk.Widget (17)

Signals

Inherited:

Gtk.SpinButton (5), Gtk.Entry (15), Gtk.Widget (69), GObject.Object (1), Gtk.CellEditable (2), Gtk.Editable (3)

Fields

Inherited:

Gtk.SpinButton (5), Gtk.Entry (15), Gtk.Widget (69), GObject.Object (1), Gtk.CellEditable (2), Gtk.Editable (3)

Name

Type

Access

Description

parent_instance

Gtk.SpinButton

r

Class Details

class GimpUi.SpinButton(**kwargs)
Bases:

Gtk.SpinButton

Abstract:

No

Structure:

GimpUi.SpinButtonClass

GimpUi.SpinButton is a drop-in replacement for Gtk.SpinButton, with the following changes:

  • When the spin-button loses focus, its adjustment value is only updated if the entry text has been changed.

  • When the spin-button’s “wrap” property is True, values input through the entry are wrapped around.

  • Modifiers can be used during scrolling for smaller/bigger increments.

classmethod new(adjustment, climb_rate, digits)
Parameters:
  • adjustment (Gtk.Adjustment or None) – the Gtk.Adjustment object that this spin button should use, or None

  • climb_rate (float) – specifies by how much the rate of change in the value will accelerate if you continue to hold down an up/down button or arrow key

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

Returns:

The new spin button as a Gtk.Widget

Return type:

Gtk.Widget

Creates a new GimpUi.SpinButton.

New in version 2.10.10.

classmethod new_with_range(min, max, step)
Parameters:
  • min (float) – Minimum allowable value

  • max (float) – Maximum allowable value

  • step (float) – Increment added or subtracted by spinning the widget

Returns:

The new spin button as a Gtk.Widget

Return type:

Gtk.Widget

This is a convenience constructor that allows creation of a numeric GimpUi.SpinButton without manually creating an adjustment. The value is initially set to the minimum value and a page increment of 10 * step is the default. The precision of the spin button is equivalent to the precision of step.

Note that the way in which the precision is derived works best if step is a power of ten. If the resulting precision is not suitable for your needs, use Gtk.SpinButton.set_digits() to correct it.

New in version 2.10.10.