This method adds Netgen Layouts menu items to Sylius admin interface.
761548
public function onMainMenuBuild(MenuBuilderEvent $event): void
    {
        if (!$this->authorizationChecker->isGranted('ROLE_NGBM_ADMIN')) {
            return;
        }

        $this->addLayoutsSubMenu($event->getMenu());
    }
487166
public void addNavButtons()
    {
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.FORMDETAIL, MenuConstants.FORMDETAIL, null);
        super.addNavButtons();  // Next buttons will be "First!"
    }
584856
public void installMenu() {

        // initialize the menu groups
        m_groupContainer.clear();

        // creates the context help menu
        CmsAdminMenuGroup helpMenu = new CmsAdminMenuGroup(
            "help",
            Messages.get().getBundle(getLocale()).key(Messages.GUI_ADMIN_MENU_HELP_GROUP_0));
        helpMenu.addMenuItem(new CmsAdminContextHelpMenuItem());
        addGroup(helpMenu);

        Iterator<CmsTool> itElems = getToolManager().getToolsForPath(
            this,
            getToolManager().getBaseToolPath(this),
            false).iterator();
        while (itElems.hasNext()) {
            CmsTool tool = itElems.next();
            // check visibility
            String link = tool.getHandler().getLink();
            if (link.indexOf("?") > 0) {
                link = link.substring(0, link.indexOf("?"));
            }
            if (!getCms().existsResource(link) || !tool.getHandler().isVisible(this)) {
                continue;
            }

            // cut out the base
            String path = tool.getHandler().getPath().substring(getToolManager().getBaseToolPath(this).length());
            // special case of the base tool
            if (CmsStringUtil.isEmpty(path)) {
                continue;
            }
            // skip initial '/'
            int pos = tool.getHandler().getPath().indexOf(CmsToolManager.TOOLPATH_SEPARATOR);
            // only install if at first level
            if (path.indexOf(CmsToolManager.TOOLPATH_SEPARATOR, pos + 1) < 0) {

                addItem(
                    tool.getHandler().getGroup(),
                    tool.getHandler().getShortName(),
                    tool.getHandler().getSmallIconPath(),
                    CmsToolManager.linkForToolPath(getJsp(), tool.getHandler().getPath()),
                    tool.getHandler().isEnabled(this)
                    ? tool.getHandler().getHelpText()
                    : tool.getHandler().getDisabledHelpText(),
                    tool.getHandler().isEnabled(this),
                    tool.getHandler().getPosition(),
                    CmsAdminMenu.DEFAULT_TARGET);
            }
        }
    }
1091505
function( editor, buttonName, buttonLabel, commandName, command, menugroup, menuOrder )
	{
		editor.addCommand( commandName, command );

		// If the "menu" plugin is loaded, register the menu item.
		editor.addMenuItem( commandName,
			{
				label : buttonLabel,
				command : commandName,
				group : menugroup,
				order : menuOrder
			});
	}
919277
def add_options(cls, manager):
        """"""
        kw = {}
        if flake8.__version__ >= '3.0.0':
            kw['parse_from_config'] = True
        manager.add_option(
            "--known-modules",
            action='store',
            default="",
            help=(
                "User defined mapping between a project name and a list of"
                " provided modules. For example: ``--known-modules=project:"
                "[Project],extra-project:[extras,utilities]``."
            ),
            **kw
        )
1203907
public function adminOnMenuRender()
	{
		/** @var TAdminUI $page */
		$page = Eresus_Kernel::app()->getPage();
		$page->addMenuItem(admExtensions, array(
			'access'  => EDITOR,
			'link'  => $this->name,
			'caption'  => 'Формы ввода',
			'hint'  => $this->description
		));
	}
1363328
public ToolScreen addToolbars()
    {
        ToolScreen screen = new ToolScreen(null, this, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, null);
        new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.SUBMIT);
        new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.RESET);
        String strDesc = "Create account";
        new SCannedBox(screen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), screen, null, ScreenConstants.DEFAULT_DISPLAY, null, strDesc, MenuConstants.FORM, MenuConstants.FORM, MenuConstants.FORM + "Tip");
        return screen;
    }
976880
public void addNavButtons()
    {
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, JCalendarPopup.CALENDAR_ICON, ProjectTask.PROJECT_TASK_CALENDAR_SCREEN, ProjectTask.PROJECT_TASK_CALENDAR_SCREEN);
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.FORMDETAIL, ProjectTask.PROJECT_PREDECESSOR_DETAIL_SCREEN, ProjectTask.PROJECT_PREDECESSOR_DETAIL_SCREEN);
        super.addNavButtons();
    }
