import "gui/view";
This class is used for both main menu and popup menus.
static function create(): Menu
function insert_item(idx: Integer, title: String, action, data, id: Integer)
function insert_separator(idx: Integer)
function insert_submenu(idx: Integer, title: String, submenu: Menu)
function insert_item(idx: Integer, item: MenuItem)
-1 to insert at end).
The item can be either a regular item with attached callback, a separator,
a submenu, or a menu item object. The callback is taking two parameters, first
is data and second is id.
function add_item(title: String, action, data, id: Integer)
function add_separator()
function add_submenu(title: String, submenu: Menu)
function add_item(item: MenuItem)
-1.
function remove_item(idx: Integer)function get_item_count(): Integerfunction get_item(idx: Integer): MenuItemfunction dump()function show(view: View or SubView, x: Integer, y: Integer)This class contains information about the menu item. It is just a container of information not a native handle.
var menu: Menu;var idx: Integer;var title: String;var submenu: Menu;
var action;
var data;
var id: Integer;
function is_separator(): Booleanfunction update()function to_string(): String