struct Gtk::SpinButton::OutputSignal
- Gtk::SpinButton::OutputSignal
- GObject::Signal
- 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 (Gtk::SpinButton *spin,
gpointer data)
{
Gtk::Adjustment *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_editable_set_text (GTK_EDITABLE (spin), text):
g_free (text);
return TRUE;
}
Defined in:
lib/gi-crystal/src/auto/gtk-4.0/spin_button.crInstance Method Summary
- #connect(*, after : Bool = false, &block : Proc(Bool)) : GObject::SignalConnection
- #connect(handler : Proc(Bool), *, after : Bool = false) : GObject::SignalConnection
- #connect(handler : Proc(Gtk::SpinButton, Bool), *, after : Bool = false) : GObject::SignalConnection
- #emit : Nil
-
#name : String
The signal name
Instance methods inherited from struct GObject::Signal
[](detail : String) : self
[],
name : String
name
Constructor methods inherited from struct GObject::Signal
new(source : GObject::Object, detail : String? = nil)
new
Instance Method Detail
def connect(handler : Proc(Gtk::SpinButton, Bool), *, after : Bool = false) : GObject::SignalConnection
#