Place @widgets under the blitting hand of the Container(). Each arg 
        must be a Widget(), a fellow Container(), or an iterable. Else, things 
        get ugly...
437294
def add(self, *widgets):
        '''
        
        '''
        for w in widgets:
            if is_widget(w):
                if w not in self.widgets:
                    self.widgets.add(w)
                    w.add_internal(self)
            elif is_container(w):
                if w not in self.containers:
                    self.containers.add(w)
                    w.add_internal(self)
            else:
                # If it isn't an iterable, we'll get an error here.
                # Desired effect.
                self.add(*w)
995536
def add_view(self, *args, **kwargs):
        
        from .viewbox import ViewBox
        view = ViewBox(*args, **kwargs)
        return self.add_widget(view)
604129
def positional_args(arguments):
    "
    # TODO this behaviour probably isn't quite right.
    if arguments and arguments[0] == '--':
        for a in arguments[1:]:
            yield a
    else:
        for a in arguments:
            if a.startswith('-'):
                break
            yield a
220024
def layouts(*args)
      args.concat(%i[fast unsort small large]) if args.map(&:to_s).include?('all')
      args = args.map(&:to_s).join('|')
      res = ''
      res += fastbin.map(&:inspect).join if args.include?('fast')
      res += unsorted_bin.inspect if args.include?('unsort')
      res += smallbin.map(&:inspect).join if args.include?('small')
      res
    end
99065
def draw(self, surf):
        '''
        
        '''
        if self.shown:
            for w in self.widgets:
                surf.blit(w.image, self.convert_rect(w.rect))
            for c in self.containers:
                c.draw(surf)
568202
def add_widget(self, widget):
        
        if self._buttons.get(widget):
            return
        btn = self.create_button(widget)
        cb = partial(self.focus_widget, w=widget)
        btn.clicked.connect(cb)
        self.layout().addWidget(btn)
        self._buttons[widget] = btn
1312833
def _make_dir(self, client_kwargs):
        
        with _handle_client_exception():
            # Object
            if 'obj' in client_kwargs:
                return self.client.put_object(
                    client_kwargs['container'], client_kwargs['obj'], b'')

            # Container
            return self.client.put_container(client_kwargs['container'])
1075428
def __grid_widgets(self):
        """"""
        scrollbar_column = 0 if self.__compound is tk.LEFT else 2
        self._canvas.grid(row=0, column=1, sticky="nswe")
        self._scrollbar.grid(row=0, column=scrollbar_column, sticky="ns")
1308687
function( context, args ) {
				args = args || [];
				args = [ context, args.slice ? args.slice() : args ];
				if ( list && ( !fired || stack ) ) {
					if ( firing ) {
						stack.push( args );
					} else {
						fire( args );
					}
				}
				return this;
			}
801679
@Override
    protected void defineWidgets() {

        super.defineWidgets();

        addWidget(new CmsWidgetDialogParameter(m_module, "resources", PAGES[0], new CmsVfsFileWidget()));
        addWidget(new CmsWidgetDialogParameter(m_module, "excludeResources", PAGES[0], new CmsVfsFileWidget()));
    }
115127
public void addBottomWidget(Widget w) {

        m_content.removeStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().alertMainContent());
        m_bottomWidgets.getElement().getStyle().clearDisplay();
        m_bottomWidgets.add(w);

    }
1177969
@Override
    protected void defineWidgets() {

        super.defineWidgets();

        // widgets to display
        // new indexsource
        addWidget(
            new CmsWidgetDialogParameter(this, "type", PAGES[0], new CmsSelectWidget(getTypeWidgetConfiguration())));
        addWidget(new CmsWidgetDialogParameter(m_mapping, "param", "", PAGES[0], new CmsInputWidget(), 0, 1));
        addWidget(new CmsWidgetDialogParameter(m_mapping, "defaultValue", "", PAGES[0], new CmsInputWidget(), 0, 1));
    }
1241766
def set_widgets(self):
        """"""
        # The list is already populated in the previous step, but now we
        # need to do it again in case we're back from the Keyword Wizard.
        # First, preserve self.parent.layer before clearing the list
        last_layer = self.parent.layer and self.parent.layer.id() or None
        self.lblDescribeCanvasHazLayer.clear()
        self.list_compatible_canvas_layers()
        self.auto_select_one_item(self.lstCanvasHazLayers)
        # Try to select the last_layer, if found:
        if last_layer:
            layers = []
            for index in range(self.lstCanvasHazLayers.count()):
                item = self.lstCanvasHazLayers.item(index)
                layers += [item.data(Qt.UserRole)]
            if last_layer in layers:
                self.lstCanvasHazLayers.setCurrentRow(layers.index(last_layer))

        # Set icon
        hazard = self.parent.step_fc_functions1.selected_value(
            layer_purpose_hazard['key'])
        icon_path = get_image_path(hazard)
        self.lblIconIFCWHazardFromCanvas.setPixmap(QPixmap(icon_path))
