Show the sidebar and squish the container to make room for the sidebar.
If hideOthers is true, hide other open sidebars.
2
function() {
        var options = this.options;

        if (options.hideOthers) {
            this.secondary.each(function() {
                var sidebar = $(this);

                if (sidebar.hasClass('is-expanded')) {
                    sidebar.toolkit('offCanvas', 'hide');
                }
            });
        }

        this.fireEvent('showing');

        this.container.addClass('move-' + this.opposite);

        this.element
            .reveal()
            .addClass('is-expanded')
            .aria('expanded', true);

        if (options.stopScroll) {
            $('body').addClass('no-scroll');
        }

        this.fireEvent('shown');
    }
737718
function () {
            if (!this.coords.w_rs || this.options.hide_from_to) {
                return;
            }

            if (this.options.type === "single") {

                this.labels.w_single = this.$cache.single.outerWidth(false);
                this.labels.p_single_fake = this.labels.w_single / this.coords.w_rs * 100;
                this.labels.p_single_left = this.coords.p_single_fake + (this.coords.p_handle / 2) - (this.labels.p_single_fake / 2);
                this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single_fake);

            } else {

                this.labels.w_from = this.$cache.from.outerWidth(false);
                this.labels.p_from_fake = this.labels.w_from / this.coords.w_rs * 100;
                this.labels.p_from_left = this.coords.p_from_fake + (this.coords.p_handle / 2) - (this.labels.p_from_fake / 2);
                this.labels.p_from_left = this.toFixed(this.labels.p_from_left);
                this.labels.p_from_left = this.checkEdges(this.labels.p_from_left, this.labels.p_from_fake);

                this.labels.w_to = this.$cache.to.outerWidth(false);
                this.labels.p_to_fake = this.labels.w_to / this.coords.w_rs * 100;
                this.labels.p_to_left = this.coords.p_to_fake + (this.coords.p_handle / 2) - (this.labels.p_to_fake / 2);
                this.labels.p_to_left = this.toFixed(this.labels.p_to_left);
                this.labels.p_to_left = this.checkEdges(this.labels.p_to_left, this.labels.p_to_fake);

                this.labels.w_single = this.$cache.single.outerWidth(false);
                this.labels.p_single_fake = this.labels.w_single / this.coords.w_rs * 100;
                this.labels.p_single_left = ((this.labels.p_from_left + this.labels.p_to_left + this.labels.p_to_fake) / 2) - (this.labels.p_single_fake / 2);
                this.labels.p_single_left = this.toFixed(this.labels.p_single_left);
                this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single_fake);

            }
        }
430492
protected void toggleElementVisibility() {

        if (CmsDomUtil.hasClass(HIDE_ELEMENTS_CLASS, getGroupContainerWidget().getElement())) {
            getGroupContainerWidget().removeStyleName(HIDE_ELEMENTS_CLASS);
        } else {
            getGroupContainerWidget().addStyleName(HIDE_ELEMENTS_CLASS);
        }
        getGroupContainerWidget().refreshHighlighting();
    }
425012
private void adaptButtonBarVisibility() {
        if (buttonBarContainer != null) {
            buttonBarContainer.setVisibility(buttonBarShown ? View.VISIBLE : View.GONE);
        }
    }
423235
function() {
	var totalWidth = this.element.offsetWidth;
	if (totalWidth < this.minWidth){
		if (this.isNarrow == null || this.isNarrow == false)
			this.isNarrow = true
		this.hideMaster()
	}
	else{
		if (this.isNarrow == null || this.isNarrow == true)
			this.isNarrow = false
		this.showMaster()
	}
	this.calcWidth();

}
727734
function(close) {
				var w = $('#sidepanels').width();
				var deltaX = (w > 2 || close ? 2 : SIDEPANEL_OPENWIDTH) - w;
				changeSidePanelWidth(deltaX);
			}
1137797
private void inflateTitleContainer() {
        if (titleContainer == null) {
            titleContainer = new RelativeLayout(getContext());
            titleContainer.setId(R.id.title_container);
            titleContainer.setLayoutParams(
                    new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                            ViewGroup.LayoutParams.WRAP_CONTENT));
        } else {
            titleContainer.removeAllViews();
        }
    }
652521
private void openSubMenu() {

        if (isEnabled() && hasSubMenu() && !m_subMenu.isShowing()) {
            m_overlay.closeSubMenus();

            setFocus(false);
            addStyleName("v-context-menu-item-basic-open");
            m_subMenu.openNextTo(this);
        }
    }
