Get restorable tabs under the given window

@param {object} window
Window inside the tree
@returns List of tabs
@type {array of object}
500883
function aboutSessionRestore_getTabs(window) {
    var tabs = [ ];
    var tree = this.tabList.getNode();

    // Add entries when they are tabs (no container)
    var ii = window.listIndex + 1;
    while (ii < tree.view.rowCount && !tree.view.isContainer(ii)) {
      tabs.push({
                 index: tabs.length,
                 listIndex : ii,
                 restore: tree.view.getCellValue(ii, tree.columns.getColumnAt(0)),
                 title: tree.view.getCellText(ii, tree.columns.getColumnAt(2))
                });
      ii++;
    }

    return tabs;
  }
953342
function Windows(chrome) {
    this.chrome = chrome;
    this.WINDOW_ID_NONE = -1;
    this.WINDOW_ID_CURRENT = -2;

    /**
     * Gets details about a window.
     *
     * @param {number} tabId
     * @param {function} callback
     */
    this.get = sinon.stub();

    /**
     * Gets the current window
     *
     * @param {function} callback
     */
    this.getCurrent = sinon.stub();

    /**
     * Gets the window that was most recently focused — typically the window 'on top'.
     *
     * @param {function} callback
     */
    this.getLastFocused = sinon.stub();

    /**
     * Gets all windows.
     *
     * @param {function} callback
     */
    this.getAll = sinon.stub();
    /**
     * Creates (opens) a new browser with any optional sizing, position or default URL provided.
     *
     * @param {function} callback
     */
    this.create = sinon.stub();

    /**
     * Updates the properties of a window. Specify only the properties that you want to change;
     * unspecified properties will be left unchanged.
     *
     * @param {function} callback
     */
    this.update = sinon.stub();

    /**
     * Removes (closes) a window, and all the tabs inside it.
     *
     * @param {function} callback
     */
    this.remove = sinon.stub();
}
933599
protected function getSliderTooCloseToBeginning($window)
    {
        $lastPage = $this->lastPage();

        return array(
            'first'  => $this->getUrlRange(1, $window + 2),
            'slider' => null,
            'last'   => $this->getUrlRange($lastPage - 1, $lastPage),
        );
    }
1357359
function (panel) {
                var self = this, bar = self.get('bar'), body = self.get('body'), selectedPanelIndex = util.indexOf(panel, body.get('children'));
                body.set('selectedPanelIndex', selectedPanelIndex);
                bar.set('selectedTab', self.getTabAt(selectedPanelIndex));
                return this;
            }
599928
private List<UIComponent> getTabs(TabView tabView) {
		List<UIComponent> children = tabView.getChildren();
		List<UIComponent> filtered = new ArrayList<UIComponent>(children.size());
		for (UIComponent c : children) {
			if (c instanceof Tab)
				filtered.add(c);
		}
		return filtered;
	}
1074494
private Element getTabElement(int tabIndex) {

        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);
        if ((tabDivs != null) && (tabDivs.size() > tabIndex)) {
            return tabDivs.get(tabIndex);
        }
        return null;
    }
1014849
def get_tabs(self):
        
        if not self.tabs:
            return None
        else:
            allowed_tabs = []
            for tab in self.tabs:

                # check permission based on named_url
                if not view_from_url(tab[1]).has_permission(self.request.user):
                    continue

                obj = self if not hasattr(self, "object") else self.object
                url = reverse_url(tab[1], obj)
                allowed_tabs.append(
                    {
                        "name": tab[0],
                        "active": self.request.path == url,
                        "url": self.in_modal(url),
                    }
                )
            return allowed_tabs
1001813
function(tab) {
            var index = null,
                tabs = this.get('tabs');
            for (var i = 0, len = tabs.length; i < len; ++i) {
                if (tab == tabs[i]) {
                    index = i;
                    break;
                }
            }
            
            return index;
        }
1337908
function getTouchList() {
    var touchlist = [];
    // we can use forEach since pointerEvents only is in IE10
    Utils.each(this.pointers, function(pointer) {
      touchlist.push(pointer);
    });
    return touchlist;
  }