824391
function Widgets() {
        var that;

        /**
         * ### Widgets.widgets
         *
         * Container of currently registered widgets
         *
         * @see Widgets.register
         */
        this.widgets = {};

        /**
         * ### Widgets.instances
         *
         * Container of appended widget instances
         *
         * @see Widgets.append
         * @see Widgets.lastAppended
         */
        this.instances = [];

        /**
         * ### Widgets.lastAppended
         *
         * Reference to lastAppended widget
         *
         * @see Widgets.append
         */
        this.lastAppended = null;

        /**
         * ### Widgets.docked
         *
         * List of docked widgets
         */
        this.docked = [];

        /**
         * ### Widgets.dockedHidden
         *
         * List of hidden docked widgets (cause not enough space on page)
         */
        this.dockedHidden = [];

        /**
         * ### Widgets.boxSelector
         *
         * A box selector widget containing hidden docked widgets
         */
        this.boxSelector = null;

        /**
         * ### Widgets.collapseTarget
         *
         * Collapsed widgets are by default moved inside element
         */
        this.collapseTarget = null;

        that = this;
        node.registerSetup('widgets', function(conf) {
            var name, root, collapseTarget;
            if (!conf) return;

            // Add new widgets.
            if (conf.widgets) {
                for (name in conf.widgets) {
                    if (conf.widgets.hasOwnProperty(name)) {
                        that.register(name, conf.widgets[name]);
                    }
                }
            }

            // Destroy all existing widgets.
            if (conf.destroyAll) that.destroyAll();

            // Append existing widgets.
            if (conf.append) {
                for (name in conf.append) {
                    if (conf.append.hasOwnProperty(name)) {
                        // Determine root.
                        root = conf.append[name].root;
                        if ('function' === typeof root) {
                            root = root();
                        }
                        else if ('string' === typeof root) {
                            root = W.getElementById(root);
                        }
                        if (!root) root = W.getScreen();

                        if (!root) {
                            node.warn('setup widgets: could not find a root ' +
                                      'for widget ' + name + '. Requested: ' +
                                      conf.append[name].root);
                        }
                        else {
                            that.append(name, root, conf.append[name]);
                        }
                    }
                }
            }

            if (conf.collapseTarget) {
                if ('function' === typeof conf.collapseTarget) {
                    collapseTarget = conf.collapseTarget();
                }
                else if ('string' === typeof conf.collapseTarget) {
                    collapseTarget = W.getElementById(conf.collapseTarget);
                }
                else if (J.isElement(conf.collapseTarget)) {
                    collapseTarget = conf.collapseTarget;
                }
                if (!collapseTarget) {
                    node.warn('setup widgets: could not find collapse target.');
                }
                else {
                    that.collapseTarget = collapseTarget;
                }
            }

            return conf;
        });

        // Garbage collection.
        node.on('FRAME_LOADED', function() {
            node.widgets.garbageCollection();
        });

        node.info('node-widgets: loading');
    }
299654
def remake_display(self, *args):
        
        Builder.load_string(self.kv)
        if hasattr(self, '_kv_layout'):
            self.remove_widget(self._kv_layout)
            del self._kv_layout
        self._kv_layout = KvLayout()
        self.add_widget(self._kv_layout)
340478
def build_gui(self, container):
        
        vbox = Widgets.VBox()
        vbox.set_border_width(0)

        w = Viewers.GingaViewerWidget(viewer=self)
        vbox.add_widget(w, stretch=1)

        # need to put this in an hbox with an expanding label or the
        # browser wants to resize the canvas, distorting it
        hbox = Widgets.HBox()
        hbox.add_widget(vbox, stretch=0)
        hbox.add_widget(Widgets.Label(''), stretch=1)

        container.set_widget(hbox)
183334
function(name, arguments_array) {

		if (Lava.schema.DEBUG && !(name in this._modifiers)) Lava.t("Unknown widget modifier: " + name);

		return this[this._modifiers[name]].apply(this, arguments_array);

	}