ToolItem


Object Hierarchy:

Gtk.ToolItem Gtk.ToolItem Gtk.ToolItem Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.ToolItem Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.ToolItem Atk.Implementor->Gtk.Bin Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.ToolItem Gtk.Buildable->Gtk.Bin Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.Activatable Gtk.Activatable Gtk.Activatable->Gtk.ToolItem

Description:

[ CCode ( type_id = "gtk_tool_item_get_type ()" ) ]
public class ToolItem : Bin, Implementor, Activatable, Buildable

ToolItems are widgets that can appear on a toolbar.

To create a toolbar item that contain something else than a button, use ToolItem. Use add to add a child widget to the tool item.

For toolbar items that contain buttons, see the ToolButton, ToggleToolButton and RadioToolButton classes.

See the Toolbar class for a description of the toolbar widget, and ToolShell for a description of the tool shell interface.

Example: ToolItem:

public class Application : Gtk.Window {
public Application () {
// Prepare Gtk.Window:
this.title = "My Gtk.ToolItem";
this.window_position = Gtk.WindowPosition.CENTER;
this.destroy.connect (Gtk.main_quit);
this.set_default_size (350, -1);


// The Toolbar:
Gtk.Toolbar bar = new Gtk.Toolbar ();
this.add (bar);

// ToolItem:
Gtk.ToolItem button = new Gtk.ToolItem ();
bar.add (button);

// ToolItem content:
Gtk.Spinner spinner = new Gtk.Spinner ();
button.add (spinner);
spinner.start ();
}

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.ToolItem.vala


Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Widget
All known members inherited from interface Atk.Implementor