Base class for widgets which visualize an adjustment
Derives from
<gtk-widget>
.This class defines the following slots:
update-policy
- How the range should be updated on the screen
adjustment
- The GtkAdjustment that contains the current value of this range object
inverted
- Invert direction slider moves to increase range value
lower-stepper-sensitivity
- The sensitivity policy for the stepper that points to the adjustment's lower side
upper-stepper-sensitivity
- The sensitivity policy for the stepper that points to the adjustment's upper side
show-fill-level
- Whether to display a fill level indicator graphics on trough.
restrict-to-fill-level
- Whether to restrict the upper boundary to the fill level.
fill-level
- The fill level.
<gtk-scroll-type>
)Virtual function that moves the slider. Used for keybindings.
<gtk-scroll-type>
) (arg1 <gdouble>
) ⇒ <gboolean>
The ::change-value signal is emitted when a scroll action is performed on a range. It allows an application to determine the type of scroll event that occurred and the resultant new value. The application can handle the event itself and return ‘
#t
’ to prevent further processing. Or, by returning ‘#f
’, it can pass the event to other handlers until the default GTK+ handler is reached.The value parameter is unrounded. An application that overrides the ::change-value signal is responsible for clamping the value to the desired number of decimal digits; the default GTK+ handler clamps the value based on range->round-digits.
It is not possible to use delayed update policies in an overridden ::change-value handler.
Since 2.6
<gtk-range>
) ⇒ (ret <gtk-adjustment>
)Get the
<gtk-adjustment>
which is the "model" object for<gtk-range>
. Seegtk-range-set-adjustment
for details. The return value does not have a reference added, so should not be unreferenced.
- range
- a
<gtk-range>
- ret
- a
<gtk-adjustment>
<gtk-range>
) (policy <gtk-update-type>
)Sets the update policy for the range.
<gtk-update-continuous>
means that anytime the range slider is moved, the range value will change and the value_changed signal will be emitted.<gtk-update-delayed>
means that the value will be updated after a brief timeout where no slider motion occurs, so updates are spaced by a short time rather than continuous.<gtk-update-discontinuous>
means that the value will only be updated when the user releases the button and ends the slider drag operation.
- range
- a
<gtk-range>
- policy
- update policy
<gtk-range>
) (adjustment <gtk-adjustment>
)Sets the adjustment to be used as the "model" object for this range widget. The adjustment indicates the current range value, the minimum and maximum range values, the step/page increments used for keybindings and scrolling, and the page size. The page size is normally 0 for
<gtk-scale>
and nonzero for<gtk-scrollbar>
, and indicates the size of the visible area of the widget being scrolled. The page size affects the size of the scrollbar slider.
- range
- a
<gtk-range>
- adjustment
- a
<gtk-adjustment>
<gtk-range>
) ⇒ (ret bool
)Gets the value set by
gtk-range-set-inverted
.
- range
- a
<gtk-range>
- ret
- ‘
#t
’ if the range is inverted
<gtk-range>
) (setting bool
)Ranges normally move from lower to higher values as the slider moves from top to bottom or left to right. Inverted ranges have higher values at the top or on the right rather than on the bottom or left.
- range
- a
<gtk-range>
- setting
- ‘
#t
’ to invert the range
<gtk-range>
) ⇒ (ret <gtk-update-type>
)Gets the update policy of range. See
gtk-range-set-update-policy
.
- range
- a
<gtk-range>
- ret
- the current update policy
<gtk-range>
) ⇒ (ret double
)Gets the current value of the range.
- range
- a
<gtk-range>
- ret
- current value of the range.
<gtk-range>
) (step double
) (page double
)Sets the step and page sizes for the range. The step size is used when the user clicks the
<gtk-scrollbar>
arrows or moves<gtk-scale>
via arrow keys. The page size is used for example when moving via Page Up or Page Down keys.
- range
- a
<gtk-range>
- step
- step size
- page
- page size
<gtk-range>
) (min double
) (max double
)Sets the allowable values in the
<gtk-range>
, and clamps the range value to be between min and max. (If the range has a non-zero page size, it is clamped between min and max - page-size.)
- range
- a
<gtk-range>
- min
- minimum range value
- max
- maximum range value
<gtk-range>
) (value double
)Sets the current value of the range; if the value is outside the minimum or maximum range values, it will be clamped to fit inside them. The range emits the "value_changed" signal if the value changes.
- range
- a
<gtk-range>
- value
- new value of the range