def create_menuitem *args
PromptMenu.create_menuitem *args
end
 popup the hist
492316
def show_actions
      return if @actions.empty?
      list = @actions
      menu = PromptMenu.new self do |m|
      list.each { |e| 
        m.add *e
      }
      end
      menu.display_new :title => 'Widget Menu (Press letter)'
    end
452655
private void fillMenu() {
        // Create a selection listener to handle when the
        // user selects a warning severity.
        SelectionListener menuItemSelectionListener = new SelectionAdapter() {
            /*
             * (non-Javadoc)
             *
             * @see
             * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
             * .swt.events.SelectionEvent)
             */
            @Override
            public void widgetSelected(SelectionEvent e) {
                Widget w = e.widget;
                int index;
                for (index = 0; index < severityItemList.length; ++index) {
                    if (w == severityItemList[index]) {
                        break;
                    }
                }

                if (index < severityItemList.length) {
                    if (bugInstance != null) {
                        bugInstance.setProperty(BugProperty.SEVERITY, String.valueOf(index + 1));
                    }
                }
            }
        };

        severityItemList = new MenuItem[SEVERITY_LABEL_LIST.length];
        for (int i = 0; i < SEVERITY_LABEL_LIST.length; ++i) {
            MenuItem menuItem = new MenuItem(menu, SWT.RADIO);
            menuItem.setText(SEVERITY_LABEL_LIST[i]);
            menuItem.addSelectionListener(menuItemSelectionListener);

            severityItemList[i] = menuItem;
        }

        // Keep menu in sync with current BugInstance.
        menu.addMenuListener(new MenuAdapter() {
            /*
             * (non-Javadoc)
             *
             * @see
             * org.eclipse.swt.events.MenuAdapter#menuShown(org.eclipse.swt.
             * events.MenuEvent)
             */
            @Override
            public void menuShown(MenuEvent e) {
                syncMenu();
            }
        });
    }
116055
def create_widget(self):
        
        d = self.declaration
        style = d.style or '@style/Widget.DeviceDefault.PopupMenu'
        self.window = PopupWindow(self.get_context(), None, 0, style)
        self.showing = False
679923
def setup_menu(self, minmax):
        """"""
        if self.minmax_action is not None:
            self.minmax_action.setChecked(minmax)
            return
        
        resize_action = create_action(self, _("Resize rows to contents"),
                                      triggered=self.resizeRowsToContents)
        resize_columns_action = create_action(
            self,
            _("Resize columns to contents"),
            triggered=self.resize_column_contents)
        self.paste_action = create_action(self, _("Paste"),
                                          icon=ima.icon('editpaste'),
                                          triggered=self.paste)
        self.copy_action = create_action(self, _("Copy"),
                                         icon=ima.icon('editcopy'),
                                         triggered=self.copy)
        self.edit_action = create_action(self, _("Edit"),
                                         icon=ima.icon('edit'),
                                         triggered=self.edit_item)
        self.plot_action = create_action(self, _("Plot"),
                                    icon=ima.icon('plot'),
                                    triggered=lambda: self.plot_item('plot'))
        self.plot_action.setVisible(False)
        self.hist_action = create_action(self, _("Histogram"),
                                    icon=ima.icon('hist'),
                                    triggered=lambda: self.plot_item('hist'))
        self.hist_action.setVisible(False)
        self.imshow_action = create_action(self, _("Show image"),
                                           icon=ima.icon('imshow'),
                                           triggered=self.imshow_item)
        self.imshow_action.setVisible(False)
        self.save_array_action = create_action(self, _("Save array"),
                                               icon=ima.icon('filesave'),
                                               triggered=self.save_array)
        self.save_array_action.setVisible(False)
        self.insert_action = create_action(self, _("Insert"),
                                           icon=ima.icon('insert'),
                                           triggered=self.insert_item)
        self.remove_action = create_action(self, _("Remove"),
                                           icon=ima.icon('editdelete'),
                                           triggered=self.remove_item)
        self.minmax_action = create_action(self, _("Show arrays min/max"),
                                           toggled=self.toggle_minmax)
        self.minmax_action.setChecked(minmax)
        self.toggle_minmax(minmax)
        self.rename_action = create_action(self, _("Rename"),
                                           icon=ima.icon('rename'),
                                           triggered=self.rename_item)
        self.duplicate_action = create_action(self, _("Duplicate"),
                                              icon=ima.icon('edit_add'),
                                              triggered=self.duplicate_item)
        menu = QMenu(self)
        menu_actions = [self.edit_action, self.plot_action, self.hist_action,
                        self.imshow_action, self.save_array_action,
                        self.insert_action, self.remove_action,
                        self.copy_action, self.paste_action,
                        None, self.rename_action, self.duplicate_action,
                        None, resize_action, resize_columns_action]
        if ndarray is not FakeObject:
            menu_actions.append(self.minmax_action)
        add_actions(menu, menu_actions)
        self.empty_ws_menu = QMenu(self)
        add_actions(self.empty_ws_menu,
                    [self.insert_action, self.paste_action,
                     None, resize_action, resize_columns_action])
        return menu
