The
gtk-range class is the common base class for widgets which visualize an adjustment, e.g. the
gtk-scale or
gtk-scrollbar
widgets.
Apart from signals for monitoring the parameters of the adjustment, the
gtk-range class provides properties and methods for influencing the
sensitivity of the "steppers". It also provides properties and methods for setting a "fill level" on range widgets. See the
gtk-range-fill-level
function.
Style Property Details
- arrow-displacement-x
- The arrow-displacement-x style property of type :int (Read)
How far in the x direction to move the arrow when the button is depressed.
Warning: The arrow-displacement-x style property has been
deprecated since version 3.20 and should not be used in newly written code. The value of this style property is ignored.
Default value: 0 - arrow-displacement-y
- The arrow-displacement-y style property of type :int (Read)
How far in the y direction to move the arrow when the button is depressed.
Warning: The arrow-displacement-y style property has been
deprecated since version 3.20 and should not be used in newly written code. The value of this style property is ignored.
Default value: 0 - arrow-scaling
- The arrow-scaling style property of type :float (Read)
The arrow size proportion relative to the scroll button size.
Warning: The arrow-scaling style property has been
deprecated since version 3.20 and should not be used in newly written code. The value of this style property is ignored.
Allowed values: [0.0,1.0]
Default value: 0.5 - slider-width
- The slider-width style property of type :int (Read)
Width of scrollbar or scale thumb.
Warning: The slider-width style property has been deprecated
since version 3.20 and should not be used in newly written code. The value of this style property is ignored.
Allowed values: >= 0
Default value: 14 - stepper-size
- The stepper-size style property of type :int (Read)
Length of step buttons at ends.
Warning: The stepper-size style property has been deprecated
since version 3.20 and should not be used in newly written code. The value of this style property is ignored.
Allowed values: >= 0
Default value: 14 - stepper-spacing
- The stepper-spacing style property of type :int (Read)
The spacing between the stepper buttons and thumb. Note that stepper-spacing will not have any effect if there are no steppers.
Warming: The stepper-spacing style property has been
deprecated since version 3.20 and should not be used in newly written code. The value of this style property is ignored.
Allowed values: >= 0
Default value: 0 - trough-border
- The trough-border style property of type :int (Read)
Spacing between thumb/steppers and outer trough bevel.
Warning: The trough-border style property has been
deprecated since version 3.20 and should not be used in newly written code. The value of this style property is ignored.
Allowed values: >= 0
Default value: 1 - trough-under-steppers
- The trough-under-steppers style property of type :boolean (Read)
Whether to draw the trough across the full length of the range or to exclude the steppers and their spacing.
Warning: The trough-under-steppers style property has been
deprecated since version 3.20 and should not be used in newly written
code. The value of this style property is ignored, and the widget will behave as if it was set to true.
Default value: true
Signal Details
The "adjust-bounds" signal
lambda (range value) :run-last
Emitted before clamping a value, to give the application a chance to
adjust the bounds.
- range
- The gtk-range widget that received the signal.
- value
- A double float with the value before we clamp.
The "change-value" signal
lambda (range scroll value) :run-last
The 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
true to prevent further processing. Or, by returning
false, 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 "round-digits". It is not possible to use
delayed update policies in an overridden "change-value" handler.
- range
- The gtk-range widget that received the signal.
- scroll
- The gtk-scroll-type value of scroll action that was performed.
- value
- The double float value resulting from the scroll action.
- Returns
- True to prevent other handlers from being invoked for the signal, false to propagate the signal further.
The "move-slider" signal
lambda (range step) :action
Virtual function that moves the slider. Used for keybindings.
- range
- The gtk-range widget that received the signal.
- step
- The gtk-scroll-type value how to move the slider.
The "value-changed" signal
lambda (range) :run-last
Emitted when the range value changes.
- range
- The gtk-range widget that received the signal.