package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Spin_button

type t = [ `spin_button | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : [ `adjustment | `initially_unowned | `object_ ] Gobject.obj option -> float -> int -> t

Create a new SpinButton

val new_with_range : float -> float -> float -> t

Create a new SpinButton

val update : t -> unit

Manually force an update of the spin button.

val spin : t -> Gtk_enums.spintype -> float -> unit

Increment or decrement a spin button’s value in a specified direction by a specified amount.

val set_wrap : t -> bool -> unit

Sets 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 -> unit

Sets the value of @spin_button.

val set_update_policy : t -> Gtk_enums.spinbuttonupdatepolicy -> unit

Sets 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 -> unit

Sets 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 -> unit

Sets 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 -> unit

Sets the flag that determines if non-numeric text can be typed into the spin button.

val set_increments : t -> float -> float -> unit

Sets 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 -> unit

Set the precision to be displayed by @spin_button.

Up to 20 digit precision is allowed.

val set_climb_rate : t -> float -> unit

Sets the acceleration rate for repeated changes when you hold down a button or key.

val set_adjustment : t -> [ `adjustment | `initially_unowned | `object_ ] Gobject.obj -> unit

Replaces the `GtkAdjustment` associated with @spin_button.

val set_activates_default : t -> bool -> unit

Sets 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 -> bool

Returns 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 -> int

Get the value @spin_button represented as an integer.

val get_value : t -> float

Get the value in the @spin_button.

val get_update_policy : t -> Gtk_enums.spinbuttonupdatepolicy

Gets the update behavior of a spin button.

See method@Gtk.SpinButton.set_update_policy.

val get_snap_to_ticks : t -> bool

Returns whether the values are corrected to the nearest step.

val get_range : t -> float * float

Gets the range allowed for @spin_button.

See method@Gtk.SpinButton.set_range.

val get_numeric : t -> bool

Returns whether non-numeric text can be typed into the spin button.

val get_increments : t -> float * float

Gets the current step and page the increments used by @spin_button.

See method@Gtk.SpinButton.set_increments.

val get_digits : t -> int

Fetches the precision of @spin_button.

val get_climb_rate : t -> float

Returns the acceleration rate for repeated changes.

val get_adjustment : t -> [ `adjustment | `initially_unowned | `object_ ] Gobject.obj

Get the adjustment associated with a `GtkSpinButton`.

val get_activates_default : t -> bool

Retrieves the value set by method@Gtk.SpinButton.set_activates_default.

val configure : t -> [ `adjustment | `initially_unowned | `object_ ] Gobject.obj option -> float -> int -> unit

Changes 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_id
val on_change_value : ?after:bool -> t -> callback:(scroll:Gtk_enums.scrolltype -> unit) -> Gobject.Signal.handler_id
val on_output : ?after:bool -> t -> callback:(unit -> bool) -> Gobject.Signal.handler_id
val on_value_changed : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_wrapped : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id