package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Spin_button/index.html
Module Wrappers.Spin_button
type t = [ `spin_button | `widget | `initially_unowned | `object_ ] Gobject.objval new_ :
[ `adjustment | `initially_unowned | `object_ ] Gobject.obj option ->
float ->
int ->
tCreate a new SpinButton
val new_with_range : float -> float -> float -> tCreate a new SpinButton
val update : t -> unitManually force an update of the spin button.
val spin : t -> Gtk_enums.spintype -> float -> unitIncrement or decrement a spin button’s value in a specified direction by a specified amount.
val set_wrap : t -> bool -> unitSets the flag that determines if a spin button value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.
val set_value : t -> float -> unitSets the value of @spin_button.
val set_update_policy : t -> Gtk_enums.spinbuttonupdatepolicy -> unitSets the update behavior of a spin button.
This determines whether the spin button is always updated or only when a valid value is set.
val set_snap_to_ticks : t -> bool -> unitSets the policy as to whether values are corrected to the nearest step increment when a spin button is activated after providing an invalid value.
val set_range : t -> float -> float -> unitSets the minimum and maximum allowable values for @spin_button.
If the current value is outside this range, it will be adjusted to fit within the range, otherwise it will remain unchanged.
val set_numeric : t -> bool -> unitSets the flag that determines if non-numeric text can be typed into the spin button.
val set_increments : t -> float -> float -> unitSets the step and page increments for spin_button.
This affects how quickly the value changes when the spin button’s arrows are activated.
val set_digits : t -> int -> unitSet the precision to be displayed by @spin_button.
Up to 20 digit precision is allowed.
val set_climb_rate : t -> float -> unitSets the acceleration rate for repeated changes when you hold down a button or key.
val set_adjustment :
t ->
[ `adjustment | `initially_unowned | `object_ ] Gobject.obj ->
unitReplaces the `GtkAdjustment` associated with @spin_button.
val set_activates_default : t -> bool -> unitSets whether activating the spin button will activate the default widget for the window containing the spin button.
See signal@Gtk.SpinButton::activate for what counts as activation.
val get_wrap : t -> boolReturns whether the spin button’s value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.
val get_value_as_int : t -> intGet the value @spin_button represented as an integer.
val get_value : t -> floatGet the value in the @spin_button.
val get_update_policy : t -> Gtk_enums.spinbuttonupdatepolicyGets the update behavior of a spin button.
See method@Gtk.SpinButton.set_update_policy.
val get_snap_to_ticks : t -> boolReturns whether the values are corrected to the nearest step.
val get_range : t -> float * floatGets the range allowed for @spin_button.
See method@Gtk.SpinButton.set_range.
val get_numeric : t -> boolReturns whether non-numeric text can be typed into the spin button.
val get_increments : t -> float * floatGets the current step and page the increments used by @spin_button.
See method@Gtk.SpinButton.set_increments.
val get_digits : t -> intFetches the precision of @spin_button.
val get_climb_rate : t -> floatReturns the acceleration rate for repeated changes.
val get_adjustment :
t ->
[ `adjustment | `initially_unowned | `object_ ] Gobject.objGet the adjustment associated with a `GtkSpinButton`.
val get_activates_default : t -> boolRetrieves the value set by method@Gtk.SpinButton.set_activates_default.
val configure :
t ->
[ `adjustment | `initially_unowned | `object_ ] Gobject.obj option ->
float ->
int ->
unitChanges the properties of an existing spin button.
The adjustment, climb rate, and number of decimal places are updated accordingly.
val on_activate :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_change_value :
?after:bool ->
t ->
callback:(scroll:Gtk_enums.scrolltype -> unit) ->
Gobject.Signal.handler_idval on_output :
?after:bool ->
t ->
callback:(unit -> bool) ->
Gobject.Signal.handler_idval on_value_changed :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_wrapped :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id