
@c %start of fragment

@deftp Class <gtk-spin-button>
Derives from @code{<gtk-entry>}.

This class defines the following properties:

@table @code
@item adjustment
The adjustment that holds the value of the spinbutton

@item climb-rate
The acceleration rate when you hold down a button

@item digits
The number of decimal places to display

@item snap-to-ticks
Whether erroneous values are automatically changed to a spin button's nearest
step increment

@item numeric
Whether non-numeric characters should be ignored

@item wrap
Whether a spin button should wrap upon reaching its limits

@item update-policy
Whether the spin button should update always, or only when the value is legal

@item value
Reads the current value, or sets a new value

@end table

@end deftp

@defop Signal <gtk-spin-button> value-changed 
@end defop

@defop Signal <gtk-spin-button> change-value  (arg0@tie{}@code{<gtk-scroll-type>})
@end defop

@defop Signal <gtk-spin-button> input  (arg0@tie{}@code{<gpointer>}) @result{}@tie{}@code{<gint>}
@end defop

@defop Signal <gtk-spin-button> output  @result{}@tie{}@code{<gboolean>}
@end defop

@defop Signal <gtk-spin-button> wrapped 
The wrapped signal is emitted right after the spinbutton wraps from its maximum
to minimum value or vice-versa.

Since 2.10

@end defop

@deffn Function gtk-spin-button-configure  (self@tie{}@code{<gtk-spin-button>}) (adjustment@tie{}@code{<gtk-adjustment>}) (climb_rate@tie{}@code{double}) (digits@tie{}@code{unsigned-int})
@deffnx Method configure
Changes the properties of an existing spin button. The adjustment, climb rate,
and number of decimal places are all changed accordingly, after this function
call.

@table @var
@item spin-button
a @code{<gtk-spin-button>}.

@item adjustment
a @code{<gtk-adjustment>}.

@item climb-rate
the new climb rate.

@item digits
the number of decimal places to display in the spin button.

@end table

@end deffn

@deffn Function gtk-spin-button-new  (adjustment@tie{}@code{<gtk-adjustment>}) (climb_rate@tie{}@code{double}) (digits@tie{}@code{unsigned-int}) @result{}@tie{} (ret@tie{}@code{<gtk-widget>})
Creates a new @code{<gtk-spin-button>}.

@table @var
@item adjustment
the @code{<gtk-adjustment>} object that this spin button should use.

@item climb-rate
specifies how much the spin button changes when an arrow is clicked on.

@item digits
the number of decimal places to display.

@item ret
The new spin button as a @code{<gtk-widget>}.

@end table

@end deffn

@deffn Function gtk-spin-button-new-with-range  (min@tie{}@code{double}) (max@tie{}@code{double}) (step@tie{}@code{double}) @result{}@tie{} (ret@tie{}@code{<gtk-widget>})
This is a convenience constructor that allows creation of a numeric
@code{<gtk-spin-button>} without manually creating an adjustment. The value is
initially set to the minimum value and a page increment of 10 * @var{step} is
the default. The precision of the spin button is equivalent to the precision of
@var{step}.

Note that the way in which the precision is derived works best if @var{step} is
a power of ten. If the resulting precision is not suitable for your needs, use
@code{gtk-spin-button-set-digits} to correct it.

@table @var
@item min
Minimum allowable value

@item max
Maximum allowable value

@item step
Increment added or subtracted by spinning the widget

@item ret
The new spin button as a @code{<gtk-widget>}.

@end table

@end deffn

@deffn Function gtk-spin-button-set-adjustment  (self@tie{}@code{<gtk-spin-button>}) (adjustment@tie{}@code{<gtk-adjustment>})
@deffnx Method set-adjustment
Replaces the @code{<gtk-adjustment>} associated with @var{spin-button}.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item adjustment
a @code{<gtk-adjustment>} to replace the existing adjustment

@end table

@end deffn

@deffn Function gtk-spin-button-get-adjustment  (self@tie{}@code{<gtk-spin-button>}) @result{}@tie{} (ret@tie{}@code{<gtk-adjustment>})
@deffnx Method get-adjustment
Get the adjustment associated with a @code{<gtk-spin-button>}

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item ret
the @code{<gtk-adjustment>} of @var{spin-button}

@end table

@end deffn

@deffn Function gtk-spin-button-set-digits  (self@tie{}@code{<gtk-spin-button>}) (digits@tie{}@code{unsigned-int})
@deffnx Method set-digits
Set the precision to be displayed by @var{spin-button}. Up to 20 digit precision
is allowed.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item digits
the number of digits after the decimal point to be displayed for the spin
button's value

@end table

@end deffn

@deffn Function gtk-spin-button-set-increments  (self@tie{}@code{<gtk-spin-button>}) (step@tie{}@code{double}) (page@tie{}@code{double})
@deffnx Method set-increments
Sets the step and page increments for spin_button. This affects how quickly the
value changes when the spin button's arrows are activated.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item step
increment applied for a button 1 press.

@item page
increment applied for a button 2 press.

@end table

@end deffn

@deffn Function gtk-spin-button-set-range  (self@tie{}@code{<gtk-spin-button>}) (min@tie{}@code{double}) (max@tie{}@code{double})
@deffnx Method set-range
Sets the minimum and maximum allowable values for @var{spin-button}

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item min
minimum allowable value