1363590
def setup_menu(self):
        """"""
        self.copy_action = create_action(self, _('Copy'),
                                         shortcut=keybinding('Copy'),
                                         icon=ima.icon('editcopy'),
                                         triggered=self.copy,
                                         context=Qt.WidgetShortcut)
        menu = QMenu(self)
        add_actions(menu, [self.copy_action, ])
        return menu
587999
public void addScreenMenus()
    {
        AppletScreen appletScreen = this.getAppletScreen();
        if (appletScreen != null)
        {
            ScreenField menuBar = appletScreen.getSField(0);
            if ((menuBar == null) || (!(menuBar instanceof SMenuBar)))
            {
                if (menuBar instanceof SBaseMenuBar)
                    menuBar.free();     // Wrong menu
                new SMenuBar(new ScreenLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), appletScreen, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, null);
            }
        }
    }
517456
def setup_gui(self):
        """"""
        layout = QGridLayout(self)
        layout.setContentsMargins(0, 0, 0, 0)
        layout.addWidget(self.canvas, 0, 1)
        layout.addLayout(self.setup_toolbar(), 0, 3, 2, 1)

        layout.setColumnStretch(0, 100)
        layout.setColumnStretch(2, 100)
        layout.setRowStretch(1, 100)
265538
def add_menu(self, name):
        
        if self.menubar is None:
            raise ValueError("No menu bar configured")
        return self.menubar.add_name(name)
755400
public function compose()
    {
        $this->dashboard->menu
            ->add(Menu::SYSTEMS,
                ItemMenu::label(__('Content management'))
                    ->slug('CMS')
                    ->icon('icon-layers')
                    ->permission('platform.systems')
                    ->sort(1000)
            )
            ->add('CMS',
                ItemMenu::label(__('Menu'))
                    ->icon('icon-menu')
                    ->route('platform.systems.menu.index')
                    ->permission('platform.systems.menu')
                    ->show(count(config('press.menu', [])) > 0)
                    ->title(__('Editing of a custom menu (navigation) using drag & drop and localization support.'))
            );
    }
793833
def add_submenu(self, grid_lang, ass, row, column):
        
        text = "Available subassistants:\n"
        # Generate menus
        path = []
        (menu, text) = self.generate_menu(ass, text, path=path)
        menu.show_all()
        if ass[0].description:
            description = self.get_formatted_description(ass[0].description) + "\n\n"
        else:
            description = ""
        description += text.replace('|', '\n')
        image_name = ass[0].icon_path
        lbl_text = "<b>" + ass[0].fullname + "</b>"
        if not image_name:
            btn = self.button_with_label(lbl_text)
        else:
            btn = self.button_with_image(lbl_text, image=image_name)
        btn.set_has_tooltip(True)
        btn.connect("query-tooltip",
                    self.parent.tooltip_queries,
                    description
        )
        btn.connect_object("event", self.parent.btn_press_event, menu)
        if row == 0 and column == 0:
            grid_lang.add(btn)
        else:
            grid_lang.attach(btn, column, row, 1, 1)
1031876
def setup_ui(self, ):
        
        grid = QtGui.QGridLayout(self)
        self.setLayout(grid)
        self.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        self.splitter = QtGui.QSplitter(QtCore.Qt.Horizontal, self)
        grid.addWidget(self.splitter)
        grid.setContentsMargins(0, 0, 0, 0)
575585
def add_layout(self, layout):
        
        layout.register_frame(self)
        self._layouts.append(layout)
672507
private void buildUI() {
		add(new WSkipLinks());

		// the application header
		add(headerPanel);
		headerPanel.add(new UtilityBar());
		headerPanel.add(new WHeading(HeadingLevel.H1, "WComponents"));

		// mainPanel holds the menu and the actual example.
		add(mainPanel);
		mainPanel.add(menuPanel);
		mainPanel.add(exampleSection);

		// An application footer?
		WPanel footer = new WPanel(WPanel.Type.FOOTER);
		footer.add(lastLoaded);
		add(footer);
		add(new WAjaxControl(menuPanel.getTree(), new AjaxTarget[]{menuPanel.getMenu(), exampleSection}));
	}