package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Range/index.html
Module Wrappers.Range
type t = [ `range | `widget | `initially_unowned | `object_ ] Gobject.objval set_value : t -> float -> unitSets 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 signal@Gtk.Range::value-changed signal if the value changes.
val set_slider_size_fixed : t -> bool -> unitSets 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.
val set_show_fill_level : t -> bool -> unitSets whether a graphical fill level is show on the trough.
See method@Gtk.Range.set_fill_level for a general description of the fill level concept.
val set_round_digits : t -> int -> unitSets the number of digits to round the value to when it changes.
See signal@Gtk.Range::change-value.
val set_restrict_to_fill_level : t -> bool -> unitSets whether the slider is restricted to the fill level.
See method@Gtk.Range.set_fill_level for a general description of the fill level concept.
val set_range : t -> float -> float -> unitSets 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.)
val set_inverted : t -> bool -> unitSets 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.
val set_increments : t -> float -> float -> unitSets 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.
val set_flippable : t -> bool -> unitSets whether the `GtkRange` respects text direction.
If a range is flippable, it will switch its direction if it is horizontal and its direction is %GTK_TEXT_DIR_RTL.
See method@Gtk.Widget.get_direction.
val set_fill_level : t -> float -> unitSet 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 method@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 controlled by method@Gtk.Range.set_restrict_to_fill_level and is by default enabled.
val set_adjustment :
t ->
[ `adjustment | `initially_unowned | `object_ ] Gobject.obj ->
unitSets 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.
val get_value : t -> floatGets the current value of the range.
val get_slider_size_fixed : t -> boolThis function is useful mainly for `GtkRange` subclasses.
See method@Gtk.Range.set_slider_size_fixed.
val get_slider_range : t -> int * intThis function returns sliders range along the long dimension, in widget->window coordinates.
This function is useful mainly for `GtkRange` subclasses.
val get_show_fill_level : t -> boolGets whether the range displays the fill level graphically.
val get_round_digits : t -> intGets the number of digits to round the value to when it changes.
See signal@Gtk.Range::change-value.
val get_restrict_to_fill_level : t -> boolGets whether the range is restricted to the fill level.
val get_range_rect : t -> Ocgtk_gdk.Gdk.Wrappers.Rectangle.tThis function returns the area that contains the range’s trough, in coordinates relative to @range's origin.
This function is useful mainly for `GtkRange` subclasses.
val get_inverted : t -> boolGets whether the range is inverted.
See method@Gtk.Range.set_inverted.
val get_flippable : t -> boolGets whether the `GtkRange` respects text direction.
See method@Gtk.Range.set_flippable.
val get_fill_level : t -> floatGets the current position of the fill level indicator.
val get_adjustment :
t ->
[ `adjustment | `initially_unowned | `object_ ] Gobject.objGet the adjustment which is the “model” object for `GtkRange`.
val on_adjust_bounds :
?after:bool ->
t ->
callback:(value:float -> unit) ->
Gobject.Signal.handler_idval on_change_value :
?after:bool ->
t ->
callback:(scroll:Gtk_enums.scrolltype -> value:float -> bool) ->
Gobject.Signal.handler_idval on_move_slider :
?after:bool ->
t ->
callback:(step:Gtk_enums.scrolltype -> unit) ->
Gobject.Signal.handler_idval on_value_changed :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id