Wrapping in control in column wrapper
16496
def draw_control_column(bootstrap, offset:)
      return yield unless bootstrap.horizontal?
      css_class = bootstrap.control_col_class.to_s
      css_class += " #{bootstrap.offset_col_class}" if offset
      content_tag(:div, class: css_class) do
        yield
      end
    end
419818
function (e)
	{
		var filler = this.dom.filler;

		/* Don't display automatically when dragging */
		if ( this.s.drag.dragging)
		{
			return;
		}

		/* Check that we are allowed to AutoFill this column or not */
		var nTd = (e.target.nodeName.toLowerCase() == 'td') ? e.target : $(e.target).parents('td')[0];
		var iX = this._fnTargetCoords(nTd).column;
		if ( !this.s.columns[iX].enable )
		{
			filler.style.display = "none";
			return;
		}

		if (e.type == 'mouseover')
		{
			this.dom.currentTarget = nTd;
			this._fnFillerPosition( nTd );

			filler.style.display = "block";
		}
		else if ( !e.relatedTarget || !e.relatedTarget.className.match(/AutoFill/) )
		{
			filler.style.display = "none";
		}
	}
660056
def wrap(self, row: Union[Mapping[str, Any], Sequence[Any]]):
        """"""
        return (
            self.dataclass(
                **{
                    ident: row[column_name]
                    for ident, column_name in self.ids_and_column_names.items()
                }
            )
            if isinstance(row, Mapping)
            else self.dataclass(
                **{ident: val for ident, val in zip(self.ids_and_column_names.keys(), row)}
            )
        )
177086
public void setEnd(Color col) {
		((ControlPoint) list.get(list.size()-1)).col = col;
		repaint(0);
	}
341049
public function wrap($value)
		{
			// This method is primarily for convenience so we can just pass a
			// column or table instance into the wrap method without sending
			// in the name each time we need to wrap one of these objects.
			if ($value instanceof Table) {
				return $this->wrap_table($value->name);
			} elseif ($value instanceof Fluent) {
				$value = $value->name;
			}

			return parent::wrap($value);
		}
1315230
private void addSingleColumnSelectExample() {
		add(new WHeading(HeadingLevel.H3, "WCheckBoxSelect laid out in a single column"));
		add(new ExplanatoryText("When layout is COLUMN, setting the layoutColumnCount property to one, or forgetting to set it at all (default is "
				+ "one) is a little bit pointless."));
		final WCheckBoxSelect select = new WCheckBoxSelect("australian_state");
		select.setToolTip("Make a selection");
		select.setButtonLayout(WCheckBoxSelect.LAYOUT_COLUMNS);
		add(select);
	}
1055377
private void refreshHeaderColumnViewHolder(ViewHolder holder) {
        int left = getEmptySpace() + mManager.getColumnsWidth(0, Math.max(0, holder.getColumnIndex()));
        if (!isRTL()) {
            left += mManager.getHeaderRowWidth();
        }
        int top = mSettings.isHeaderFixed() ? 0 : -mState.getScrollY();
        View view = holder.getItemView();

        int leftMargin = holder.getColumnIndex() * mSettings.getCellMargin() + mSettings.getCellMargin();
        int topMargin = holder.getRowIndex() * mSettings.getCellMargin() + mSettings.getCellMargin();

        if (holder.isDragging() && mDragAndDropPoints.getOffset().x > 0) {
            left = mState.getScrollX() + mDragAndDropPoints.getOffset().x - view.getWidth() / 2;
            view.bringToFront();
        }

        if (holder.isDragging()) {
            View leftShadow = mShadowHelper.getLeftShadow();
            View rightShadow = mShadowHelper.getRightShadow();

            if (leftShadow != null) {
                int shadowLeft = left - mState.getScrollX();
                leftShadow.layout(
                        Math.max(mManager.getHeaderRowWidth() - mState.getScrollX(), shadowLeft - SHADOW_THICK) + leftMargin,
                        0,
                        shadowLeft + leftMargin,
                        mSettings.getLayoutHeight());
                leftShadow.bringToFront();
            }

            if (rightShadow != null) {
                int shadowLeft = left + mManager.getColumnWidth(holder.getColumnIndex()) - mState.getScrollX();
                rightShadow.layout(
                        Math.max(mManager.getHeaderRowWidth() - mState.getScrollX(), shadowLeft) + leftMargin,
                        0,
                        shadowLeft + SHADOW_THICK + leftMargin,
                        mSettings.getLayoutHeight());
                rightShadow.bringToFront();
            }
        }

        int viewPosLeft = left - mState.getScrollX() + leftMargin;
        int viewPosRight = viewPosLeft + mManager.getColumnWidth(holder.getColumnIndex());
        int viewPosTop = top + topMargin;
        int viewPosBottom = viewPosTop + mManager.getHeaderColumnHeight();
        //noinspection ResourceType
        view.layout(viewPosLeft,
                viewPosTop,
                viewPosRight,
                viewPosBottom);

        if (mState.isRowDragging()) {
            view.bringToFront();
        }

        if (!mState.isColumnDragging()) {
            View shadow = mShadowHelper.getColumnsHeadersShadow();

            if (shadow == null) {
                shadow = mShadowHelper.addColumnsHeadersShadow(this);
            }

            //noinspection ResourceType
            shadow.layout(mState.isRowDragging() ? 0 :
                            mSettings.isHeaderFixed() ? 0 : -mState.getScrollX(),
                    top + mManager.getHeaderColumnHeight(),
                    mSettings.getLayoutWidth(),
                    top + mManager.getHeaderColumnHeight() + SHADOW_HEADERS_THICK);

            shadow.bringToFront();
        }

    }
