GtkScale
Details
struct GtkScale
The GtkScale struct contains the following fields.
(These fields should be considered read-only. They should never be set by
an application.)
gtk_scale_set_digits ()
void gtk_scale_set_digits (GtkScale *scale,
gint digits); |
Sets the number of decimal places that are displayed in the value. Also causes
the value of the adjustment to be rounded off to this number of digits, so the
retrieved value matches the value the user saw.
gtk_scale_set_draw_value ()
void gtk_scale_set_draw_value (GtkScale *scale,
gboolean draw_value); |
Specifies whether the current value is displayed as a string next to the
slider.
gtk_scale_set_value_pos ()
Sets the position in which the current value is displayed.
gtk_scale_get_digits ()
gint gtk_scale_get_digits (GtkScale *scale); |
Gets the number of decimal places that are displayed in the value.
gtk_scale_get_draw_value ()
gboolean gtk_scale_get_draw_value (GtkScale *scale); |
Returns whether the current value is displayed as a string next to the
slider.
gtk_scale_get_value_pos ()
Gets the position in which the current value is displayed.
Properties
- "digits" (gint : Read / Write)
The number of decimal places that are displayed in the value.
- "draw-value" (gboolean : Read / Write)
If the current value is displayed as a string next to the slider.
- "value-pos" (GtkPositionType : Read / Write)
The position in which the current value is displayed.
Signals
The "format-value" signal
gchar* user_function (GtkScale *scale,
gdouble arg1,
gpointer user_data); |
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.
Here's an example signal handler which displays a value 1.0 as
with "-->1.0<--".