gtk.ScaleButtonA button which pops up a scale. (new in PyGTK 2.12)Synopsisgtk.ScaleButtongtk.Buttongtk.ScaleButtonsizeminmaxstepiconsNoneget_adjustmentget_minus_buttonget_orientationget_plus_buttonget_popupget_valueset_adjustmentadjustmentset_iconsiconsset_orientationiconsset_valuevalueAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Container
+-- gtk.Bin
+-- gtk.Button
+-- gtk.ScaleButton
Implemented Interfacesgtk.ScaleButton
implements
gtk.Buildablegtk.ScaleButton Propertiesgtk.Object Propertiesgtk.Widget Propertiesgtk.Container Propertiesgtk.Button Properties
"adjustment"Read/Write
The gtk.Adjustment
that contains the current value of this scale button object.
"icons"Read/Write
The names of the icons to be used by the scale button. The first item in the array
will be used in the button when the current value is the lowest value, the second
item for the highest value. All the subsequent icons will be used for all the other
values, spread evenly over the range of values. If there's only one icon name in the
icons array, it will be used for all the values. If only two icon names are in the
icons array, the first one will be used for the bottom 50% of the scale, and the
second one for the top 50%.
It is recommended to use at least 3 icons so that the GtkScaleButton reflects the
current value of the scale better for the users.
"orientation"Read/Write
The orientation of the
gtk.ScaleButton's
popup window. Default value: gtk.ORIENTATION_VERTICAL.
Available from GTK+ 2.14.
"size"Read/Write
The icon size. Default value: gtk.ICON_SIZE_SMALL_TOOLBAR.
"value"Read/Write
The value of the scale. Default value: 0.
gtk.ScaleButton Style Propertiesgtk.Widget Style Propertiesgtk.Button Style Propertiesgtk.ScaleButton Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal Prototypesgtk.Container Signal Prototypesgtk.Button Signal Prototypes"popdown"callbackscalebuttonuser_param1..."popup"callbackscalebuttonuser_param1..."value-changed"callbackscalebuttonvalueuser_param1...Descriptiongtk.ScaleButton
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
gtk.VolumeButton
subclass that is tailored for this use case.
Constructorgtk.ScaleButtonsizeminmaxstepiconsNonesize :A stock icon size.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 :Optionally a list or tuple of icon names, you will be able to set the
list later with set_iconsReturns :a new
gtk.ScaleButton
object.This constructor is available in PyGTK 2.12 and above.
Creates a gtk.ScaleButton,
with a range between min and max,
with a stepping of step.
Methodsgtk.ScaleButton.get_adjustmentget_adjustmentReturns :The
gtk.Adjustment
associated with the scale.This method is available in PyGTK 2.12 and above.
The get_adjustment() method gets the
gtk.Adjustment
associated with the
gtk.ScaleButton's
scale. See
gtk.Range.get_adjustment
for details.
gtk.ScaleButton.get_minus_buttonget_minus_buttonReturns :the minus button of the
gtk.ScaleButton.
This method is available in PyGTK 2.14 and above.
The get_minus_button() method
retrieves the minus button of the
gtk.ScaleButton.
gtk.ScaleButton.get_orientationget_orientationReturns :the
gtk.ScaleButton's
orientation.
This method is available in PyGTK 2.14 and above.
The get_orientation() method
gets the orientation of the
gtk.ScaleButton's
popup window.
gtk.ScaleButton.get_plus_buttonget_plus_buttonReturns :the plus button of the
gtk.ScaleButton.
This method is available in PyGTK 2.14 and above.
The get_plus_button() method
retrieves the plus button of the
gtk.ScaleButton.
gtk.ScaleButton.get_popupget_popupReturns :the popup of the
gtk.ScaleButton.
This method is available in PyGTK 2.14 and above.
The get_popup() method
gets the popup of the
gtk.ScaleButton.
gtk.ScaleButton.get_valueget_valueReturns :The current value of the scale button.This method is available in PyGTK 2.12 and above.
The get_value() method gets the current value of the scale button.
gtk.ScaleButton.set_adjustmentset_adjustmentadjustmentadjustment :The
gtk.Adjustment
to set.This method is available in PyGTK 2.12 and above.
The set_adjustment() method sets the
gtk.Adjustment
to be used as a model for the
gtk.ScaleButton's
scale. See
gtk.Range.set_adjustment
for details.
gtk.ScaleButton.set_iconsset_iconsiconsicons :A list or tuple of icon names.This method is available in PyGTK 2.12 and above.
The set_icons() method sets the icons to be used by the
scale button. For details, see the gtk.ScaleButton:icons property
for details.
gtk.ScaleButton.set_orientationset_orientationiconsorientation :the new orientation.This method is available in PyGTK 2.14 and above.
The set_orientation() method sets the
orientation of the
gtk.ScaleButton's
popup window.
gtk.ScaleButton.set_valueset_valuevaluevalue :The new value of the scale button.This method is available in PyGTK 2.12 and above.
The set_value() method 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.
SignalsThe "popdown" gtk.ScaleButton Signalcallbackscalebuttonuser_param1...scalebutton :the scalebutton that received the "popdown" signaluser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)This signal is available in PyGTK 2.12 and above.
The "popdown" signal is a keybinding signal which gets emitted to popdown the scale widget.
The default binding for this signal is Escape.
The "popup" gtk.ScaleButton Signalcallbackscalebuttonuser_param1...scalebutton :the scalebutton that received the "popup" signaluser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)This signal is available in PyGTK 2.12 and above.
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 "value-changed" gtk.ScaleButton Signalcallbackscalebuttonvalueuser_param1...scalebutton :the scalebutton that received the "value-changed" signalvalue :the new valueuser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)This signal is available in PyGTK 2.12 and above.
The "value-changed" signal is emitted when the value field has changed.