11.100Class GtkRange

Base class for widgets which visualize an adjustment

Class GtkRange

GtkRange is the common base class for widgets which visualize an adjustment, e.g scales or scrollbars.

Apart from signals for monitoring the parameters of the adjustment, GtkRange 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 gtk_range_set_fill_level().

Methods
get_adjustmentGet the GtkAdjustment which is the "model" object for GtkRange.
get_fill_levelGets the current position of the fill level indicator.
get_flippableGets the value set by gtk_range_set_flippable().
get_invertedGets the value set by gtk_range_set_inverted().
get_lower_stepper_sensitivityGets the sensitivity policy for the stepper that points to the 'lower' end of the GtkRange's adjustment.
get_min_slider_sizeThis function is useful mainly for GtkRange subclasses.
get_range_rectThis function returns the area that contains the range's trough and its steppers, in widget->window coordinates.
get_restrict_to_fill_levelGets whether the range is restricted to the fill level.
get_show_fill_levelGets whether the range displays the fill level graphically.
get_slider_rangeThis function returns sliders range along the long dimension, in widget->window coordinates.
get_slider_size_fixedThis function is useful mainly for GtkRange subclasses.
get_update_policyGets the update policy of range.
get_upper_stepper_sensitivityGets the sensitivity policy for the stepper that points to the 'upper' end of the GtkRange's adjustment.
get_valueGets the current value of the range.
set_adjustmentSets the adjustment to be used as the "model" object for this range widget.
set_fill_levelSet the new position of the fill level indicator.
set_flippableIf a range is flippable, it will switch its direction if it is horizontal and its direction is GTK_TEXT_DIR_RTL.
set_incrementsSets the step and page sizes for the range.
set_invertedRanges normally move from lower to higher values as the slider moves from top to bottom or left to right.
set_lower_stepper_sensitivitySets the sensitivity policy for the stepper that points to the 'lower' end of the GtkRange's adjustment.
set_min_slider_sizeSets the minimum size of the range's slider.
set_rangeSets the allowable values in the GtkRange, and clamps the range value to be between min and max.
set_restrict_to_fill_levelSets whether the slider is restricted to the fill level.
set_show_fill_levelSets whether a graphical fill level is show on the trough.
set_slider_size_fixedSets whether the range's slider has a fixed size, or a size that depends on it's adjustment's page size.
set_update_policySets the update policy for the range.
set_upper_stepper_sensitivitySets the sensitivity policy for the stepper that points to the 'upper' end of the GtkRange's adjustment.
set_valueSets the current value of the range
signal_adjust_boundsThe "adjust-bounds" signal is emitted when the range is adjusted by user action.
signal_change_valueThe change-value signal is emitted when a scroll action is performed on a range.
signal_move_sliderVirtual function that moves the slider. Used for keybindings.
value_changedEmitted when the range value changes.

Methods

get_adjustment

Get the GtkAdjustment which is the "model" object for GtkRange.

GtkRange.get_adjustment()
Returna GtkAdjustment

get_fill_level

Gets the current position of the fill level indicator.

GtkRange.get_fill_level()
ReturnThe current fill level

get_flippable

Gets the value set by gtk_range_set_flippable().

GtkRange.get_flippable()
ReturnTRUE if the range is flippable

get_inverted

Gets the value set by gtk_range_set_inverted().

GtkRange.get_inverted()
ReturnTRUE if the range is inverted

get_lower_stepper_sensitivity

Gets the sensitivity policy for the stepper that points to the 'lower' end of the GtkRange's adjustment.

GtkRange.get_lower_stepper_sensitivity()
ReturnThe lower stepper's sensitivity policy.

get_min_slider_size

This function is useful mainly for GtkRange subclasses.

GtkRange.get_min_slider_size()
ReturnThe minimum size of the range's slider.

get_range_rect

This function returns the area that contains the range's trough and its steppers, in widget->window coordinates.

GtkRange.get_range_rect()
Returnthe range rectangle (GdkRectangle).

This function is useful mainly for GtkRange subclasses.

get_restrict_to_fill_level

Gets whether the range is restricted to the fill level.

GtkRange.get_restrict_to_fill_level()
ReturnTRUE if range is restricted to the fill level.

get_show_fill_level

Gets whether the range displays the fill level graphically.

GtkRange.get_show_fill_level()
ReturnTRUE if range shows the fill level.

get_slider_range

This function returns sliders range along the long dimension, in widget->window coordinates.

