Class WrapBox

Namespace
Pixie.Markup
Assembly
Pixie.dll

A block that applies wrapping and horizontal margins to its contents.

public sealed class WrapBox : BlockContainer
Inheritance
WrapBox
Inherited Members

Constructors

WrapBox(Block, WrappingStrategy)

Creates a wrapped block with no horizontal margins.

public WrapBox(Block contents, WrappingStrategy wrapping)

Parameters

contents Block

The block contents.

wrapping WrappingStrategy

The wrapping strategy to apply.

WrapBox(Block, WrappingStrategy, int)

Creates a wrapped block with equal horizontal margins.

public WrapBox(Block contents, WrappingStrategy wrapping, int margin)

Parameters

contents Block

The block contents.

wrapping WrappingStrategy

The wrapping strategy to apply.

margin int

The left and right margin width.

WrapBox(Block, WrappingStrategy, int, int)

Creates a wrapped block with horizontal margins.

public WrapBox(Block contents, WrappingStrategy wrapping, int leftMargin, int rightMargin)

Parameters

contents Block

The block contents.

wrapping WrappingStrategy

The wrapping strategy to apply.

leftMargin int

The left margin width.

rightMargin int

The right margin width.

WrapBox(Block, int)

Creates a character-wrapped block with equal horizontal margins.

public WrapBox(Block contents, int margin)

Parameters

contents Block

The block contents.

margin int

The left and right margin width.

WrapBox(Block, int, int)

Creates a character-wrapped block with horizontal margins.

public WrapBox(Block contents, int leftMargin, int rightMargin)

Parameters

contents Block

The block contents.

leftMargin int

The left margin width.

rightMargin int

The right margin width.

Properties

LeftMargin

Gets the left margin width.

public int LeftMargin { get; }

Property Value

int

RightMargin

Gets the right margin width.

public int RightMargin { get; }

Property Value

int

Wrapping

Gets the wrapping strategy applied to the contents.

public WrappingStrategy Wrapping { get; }

Property Value

WrappingStrategy

Methods

IndentAndWordWrap(Block)

Creates a word-wrapped block with a standard left indent.

public static WrapBox IndentAndWordWrap(Block node)

Parameters

node Block

The block to wrap.

Returns

WrapBox

A word-wrapped block with a standard left indent.

IndentAndWordWrap(params Block[])

Creates a word-wrapped stack from a parameter list of blocks with a standard left indent.

public static WrapBox IndentAndWordWrap(params Block[] nodes)

Parameters

nodes Block[]

The blocks to wrap.

Returns

WrapBox

A word-wrapped block with a standard left indent.

IndentAndWordWrap(IReadOnlyList<Block>)

Creates a word-wrapped stack with a standard left indent.

public static WrapBox IndentAndWordWrap(IReadOnlyList<Block> nodes)

Parameters

nodes IReadOnlyList<Block>

The blocks to wrap.

Returns

WrapBox

A word-wrapped block with a standard left indent.

WithContents(Block)

Creates a copy of this block container with different contents.

public override BlockContainer WithContents(Block newContents)

Parameters

newContents Block

The new block contents.

Returns

BlockContainer

A new wrapped block with the updated contents.

WordWrap(Block)

Creates a word-wrapped block.

public static WrapBox WordWrap(Block node)

Parameters

node Block

The block to wrap.

Returns

WrapBox

A word-wrapped block.

WordWrap(params Block[])

Creates a word-wrapped stack from a parameter list of blocks.

public static WrapBox WordWrap(params Block[] nodes)

Parameters

nodes Block[]

The blocks to wrap.

Returns

WrapBox

A word-wrapped block.

WordWrap(IReadOnlyList<Block>)

Creates a word-wrapped stack.

public static WrapBox WordWrap(IReadOnlyList<Block> nodes)

Parameters

nodes IReadOnlyList<Block>

The blocks to wrap.

Returns

WrapBox

A word-wrapped block.