Gio.Menu

const Gio = imports.gi.Gio;

let menu = new Gio.Menu();
  

Gio.Menu is a simple implementation of Gio.MenuModel. You populate a Gio.Menu by adding Gio.MenuItem instances to it.

There are some convenience functions to allow you to directly add items (avoiding Gio.MenuItem) for the common cases. To add a regular item, use Gio.Menu.prototype.insert. To add a section, use Gio.Menu.prototype.insert_section. To add a submenu, use Gio.Menu.prototype.insert_submenu.

Since 2.32

Hierarchy

  • GObject.Object
    • Gio.MenuModel
      • Gio.Menu