Spinner
Object Hierarchy:
Description:
[ CCode ( type_id = "gtk_spinner_get_type ()" ) ]
public class Spinner : Widget, Implementor, Buildable
public class Spinner : Widget, Implementor, Buildable
A GtkSpinner widget displays an icon-size spinning animation.
It is often used as an alternative to a ProgressBar for displaying indefinite activity, instead of actual progress.
To start the animation, use start, to stop it use stop.
CSS nodes
GtkSpinner has a single CSS node with the name spinner. When the animation is active, the GtkSpinner:checked
pseudoclass is added
to this node.
Example: Spinner:
public class Application : Gtk.Window {
public Application () {
// Prepare Gtk.Window:
this.title = "My Gtk.Spinner";
this.window_position = Gtk.WindowPosition.CENTER;
this.destroy.connect (Gtk.main_quit);
this.set_default_size (400, 400);
// Create & add a new spinner:
Gtk.Spinner spinner = new Gtk.Spinner ();
spinner.active = true;
this.add (spinner);
}
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.Spinner.vala
Namespace: Gtk
Package: gtk+-3.0
Content:
Properties:
Creation methods:
Methods:
Inherited Members:
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.Buildable