877470
def CreateMenuBar(self):
        """"""
        menubar = wx.MenuBar()
        menu = wx.Menu()
        menu.Append(ID_OPEN, _('&Open Profile'), _('Open a cProfile file'))
        menu.Append(ID_OPEN_MEMORY, _('Open &Memory'), _('Open a Meliae memory-dump file'))
        menu.AppendSeparator()
        menu.Append(ID_EXIT, _('&Close'), _('Close this RunSnakeRun window'))
        menubar.Append(menu, _('&File'))
        menu = wx.Menu()
#        self.packageMenuItem = menu.AppendCheckItem(
#            ID_PACKAGE_VIEW, _('&File View'),
#            _('View time spent by package/module')
#        )
        self.percentageMenuItem = menu.AppendCheckItem(
            ID_PERCENTAGE_VIEW, _('&Percentage View'),
            _('View time spent as percent of overall time')
        )
        self.rootViewItem = menu.Append(
            ID_ROOT_VIEW, _('&Root View (Home)'),
            _('View the root of the tree')
        )
        self.backViewItem = menu.Append(
            ID_BACK_VIEW, _('&Back'), _('Go back in your viewing history')
        )
        self.upViewItem = menu.Append(
            ID_UP_VIEW, _('&Up'),
            _('Go "up" to the parent of this node with the largest cumulative total')
        )
        self.moreSquareViewItem = menu.AppendCheckItem(
            ID_MORE_SQUARE, _('&Hierarchic Squares'),
            _('Toggle hierarchic squares in the square-map view')
        )

        # This stuff isn't really all that useful for profiling,
        # it's more about how to generate graphics to describe profiling...
        self.deeperViewItem = menu.Append(
            ID_DEEPER_VIEW, _('&Deeper'), _('View deeper squaremap views')
        )
        self.shallowerViewItem = menu.Append(
            ID_SHALLOWER_VIEW, _('&Shallower'), _('View shallower squaremap views')
        )
#        wx.ToolTip.Enable(True)
        menubar.Append(menu, _('&View'))
        
        self.viewTypeMenu =wx.Menu( )
        menubar.Append(self.viewTypeMenu, _('View &Type'))
        
        self.SetMenuBar(menubar)

        wx.EVT_MENU(self, ID_EXIT, lambda evt: self.Close(True))
        wx.EVT_MENU(self, ID_OPEN, self.OnOpenFile)
        wx.EVT_MENU(self, ID_OPEN_MEMORY, self.OnOpenMemory)
        
        wx.EVT_MENU(self, ID_PERCENTAGE_VIEW, self.OnPercentageView)
        wx.EVT_MENU(self, ID_UP_VIEW, self.OnUpView)
        wx.EVT_MENU(self, ID_DEEPER_VIEW, self.OnDeeperView)
        wx.EVT_MENU(self, ID_SHALLOWER_VIEW, self.OnShallowerView)
        wx.EVT_MENU(self, ID_ROOT_VIEW, self.OnRootView)
        wx.EVT_MENU(self, ID_BACK_VIEW, self.OnBackView)
        wx.EVT_MENU(self, ID_MORE_SQUARE, self.OnMoreSquareToggle)
580118
protected static JMenuItem createItem (String name, Integer mnem, KeyStroke accel)
    {
        JMenuItem item = new JMenuItem(name);
        if (mnem != null) {
            item.setMnemonic(mnem.intValue());
        }
        if (accel != null) {
            item.setAccelerator(accel);
        }
        return item;
    }
