Gtk.UIManager.prototype.add_ui

function add_ui(merge_id:Number, path:String, name:String, action:String, type:Gtk.UIManagerItemType, top:Boolean):void {
    // Gjs wrapper for gtk_ui_manager_add_ui()
}

Adds a UI element to the current contents of manager.

If type is Gtk.UIManagerItemType.auto, GTK+ inserts a menuitem, toolitem or separator if such an element can be inserted at the place determined by path. Otherwise type must indicate an element that can be inserted at the place determined by path.

If path points to a menuitem or toolitem, the new element will be inserted before or after this item, depending on top.

Since 2.4

merge_id

the merge id for the merged UI, see Gtk.new_merge_id

path

a path

name

the name for the added UI element

action

the name of the action to be proxied, or null to add a separator

type

the type of UI element to add.

top

if true, the UI element is added before its siblings, otherwise it is added after its siblings.