Struct TextModeCellBorder
A frame of whole cells around the part of a grid that holds content, one width per side.
Implements
Inherited Members
Namespace: Scylla.TextMode
Assembly: ScyllaTextMode.dll
Syntax
[Serializable]
public struct TextModeCellBorder : IEquatable<TextModeCellBorder>
Remarks
A view with a border of 1 lays out one more cell on every side than its content grid has, and draws those cells in its default background. Nothing ever writes into them: the content grid, and with it the terminal's wrapping, scrolling and cursor, is only the area inside the frame.
Constructors
TextModeCellBorder(int, int, int, int)
Creates a border with its own width on each side.
Declaration
public TextModeCellBorder(int left, int top, int right, int bottom)
Parameters
| Type | Name | Description |
|---|---|---|
| int | left | Cells on the left side. |
| int | top | Cells on the top side. |
| int | right | Cells on the right side. |
| int | bottom | Cells on the bottom side. |
Fields
Bottom
Cells on the bottom side.
Declaration
public int Bottom
Field Value
| Type | Description |
|---|---|
| int |
Left
Cells on the left side.
Declaration
public int Left
Field Value
| Type | Description |
|---|---|
| int |
Right
Cells on the right side.
Declaration
public int Right
Field Value
| Type | Description |
|---|---|
| int |
Top
Cells on the top side.
Declaration
public int Top
Field Value
| Type | Description |
|---|---|
| int |
Properties
Horizontal
Gets the cells taken by the left and right sides together.
Declaration
public int Horizontal { get; }
Property Value
| Type | Description |
|---|---|
| int |
IsNone
Gets whether every side is zero.
Declaration
public bool IsNone { get; }
Property Value
| Type | Description |
|---|---|
| bool |
None
Gets a border of zero on every side.
Declaration
public static TextModeCellBorder None { get; }
Property Value
| Type | Description |
|---|---|
| TextModeCellBorder |
Vertical
Gets the cells taken by the top and bottom sides together.
Declaration
public int Vertical { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
ClampedToZero()
Returns a copy with every negative side raised to zero.
Declaration
public TextModeCellBorder ClampedToZero()
Returns
| Type | Description |
|---|---|
| TextModeCellBorder | The border with no negative sides. |
Equals(TextModeCellBorder)
Declaration
public bool Equals(TextModeCellBorder other)
Parameters
| Type | Name | Description |
|---|---|---|
| TextModeCellBorder | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
ToString()
Returns the sides in the order top, right, bottom, left.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A text such as |
Overrides
Uniform(int)
Creates a border with the same width on every side.
Declaration
public static TextModeCellBorder Uniform(int cells)
Parameters
| Type | Name | Description |
|---|---|---|
| int | cells | Cells on each side. |
Returns
| Type | Description |
|---|---|
| TextModeCellBorder | The border. |
Operators
operator ==(TextModeCellBorder, TextModeCellBorder)
Compares two borders side by side.
Declaration
public static bool operator ==(TextModeCellBorder a, TextModeCellBorder b)
Parameters
| Type | Name | Description |
|---|---|---|
| TextModeCellBorder | a | |
| TextModeCellBorder | b |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(TextModeCellBorder, TextModeCellBorder)
Compares two borders side by side.
Declaration
public static bool operator !=(TextModeCellBorder a, TextModeCellBorder b)
Parameters
| Type | Name | Description |
|---|---|---|
| TextModeCellBorder | a | |
| TextModeCellBorder | b |
Returns
| Type | Description |
|---|---|
| bool |