awsc.termui.alignment.Dimension

class awsc.termui.alignment.Dimension(width, height)

Represents a width and height value.

Upon each axis, the value can be specified in a few ways: * Directly, as a number of characters. (eg. 20) * As a percentage of space available in the current block. (eg. 100%) * As a difference of any amount of the above values (eg. 100%-5, 100%-20%, 5-2, 100%-2-1) * As a sum of any amount of the above values (eg. 50%+1) * As the highest character count of any number of above operations (eg. 50%|60%-5|20)

Attributes:
widthstr

The width specification.

heightstr

The height specification.

Methods

__call__([parent])

Evaluates the dimension into a width-height pair.

__init__(width, height)

Initializes a Dimension object.

Parameters:
widthstr

The width specification.

heightstr

The height specification.

Methods

__init__(width, height)

Initializes a Dimension object.