Adds a tab to the tab widget, this function set the parent_tab_widget
        attribute on the tab instance.
167314
def addTab(self, tab, *args):
        
        tab.parent_tab_widget = self
        super(BaseTabWidget, self).addTab(tab, *args)
1295285
public int put(Widget widget, String name) {
		if (widget == null) return -1;
		attach(widget);
		for (int i = 0; i < content.length; ++i)
			if (content[i] == null) {
				content[i] = new Tab(widget, name);
				this.sendElement();
				return i;
			}
		throw new IndexOutOfBoundsException();
		//return -1;
	}
564474
public function addPage ()
    {
        add_submenu_page($this->parentSlug, $this->pageTitle, $this->menuTitle, $this->capability, $this->menuSlug, $this->getDisplayFunction());
    }
714751
public function setTabTitle($name, $new_name)
    {
        if ($this->hasTab($name)) {
            $this->tabs[$name][static::TITLE] = $new_name;
        }
    }
407265
def _update_gui_text_tabs(self):
        """"""
        for index, page in enumerate(self.pages):
            self.tabWidget.setTabText(index, "{} (Alt+&{}){}".format(page.text_tab, index+1, (" (changed)" if page.flag_changed else "")))
1172268
def add_parent(sender, instance, **kwargs):
    
    if not kwargs['created']:
        return
    for att in ['task', 'context']:
        parent = getattr(instance, att).item_id
        child = instance.item_id
        ItemRelation.objects.get_or_create(
            parent_id=parent,
            child_id=child,
            visible=True,
        )
535004
def _focus_tab(self, tab_idx):
        """"""
        for i in range(self.tab_widget.count()):
            self.tab_widget.setTabEnabled(i, False)
        self.tab_widget.setTabEnabled(tab_idx, True)
        self.tab_widget.setCurrentIndex(tab_idx)
366494
public function setTab(string $tab_name, string $tab_title)
    {
        $this->tab = [$tab_name => $tab_title];

        return $this;
    }
849835
def tabText(self, tab):
        
        if not isinstance(tab, int):
            tab = self.indexOf(tab)
        return super(FwTabWidget, self).tabText(tab)
968557
def addTab(self, view, title):
        
        if not isinstance(view, XView):
            return False

        tab = self._tabBar.addTab(title)
        self.addWidget(view)
        tab.titleChanged.connect(view.setWindowTitle)
        
        # create connections
        try:
            view.windowTitleChanged.connect(self.refreshTitles,
                                            QtCore.Qt.UniqueConnection)
            view.sizeConstraintChanged.connect(self.adjustSizeConstraint,
                                            QtCore.Qt.UniqueConnection)
            view.poppedOut.connect(self.disconnectView,
                                   QtCore.Qt.UniqueConnection)
        except RuntimeError:
            pass
        
        self.setCurrentIndex(self.count() - 1)
        
        return True
1206220
def addTab(self, tab):
        
        if not isinstance(tab, XViewPanelItem):
            tab = XViewPanelItem(tab, self)
            tab.setFixedHeight(self.height())

        index = len(self.items())
        self.layout().insertWidget(index, tab)

        self.setCurrentIndex(index)
        return tab
1085672
def add_parents(self, parents):
        

        self._parents += [p for p in parents if p not in self._parents]
1105072
public void add(E tabContent, String tabName) {

        tabContent.addStyleName(I_CmsLayoutBundle.INSTANCE.generalCss().cornerAll());
        m_tabPanel.add(tabContent, CmsDomUtil.stripHtml(tabName));

        Element tabRootEl = m_tabPanel.getElement();
        // set an additional css class for the parent element of the .gwt-TabLayoutPanelTabs element
        List<Element> tabDivs = CmsDomUtil.getElementsByClass(
            I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().cmsTabLayoutPanelTab(),
            CmsDomUtil.Tag.div,
            tabRootEl);

        Iterator<Element> it = tabDivs.iterator();
        boolean first = true;
        while (it.hasNext()) {

            Element e = it.next();
            e.removeClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().cornerLeft());
            e.removeClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().cornerRight());
            if (first) {
                e.addClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().cornerLeft());
                first = false;
            }
            if (!it.hasNext()) {
                e.addClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().cornerRight());
            }
        }
        m_tabPanel.checkTabOverflow();
    }
1205907
def _add_widget(self, widget):
        
        widgets = self.widgets()
        widgets += [widget]
        self._save_customization(widgets)
