SeparatorToolItem


Object Hierarchy:

Gtk.SeparatorToolItem Gtk.SeparatorToolItem Gtk.SeparatorToolItem Gtk.ToolItem Gtk.ToolItem Gtk.ToolItem->Gtk.SeparatorToolItem 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.SeparatorToolItem Atk.Implementor->Gtk.ToolItem Atk.Implementor->Gtk.Bin Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.SeparatorToolItem Gtk.Buildable->Gtk.ToolItem Gtk.Buildable->Gtk.Bin Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.Activatable Gtk.Activatable Gtk.Activatable->Gtk.SeparatorToolItem Gtk.Activatable->Gtk.ToolItem

Description:

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

A SeparatorToolItem is a ToolItem that separates groups of other ToolItems.

Depending on the theme, a SeparatorToolItem will often look like a vertical line on horizontally docked toolbars.

If the Toolbar child property “expand” is true and the property draw is false, a SeparatorToolItem will act as a “spring” that forces other items to the ends of the toolbar.

Use SeparatorToolItem to create a new SeparatorToolItem.

CSS nodes

GtkSeparatorToolItem has a single CSS node with name separator.

Example: SeparatorToolItem:

public class Application : Gtk.Window {
public Application () {
// Prepare Gtk.Window:
this.title = "My Gtk.SeparatorToolItem";
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);


// Toolbar content:
Gtk.Image img = new Gtk.Image.from_icon_name ("document-open", Gtk.IconSize.SMALL_TOOLBAR);
Gtk.ToolButton button1 = new Gtk.ToolButton (img, null);
button1.clicked.connect (() => {
print ("Button 1\n");
});
bar.add (button1);

Gtk.SeparatorToolItem separator = new Gtk.SeparatorToolItem ();
bar.add (separator);

img = new Gtk.Image.from_icon_name ("window-close", Gtk.IconSize.SMALL_TOOLBAR);
Gtk.ToolButton button2 = new Gtk.ToolButton (img, null);
button2.clicked.connect (() => {
print ("Button 2\n");
});
bar.add (button2);
}

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


Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Creation methods:

Methods:

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