struct Gtk::SpinButton::OutputSignal

Overview

Emitted to tweak the formatting of the value for display.

WARNING ⚠️ The following code is in c ⚠️

// show leading zeros
static gboolean
on_output (GtkSpinButton *spin,
           gpointer       data)
{
   GtkAdjustment *adjustment;
   char *text;
   int value;

   adjustment = gtk_spin_button_get_adjustment (spin);
   value = (int)gtk_adjustment_get_value (adjustment);
   text = g_strdup_printf ("%02d", value);
   gtk_spin_button_set_text (spin, text):
   g_free (text);

   return TRUE;
}

Defined in:

auto/gtk-4.0/spin_button.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(source, detail = nil) #

Instance Method Detail

def [](detail : String) : self #

def connect(&block : Proc(Bool)) #

def connect(handler : Proc(Bool)) #

def connect(handler : Proc(Gtk::SpinButton, Bool)) #

def connect_after(&block : Proc(Bool)) #

def connect_after(handler : Proc(Bool)) #

def connect_after(handler : Proc(Gtk::SpinButton, Bool)) #

def emit : Nil #

def name #