Gtk.Toolbar
const Gtk = imports.gi.Gtk;
let toolbar = new Gtk.Toolbar({
icon_size: value,
icon_size_set: value,
show_arrow: value,
toolbar_style: value,
});
A toolbar is created with a call to Gtk.new.
A toolbar can contain instances of a subclass of Gtk.ToolItem. To add a Gtk.ToolItem to the a toolbar, use Gtk.insert. To remove an item from the toolbar use Gtk.Container.prototype.remove. To add a button to the toolbar, add an instance of Gtk.ToolButton.
Toolbar items can be visually grouped by adding instances of Gtk.SeparatorToolItem to the toolbar. If the GtkToolbar child property "expand" is #TRUE and the property Gtk.SeparatorToolItem:draw is set to #FALSE, the effect is to force all following items to the end of the toolbar.
Creating a context menu for the toolbar can be done by connecting to the Gtk.popup-context-menu signal.
Hierarchy
-
GObject.Object
-
GObject.InitiallyUnowned
-
Gtk.Widget
-
Gtk.Container
- Gtk.Toolbar
-
-
-
Methods
- Gtk.Toolbar.prototype.get_drop_index
- Gtk.Toolbar.prototype.get_icon_size
- Gtk.Toolbar.prototype.get_item_index
- Gtk.Toolbar.prototype.get_n_items
- Gtk.Toolbar.prototype.get_nth_item
- Gtk.Toolbar.prototype.get_relief_style
- Gtk.Toolbar.prototype.get_show_arrow
- Gtk.Toolbar.prototype.get_style
- Gtk.Toolbar.prototype.insert
- Gtk.Toolbar.prototype.set_drop_highlight_item
- Gtk.Toolbar.prototype.set_icon_size
- Gtk.Toolbar.prototype.set_show_arrow
- Gtk.Toolbar.prototype.set_style
- Gtk.Toolbar.prototype.unset_icon_size
- Gtk.Toolbar.prototype.unset_style