ScaleButton
Object Hierarchy:
Description:
[ CCode ( type_id = "gtk_scale_button_get_type ()" ) ]
public class ScaleButton : Button, Implementor, Actionable, Activatable, Buildable, Orientable
public class ScaleButton : Button, Implementor, Actionable, Activatable, Buildable, Orientable
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 VolumeButton subclass that is tailored for this use case.
CSS nodes
GtkScaleButton has a single CSS node with name button. To differentiate it from a plain Button, it gets the .scale style class.
The popup widget that contains the scale has a .scale-popup style class.
Example: ScaleButton:
public class Application : Gtk.Window {
public Application () {
// Prepare Gtk.Window:
this.title = "My Gtk.ScaleButton";
this.window_position = Gtk.WindowPosition.CENTER;
this.destroy.connect (Gtk.main_quit);
// The button:
string[] icons = { "zoom-out", "zoom-in" };
Gtk.ScaleButton button = new Gtk.ScaleButton (Gtk.IconSize.SMALL_TOOLBAR, 0.0, 1.0, 0.2, icons);
this.add (button);
// Catch changes:
button.value_changed.connect ((val) => {
print ("%f\n", val);
});
}
public static int main (string[] args) {
Gtk.init (ref args);
Application app = new Application ();
app.show_all ();
Gtk.main ();
return 0;
}
}
valac --pkg gtk+-3.0 Gtk.ScaleButton.vala
All known sub-classes:
Namespace: Gtk
Package: gtk+-3.0
Content:
Properties:
Creation methods:
Methods:
Signals:
Inherited Members:
All known members inherited from class Gtk.Button
All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Container
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Actionable
All known members inherited from interface Gtk.Activatable
All known members inherited from interface Gtk.Buildable
All known members inherited from interface Gtk.Orientable