class fwt::Menu

sys::Obj
  fwt::Widget
    fwt::MenuItem
      fwt::Menu

@Js
@Serializable { collection=true }

Source

Menu contains MenuItems. Menu is also itself a MenuItem when nested inside other Menus.

add

@Operator
virtual override This add(Widget? kid)

Source

addCommand

MenuItem addCommand(Command c)

Source

Add a menu item for the specified command. Default implementation is to add an item without the icon.

addSep

Void addSep()

Source

Add a separator to the menu.

make

new make()

Source

Default constructor.

onClose

EventListeners onClose()

Source

Callback function when menu is closed.

Event id fired:

Event fields:

  • none
onOpen

EventListeners onOpen()

Source

Callback function when menu is opened. This callback provides a change to build a lazily populated menu.

Event id fired:

Event fields:

  • none
open

This open(Widget parent, Point pos)

Source

Open this menu as a popup at the coordinates relative to the parent widget. This method blocks until the menu is closed.