GimpUi.ScaleEntry

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

Methods

Inherited:

GimpUi.LabelSpin (6), 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_logarithmic ()

get_range ()

set_bounds (lower, upper, limit_scale)

set_logarithmic (logarithmic)

Virtual Methods

Inherited:

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

Properties

Inherited:

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

Child Properties

Inherited:

Gtk.Grid (4)

Style Properties

Inherited:

Gtk.Widget (17)

Signals

Inherited:

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

Fields

Inherited:

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

Name

Type

Access

Description

parent_instance

GimpUi.LabelSpin

r

Class Details

class GimpUi.ScaleEntry(**kwargs)
Bases:

GimpUi.LabelSpin

Abstract:

No

Structure:

GimpUi.ScaleEntryClass

This widget is a Gtk.Grid showing a Gtk.SpinButton and a Gtk.Scale bound together. It also displays a Gtk.Label which is used as mnemonic on the Gtk.SpinButton.

classmethod new(text, value, lower, upper, digits)
Parameters:
  • text (str) – The text for the Gtk.Label which will appear left of the Gtk.HScale.

  • 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.ScaleEntry.

Return type:

Gtk.Widget

This function creates a Gtk.Label, a Gtk.HScale and a Gtk.SpinButton and attaches them to a 3-column Gtk.Grid.

get_logarithmic()
Returns:

True if self's scale widget will behave in logarithmic fashion, False for linear behavior.

Return type:

bool

New in version 2.2.

get_range()
Returns:

The Gtk.Range contained in self.

Return type:

Gtk.Range

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

By default, it is a Gtk.Scale, but it can be any other type of Gtk.Range if a subclass overrode the new_range_widget() protected method.

set_bounds(lower, upper, limit_scale)
Parameters:

By default the Gtk.SpinButton and Gtk.Scale will have the same range. In some case, you want to set a different range. In particular when the finale range is huge, the Gtk.Scale might become nearly useless as every tiny slider move would dramatically update the value. In this case, it is common to set the Gtk.Scale to a smaller common range, while the Gtk.SpinButton would allow for the full allowed range. This function allows this. Obviously the Gtk.Adjustment of both widgets would be synced but if the set value is out of the Gtk.Scale range, the slider would simply show at one extreme.

If limit_scale is False though, it would sync back both widgets range to the new values.

Note that the step and page increments are updated when the range is updated according to some common usage algorithm which should work if you don’t have very specific needs. If you want to customize the step increments yourself, you may call GimpUi.LabelSpin.set_increments()

set_logarithmic(logarithmic)
Parameters:

logarithmic (bool) – a boolean value to set or reset logarithmic behavior of the scale widget

Sets whether self's scale widget will behave in a linear or logarithmic fashion. Useful when an entry has to attend large ranges, but smaller selections on that range require a finer adjustment.

New in version 2.2.