250618
def addWidget(self, widget):
        
        CheckParent(self)
        doc = self.parent
        if not doc.isPDF:
            raise ValueError("not a PDF")
        widget._validate()

    # Check if PDF already has our fonts.
    # If none insert all of them in a new object and store the xref.
    # Else only add any missing fonts.
    # To determine the situation, /DR object is checked.
        xref = 0
        ff = doc.FormFonts               # /DR object: existing fonts
        if not widget.text_font:         # ensure default
            widget.text_font = "Helv"
        if not widget.text_font in ff:   # if no existent font ...
            if not doc.isFormPDF or not ff:   # a fresh /AcroForm PDF!
                xref = doc._getNewXref()      # insert all our fonts
                doc._updateObject(xref, Widget_fontobjects)
            else:                        # add any missing fonts
                for k in Widget_fontdict.keys():
                    if not k in ff:      # add our font if missing
                        doc._addFormFont(k, Widget_fontdict[k])
            widget._adjust_font()        # ensure correct font spelling
        widget._dr_xref = xref           # non-zero causes /DR creation

    # now create the /DA string
        if   len(widget.text_color) == 3:
            fmt = "{:g} {:g} {:g} rg /{f:s} {s:g} Tf " + widget._text_da
        elif len(widget.text_color) == 1:
            fmt = "{:g} g /{f:s} {s:g} Tf " + widget._text_da
        elif len(widget.text_color) == 4:
            fmt = "{:g} {:g} {:g} {:g} k /{f:s} {s:g} Tf " + widget._text_da
        widget._text_da = fmt.format(*widget.text_color, f=widget.text_font,
                                     s=widget.text_fontsize)
    # create the widget at last
        annot = self._addWidget(widget)
        if annot:
            annot.thisown = True
            annot.parent = weakref.proxy(self) # owning page object
            self._annot_refs[id(annot)] = annot
        return annot
1223171
function(attr) {
            TabView.superclass.initAttributes.call(this, attr);
            
            if (!attr.orientation) {
                attr.orientation = 'top';
            }
            
            var el = this.get(ELEMENT);

            if (!Dom.hasClass(el, this.CLASSNAME)) {
                Dom.addClass(el, this.CLASSNAME);        
            }
            
            /**
             * The Tabs belonging to the TabView instance.
             * @attribute tabs
             * @type Array
             */
            this.setAttributeConfig('tabs', {
                value: [],
                readOnly: true
            });

            /**
             * The container of the tabView's label elements.
             * @property _tabParent
             * @private
             * @type HTMLElement
             */
            this._tabParent = 
                    this.getElementsByClassName(this.TAB_PARENT_CLASSNAME,
                            'ul' )[0] || this._createTabParent();
                
            /**
             * The container of the tabView's content elements.
             * @property _contentParent
             * @type HTMLElement
             * @private
             */
            this._contentParent = 
                    this.getElementsByClassName(this.CONTENT_PARENT_CLASSNAME,
                            'div')[0] ||  this._createContentParent();
            
            /**
             * How the Tabs should be oriented relative to the TabView.
             * @attribute orientation
             * @type String
             * @default "top"
             */
            this.setAttributeConfig('orientation', {
                value: attr.orientation,
                method: function(value) {
                    var current = this.get('orientation');
                    this.addClass('yui-navset-' + value);
                    
                    if (current != value) {
                        this.removeClass('yui-navset-' + current);
                    }
                    
                    if (value === 'bottom') {
                        this.appendChild(this._tabParent);
                    }
                }
            });
            
            /**
             * The index of the tab currently active.
             * @attribute activeIndex
             * @type Int
             */
            this.setAttributeConfig(ACTIVE_INDEX, {
                value: attr.activeIndex,
                validator: function(value) {
                    var ret = true;
                    if (value && this.getTab(value).get('disabled')) { // cannot activate if disabled
                        ret = false;
                    }
                    return ret;
                }
            });
            
            /**
             * The tab currently active.
             * @attribute activeTab
             * @type YAHOO.widget.Tab
             */
            this.setAttributeConfig(ACTIVE_TAB, {
                value: attr.activeTab,
                method: function(tab) {
                    var activeTab = this.get(ACTIVE_TAB);
                    
                    if (tab) {
                        tab.set(ACTIVE, true);
                    }
                    
                    if (activeTab && activeTab !== tab) {
                        activeTab.set(ACTIVE, false);
                    }
                    
                    if (activeTab && tab !== activeTab) { // no transition if only 1
                        this.contentTransition(tab, activeTab);
                    } else if (tab) {
                        tab.set('contentVisible', true);
                    }
                },
                validator: function(value) {
                    var ret = true;
                    if (value && value.get('disabled')) { // cannot activate if disabled
                        ret = false;
                    }
                    return ret;
                }
            });

            this.on('activeTabChange', this._onActiveTabChange);
            this.on('activeIndexChange', this._onActiveIndexChange);

            if ( this._tabParent ) {
                this._initTabs();
            }
            
            // Due to delegation we add all DOM_EVENTS to the TabView container
            // but IE will leak when unsupported events are added, so remove these
            this.DOM_EVENTS.submit = false;
            this.DOM_EVENTS.focus = false;
            this.DOM_EVENTS.blur = false;

            for (var type in this.DOM_EVENTS) {
                if ( YAHOO.lang.hasOwnProperty(this.DOM_EVENTS, type) ) {
                    this.addListener.call(this, type, this.DOMEventHandler);
                }
            }
        }
243386
def init_widget(self):
        
        super(AndroidTabLayout, self).init_widget()
        w = self.widget
        w.addOnTabSelectedListener(w.getId())
        w.onTabSelected.connect(self.on_tab_selected)
        w.onTabUnselected.connect(self.on_tab_unselected)