struct Gtk::SpinButton::OutputSignal
- Gtk::SpinButton::OutputSignal
- Struct
- Value
- Object
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.crConstructors
Instance Method Summary
- #[](detail : String) : self
- #connect(&block : Proc(Bool))
- #connect(handler : Proc(Bool))
- #connect(handler : Proc(Gtk::SpinButton, Bool))
- #connect_after(&block : Proc(Bool))
- #connect_after(handler : Proc(Bool))
- #connect_after(handler : Proc(Gtk::SpinButton, Bool))
- #emit : Nil
- #name