package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Adjustment/index.html
Module Wrappers.Adjustment
type t = [ `adjustment | `initially_unowned | `object_ ] Gobject.objval new_ : float -> float -> float -> float -> float -> float -> tCreate a new Adjustment
val set_value : t -> float -> unitSets the `GtkAdjustment` value.
The value is clamped to lie between property@Gtk.Adjustment:lower and property@Gtk.Adjustment:upper.
Note that for adjustments which are used in a `GtkScrollbar`, the effective range of allowed values goes from property@Gtk.Adjustment:lower to property@Gtk.Adjustment:upper - property@Gtk.Adjustment:page-size.
val set_upper : t -> float -> unitSets the maximum value of the adjustment.
Note that values will be restricted by `upper - page-size` if the page-size property is nonzero.
See method@Gtk.Adjustment.set_lower about how to compress multiple emissions of the signal@Gtk.Adjustment::changed signal when setting multiple adjustment properties.
val set_step_increment : t -> float -> unitSets the step increment of the adjustment.
See method@Gtk.Adjustment.set_lower about how to compress multiple emissions of the signal@Gtk.Adjustment::changed signal when setting multiple adjustment properties.
val set_page_size : t -> float -> unitSets the page size of the adjustment.
See method@Gtk.Adjustment.set_lower about how to compress multiple emissions of the signal@Gtk.Adjustment::changed signal when setting multiple adjustment properties.
val set_page_increment : t -> float -> unitSets the page increment of the adjustment.
See method@Gtk.Adjustment.set_lower about how to compress multiple emissions of the signal@Gtk.Adjustment::changed signal when setting multiple adjustment properties.
val set_lower : t -> float -> unitSets the minimum value of the adjustment.
When setting multiple adjustment properties via their individual setters, multiple signal@Gtk.Adjustment::changed signals will be emitted. However, since the emission of the signal@Gtk.Adjustment::changed signal is tied to the emission of the ::notify signals of the changed properties, it’s possible to compress the signal@Gtk.Adjustment::changed signals into one by calling g_object_freeze_notify() and g_object_thaw_notify() around the calls to the individual setters.
Alternatively, using a single g_object_set() for all the properties to change, or using method@Gtk.Adjustment.configure has the same effect.
val get_value : t -> floatGets the current value of the adjustment.
val get_upper : t -> floatRetrieves the maximum value of the adjustment.
val get_step_increment : t -> floatRetrieves the step increment of the adjustment.
val get_page_size : t -> floatRetrieves the page size of the adjustment.
val get_page_increment : t -> floatRetrieves the page increment of the adjustment.
val get_minimum_increment : t -> floatGets the smaller of step increment and page increment.
val get_lower : t -> floatRetrieves the minimum value of the adjustment.
val configure : t -> float -> float -> float -> float -> float -> float -> unitSets all properties of the adjustment at once.
Use this function to avoid multiple emissions of the signal@Gtk.Adjustment::changed signal. See method@Gtk.Adjustment.set_lower for an alternative way of compressing multiple emissions of signal@Gtk.Adjustment::changed into one.
val clamp_page : t -> float -> float -> unitUpdates the value property to ensure that the range between @lower and @upper is in the current page.
The current page goes from `value` to `value` + `page-size`. If the range is larger than the page size, then only the start of it will be in the current page.
A signal@Gtk.Adjustment::value-changed signal will be emitted if the value is changed.
val on_changed :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_value_changed :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id