Module view.MainMenu

Menu that provides access to the functions of the simulator.

Functions

MainMenu.new (controller, controlled) Constructor.
MainMenu:add_addon_button (item, context, Tool) Adds a tool item to the addon group.
MainMenu:pack_group (title, ...) Adds a new group to the main menu palette.
MainMenu:project_selected (event, project) Updates the menu items, based on the current project.
(private) MainMenu:add_s_buttons (...) Adds buttons to the s_buttons group.
(private) MainMenu:build_gui () Builds the interface.
(private) MainMenu:connect_events () Connects the events of the menu to the controller.


Functions

MainMenu.new (controller, controlled)
Constructor.

Parameters

  • controller:
  • controlled: MainControler instance that created the menu.

Return value:

New MainMenu instance
MainMenu:add_addon_button (item, context, Tool)
Adds a tool item to the addon group.

Parameters

  • item:
  • context: If the button must only be clickable if there's a selected project
  • Tool: item to add to the group
MainMenu:pack_group (title, ...)
Adds a new group to the main menu palette.

Parameters

  • title: Title of the group
  • ...: Tool items to be packed

Return value:

The vbox created internally
MainMenu:project_selected (event, project)
Updates the menu items, based on the current project.

Parameters

  • event: Event that triggered this handler
  • project: Current project
(private) MainMenu:add_s_buttons (...)
Adds buttons to the s_buttons group.

Parameters

  • ...:
(private) MainMenu:build_gui ()
Builds the interface.
(private) MainMenu:connect_events ()
Connects the events of the menu to the controller.

Valid XHTML 1.0!