827170
private void decorate(final String styleName, final String caption, final String description,
            final Boolean autoClose) {
        setCaption(caption);
        setDescription(description);
        setStyleName(styleName);
        setHtmlContentAllowed(true);
        setPosition(Position.BOTTOM_RIGHT);
        if (autoClose) {
            setDelayMsec(SPUILabelDefinitions.SP_DELAY);
        } else {
            setDelayMsec(-1);
        }
    }
320805
function(
    /*number*/ combinedWidth,
    /*number*/ leftOffset,
    /*number*/ cellWidth,
    /*?number*/ cellMinWidth,
    /*?number*/ cellMaxWidth,
    /*number|string*/ columnKey,
    /*object*/ event) {
    if (Locale.isRTL()) {
      leftOffset = -leftOffset;
    }
    this.setState({
      isColumnResizing: true,
      columnResizingData: {
        left: leftOffset + combinedWidth - cellWidth,
        width: cellWidth,
        minWidth: cellMinWidth,
        maxWidth: cellMaxWidth,
        initialEvent: {
          clientX: event.clientX,
          clientY: event.clientY,
          preventDefault: emptyFunction
        },
        key: columnKey
      }
    });
  }
558360
function _fnAdjustColumnSizing ( settings )
	{
		/* Not interested in doing column width calculation if auto-width is disabled */
		if ( settings.oFeatures.bAutoWidth !== false )
		{
			var columns = settings.aoColumns;
	
			_fnCalculateColumnWidths( settings );
			for ( var i=0 , iLen=columns.length ; i<iLen ; i++ )
			{
				columns[i].nTh.style.width = columns[i].sWidth;
			}
		}
	
		var scroll = settings.oScroll;
		if ( scroll.sY !== '' || scroll.sX !== '')
		{
			_fnScrollDraw( settings );
		}
	
		_fnCallbackFire( settings, null, 'column-sizing', [settings] );
	}
1166904
def OnInsertCols(self, event):
        """"""

        bbox = self.grid.selection.get_bbox()

        if bbox is None or bbox[1][1] is None:
            # Insert rows at cursor
            ins_point = self.grid.actions.cursor[1] - 1
            no_cols = 1
        else:
            # Insert at right edge of bounding box
            ins_point = bbox[0][1] - 1
            no_cols = self._get_no_rowscols(bbox)[1]

        with undo.group(_("Insert columns")):
            self.grid.actions.insert_cols(ins_point, no_cols)

        self.grid.GetTable().ResetView()

        # Update the default sized cell sizes
        self.grid.actions.zoom()

        event.Skip()
289213
function wrapInner(parent, wrapper) {
    if (typeof wrapper === "string") wrapper = document.createElement(wrapper);

    parent.appendChild(wrapper);

    while (parent.firstChild !== wrapper) wrapper.appendChild(parent.firstChild);
  }
436083
def wrap_row(self, widths, row, width_default=None):
        """"""
        lines = []
        longest = 0 # longest wrapped column in row

        if not width_default:
            width_default = self.width_default

        # Wrap column contents
        for i in range(0, len(row)):
            w=width_default # column width

            # Only set column width dynamicaly for non-rogue rows
            if i < len(widths):
              w = widths[i]

            tw = textwrap.TextWrapper(width=w, break_on_hyphens=False)
            # Wrap and left-justify
            row[i] = tw.wrap(textwrap.dedent(row[i]))
            # Pad with spaces up to to fixed column width
            for l in range(0, len(row[i])):
                    row[i][l] += (w - len(row[i][l])) * ' '
            if len(row[i]) > longest:
                longest = len(row[i])

        # Pad all columns to have the same number of lines
        for i in range(0, len(row)):
            w=width_default # column width

            # Only set column width dynamicaly for non-rogue rows
            if i < len(widths):
                w = widths[i]

            if len(row[i]) < longest:
                for j in range(len(row[i]), longest):
                    row[i].append(w * ' ')

        for l in range(0,longest):
            line = []
            for c in range(len(row)):
                line.append(row[c][l])
            line = '| ' + ' | '.join(line) + ' |'
            lines.append(line)

        return lines