GtkRange.get_slider_range()
ReturnArray [ slider start, slider end ]

This function is useful mainly for GtkRange subclasses.

get_slider_size_fixed

This function is useful mainly for GtkRange subclasses.

GtkRange.get_slider_size_fixed()
Returnwhether the range's slider has a fixed size.

get_update_policy

Gets the update policy of range.

GtkRange.get_update_policy()
ReturnThe current update policy (GtkUpdateType).

get_upper_stepper_sensitivity

Gets the sensitivity policy for the stepper that points to the 'upper' end of the GtkRange's adjustment.

GtkRange.get_upper_stepper_sensitivity()
ReturnThe upper stepper's sensitivity policy.

get_value

Gets the current value of the range.

GtkRange.get_value()
Returncurrent value of the range.

set_adjustment

Sets the adjustment to be used as the "model" object for this range widget.

GtkRange.set_adjustment( adjustment )
adjustment a GtkAdjustment

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.

set_fill_level

Set the new position of the fill level indicator.

GtkRange.set_fill_level( fill_level )
fill_level 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 gtk_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 controller by gtk_range_set_restrict_to_fill_level() and is by default enabled.

set_flippable

If a range is flippable, it will switch its direction if it is horizontal and its direction is GTK_TEXT_DIR_RTL.

GtkRange.set_flippable( flippable )
flippable TRUE to make the range flippable

set_increments

Sets the step and page sizes for the range.

GtkRange.set_increments( step, page )
step step size
page page size

The step size is used when the user clicks the GtkScrollbar arrows or moves GtkScale via arrow keys. The page size is used for example when moving via Page Up or Page Down keys.

set_inverted

Ranges normally move from lower to higher values as the slider moves from top to bottom or left to right.

GtkRange.set_inverted( setting )
setting TRUE to invert the range

Inverted ranges have higher values at the top or on the right rather than on the bottom or left.

set_lower_stepper_sensitivity

Sets the sensitivity policy for the stepper that points to the 'lower' end of the GtkRange's adjustment.

GtkRange.set_lower_stepper_sensitivity( sensitivity )
sensitivity the lower stepper's sensitivity policy (GtkSensitivityType).

set_min_slider_size

Sets the minimum size of the range's slider.

GtkRange.set_min_slider_size( min_size )
min_size The slider's minimum size

This function is useful mainly for GtkRange subclasses.

set_range

Sets the allowable values in the GtkRange, and clamps the range value to be between min and max.

GtkRange.set_range( min, max )
min minimum range value
max maximum range value

If the range has a non-zero page size, it is clamped between min and max - page-size.

set_restrict_to_fill_level

Sets whether the slider is restricted to the fill level.

GtkRange.set_restrict_to_fill_level( restrict_to_fill_level )
restrict_to_fill_level Whether the fill level restricts slider movement.

set_show_fill_level

Sets whether a graphical fill level is show on the trough.

GtkRange.set_show_fill_level( show_fill_level )
show_fill_level Whether a fill level indicator graphics is shown.

set_slider_size_fixed

Sets whether the range's slider has a fixed size, or a size that depends on it's adjustment's page size.

GtkRange.set_slider_size_fixed( size_fixed )
size_fixed TRUE to make the slider size constant

This function is useful mainly for GtkRange subclasses.

set_update_policy

Sets the update policy for the range.

GtkRange.set_update_policy( policy )
policy update policy (GtkUpdateType).

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.

set_upper_stepper_sensitivity

Sets the sensitivity policy for the stepper that points to the 'upper' end of the GtkRange's adjustment.

GtkRange.set_upper_stepper_sensitivity( sensitivity )
sensitivity the upper stepper's sensitivity policy.

set_value

Sets the current value of the range

GtkRange.set_value( value )
value new 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.

signal_adjust_bounds

The "adjust-bounds" signal is emitted when the range is adjusted by user action.

GtkRange.signal_adjust_bounds()

Note the value can be more or less than the range since it depends on the mouse position.

signal_change_value

The change-value signal is emitted when a scroll action is performed on a range.

GtkRange.signal_change_value()

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 range->round_digits.

It is not possible to use delayed update policies in an overridden change-value handler.

signal_move_slider

Virtual function that moves the slider. Used for keybindings.

GtkRange.signal_move_slider()

value_changed

Emitted when the range value changes.

GtkRange.value_changed()
Made with http://www.falconpl.org