A button which pops up a scale
Class GtkScaleButton( size, min, max, step, icons )
size | a stock icon size (GtkIconSize). |
min | the minimum value of the scale (usually 0) |
max | the maximum value of the scale (usually 100) |
step | the stepping of value when a scroll-wheel event, or up/down arrow event occurs (usually 2) |
icons | an array of icon names (strings), or nil if you want to set the list later with set_icons(). |
GtkScaleButton 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.
Methods | |
get_adjustment | Gets the GtkAdjustment associated with the GtkScaleButton's scale. |
get_minus_button | Retrieves the minus button of the GtkScaleButton. |
get_plus_button | Retrieves the plus button of the GtkScaleButton. |
get_popup | Retrieves the popup of the GtkScaleButton. |
get_value | Gets the current value of the scale button. |
set_adjustment | Sets the GtkAdjustment to be used as a model for the GtkScaleButton's scale. |
set_icons | Sets the icons to be used by the scale button. |
set_value | Sets the current value of the scale. |
signal_popdown | The popdown signal is a keybinding signal which gets emitted to popdown the scale widget. |
signal_popup | The popup signal is a keybinding signal which gets emitted to popup the scale widget. |
signal_value_changed | The value-changed signal is emitted when the value field has changed. |
Gets the GtkAdjustment associated with the GtkScaleButton's scale.
GtkScaleButton.get_adjustment()
Return | the adjustment associated with the scale |
Retrieves the minus button of the GtkScaleButton.
GtkScaleButton.get_minus_button()
Return | the minus button of the GtkScaleButton (as a GtkWidget). |
Retrieves the plus button of the GtkScaleButton.
GtkScaleButton.get_plus_button()
Return | the plus button of the GtkScaleButton (as a GtkWidget). |
Retrieves the popup of the GtkScaleButton.
GtkScaleButton.get_popup()
Return | the popup of the GtkScaleButton (as a GtkWidget). |
Gets the current value of the scale button.
GtkScaleButton.get_value()
Return | current value of the scale button |
Sets the GtkAdjustment to be used as a model for the GtkScaleButton's scale.
GtkScaleButton.set_adjustment( adjustment )
adjustment | a GtkAdjustment |
Sets the icons to be used by the scale button.
GtkScaleButton.set_icons( icons )
icons | an array of icon names (strings). |
Sets the current value of the scale.
GtkScaleButton.set_value( value )
value | new value of the scale button |
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.
The popdown signal is a keybinding signal which gets emitted to popdown the scale widget.
GtkScaleButton.signal_popdown()
The default binding for this signal is Escape.
The popup signal is a keybinding signal which gets emitted to popup the scale widget.
GtkScaleButton.signal_popup()
The default bindings for this signal are Space, Enter and Return.
The value-changed signal is emitted when the value field has changed.
GtkScaleButton.signal_value_changed()