It derives from <GtkWidget>.
Base class for widgets which visualize an adjustment.
Widgets that are derived from <GtkRange> include
<GtkScale> and
<GtkScrollbar>.
Apart from signals for monitoring the parameters of the adjustment,
<GtkRange> provides properties and methods for
setting a “fill level” on range widgets. See range:set-fill-level.
The <GtkRange> slider is draggable. Holding the
Shift key while dragging, or initiating the drag with a long-press
will enable the fine-tuning mode.
parent-instanceThe adjustment that is controlled by the range.
Its value is a <GtkAdjustment>, or #f.
Set it with (set! (range:adjustment self) value).
The fill level (e.g. prebuffering of a network stream).
Its value is a real number.
Set it with (set! (range:fill-level self) value).
If #t, the direction in which the slider moves is inverted.
Its value is a boolean.
Set it with (set! (range:inverted self) value).
Controls whether slider movement is restricted to an upper boundary set by the fill level.
Its value is a boolean.
Set it with (set! (range:restrict-to-fill-level self) value).
The number of digits to round the value to when it changes.
See range:change-value.
Its value is a 32-bit integer.
Set it with (set! (range:round-digits self) value).
Controls whether fill level indicator graphics are displayed on the trough.
Its value is a boolean.
Set it with (set! (range:show-fill-level self) value).
Get the adjustment which is the “model” object for
<GtkRange>.
Passed: a <GtkRange>.
Returned: a <GtkAdjustment>.
Gets the current position of the fill level indicator.
Passed: a <GtkRange>.
Returned: a real number.
The current fill level
Gets whether the <GtkRange> respects text direction.
See range:set-flippable.
Passed: a <GtkRange>.
Returned: a boolean.
#t if the range is flippable
Gets whether the range is inverted.
See range:set-inverted.
Passed: a <GtkRange>.
Returned: a boolean.
#t if the range is inverted
This function returns the area that contains the range’s trough, in coordinates relative to self’s origin.
This function is useful mainly for <GtkRange>
subclasses.
Passed: a <GtkRange>.
Passed, filled in, and returned: a
<GdkRectangle>.
return location for the range rectangle
Gets whether the range is restricted to the fill level.
Passed: a <GtkRange>.
Returned: a boolean.
#t if self is restricted to the fill level.
Gets the number of digits to round the value to when it changes.
See range:change-value.
Passed: a <GtkRange>.
Returned: a 32-bit integer.
the number of digits to round to
Gets whether the range displays the fill level graphically.
Passed: a <GtkRange>.
Returned: a boolean.
#t if self shows the fill level.
This function returns sliders range along the long dimension, in widget->window coordinates.
This function is useful mainly for <GtkRange>
subclasses.
Passed: a <GtkRange>.
Returned: a 32-bit integer.
return location for the slider’s start
Returned: a 32-bit integer.
return location for the slider’s end
This function is useful mainly for <GtkRange>
subclasses.
See range:set-slider-size-fixed.
Passed: a <GtkRange>.
Returned: a boolean.
whether the range’s slider has a fixed size.
Gets the current value of the range.
Passed: a <GtkRange>.
Returned: a real number.
current value of the range.
Sets the adjustment to be used as the “model” object for the
<GtkRange>
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 <GtkScale> and
nonzero for <GtkScrollbar>, and indicates the
size of the visible area of the widget being scrolled. The page size
affects the size of the scrollbar slider.
Passed: a <GtkRange>.
Passed: a <GtkAdjustment>.
Set the new position of the fill level indicator.
The “fill level” is probably best described by its most prominent use case, which is an indicator for the amount of pre-buffering in a streaming media player. In that use case, the value of the range would indicate the current play position, and the fill level would be the position up to which the file/stream has been downloaded.
This amount of prebuffering can be displayed on the range’s trough and
is themeable separately from the trough. To enable fill level display,
use range:set-show-fill-level.
The range defaults to not showing the fill level.
Additionally, it’s possible to restrict the range’s slider position to
values which are smaller than the fill level. This is controlled by
range:set-restrict-to-fill-level and is by
default enabled.
Passed: a <GtkRange>.
Passed: a real number.
the new position of the fill level indicator
Sets whether the <GtkRange> respects text direction.
If a range is flippable, it will switch its direction if it is
horizontal and its direction is rtl.
See widget:get-direction.
Passed: a <GtkRange>.
Passed: a boolean.
#t to make the range flippable
Sets the step and page sizes for the range.
The step size is used when the user clicks the
<GtkScrollbar> arrows or moves a
<GtkScale> via arrow keys. The page size is used
for example when moving via Page Up or Page Down keys.
Passed: a <GtkRange>.
Passed: a real number.
step size
Passed: a real number.
page size
Sets whether to invert the range.
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.
Passed: a <GtkRange>.
Passed: a boolean.
#t to invert the range
Sets the allowable values in the <GtkRange>.
The range value is clamped to be between min and max. (If the range has a non-zero page size, it is clamped between min and max - page-size.)
Passed: a <GtkRange>.
Passed: a real number.
minimum range value
Passed: a real number.
maximum range value
Sets whether the slider is restricted to the fill level.
See range:set-fill-level for a
general description of the fill level concept.
Passed: a <GtkRange>.
Passed: a boolean.
Whether the fill level restricts slider movement.
Sets the number of digits to round the value to when it changes.
See range:change-value.
Passed: a <GtkRange>.
Passed: a 32-bit integer.
the precision in digits, or -1
Sets whether a graphical fill level is show on the trough.
See range:set-fill-level for a
general description of the fill level concept.
Passed: a <GtkRange>.
Passed: a boolean.
Whether a fill level indicator graphics is shown.
Sets whether the range’s slider has a fixed size, or a size that depends on its adjustment’s page size.
This function is useful mainly for <GtkRange>
subclasses.
Passed: a <GtkRange>.
Passed: a boolean.
#t to make the slider size constant
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 range:value-changed signal if the value changes.
Passed: a <GtkRange>.
Passed: a real number.
new value of the range
Connect a handler with (connect object range:adjust-bounds
handler). It is called as (handler self value).
Emitted before clamping a value, to give the application a chance to adjust the bounds.
Passed: a <GtkRange>.
Passed: a real number.
the value before we clamp
Connect a handler with (connect object range:change-value
handler). It is called as (handler self scroll value) ⇒
%return.
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.
Passed: a <GtkRange>.
Passed: a <GtkScrollType>.
the type of scroll action that was performed
Passed: a real number.
the new value resulting from the scroll action
Returned: a boolean.
#t to prevent other handlers from being invoked for the signal,
#f to propagate the signal further
Connect a handler with (connect object range:move-slider
handler). It is called as (handler self step).
Virtual function that moves the slider.
Used for keybindings.
Passed: a <GtkRange>.
Passed: a <GtkScrollType>.
how to move the slider
Connect a handler with (connect object range:value-changed
handler). It is called as (handler self).
Emitted when the range value changes.
Passed: a <GtkRange>.
To override it in a new class, give register-type #:vfuncs
`((adjust-bounds . ,procedure)). The procedure is called as
(procedure self new-value).
Passed: the class whose implementation to call:
<GtkRange>, or a class that derives from it, or its
GType number.
Passed: a <GtkRange>.
Passed: a real number.
To override it in a new class, give register-type #:vfuncs
`((change-value . ,procedure)). The procedure is called as
(procedure self scroll new-value) ⇒ %return.
Passed: the class whose implementation to call:
<GtkRange>, or a class that derives from it, or its
GType number.
Passed: a <GtkRange>.
Passed: a <GtkScrollType>, or one of its
symbols.
Passed: a real number.
Returned: a boolean.
To override it in a new class, give register-type #:vfuncs
`((get-range-border . ,procedure)). The procedure is called as
(procedure self border-).
Passed: the class whose implementation to call:
<GtkRange>, or a class that derives from it, or its
GType number.
Passed: a <GtkRange>.
Passed: a <GtkBorder>.
To override it in a new class, give register-type #:vfuncs
`((move-slider . ,procedure)). The procedure is called as
(procedure self scroll).
Passed: the class whose implementation to call:
<GtkRange>, or a class that derives from it, or its
GType number.
Passed: a <GtkRange>.
Passed: a <GtkScrollType>, or one of its
symbols.
To override it in a new class, give register-type #:vfuncs
`((value-changed . ,procedure)). The procedure is called as
(procedure self).
Passed: the class whose implementation to call:
<GtkRange>, or a class that derives from it, or its
GType number.
Passed: a <GtkRange>.