57044
def __initialize_menu_bar(self):
        

        self.__file_menu = QMenu("&File", parent=self.__menu_bar)
        self.__file_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&File|&New",
            shortcut=QKeySequence.New,
            slot=self.__new_file_action__triggered))
        self.__file_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&File|&Load ...",
            shortcut=QKeySequence.Open,
            slot=self.__load_file_action__triggered))
        self.__file_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&File|Source ...",
            slot=self.__source_file_action__triggered))
        self.__file_menu.addSeparator()
        self.__file_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&File|Add Project ...",
            slot=self.__add_project_action__triggered))
        self.__file_menu.addSeparator()
        self.__file_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&File|&Save",
            shortcut=QKeySequence.Save,
            slot=self.__save_file_action__triggered))
        self.__file_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&File|Save As ...",
            shortcut=QKeySequence.SaveAs,
            slot=self.__save_file_as_action__triggered))
        self.__file_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&File|Save All",
            slot=self.__save_all_files_action__triggered))
        self.__file_menu.addSeparator()
        self.__file_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&File|Revert",
            slot=self.__revert_file_action__triggered))
        self.__file_menu.addSeparator()
        self.__file_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&File|Close ...",
            shortcut=QKeySequence.Close,
            slot=self.__close_file_action__triggered))
        self.__file_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&File|Close All ...",
            shortcut=Qt.SHIFT + Qt.ControlModifier + Qt.Key_W,
            slot=self.__close_all_files_action__triggered))
        self.__file_menu.addSeparator()
        for action in self.__recent_files_actions:
            self.__file_menu.addAction(action)
        self.__set_recent_files_actions()
        self.__menu_bar.addMenu(self.__file_menu)

        self.__edit_menu = QMenu("&Edit", parent=self.__menu_bar)
        self.__edit_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Edit|&Undo",
            shortcut=QKeySequence.Undo,
            slot=self.__undo_action__triggered))
        self.__edit_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Edit|&Redo",
            shortcut=QKeySequence.Redo,
            slot=self.__redo_action__triggered))
        self.__edit_menu.addSeparator()
        self.__edit_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Edit|Cu&t",
            shortcut=QKeySequence.Cut,
            slot=self.__cut_action__triggered))
        self.__edit_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Edit|&Copy",
            shortcut=QKeySequence.Copy,
            slot=self.__copy_action__triggered))
        self.__edit_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Edit|&Paste",
            shortcut=QKeySequence.Paste,
            slot=self.__paste_action__triggered))
        self.__edit_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Edit|Delete",
            slot=self.__delete_action__triggered))
        self.__edit_menu.addSeparator()
        self.__edit_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Edit|Select All",
            shortcut=QKeySequence.SelectAll,
            slot=self.__select_all_action__triggered))
        self.__menu_bar.addMenu(self.__edit_menu)

        self.__source_menu = QMenu("&Source", parent=self.__menu_bar)
        self.__source_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Source|Delete Line(s)",
            shortcut=Qt.ControlModifier + Qt.Key_D,
            slot=self.__delete_lines_action__triggered))
        self.__source_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Source|Duplicate Line(s)",
            shortcut=Qt.SHIFT + Qt.ControlModifier + Qt.Key_D,
            slot=self.__duplicate_lines_action__triggered))
        self.__source_menu.addSeparator()
        self.__source_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Source|Move Up",
            shortcut=Qt.SHIFT + Qt.ControlModifier + Qt.ALT + Qt.Key_Up,
            slot=self.__move_up_action__triggered))
        self.__source_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Source|Move Down",
            shortcut=Qt.SHIFT + Qt.ControlModifier + Qt.ALT + Qt.Key_Down,
            slot=self.__move_down_action__triggered))
        self.__source_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Source|Indent Selection",
            shortcut=Qt.Key_Tab,
            slot=self.__indent_selection_action__triggered))
        self.__source_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Source|Unindent Selection",
            shortcut=Qt.Key_Backtab,
            slot=self.__unindent_selection_action__triggered))
        self.__source_menu.addSeparator()
        self.__source_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Source|Convert Indentation To Tabs",
            slot=self.__convert_indentation_to_tabs_action__triggered))
        self.__source_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Source|Convert Indentation To Spaces",
            slot=self.__convert_indentation_to_spaces_action__triggered))
        self.__source_menu.addSeparator()
        self.__source_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Source|Remove Trailing WhiteSpaces",
            slot=self.__remove_trailing_white_spaces_action__triggered))
        self.__source_menu.addSeparator()
        self.__source_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Source|Toggle Comments",
            shortcut=Qt.ControlModifier + Qt.Key_Slash,
            slot=self.__toggle_comments_action__triggered))
        self.__menu_bar.addMenu(self.__source_menu)

        self.__navigate_menu = QMenu("&Navigate", parent=self.__menu_bar)
        self.__navigate_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Navigate|Goto Line ...",
            shortcut=Qt.ControlModifier + Qt.Key_L,
            slot=self.__go_to_line_action__triggered))
        self.__navigate_menu.addSeparator()
        self.__menu_bar.addMenu(self.__navigate_menu)

        self.__search_menu = QMenu("&Search", parent=self.__menu_bar)
        self.__search_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Search|Search And Replace ...",
            shortcut=Qt.ControlModifier + Qt.Key_F,
            slot=self.__search_and_replace_action__triggered))
        self.__search_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Search|Search In Files ...",
            shortcut=Qt.ALT + Qt.ControlModifier + Qt.Key_F,
            slot=self.__search_in_files_action__triggered))
        self.__search_menu.addSeparator()
        self.__search_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Search|Search Next",
            shortcut=Qt.ControlModifier + Qt.Key_K,
            slot=self.__search_next_action__triggered))
        self.__search_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Search|Search Previous",
            shortcut=Qt.SHIFT + Qt.ControlModifier + Qt.Key_K,
            slot=self.__search_previous_action__triggered))
        self.__menu_bar.addMenu(self.__search_menu)

        self.__command_menu = QMenu("&Command", parent=self.__menu_bar)
        self.__command_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Command|&Evaluate Selection",
            shortcut=Qt.ControlModifier + Qt.Key_Return,
            slot=self.__evaluate_selection_action__triggered))
        self.__command_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&Command|Evaluate &Script",
            shortcut=Qt.SHIFT + Qt.CTRL + Qt.Key_Return,
            slot=self.__evaluate_script_action__triggered))
        self.__menu_bar.addMenu(self.__command_menu)

        self.__view_menu = QMenu("&View", parent=self.__menu_bar)
        self.__view_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&View|Increase Font Size",
            shortcut=Qt.ControlModifier + Qt.Key_Plus,
            slot=self.__increase_font_size_action__triggered))
        self.__view_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&View|Decrease Font Size",
            shortcut=Qt.ControlModifier + Qt.Key_Minus,
            slot=self.__decrease_font_size_action__triggered))
        self.__view_menu.addSeparator()
        self.__view_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&View|Toggle Word Wrap",
            slot=self.__toggle_word_wrap_action__triggered))
        self.__view_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&View|Toggle White Spaces",
            slot=self.__toggle_white_spaces_action__triggered))
        self.__view_menu.addSeparator()
        self.__view_menu.addAction(self.__engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|&View|Loop Through Editors",
            shortcut=Qt.AltModifier + Qt.SHIFT + Qt.Key_Tab,
            slot=self.__loop_through_editors_action__triggered))
        self.__menu_bar.addMenu(self.__view_menu)
