Utilities¶
Provides handy functions.
- frame_str(frame: Frame) str¶
Formats a
Frameas a human-readable string.- Return type:
str- Parameters:
frame (
Frame) – The frame to convert.- Returns:
A human-readable string.
- size_str(size: Size) str¶
Formats a
Sizeas a human-readable string.- Return type:
str- Parameters:
size (
Size) – The size to convert.- Returns:
A human-readable string.
- class Size(width: int, height: int)¶
Describes a 2D size.
Can be used where api_pb2.Size is accepted.
- class Point(x: int, y: int)¶
Describes a 2D coordinate.
Can be used where api_pb2.Point is accepted.
- class Frame(origin: ~iterm2.util.Point = (0, 0), size: ~iterm2.util.Size = <iterm2.util.Size object>)¶
Describes a bounding rectangle. 0,0 is the bottom left coordinate.
- class CoordRange(start: Point, end: Point)¶
Describes a range of contiguous cells.
- Parameters:
start – The start point.
end – The first point after the start point not in the range.
- class Range(location: int, length: int)¶
Describes a range of integers.
- Parameters:
location – The first value in the range.
length – The number of values in the range.
- class WindowedCoordRange(coordRange: CoordRange, columnRange: Range | None = None)¶
Describes a range of coordinates, optionally constrained to a continugous range of columns.
- Parameters:
coordRange – The range of cells.
columnRange – The range of columns to intersect with coordRange to get the described region, or None if unwindowed.
- property coordRange: CoordRange¶
- Returns:
The range of coordinates.
