awsc.termui.alignment.TopLeftAnchor

class awsc.termui.alignment.TopLeftAnchor(left, top)

Anchor class which specifies a block is aligned with the top-left corner of the parent at a fixed offset.

Anchor point: top left corner of the block.

Parent point: top left corner of the block.

Attributes:
topint

The vertical offset from the top left corner.

leftint

The horizontal offset from the top left corner.

Methods

anchor(parent)

Returns the position of the anchor point of the block.

topleft(dim, parent)

Returns the position of the top left corner of the anchored block.

__init__(left, top)

Initializes a TopLeftAnchor object.

Parameters:
leftint

The horizontal offset from the top left corner.

topint

The vertical offset from the top left corner.

Methods

__init__(left, top)

Initializes a TopLeftAnchor object.

anchor(parent)

Returns the position of the anchor point of the block.

topleft(dim, parent)

Returns the position of the top left corner of the anchored block.