282621
function findTabbables(oRef, aScopes, bNext) {
			var $Ref = jQuery(oRef),
				$All, $Tabbables;

			if (bNext) {
				$All = jQuery.merge($Ref.find("*"), jQuery.merge($Ref.nextAll(), $Ref.parents().nextAll()));
				$Tabbables = $All.find(':sapTabbable').addBack(':sapTabbable');
			} else {
				$All = jQuery.merge($Ref.prevAll(), $Ref.parents().prevAll());
				$Tabbables = jQuery.merge($Ref.parents(':sapTabbable'), $All.find(':sapTabbable').addBack(':sapTabbable'));
			}

			var $Tabbables = jQuery.unique($Tabbables);
			return $Tabbables.filter(function() {
				return isContained(aScopes, this);
			});
		}
525980
def getSelectedTab(tabs, forURL):
    

    flatTabs = []

    def flatten(tabs):
        for t in tabs:
            flatTabs.append(t)
            flatten(t.children)

    flatten(tabs)
    forURL = '/' + forURL.path

    for t in flatTabs:
        if forURL == t.linkURL:
            return t

    flatTabs.sort(key=lambda t: len(t.linkURL), reverse=True)

    for t in flatTabs:
        if not t.linkURL.endswith('/'):
            linkURL = t.linkURL + '/'
        else:
            linkURL = t.linkURL

        if forURL.startswith(linkURL):
            return t
200414
def getWindows(input):
    """"""
    with rasterio.open(input) as src:
        return [[window, ij] for ij, window in src.block_windows()]
877266
function(e) {
            var current = _this._getCurrentTab(); // Fetch current tab
            var activatedTab = e.data.tab;

            e.preventDefault();

            // Trigger click event for whenever a tab is clicked/touched even if the tab is disabled
            activatedTab.tab.trigger('tabs-click', activatedTab);

            // Make sure this tab isn't disabled
            if(!activatedTab.disabled) {

                // Check if hash has to be set in the URL location
                if(_this.options.setHash) {
                    // Set the hash using the history api if available to tackle Chromes repaint bug on hash change
                    if(history.pushState) {
                        // Fix for missing window.location.origin in IE
                        if (!window.location.origin) {
                            window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
                        }
                        
                        history.pushState(null, null, window.location.origin + window.location.pathname + window.location.search + activatedTab.selector);
                    } else {
                        // Otherwise fallback to the hash update for sites that don't support the history api
                        window.location.hash = activatedTab.selector;
                    }
                }

                e.data.tab._ignoreHashChange = true;

                // Check if the activated tab isnt the current one or if its collapsible. If not, do nothing
                if(current !== activatedTab || _this._isCollapisble()) {
                    // The activated tab is either another tab of the current one. If it's the current tab it is collapsible
                    // Either way, the current tab can be closed
                    _this._closeTab(e, current);

                    // Check if the activated tab isnt the current one or if it isnt collapsible
                    if(current !== activatedTab || !_this._isCollapisble()) {
                        _this._openTab(e, activatedTab, false, true);
                    }
                }
            }
        }
897596
function Tabs(element) {
      classCallCheck(this, Tabs);

      /** @type {Element} */
      var _this = possibleConstructorReturn(this, _TinyEmitter.call(this));

      _this.element = element;

      /** @private {number} */
      _this._selectedIndex = -1;

      /**
       * List items, children of the tabs list.
       * @type {Array.<Element>}
       */
      _this.tabs = Array.from(_this.element.children);

      /**
       * Anchor elements inside the tab.
       * @type {Array.<HTMLAnchorElement>}
       */
      _this.anchors = _this.tabs.map(function (tab) {
        return tab.querySelector('a');
      });

      /**
       * Tab pane elements.
       * @type {Array.<HTMLElement>}
       */
      _this.panes = _this.anchors.map(function (anchor) {
        return document.getElementById(anchor.getAttribute('href').substring(1));
      });

      /**
       * Wrapper for the panes.
       * @type {HTMLElement}
       */
      _this.panesContainer = _this.panes[0].parentElement;

      /**
       * Get an array of [possible] hashes.
       * @type {Array.<?string>}
       */
      _this.hashes = _this.anchors.map(function (anchor) {
        return anchor.getAttribute('data-hash');
      });

      _this.init();
      return _this;
    }
644942
def find_window_classes() -> List[str]:
    
    return [
        path.parts[-1] for path in Path(__file__).parent.iterdir()
        if path.is_dir() and not path.parts[-1].startswith('__')
    ]
414636
protected static Window[] getDisplayableWindows()
    {
        return Stream.of(Window.getWindows()).filter(Window::isDisplayable).toArray(Window[]::new);
    }
