Skip to content

guimenuctrl: members

11 implemented, 0 reserved. Entries are sorted by name.

guimenuctrl.addmenu(name: string) -> guicontextmenuctrl

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Adds a menu with that title at the end of the bar and returns its context menu; returns the existing one when the title is taken.

temp.menu = Bar.addmenu("File");
menu.addrow(0, "Open");

Specification: gui-legacy.md§23.

guimenuctrl.clearmenus() -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Removes every menu of the bar.

Bar.clearmenus();

Specification: gui-legacy.md§23.

guimenuctrl.findmenu(name: string) -> guicontextmenuctrl

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

The context menu of the menu with that title, or nothing.

temp.menu = Bar.findmenu("File");

Specification: gui-legacy.md§23.

guimenuctrl.iconheight: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Property of GuiMenuCtrl in the legacy GUI toolkit (gui.md§2, §3).

new GuiMenuCtrl("MyControl") { iconheight = 1; }

Specification: gui.md§3.

guimenuctrl.iconwidth: number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Property of GuiMenuCtrl in the legacy GUI toolkit (gui.md§2, §3).

new GuiMenuCtrl("MyControl") { iconwidth = 1; }

Specification: gui.md§3.

guimenuctrl.menus: guicontextmenuctrl[]

Runs on: client only. Origin: compatibility. Since: M8. Playground: no. read-only.

The context menus of the bar, left to right.

for (temp.m: Bar.menus)
echo(m.rowcount);

Specification: gui.md§3.

guimenuctrl.onCancel()

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when an open menu closes without a choice.

function Bar.onCancel() {
echo("onCancel");
}

Specification: gui-legacy.md§23.

guimenuctrl.onIconResized(width: number, height: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised by setIconSize with the new icon size.

function Bar.onIconResized(w, h) {
echo(w @ " " @ h);
}

Specification: gui-legacy.md§23.

guimenuctrl.onSelect(menu: string, id: any, text: string, index: number)

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Raised when a row of a menu is chosen, with the menu title and the row id, text and index.

function Bar.onSelect(menu, id, text, index) {
echo(menu @ ": " @ text);
}

Specification: gui-legacy.md§23.

guimenuctrl.removemenu(name: string) -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Removes the menu with that title.

Bar.removemenu("File");

Specification: gui-legacy.md§23.

guimenuctrl.seticonsize(width: number, height: number) -> number

Runs on: client only. Origin: compatibility. Since: M8. Playground: no.

Sets the icon size (at most 64 by 64) of the bar and its menus and raises onIconResized.

Bar.seticonsize(16, 16);

Specification: gui-legacy.md§23.

Engine version 0.1.0. Built 2026-11-18.