@item max
maximum allowable value

@end table

@end deffn

@deffn Function gtk-spin-button-get-value-as-int  (self@tie{}@code{<gtk-spin-button>}) @result{}@tie{} (ret@tie{}@code{int})
@deffnx Method get-value-as-int
Get the value @var{spin-button} represented as an integer.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item ret
the value of @var{spin-button}

@end table

@end deffn

@deffn Function gtk-spin-button-set-value  (self@tie{}@code{<gtk-spin-button>}) (value@tie{}@code{double})
@deffnx Method set-value
Set the value of @var{spin-button}.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item value
the new value

@end table

@end deffn

@deffn Function gtk-spin-button-set-update-policy  (self@tie{}@code{<gtk-spin-button>}) (policy@tie{}@code{<gtk-spin-button-update-policy>})
@deffnx Method set-update-policy
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.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item policy
a @code{<gtk-spin-button-update-policy>} value

@end table

@end deffn

@deffn Function gtk-spin-button-set-numeric  (self@tie{}@code{<gtk-spin-button>}) (numeric@tie{}@code{bool})
@deffnx Method set-numeric
Sets the flag that determines if non-numeric text can be typed into the spin
button.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item numeric
flag indicating if only numeric entry is allowed.

@end table

@end deffn

@deffn Function gtk-spin-button-spin  (self@tie{}@code{<gtk-spin-button>}) (direction@tie{}@code{<gtk-spin-type>}) (increment@tie{}@code{double})
@deffnx Method spin
Increment or decrement a spin button's value in a specified direction by a
specified amount.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item direction
a @code{<gtk-spin-type>} indicating the direction to spin.

@item increment
step increment to apply in the specified direction.

@end table

@end deffn

@deffn Function gtk-spin-button-set-wrap  (self@tie{}@code{<gtk-spin-button>}) (wrap@tie{}@code{bool})
@deffnx Method set-wrap
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.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item wrap
a flag indicating if wrapping behavior is performed.

@end table

@end deffn

@deffn Function gtk-spin-button-set-snap-to-ticks  (self@tie{}@code{<gtk-spin-button>}) (snap_to_ticks@tie{}@code{bool})
@deffnx Method set-snap-to-ticks
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.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item snap-to-ticks
a flag indicating if invalid values should be corrected.

@end table

@end deffn

@deffn Function gtk-spin-button-update  (self@tie{}@code{<gtk-spin-button>})
@deffnx Method update
Manually force an update of the spin button.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@end table

@end deffn

@deffn Function gtk-spin-button-get-digits  (self@tie{}@code{<gtk-spin-button>}) @result{}@tie{} (ret@tie{}@code{unsigned-int})
@deffnx Method get-digits
Fetches the precision of @var{spin-button}. See
@code{gtk-spin-button-set-digits}.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item ret
the current precision

@end table

@end deffn

@deffn Function gtk-spin-button-get-increments  (self@tie{}@code{<gtk-spin-button>}) @result{}@tie{} (step@tie{}@code{double}) (page@tie{}@code{double})
@deffnx Method get-increments
Gets the current step and page the increments used by @var{spin-button}. See
@code{gtk-spin-button-set-increments}.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item step
location to store step increment, or @samp{@code{#f}}

@item page
location to store page increment, or @samp{@code{#f}}

@end table

@end deffn

@deffn Function gtk-spin-button-get-numeric  (self@tie{}@code{<gtk-spin-button>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method get-numeric
Returns whether non-numeric text can be typed into the spin button. See
@code{gtk-spin-button-set-numeric}.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item ret
@samp{@code{#t}} if only numeric text can be entered

@end table

@end deffn

@deffn Function gtk-spin-button-get-range  (self@tie{}@code{<gtk-spin-button>}) @result{}@tie{} (min@tie{}@code{double}) (max@tie{}@code{double})
@deffnx Method get-range
Gets the range allowed for @var{spin-button}. See
@code{gtk-spin-button-set-range}.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item min
location to store minimum allowed value, or @samp{@code{#f}}

@item max
location to store maximum allowed value, or @samp{@code{#f}}

@end table

@end deffn

@deffn Function gtk-spin-button-get-snap-to-ticks  (self@tie{}@code{<gtk-spin-button>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method get-snap-to-ticks
Returns whether the values are corrected to the nearest step. See
@code{gtk-spin-button-set-snap-to-ticks}.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item ret
@samp{@code{#t}} if values are snapped to the nearest step.

@end table

@end deffn

@deffn Function gtk-spin-button-get-value  (self@tie{}@code{<gtk-spin-button>}) @result{}@tie{} (ret@tie{}@code{double})
@deffnx Method get-value
Get the value in the @var{spin-button}.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item ret
the value of @var{spin-button}

@end table

@end deffn

@deffn Function gtk-spin-button-get-wrap  (self@tie{}@code{<gtk-spin-button>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method get-wrap
Returns whether the spin button's value wraps around to the opposite limit when
the upper or lower limit of the range is exceeded. See
@code{gtk-spin-button-set-wrap}.

@table @var
@item spin-button
a @code{<gtk-spin-button>}

@item ret
@samp{@code{#t}} if the spin button wraps around

@end table

@end deffn


@c %end of fragment