853091
def createMenuItem( self, title ):
        
        item = QTreeWidgetItem([title])
        ico = projexui.resources.find('img/folder.png')
        
        item.setIcon(0, QIcon(ico))
        item.setSizeHint(0, QSize(120, 20))
        item.setData(0, Qt.UserRole, wrapVariant('menu'))
        
        return item
1350426
def showHeaderMenu( self, pos):
        
        header = self.header()
        index  = header.logicalIndexAt(pos)
        self._headerIndex = index
        
        # show a pre-set menu
        if self._headerMenu:
            menu = self._headerMenu
        else:
            menu = self.createHeaderMenu(index)
        
        # determine the point to show the menu from
        if pos is not None:
            point = header.mapToGlobal(pos)
        else:
            point = QtGui.QCursor.pos()
        
        self.headerMenuAboutToShow.emit(menu, index)
        menu.exec_(point)
1193152
def _append(self, menu):
        ''''''
        from MAVProxy.modules.lib.wx_loader import wx
        submenu = wx.Menu()
        for i in range(len(self.items)):
            submenu.AppendRadioItem(self.id()+i, self.items[i], self.description)
            if self.items[i] == self.initial:
                submenu.Check(self.id()+i, True)
        menu.AppendSubMenu(submenu, self.name)
691435
def showMenu(self, pos):
        
        glbl_pos = self.viewport().mapToGlobal(pos)
        
        # lookup the specific item at the given position
        item = self.itemAt(pos)
        selected = self.selectedRecords()
        
        if not self._recordEditors:
            return
        
        if item and not isinstance(item, XOrbRecordItem):
            return
        
        menu = QMenu(self)
        acts = {}
        
        # modify a particular item
        if item:
            if self.editorFlags() & XOrbTreeWidget.EditorFlags.Edit:
                record = item.record()
                editor = self.recordEditor(type(record))
                
                if editor:
                    name = record.schema().displayName()
                    act = menu.addAction('Edit {}...'.format(name))
                    act.setIcon(QIcon(resources.find('img/edit.png')))
                    acts[act] = (editor, 'edit', record)
        
        # add items
        if self.editorFlags() & XOrbTreeWidget.EditorFlags.Create:
            menu.addSeparator()
            
            typs = self._recordEditors.keys()
            typs.sort(key=lambda x: x.schema().displayName())
            
            for typ in typs:
                name = typ.schema().displayName()
                act  = menu.addAction('Add {}...'.format(name))
                act.setIcon(QIcon(resources.find('img/add.png')))
                acts[act] = (self._recordEditors[typ], 'create', None)
        
        # remove selected items
        if selected and self.editorFlags() & XOrbTreeWidget.EditorFlags.Remove:
            menu.addSeparator()
            
            act = menu.addAction('Remove Selected Records')
            act.setIcon(QIcon(resources.find('img/remove.png')))
            acts[act] =(None, 'remove', selected)
        
        if not acts:
            return
        
        act = menu.exec_(glbl_pos)
        
        editor, action, record = acts.get(act, (None, None, None))
        
        # create a new record
        if action == 'create':
            record = editor.create(autoCommit=False)
            if record:
                self.recordCreated.emit(record)
                record.commit()
                self.refresh()
        
        # edit an existing record
        elif action == 'edit':
            self.editRecord(record, glbl_pos)
        
        # remove selected records
        elif action == 'remove':
            title = 'Remove Records'
            msg = 'Are you sure you want to remove these records?'
            btns = QMessageBox.Yes | QMessageBox.No
            ans = QMessageBox.information(self.window(), title, msg, btns)
            if ans == QMessageBox.Yes:
                self.recordsRemoved.emit(selected)
                if RecordSet(selected).remove():
                    self.refresh()