912834
def add_sidebar(self, component: Component) -> None:
        
        if not self.sidebar:
            raise NoSidebarError('Set `sidebar=True` if you want to use the sidebar.')

        if not isinstance(component, Component):
            raise ValueError('component must be Component type, found {}'.format(component))
        # self._track_widget(widget)
        self._controllers.append(component)
389186
function () {
        u.toggleClass(this._drawer, this._CssClasses.IS_DRAWER_OPEN);
        u.toggleClass(this._obfuscator, this._CssClasses.IS_DRAWER_OPEN);
    }
523447
function(e) {
      var t = this,
          sidebar = $('.nm-sb'),
          newWidth = startWidth = sidebar.width(),
          startX = e.pageX;
      function drag(e) {
        newWidth = startWidth + (e.pageX - startX);
        sidebar.css({width:newWidth});
        t.tour.css({left: newWidth + t.handleWidth});
        UI.pageView.centerPage();
      }
      function drop(e) {
        t.handle.removeClass('drag');
        $(document).unbind("mousemove", drag).unbind("mouseup", drop);
        // Simulate click?
        if (newWidth === startWidth) {
          newWidth = startWidth === 0 ? Sidebar.prototype.defaults.width : 0;
        }
        // Auto-close?
        else if (newWidth < 30) {
          newWidth = 0;
        }
        // Set the width, center the page, and persist
        t.sidebar.set('width', newWidth);
        sidebar.css({width: newWidth});
        t.tour.css({left: newWidth + t.handleWidth});
        UI.pageView.centerPage();
      }
      $(document).bind("mousemove", drag).bind("mouseup", drop);
      t.handle.addClass('drag');
      drag(e);
      e.preventDefault();
    }
253369
def add_to(self, container):
        '''
        
        '''
        if self.container:
            self.remove_from(self.container)
        container.add(self)
399046
function($container) {
    var styles = window.getComputedStyle($container, null);
    var position = styles.getPropertyValue("position");
    var overflow = styles.getPropertyValue("overflow");
    var display = styles.getPropertyValue("display");

    if (!position || position === "static") {
      $container.style.position = "relative";
    }
    if (overflow !== "hidden") {
      $container.style.overflow = "hidden";
    }
    // Guesstimating that people want the parent to act like full width/height wrapper here.
    // Mostly attempts to target <picture> elements, which default to inline.
    if (!display || display === "inline") {
      $container.style.display = "block";
    }
    if ($container.clientHeight === 0) {
      $container.style.height = "100%";
    }

    // Add a CSS class hook, in case people need to override styles for any reason.
    if ($container.className.indexOf("object-fit-polyfill") === -1) {
      $container.className = $container.className + " object-fit-polyfill";
    }
  }
319557
def hide(self):
        
        if not self.isHidden():
            QWidget.hide(self)
            self._qpart.updateViewport()
717057
def do_fit(self, event, min_size=None):
        
        #self.grid.ShowScrollbars(wx.SHOW_SB_NEVER, wx.SHOW_SB_NEVER)
        if event:
            event.Skip()
        self.main_sizer.Fit(self)
        disp_size = wx.GetDisplaySize()
        actual_size = self.GetSize()
        # if there isn't enough room to display new content
        # resize the frame
        if disp_size[1] - 75 < actual_size[1]:
            self.SetSize((actual_size[0], disp_size[1] * .95))
        # make sure you adhere to a minimum size
        if min_size:
            actual_size = self.GetSize()
            larger_width = max([actual_size[0], min_size[0]])
            larger_height = max([actual_size[1], min_size[1]])
            if larger_width > actual_size[0] or larger_height > actual_size[1]:
                self.SetSize((larger_width, larger_height))
        self.Centre()
743693
public void setCollapsed (boolean collapse)
    {
        if (collapse) {
            _content.setVisible(false);
            _trigger.setIcon(_downIcon);

        } else {
            _content.setVisible(true);
            _trigger.setIcon(_upIcon);
        }
        SwingUtil.refresh(this);
    }
1278366
function()
    {
        if (this.visible())
            return;
        this._overlay = new WebInspector.SuggestBox.Overlay();
        this._bodyElement = document.body;
        this._bodyElement.addEventListener("mousedown", this._maybeHideBound, true);

        this._leftSpacerElement = this._overlay.element.createChild("div", "suggest-box-left-spacer");
        this._horizontalElement = this._overlay.element.createChild("div", "suggest-box-horizontal");
        this._topSpacerElement = this._horizontalElement.createChild("div", "suggest-box-top-spacer");
        this._horizontalElement.appendChild(this._element);
        this._bottomSpacerElement = this._horizontalElement.createChild("div", "suggest-box-bottom-spacer");
    }