Synopsis
#include <gtk/gtk.h>
GtkScaleButton;
GtkWidget* gtk_scale_button_new (GtkIconSize size,
gdouble min,
gdouble max,
gdouble step,
const gchar **icons);
void gtk_scale_button_set_adjustment (GtkScaleButton *button,
GtkAdjustment *adjustment);
void gtk_scale_button_set_icons (GtkScaleButton *button,
const gchar **icons);
void gtk_scale_button_set_value (GtkScaleButton *button,
gdouble value);
GtkAdjustment* gtk_scale_button_get_adjustment (GtkScaleButton *button);
gdouble gtk_scale_button_get_value (GtkScaleButton *button);
GtkWidget* gtk_scale_button_get_popup (GtkScaleButton *button);
GtkWidget* gtk_scale_button_get_plus_button (GtkScaleButton *button);
GtkWidget* gtk_scale_button_get_minus_button (GtkScaleButton *button);
void gtk_scale_button_set_orientation (GtkScaleButton *button,
GtkOrientation orientation);
GtkOrientation gtk_scale_button_get_orientation (GtkScaleButton *button);
Object Hierarchy
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBin
+----GtkButton
+----GtkScaleButton
+----GtkVolumeButton
Properties"adjustment" GtkAdjustment* : Read / Write "icons" GStrv* : Read / Write "orientation" GtkOrientation : Read / Write "size" GtkIconSize : Read / Write "value" gdouble : Read / Write DescriptionGtkScaleButton provides a button which pops up a scale widget. This kind of widget is commonly used for volume controls in multimedia applications, and GTK+ provides a GtkVolumeButton subclass that is tailored for this use case. Detailsgtk_scale_button_new ()GtkWidget* gtk_scale_button_new (GtkIconSize size, gdouble min, gdouble max, gdouble step, const gchar **icons);
Creates a GtkScaleButton, with a range between
Since 2.12 gtk_scale_button_set_adjustment ()void gtk_scale_button_set_adjustment (GtkScaleButton *button, GtkAdjustment *adjustment);
Sets the GtkAdjustment to be used as a model
for the GtkScaleButton's scale.
See
Since 2.12 gtk_scale_button_set_icons ()void gtk_scale_button_set_icons (GtkScaleButton *button, const gchar **icons); Sets the icons to be used by the scale button. For details, see the "icons" property.
Since 2.12 gtk_scale_button_set_value ()void gtk_scale_button_set_value (GtkScaleButton *button, gdouble value); Sets the current value of the scale; if the value is outside the minimum or maximum range values, it will be clamped to fit inside them. The scale button emits the "value-changed" signal if the value changes.
Since 2.12 gtk_scale_button_get_adjustment ()GtkAdjustment* gtk_scale_button_get_adjustment (GtkScaleButton *button);
Gets the GtkAdjustment associated with the GtkScaleButton's scale.
See
Since 2.12 gtk_scale_button_get_value ()gdouble gtk_scale_button_get_value (GtkScaleButton *button); Gets the current value of the scale button.
Since 2.12 gtk_scale_button_get_popup ()GtkWidget* gtk_scale_button_get_popup (GtkScaleButton *button); Retrieves the popup of the GtkScaleButton.
Since 2.14 gtk_scale_button_get_plus_button ()GtkWidget* gtk_scale_button_get_plus_button (GtkScaleButton *button); Retrieves the plus button of the GtkScaleButton.
Since 2.14 gtk_scale_button_get_minus_button ()GtkWidget* gtk_scale_button_get_minus_button (GtkScaleButton *button); Retrieves the minus button of the GtkScaleButton.
Since 2.14 gtk_scale_button_set_orientation ()void gtk_scale_button_set_orientation (GtkScaleButton *button, GtkOrientation orientation); Sets the orientation of the GtkScaleButton's popup window.
Since 2.14 gtk_scale_button_get_orientation ()GtkOrientation gtk_scale_button_get_orientation (GtkScaleButton *button); Gets the orientation of the GtkScaleButton's popup window.
Since 2.14 Property DetailsThe
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
the object which received the signal |
|
user data set when the signal handler was connected. |
Since 2.12
"popup" signalvoid user_function (GtkScaleButton *button, gpointer user_data) : Run Last / Action
The ::popup signal is a keybinding signal which gets emitted to popup the scale widget.
The default bindings for this signal are Space, Enter and Return.
|
the object which received the signal |
|
user data set when the signal handler was connected. |
Since 2.12
"value-changed" signalvoid user_function (GtkScaleButton *button, gdouble value, gpointer user_data) : Run Last
The ::value-changed signal is emitted when the value field has changed.
|
the object which received the signal |
|
the new value |
|
user data set when the signal handler was connected. |
Since 2.12