struct
Sheen::Border
- Sheen::Border
- Struct
- Value
- Object
Overview
The characters that compose a box border:
- four edges
- four corners
- interior cross pieces used by tables
A Border whose pieces are all empty is a "none" Border.
Meta: Reopened so these methods live outside the record macro block but are still attached to the same struct.
Why do this? Because the crystal docs commands' wants_doc parser chokes on method docstring comments under the record macro.
Defined in:
sheen/border.cr:16sheen/border.cr:31
Constructors
-
.ascii : Border
An ASCII-only border
-
.block : Border
A fat, solid block border
-
.double : Border
Double-vision.
-
.hidden : Border
A border of single-cell spaces, holding a frame layout without strokes.
-
.inner_half_block : Border
A half-block border that sits inside the frame
-
.markdown : Border
A Markdown-table style border.
- .new(top : String = "", bottom : String = "", left : String = "", right : String = "", top_left : String = "", top_right : String = "", bottom_left : String = "", bottom_right : String = "", middle_left : String = "", middle_right : String = "", middle : String = "", middle_top : String = "", middle_bottom : String = "")
-
.normal : Border
A standard single-stroke border with square corners
-
.outer_half_block : Border
A half-block border that sits outside the frame
-
.rounded : Border
A single-stroke border with rounded corners.
-
.thick : Border
A heavier, single-stroke thick boi border.
Class Method Summary
-
.max_rune_width(piece : String) : Int32
Max cell-width of any single grapheme in piece.
Instance Method Summary
- #bottom : String
- #bottom_left : String
- #bottom_right : String
-
#bottom_size : Int32
Cell-width of the bottom edge.
- #clone
- #copy_with(top _top = @top, bottom _bottom = @bottom, left _left = @left, right _right = @right, top_left _top_left = @top_left, top_right _top_right = @top_right, bottom_left _bottom_left = @bottom_left, bottom_right _bottom_right = @bottom_right, middle_left _middle_left = @middle_left, middle_right _middle_right = @middle_right, middle _middle = @middle, middle_top _middle_top = @middle_top, middle_bottom _middle_bottom = @middle_bottom)
- #left : String
-
#left_size : Int32
Cell-width of the left edge.
- #middle : String
- #middle_bottom : String
- #middle_left : String
- #middle_right : String
- #middle_top : String
-
#none? : Bool
True when no border piece is set.
- #right : String
-
#right_size : Int32
Cell-width of the right edge.
- #top : String
- #top_left : String
- #top_right : String
-
#top_size : Int32
Cell-width of the top corner edges.
Constructor Detail
Class Method Detail
Max cell-width of any single grapheme in piece. Returns 0 when piece is empty.