hildon.HVolumebar
A widget that displays a horizontal volume bar.
Description
The hildon.HVolumebar
widget displays a horizontal volume bar that allows increasing or
decreasing volume within a pre-defined range, and muting the volume by clicking on a specific mute icon.
Ancestry
Up to the first non-hildon ancestor:
... +-- gtk.Container +-- hildon.Volumebar +-- hildon.HVolumebar
Usage Example
import gtk import hildon def level_changed(volumebar, label): label.set_text("Volume level: %s" % volumebar.get_level()) def mute_toggled(volumebar, label): if volumebar.get_mute(): label.set_text("Volume level: Mute") else: level_changed(volumebar, label) window = hildon.Window() window.set_title("Test App") label = gtk.Label() volumebar = hildon.HVolumebar() volumebar.connect("level_changed", level_changed, label) volumebar.connect("mute_toggled", mute_toggled, label) level_changed(volumebar, label) #Init label text vbox = gtk.VBox(False, 10) vbox.pack_start (volumebar) vbox.pack_start (label) window.add(vbox) window.show_all() gtk.main()
Constructor
Creates a new hildon.HVolumebar
widget.
hildon.HVolumebar() |
|
---|---|
Returns | A new hildon.HVolumebar widget. |
Improve this page