1360133
private void addAppLevelCSSExample() {
		String htmlClass = "my_local_class";
		add(new WHeading(HeadingLevel.H2, "Automatic (app defined) widths"));
		add(new ExplanatoryText("This example shows the use of a htmlClass and app-specific CSS (in this case inline) to style the columns.\n"
				+ "In this case the columns are: 20% and left, 50% and center, 30% and right; and the columns break to full width and are forced to "
				+ "left aligned at 1000px."));
		WPanel panel = new WPanel();
		panel.setHtmlClass(htmlClass);
		panel.setLayout(new ColumnLayout(new int[]{0, 0, 0},
				new Alignment[]{Alignment.LEFT, Alignment.CENTER, Alignment.RIGHT}));
		add(panel);
		panel.add(new BoxComponent("Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."));
		panel.add(new BoxComponent("Praesent eu turpis convallis, fringilla elit nec, ullamcorper purus. Proin dictum ac nunc rhoncus fringilla. "
				+ "Pellentesque habitant morbi tristique senectus et netus et malesuada fames."));
		panel.add(new BoxComponent("Vestibulum vehicula a turpis et efficitur. Integer maximus enim a orci posuere, id fermentum magna dignissim. "
				+ "Sed condimentum, dui et condimentum faucibus, quam erat pharetra."));
		panel.add(new BoxComponent("Left"));
		panel.add(new BoxComponent("Center"));
		panel.add(new BoxComponent("Right"));

		// .columnLayout is the local name of ColumnLayout and is guranteed, row is now part of the WComponents CSS API but _may_ change.
		String rowSelector = "." + htmlClass + " > .wc-columnlayout > .wc-row";
		String columnSelector =  rowSelector + " > .wc-column";
		String css = columnSelector
				+ " {width: 20%}"
				+ columnSelector
				+ ":first-child {width: 50%}" // the first column in the layout
				+ columnSelector
				+ ":last-child {width: 30%;}" // the last column in the layout
				+ rowSelector
				+ " + .wc-row {margin-top: 0.5em;}"  // sibling rows in the column layout
				+ "@media only screen and (max-width: 1000px) {"  //when the screen goes below 1000px wide
				+ rowSelector
				+ " {display: block;}"
				+ columnSelector + ", " + columnSelector + ":first-child, " + columnSelector + ":last-child "
				+ " {display: inline-block; box-sizing: border-box; width: 100%; text-align: left;} "
				+ columnSelector
				+ " + .wc-column {margin-top: 0.25em;}}";

		WText cssText = new WText("<style type='text/css'>" + css + "</style>");
		cssText.setEncodeText(false);
		add(cssText);
		add(new WHorizontalRule());
	}
1110637
function(oColumn, elTd) {
    // Only Columns without widths that are not hidden
    if(!oColumn.width && !oColumn.hidden) {
        var elTh = oColumn.getThEl();
        // Unset a calculated auto-width
        if(oColumn._calculatedWidth) {
            this._setColumnWidth(oColumn, "auto", "visible");
        }
        // Compare auto-widths
        if(elTh.offsetWidth !== elTd.offsetWidth) {
            var elWider = (elTh.offsetWidth > elTd.offsetWidth) ?
                    oColumn.getThLinerEl() : elTd.firstChild;               

            // Grab the wider liner width, unless the minWidth is wider
            var newWidth = Math.max(0,
                (elWider.offsetWidth -(parseInt(Dom.getStyle(elWider,"paddingLeft"),10)|0) - (parseInt(Dom.getStyle(elWider,"paddingRight"),10)|0)),
                oColumn.minWidth);
                
            var sOverflow = 'visible';
            
            // Now validate against maxAutoWidth
            if((oColumn.maxAutoWidth > 0) && (newWidth > oColumn.maxAutoWidth)) {
                newWidth = oColumn.maxAutoWidth;
                sOverflow = "hidden";
            }

            // Set to the wider auto-width
            this._elTbody.style.display = "none";
            this._setColumnWidth(oColumn, newWidth+'px', sOverflow);
            oColumn._calculatedWidth = newWidth;
            this._elTbody.style.display = "";
        }
    }
}
128678
public function wrapAndRender()
    {
        // Apend the edit button
        $this->appendEditButton();

        // Add control group attributes
        $this->addGroupClass('belongs-to');
        $this->group->setAttribute('data-js-view', 'belongs-to');
        if ($this->route) {
            $this->group->setAttribute('data-controller-route', $this->route);
        }

        // Continue doing normal wrapping
        return parent::wrapAndRender();
    }
548946
def set_col_width(self, col, width):
        """"""

        # Mark content as changed
        post_command_event(self.main_window, self.ContentChangedMsg)

        tab = self.grid.current_table

        self.code_array.set_col_width(col, tab, width)
        self.grid.SetColSize(col, width)