Scale.connectFormatValue
gulong connectFormatValue(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == string)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == double)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.scale.Scale)))
&& Parameters!T.length < 3)Connect to FormatValue signal.
Signal which allows you to change how the scale value is displayed. Connect a signal handler which returns an allocated string representing value. That string will then be used to display the scale's value.
If no user-provided handlers are installed, the value will be displayed on its own, rounded according to the value of the #GtkScale:digits property.
Here's an example signal handler which displays a value 1.0 as with "-->1.0<--".
static gchar*
format_value_callback (GtkScale *scale,
gdouble value)
{
return g_strdup_printf ("-->\%0.*g<--",
gtk_scale_get_digits (scale), value);
}Parameters
callback | signal callback delegate or function to connect string callback(double value, gtk.scale.Scale scale) value the value to format (optional) scale the instance the signal is connected to (optional) Returns allocated string representing value |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |
Returns
Signal ID