SpinButton.connectOutput

gulong connectOutput(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == bool) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.spin_button.SpinButton))) && Parameters!T.length < 2)

Connect to Output signal.

The ::output signal can be used to change to formatting of the value that is displayed in the spin buttons entry.

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

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

    return TRUE;
 }

Parameters

callbacksignal callback delegate or function to connect bool callback(gtk.spin_button.SpinButton spinButton) spinButton the instance the signal is connected to (optional) Returns true if the value has been displayed
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID