A GtkObject representing an adjustable bounded 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-spin-button>,
<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-adjustment-value-changed and gtk-adjustment-changed functions
after changing the value and its bounds. This results in the emission of the
"value_changed" or "changed" signal respectively.
Derives from
<gtk-object>.This class defines the following slots:
value- The value of the adjustment
lower- The minimum value of the adjustment
upper- The maximum value of the adjustment
step-increment- The step increment of the adjustment
page-increment- The page increment of the adjustment
page-size- The page size of the adjustment
Emitted when one or more of the
<gtk-adjustment>fields have been changed, other than the value field.
Emitted when the
<gtk-adjustment>value field has been changed.
double) (lower double) (upper double) (step_increment double) (page_increment double) (page_size double) ⇒ (ret <gtk-object>)Creates a new
<gtk-adjustment>.
- value
- the initial value.
- lower
- the minimum value.
- upper
- the maximum value.
- step-increment
- the step increment.
- page-increment
- the page increment.
- page-size
- the page size.
- ret
- a new
<gtk-adjustment>.
<gtk-adjustment>) ⇒ (ret double)Gets the current value of the adjustment. See
gtk-adjustment-set-value.
- adjustment
- a
<gtk-adjustment>- ret
- The current value of the adjustment.
<gtk-adjustment>) (value double)Sets the
<gtk-adjustment>value. The value is clamped to lie between ‘adjustment->lower’ and ‘adjustment->upper’.Note that for adjustments which are used in a
<gtk-scrollbar>, the effective range of allowed values goes from ‘adjustment->lower’ to ‘adjustment->upper - adjustment->page_size’.
- adjustment
- a
<gtk-adjustment>.- value
- the new value.
<gtk-adjustment>) (lower double) (upper double)Updates the
<gtk-adjustment>value to ensure that the range between lower and upper is in the current page (i.e. between value and value + page-size). If the range is larger than the page size, then only the start of it will be in the current page. A "changed" signal will be emitted if the value is changed.
- adjustment
- a
<gtk-adjustment>.- lower
- the lower value.
- upper
- the upper value.