Reference

# Module `view.MainMenu`

Menu that provides access to the functions of the simulator.

## Functions

MainMenu.new (controller, controlled) | Constructor.
MainMenu:add_addon_button (button, context) | Adds an button to the addonn group.
MainMenu:pack_group (title, ...) | Packs a group in the main menu left_box.
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.
(private) MainMenu:expander_selected () | Only one group can be selected at the same time.

## Functions

MainMenu.new (controller, controlled)
  Constructor.

  ### Parameters

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

  ### Return value:

  New MainMenu instance
MainMenu:add_addon_button (button, context)
  Adds an button to the addonn group.

  ### Parameters

  - button: Button to add
  - context: If the button must only be clickable if there's a selected project
MainMenu:pack_group (title, ...)
  Packs a group in the main menu left_box. The group will be contained in an expander. Only one expander can be "expanded" at the same time.

  ### Parameters

  - title: Title of the group
  - ...: Widgets 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.
(private) MainMenu:expander_selected ()
  Only one group can be selected at the same time. O(n).