Range
Object Hierarchy:
Description:
[ CCode ( type_id = "gtk_range_get_type ()" ) ]
public class Range : Widget, Accessible, AccessibleRange, Buildable, ConstraintTarget, Orientable
public class Range : Widget, Accessible, AccessibleRange, Buildable, ConstraintTarget, Orientable
`GtkRange` is the common base class for widgets which visualize an adjustment.
Widgets that are derived from `GtkRange` include [class@Gtk.Scale] and [class@Gtk.Scrollbar].
Apart from signals for monitoring the parameters of the adjustment, `GtkRange` provides properties and methods for setting a “fill level” on range widgets. See [method@Gtk.Range.set_fill_level].
All known sub-classes:
Namespace: Gtk
Package: gtk4
Content:
Properties:
- public Adjustment adjustment { get; set construct; }
The adjustment that is controlled by the range.
- public double fill_level { get; set; }
The fill level (e.
- public bool inverted { get; set; }
If true, the direction in which the slider moves is inverted.
- public bool restrict_to_fill_level { get; set; }
Controls whether slider movement is restricted to an upper boundary set by the fill level.
- public int round_digits { get; set; }
The number of digits to round the value to when it changes.
- public bool show_fill_level { get; set; }
Controls whether fill level indicator graphics are displayed on the trough.
Creation methods:
- protected Range ()
Methods:
- public unowned Adjustment get_adjustment ()
Get the adjustment which is the “model” object for `GtkRange`.
- public double get_fill_level ()
Gets the current position of the fill level indicator.
- public bool get_flippable ()
Gets whether the `GtkRange` respects text direction.
- public bool get_inverted ()
Gets whether the range is inverted.
- public virtual Border get_range_border ()
- public Rectangle get_range_rect ()
This function returns the area that contains the range’s trough, in coordinates relative to this's origin.
- public bool get_restrict_to_fill_level ()
Gets whether the range is restricted to the fill level.
- public int get_round_digits ()
Gets the number of digits to round the value to when it changes.
- public bool get_show_fill_level ()
Gets whether the range displays the fill level graphically.
- public void get_slider_range (out int slider_start, out int slider_end)
This function returns sliders range along the long dimension, in widget-> window coordinates.
- public bool get_slider_size_fixed ()
This function is useful mainly for `GtkRange` subclasses.
- public double get_value ()
Gets the current value of the range.
- public void set_adjustment (Adjustment adjustment)
Sets the adjustment to be used as the “model” object for the `GtkRange`
- public void set_fill_level (double fill_level)
Set the new position of the fill level indicator.
- public void set_flippable (bool flippable)
Sets whether the `GtkRange` respects text direction.
- public void set_increments (double step, double page)
Sets the step and page sizes for the range.
- public void set_inverted (bool setting)
Sets whether to invert the range.
- public void set_range (double min, double max)
Sets the allowable values in the `GtkRange`.
- public void set_restrict_to_fill_level (bool restrict_to_fill_level)
Sets whether the slider is restricted to the fill level.
- public void set_round_digits (int round_digits)
Sets the number of digits to round the value to when it changes.
- public void set_show_fill_level (bool show_fill_level)
Sets whether a graphical fill level is show on the trough.
- public void set_slider_size_fixed (bool size_fixed)
Sets whether the range’s slider has a fixed size, or a size that depends on its adjustment’s page size.
- public void set_value (double value)
Sets the current value of the range.
Signals:
- public virtual signal void adjust_bounds (double new_value)
Emitted before clamping a value, to give the application a chance to adjust the bounds.
- public virtual signal bool change_value (ScrollType scroll, double new_value)
Emitted when a scroll action is performed on a range.
- public virtual signal void move_slider (ScrollType scroll)
Virtual function that moves the slider.
- public virtual signal void value_changed ()
Emitted when the range value changes.
Inherited Members:
All known members inherited from class Gtk.Widget
- action_set_enabled
- activate
- activate_action
- activate_action_variant
- activate_default
- add_binding
- add_binding_action
- add_binding_signal
- add_controller
- add_css_class
- add_mnemonic_label
- add_shortcut
- add_tick_callback
- allocate
- allocate_size
- bind_template_callback_full
- bind_template_child_full
- can_focus
- can_target
- child_focus
- compute_bounds
- compute_expand
- compute_expand_internal
- compute_point
- compute_transform
- contains
- create_pango_context
- create_pango_layout
- css_changed
- css_classes
- css_name
- cursor
- destroy
- direction_changed
- dispose_template
- error_bell
- focus
- focus_on_click
- focusable
- get_accessible_role
- get_activate_signal
- get_allocated_baseline
- get_allocated_height
- get_allocated_width
- get_allocation
- get_ancestor
- get_baseline
- get_can_focus
- get_can_target
- get_child_visible
- get_clipboard
- get_color
- get_css_classes
- get_css_name
- get_cursor
- get_default_direction
- get_direction
- get_display
- get_first_child
- get_focus_child
- get_focus_on_click
- get_focusable
- get_font_map
- get_font_options
- get_frame_clock
- get_halign
- get_has_tooltip
- get_height
- get_hexpand
- get_hexpand_set
- get_last_child
- get_layout_manager
- get_layout_manager_type
- get_mapped
- get_margin_bottom
- get_margin_end
- get_margin_start
- get_margin_top
- get_name
- get_native
- get_next_sibling
- get_opacity
- get_overflow
- get_pango_context
- get_parent
- get_preferred_size
- get_prev_sibling
- get_primary_clipboard
- get_realized
- get_receives_default
- get_request_mode
- get_root
- get_scale_factor
- get_sensitive
- get_settings
- get_size
- get_size_request
- get_state_flags
- get_style_context
- get_template_child
- get_tooltip_markup
- get_tooltip_text
- get_valign
- get_vexpand
- get_vexpand_set
- get_visible
- get_width
- grab_focus
- halign
- has_css_class
- has_default
- has_focus
- has_tooltip
- has_visible_focus
- height_request
- hexpand
- hexpand_set
- hide
- in_destruction
- init_template
- insert_action_group
- insert_after
- insert_before
- install_action
- install_property_action
- is_ancestor
- is_drawable
- is_focus
- is_sensitive
- is_visible
- keynav_failed
- layout_manager
- list_mnemonic_labels
- map
- margin_bottom
- margin_end
- margin_start
- margin_top
- measure
- mnemonic_activate
- move_focus
- name
- observe_children
- observe_controllers
- opacity
- overflow
- parent
- pick
- query_action
- query_tooltip
- queue_allocate
- queue_draw
- queue_resize
- realize
- receives_default
- remove_controller
- remove_css_class
- remove_mnemonic_label
- remove_tick_callback
- root
- scale_factor
- sensitive
- set_accessible_role
- set_activate_signal
- set_activate_signal_from_name
- set_can_focus
- set_can_target
- set_child_visible
- set_css_classes
- set_css_name
- set_cursor
- set_cursor_from_name
- set_default_direction
- set_direction
- set_focus_child
- set_focus_on_click
- set_focusable
- set_font_map
- set_font_options
- set_halign
- set_has_tooltip
- set_hexpand
- set_hexpand_set
- set_layout_manager
- set_layout_manager_type
- set_margin_bottom
- set_margin_end
- set_margin_start
- set_margin_top
- set_name
- set_opacity
- set_overflow
- set_parent
- set_receives_default
- set_sensitive
- set_size_request
- set_state_flags
- set_template
- set_template_from_resource
- set_template_scope
- set_tooltip_markup
- set_tooltip_text
- set_valign
- set_vexpand
- set_vexpand_set
- set_visible
- should_layout
- show
- size_allocate
- snapshot
- snapshot_child
- state_flags_changed
- system_setting_changed
- tooltip_markup
- tooltip_text
- translate_coordinates
- trigger_tooltip_query
- unmap
- unparent
- unrealize
- unroot
- unset_state_flags
- valign
- vexpand
- vexpand_set
- visible
- width_request
All known members inherited from class GLib.Object
All known members inherited from interface Gtk.Accessible
All known members inherited from interface Gtk.AccessibleRange
All known members inherited from interface Gtk.Buildable
All known members inherited from interface Gtk.Orientable