Gtk.Adjustment
const Gtk = imports.gi.Gtk;
let adjustment = new Gtk.Adjustment({
lower: value,
page_increment: value,
page_size: value,
step_increment: value,
upper: value,
value: value,
});
The Gtk.Adjustment 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 Gtk.SpinButton, Gtk.Viewport, and Gtk.Range (which is a base class for Gtk.HScrollbar, Gtk.VScrollbar, Gtk.HScale, and Gtk.VScale).
The Gtk.Adjustment object does not update the value itself. Instead it is left up to the owner of the Gtk.Adjustment to control the value.
The owner of the Gtk.Adjustment typically calls the Gtk.value_changed and Gtk.changed functions after changing the value and its bounds. This results in the emission of the #GtkAdjustment::value_changed or Gtk.changed signal respectively.
Hierarchy
-
GObject.Object
-
GObject.InitiallyUnowned
- Gtk.Adjustment
-
Methods
- Gtk.Adjustment.prototype.changed
- Gtk.Adjustment.prototype.clamp_page
- Gtk.Adjustment.prototype.configure
- Gtk.Adjustment.prototype.get_lower
- Gtk.Adjustment.prototype.get_minimum_increment
- Gtk.Adjustment.prototype.get_page_increment
- Gtk.Adjustment.prototype.get_page_size
- Gtk.Adjustment.prototype.get_step_increment
- Gtk.Adjustment.prototype.get_upper
- Gtk.Adjustment.prototype.get_value
- Gtk.Adjustment.prototype.set_lower
- Gtk.Adjustment.prototype.set_page_increment
- Gtk.Adjustment.prototype.set_page_size
- Gtk.Adjustment.prototype.set_step_increment
- Gtk.Adjustment.prototype.set_upper
- Gtk.Adjustment.prototype.set_value
- Gtk.Adjustment.prototype.value_changed