gtk.ScaleButton — A button which pops up a scale. (new in PyGTK 2.12)
class gtk.ScaleButton(gtk.Button): |
+--gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Bin +-- gtk.Button +-- gtk.ScaleButton
|
gtk.Container Signal Prototypes
"popdown" | def callback( |
"popup" | def callback( |
def callback( |
gtk.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.
gtk.ScaleButton(size
, min
, max
, step
, icons
=None)
| A stock icon size. |
| The minimum value of the scale (usually 0). |
| The maximum value of the scale (usually 100). |
| The stepping of value when a scroll-wheel event, or up/down arrow event occurs (usually 2). |
| Optionally a list or tuple of icon names, you will be able to set the
list later with set_icons
|
Returns : | 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
.
def get_adjustment()
Returns : | 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.
def get_minus_button()
Returns : | 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
.
def get_orientation()
Returns : | 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.
def get_plus_button()
Returns : | 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
.
def get_popup()
Returns : | 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
.
def get_value()
Returns : | 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.
def set_adjustment(adjustment
)
| 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.
def set_icons(icons
)
| 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.
def set_orientation(icons
)
| 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.
def set_value(value
)
| 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.
def callback(scalebutton
, user_param1
, ...
)
| the scalebutton that received the "popdown" signal |
| the first user parameter (if any) specified
with the connect () |
| 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.
def callback(scalebutton
, user_param1
, ...
)
| the scalebutton that received the "popup" signal |
| the first user parameter (if any) specified
with the connect () |
| 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.
def callback(scalebutton
, value
, user_param1
, ...
)
| the scalebutton that received the "value-changed" signal |
| the new value |
| the first user parameter (if any) specified
with the connect () |
| 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.