27602
function Tabs(chrome) {
  this.chrome = chrome;

  /**
   * Retrieves details about the specified tab.
   *
   * @param {number} tabId
   * @param {function} callback
   */
  this.get = sinon.stub();

  /**
   * Gets the tab that this script call is being made from. May be undefined if called
   * from a non-tab context (for example: a background page or popup view).
   *
   * @param {function} callback
   */
  this.getCurrent = sinon.stub();

  /**
   * Connects to the content script(s) in the specified tab. The $(ref:runtime.onConnect)
   * event is fired in each content script running in the specified tab for the current
   * extension. For more details, see <a href='messaging'>Content Script Messaging</
   * a>.
   *
   * @param {number} tabId
   * @param {Object} connectInfo
   * @returns {undefined} A port that can be used to communicate with the content scripts running in th...
   */
  this.connect = sinon.stub();

  /**
   * Discards a tab from memory.
   * Discarded tabs are still visible on the tab strip and are reloaded when activated.
   *
   * @param {number} tabId
   * @param {function} callback
   */
  this.discard = sinon.stub();

  /**
   * Sends a single request to the content script(s) in the specified tab, with an optional
   * callback to run when a response is sent back.  The $(ref:extension.onRequest) event
   * is fired in each content script running in the specified tab for the current ex
   * tension.
   *
   * @param {number} tabId
   * @param {any} request
   * @param {function} responseCallback
   */
  this.sendRequest = sinon.stub();

  /**
   * Sends a single message to the content script(s) in the specified tab, with an optional
   * callback to run when a response is sent back.  The $(ref:runtime.onMessage) event
   * is fired in each content script running in the specified tab for the current ex
   * tension.
   *
   * @param {number} tabId
   * @param {any} message
   * @param {function} responseCallback
   */
  this.sendMessage = sinon.stub();

  /**
   * Gets the tab that is selected in the specified window.
   *
   * @param {number} windowId Defaults to the <a href='windows#current-window'>current window</a>.
   * @param {function} callback
   */
  this.getSelected = sinon.stub();

  /**
   * Gets details about all tabs in the specified window.
   *
   * @param {number} windowId Defaults to the <a href='windows#current-window'>current window</a>.
   * @param {function} callback
   */
  this.getAllInWindow = sinon.stub();

  /**
   * Creates a new tab.
   *
   * @param {Object} createProperties
   * @param {function} callback
   */
  this.create = sinon.stub();

  /**
   * Duplicates a tab.
   *
   * @param {number} tabId The ID of the tab which is to be duplicated.
   * @param {function} callback
   */
  this.duplicate = sinon.stub();

  /**
   * Gets all tabs that have the specified properties, or all tabs if no properties are
   * specified.
   *
   * @param {Object} queryInfo
   * @param {function} callback
   */
  this.query = sinon.stub();

  /**
   * Highlights the given tabs.
   *
   * @param {Object} highlightInfo
   * @param {function} callback
   */
  this.highlight = sinon.stub();

  /**
   * Modifies the properties of a tab. Properties that are not specified in <var>updateProperties</var>
   * are not modified.
   *
   * @param {number} tabId Defaults to the selected tab of the <a href='windows#current-window'>current ...
   * @param {Object} updateProperties
   * @param {function} callback
   */
  this.update = sinon.stub();

  /**
   * Moves one or more tabs to a new position within its window, or to a new window. Note
   * that tabs can only be moved to and from normal (window.type === "normal") windo
   * ws.
   *
   * @param {undefined} tabIds The tab or list of tabs to move.
   * @param {Object} moveProperties
   * @param {function} callback
   */
  this.move = sinon.stub();

  /**
   * Reload a tab.
   *
   * @param {number} tabId The ID of the tab to reload; defaults to the selected tab of the current window.
   * @param {Object} reloadProperties
   * @param {function} callback
   */
  this.reload = sinon.stub();

  /**
   * Closes one or more tabs.
   *
   * @param {undefined} tabIds The tab or list of tabs to close.
   * @param {function} callback
   */
  this.remove = sinon.stub();

  /**
   * Detects the primary language of the content in a tab.
   *
   * @param {number} tabId Defaults to the active tab of the <a href='windows#current-window'>current wi...
   * @param {function} callback
   */
  this.detectLanguage = sinon.stub();

  /**
   * Captures the visible area of the currently active tab in the specified window. You
   * must have <a href='declare_permissions'>&lt;all_urls&gt;</a> permission to use this
   * method.
   *
   * @param {number} windowId The target window. Defaults to the <a href='windows#current-window'>current w...
   * @param {undefined} options
   * @param {function} callback
   */
  this.captureVisibleTab = sinon.stub();

  /**
   * Injects JavaScript code into a page. For details, see the <a href='content_scripts#pi'>programmatic
   * injection</a> section of the content scripts doc.
   *
   * @param {number} tabId The ID of the tab in which to run the script; defaults to the active tab of t...
   * @param {undefined} details Details of the script to run.
   * @param {function} callback Called after all the JavaScript has been executed.
   */
  this.executeScript = sinon.stub();

  /**
   * Injects CSS into a page. For details, see the <a href='content_scripts#pi'>programmatic
   * injection</a> section of the content scripts doc.
   *
   * @param {number} tabId The ID of the tab in which to insert the CSS; defaults to the active tab of t...
   * @param {undefined} details Details of the CSS text to insert.
   * @param {function} callback Called when all the CSS has been inserted.
   */
  this.insertCSS = sinon.stub();

  /**
   * Zooms a specified tab.
   *
   * @param {number} tabId The ID of the tab to zoom; defaults to the active tab of the current window.
   * @param {number} zoomFactor The new zoom factor.
   * @param {function} callback Called after the zoom factor has been changed.
   */
  this.setZoom = sinon.stub();

  /**
   * Gets the current zoom factor of a specified tab.
   *
   * @param {number} tabId The ID of the tab to get the current zoom factor from; defaults to the active...
   * @param {function} callback Called with the tab's current zoom factor after it has been fetched.
   */
  this.getZoom = sinon.stub();

  /**
   * Sets the zoom settings for a specified tab, which define how zoom changes are handled.
   * These settings are reset to defaults upon navigating the tab.
   *
   * @param {number} tabId The ID of the tab to change the zoom settings for; defaults to the active tab...
   * @param {undefined} zoomSettings Defines how zoom changes are handled and at what scope.
   * @param {function} callback Called after the zoom settings have been changed.
   */
  this.setZoomSettings = sinon.stub();

  /**
   * Gets the current zoom settings of a specified tab.
   *
   * @param {number} tabId The ID of the tab to get the current zoom settings from; defaults to the acti...
   * @param {function} callback Called with the tab's current zoom settings.
   */
  this.getZoomSettings = sinon.stub();


  /**
   * Fired when a tab is created. Note that the tab's URL may not be set at the time this
   * event fired, but you can listen to onUpdated events to be notified when a URL is
   * set.
   */
  this.onCreated = new Event();

  /**
   * Fired when a tab is updated.
   */
  this.onUpdated = new Event();

  /**
   * Fired when a tab is moved within a window. Only one move event is fired, representing
   * the tab the user directly moved. Move events are not fired for the other tabs that
   * must move in response. This event is not fired when a tab is moved between windows.
   * For that, see $(ref:tabs.onDetached).
   */
  this.onMoved = new Event();

  /**
   * Fires when the selected tab in a window changes.
   */
  this.onSelectionChanged = new Event();

  /**
   * Fires when the selected tab in a window changes. Note that the tab's URL may not
   * be set at the time this event fired, but you can listen to $(ref:tabs.onUpdated)
   * events to be notified when a URL is set.
   */
  this.onActiveChanged = new Event();

  /**
   * Fires when the active tab in a window changes. Note that the tab's URL may not be
   * set at the time this event fired, but you can listen to onUpdated events to be notified
   * when a URL is set.
   */
  this.onActivated = new Event();

  /**
   * Fired when the highlighted or selected tabs in a window changes.
   */
  this.onHighlightChanged = new Event();

  /**
   * Fired when the highlighted or selected tabs in a window changes.
   */
  this.onHighlighted = new Event();

  /**
   * Fired when a tab is detached from a window, for example because it is being moved
   * between windows.
   */
  this.onDetached = new Event();

  /**
   * Fired when a tab is attached to a window, for example because it was moved between
   * windows.
   */
  this.onAttached = new Event();

  /**
   * Fired when a tab is closed.
   */
  this.onRemoved = new Event();

  /**
   * Fired when a tab is replaced with another tab due to prerendering or instant.
   */
  this.onReplaced = new Event();

  /**
   * Fired when a tab is zoomed.
   */
  this.onZoomChange = new Event();
}