539250
public void create(Menu menu) {
        String url = WxEndpoint.get("url.menu.create");
        String json = JsonMapper.nonEmptyMapper().toJson(menu);
        logger.debug("create menu: {}", json);
        wxClient.post(url, json);
    }
1067049
def add_seperator(self):
        
        m_item = Gtk.SeparatorMenuItem()
        self.menu.append(m_item)
        self.menu.show_all()
338497
def core__generate_menu_item key, values, module_name
      menu_item = {}
      menu_item[:key] = key
      menu_item[:title] = values[:title] ? core__get_menu_title_translation(values[:title], module_name) : 'Undefined'
      menu_item[:icon] = values[:icon] ? values[:icon] : 'check-circle'
      menu_item[:url] = values[:url] ? values[:url] : ''
      menu_item[:position] = values[:position] ? values[:position] : 999
      menu_item[:permission_min] = values[:permission_min] ? values[:permission_min] : 0
      menu_item[:permission_max] = values[:permission_max] ? values[:permission_max] : 999
      menu_item[:sub_items] = []

      if values[:sub_items]
        values[:sub_items].each do |key, value|
          menu_item[:sub_items].push(core__generate_menu_sub_item(key, value, module_name))
        end
      end

      return menu_item
    end
299616
protected function createAdminMenu(): void
    {
        $menu = $this->menu();
        $events = $this->app->make('events');

        $handlers = [
            UserMenuHandler::class,
            ExtensionMenuHandler::class,
            SettingMenuHandler::class,
        ];

        $menu->add('home')
            ->title(\trans('orchestra/foundation::title.home'))
            ->link($this->handles('orchestra::/'))
            ->icon('home');

        foreach ($handlers as $handler) {
            $events->listen('orchestra.started: admin', $handler);
        }
    }
152712
def set_popup_menu(self, menu):
        ''''''
        self.popup_menu = menu
        self.in_queue.put(MPImagePopupMenu(menu))
934009
private void addMenuItems(Menu f, String[] m) {

        for (int i = 0; i < m.length; i++) {
            if (m[i].equals("-")) {
                f.addSeparator();
            } else {
                MenuItem item = new MenuItem(m[i]);

                item.addActionListener(this);
                f.add(item);
            }
        }
    }