Class

GtkAdjustment

Description [src]

class Gtk.Adjustment : GObject.InitiallyUnowned {
  parent_instance: GInitiallyUnowned,
  priv: GtkAdjustmentPrivate*
}

The GtkAdjustment object represents a value which has an associated lower and upper bound, together with step and page increments, and a page size. It is used within several GTK+ widgets, including GtkSpinButton, GtkViewport, and GtkRange (which is a base class for GtkScrollbar and GtkScale).

The GtkAdjustment object does not update the value itself. Instead it is left up to the owner of the GtkAdjustment to control the value.

Hierarchy

hierarchy this GtkAdjustment ancestor_0 GInitiallyUnowned ancestor_0--this ancestor_1 GObject ancestor_1--ancestor_0

Constructors

gtk_adjustment_new

Creates a new GtkAdjustment.

Instance methods

gtk_adjustment_changed

Emits a GtkAdjustment::changed signal from the GtkAdjustment. This is typically called by the owner of the GtkAdjustment after it has changed any of the GtkAdjustment properties other than the value.

Deprecated since: 3.18

gtk_adjustment_clamp_page

Updates the GtkAdjustment:value property to ensure that the range between lower and upper is in the current page (i.e. between GtkAdjustment:value and GtkAdjustment:value + GtkAdjustment:page-size). If the range is larger than the page size, then only the start of it will be in the current page.

gtk_adjustment_configure

Sets all properties of the adjustment at once.

Available since: 2.14

gtk_adjustment_get_lower

Retrieves the minimum value of the adjustment.

Available since: 2.14

gtk_adjustment_get_minimum_increment

Gets the smaller of step increment and page increment.

Available since: 3.2

gtk_adjustment_get_page_increment

Retrieves the page increment of the adjustment.

Available since: 2.14

gtk_adjustment_get_page_size

Retrieves the page size of the adjustment.

Available since: 2.14

gtk_adjustment_get_step_increment

Retrieves the step increment of the adjustment.

Available since: 2.14

gtk_adjustment_get_upper

Retrieves the maximum value of the adjustment.

Available since: 2.14

gtk_adjustment_get_value

Gets the current value of the adjustment. See gtk_adjustment_set_value().

gtk_adjustment_set_lower

Sets the minimum value of the adjustment.

Available since: 2.14

gtk_adjustment_set_page_increment

Sets the page increment of the adjustment.

Available since: 2.14

gtk_adjustment_set_page_size

Sets the page size of the adjustment.

Available since: 2.14

gtk_adjustment_set_step_increment

Sets the step increment of the adjustment.

Available since: 2.14

gtk_adjustment_set_upper

Sets the maximum value of the adjustment.

Available since: 2.14

gtk_adjustment_set_value

Sets the GtkAdjustment value. The value is clamped to lie between GtkAdjustment:lower and GtkAdjustment:upper.

gtk_adjustment_value_changed

Emits a GtkAdjustment::value-changed signal from the GtkAdjustment. This is typically called by the owner of the GtkAdjustment after it has changed the GtkAdjustment:value property.

Deprecated since: 3.18

Methods inherited from GObject (42)

Properties

Gtk.Adjustment:lower

The minimum value of the adjustment.

Available since: 2.4

Gtk.Adjustment:page-increment

The page increment of the adjustment.

Available since: 2.4

Gtk.Adjustment:page-size

The page size of the adjustment. Note that the page-size is irrelevant and should be set to zero if the adjustment is used for a simple scalar value, e.g. in a GtkSpinButton.

Available since: 2.4

Gtk.Adjustment:step-increment

The step increment of the adjustment.

Available since: 2.4

Gtk.Adjustment:upper

The maximum value of the adjustment. Note that values will be restricted by upper - page-size if the page-size property is nonzero.

Available since: 2.4

Gtk.Adjustment:value

The value of the adjustment.

Available since: 2.4

Signals

Gtk.Adjustment::changed

Emitted when one or more of the GtkAdjustment properties have been changed, other than the GtkAdjustment:value property.

Gtk.Adjustment::value-changed

Emitted when the GtkAdjustment:value property has been changed.

Signals inherited from GObject (1)

Class structure

struct GtkAdjustmentClass {
  GInitiallyUnownedClass parent_class;
  void (* changed) (
    GtkAdjustment* adjustment
  );
  void (* value_changed) (
    GtkAdjustment* adjustment
  );
  void (* _gtk_reserved1) (
void
  );
  void (* _gtk_reserved2) (
void
  );
  void (* _gtk_reserved3) (
void
  );
  void (* _gtk_reserved4) (
void
  );
  
}
Class members
parent_class
GInitiallyUnownedClass
  No description available.
changed
void (* changed) (
    GtkAdjustment* adjustment
  )
  No description available.
value_changed
void (* value_changed) (
    GtkAdjustment* adjustment
  )
  No description available.
_gtk_reserved1
void (* _gtk_reserved1) (
void
  )
  No description available.
_gtk_reserved2
void (* _gtk_reserved2) (
void
  )
  No description available.
_gtk_reserved3
void (* _gtk_reserved3) (
void
  )
  No description available.
_gtk_reserved4
void (* _gtk_reserved4) (
void
  )
  No description available.

Virtual methods

Gtk.AdjustmentClass.changed

Emits a GtkAdjustment::changed signal from the GtkAdjustment. This is typically called by the owner of the GtkAdjustment after it has changed any of the GtkAdjustment properties other than the value.

Deprecated since: 3.18

Gtk.AdjustmentClass.value_changed

Emits a GtkAdjustment::value-changed signal from the GtkAdjustment. This is typically called by the owner of the GtkAdjustment after it has changed the GtkAdjustment:value property.

Deprecated since: 3.18