gtk :: GtkSpinButton :: defaultinit
# Retrieve an integer or floating-point number from the user
# See: https://developer.gnome.org/gtk3/3.2/GtkSpinButton.html
extern class GtkSpinButton `{GtkSpinButton *`}
super GtkEntry
new (adjustment: GtkAdjustment, climb_rate: Float, digits: Int)is extern `{
return (GtkSpinButton *)gtk_spin_button_new(adjustment, climb_rate, digits);
`}
new with_range(min: Float, max: Float, step: Float)is extern `{
return (GtkSpinButton *)gtk_spin_button_new_with_range(min, max, step);
`}
fun configure (adjustment: GtkAdjustment, climb_rate: Float, digits: Int) `{
gtk_spin_button_configure(self, adjustment, climb_rate, digits);
`}
fun adjustment: GtkAdjustment `{
return gtk_spin_button_get_adjustment(self);
`}
fun adjustment=(value: GtkAdjustment) `{
gtk_spin_button_set_adjustment(self, value);
`}
fun digits: Int `{
return gtk_spin_button_get_digits(self);
`}
fun digits=(nb_digits: Int) `{
gtk_spin_button_set_digits(self, nb_digits);
`}
fun value: Float `{
return gtk_spin_button_get_value(self);
`}
fun val=(val: Float) `{
gtk_spin_button_set_value(self, val);
`}
fun spin(direction: GtkSpinType, increment: Float)`{
gtk_spin_button_spin(self, direction, increment);
`}
end
lib/gtk/v3_4/gtk_widgets_ext.nit:161,1--205,3