Frames, Borders, Tiles
The drawing types define how frames, borders, filled areas, and character combinations are rendered into writable buffers.
They form the foundation for panels, boxes, separators, decorative borders, tiled backgrounds, and line-art style layouts.
Details about the example output on this page
The examples below were rendered with the dedicated documentation helper
doc/tools/drawing-reference.cpp at a fixed width of
70 terminal columns. This makes it easy to regenerate the visual output
together with the code snippets.
Usage
Filling Panels and Drawing Simple Frames
WritableBuffer provides convenient functions to fill rectangles and
draw frames. The drawing types on this page determine how those
operations appear.
const auto panel = Rectangle{2, 2, 30, 10};
buffer.fill(panel, Char{" ", Color{fg::Inherited, bg::Blue}});
buffer.drawFrame(panel, FrameStyle::LightWithRoundedCorners, Color{fg::BrightWhite, bg::Blue});
buffer.drawText("Overview", panel.insetBy(Margins{1}), Alignment::TopLeft);
FrameStyle is the fastest way to choose one of the built-in Unicode
box styles. It works well for common UI elements such as panels, dialogs,
and separators.
You can restyle the same layout code simply by changing the enum value:
buffer.drawFilledFrame(
Rectangle{2, 4, 20, 4},
FrameStyle::Light,
Char{" ", Color{fg::Inherited, bg::Blue}},
Color{fg::BrightCyan, bg::Inherited});
buffer.drawFilledFrame(
Rectangle{25, 4, 20, 4},
FrameStyle::LightWithRoundedCorners,
Char{" ", Color{fg::Inherited, bg::Green}},
Color{fg::BrightGreen, bg::Inherited});
buffer.drawFilledFrame(
Rectangle{48, 9, 20, 4},
FrameStyle::FullBlock,
Char{" ", Color{fg::Inherited, bg::BrightBlack}});
Built-in FrameStyle presets Choose a built-in style without changing your layout code. Light Rounded Heavy ┌──────────────────┐ ╭──────────────────╮ ┏━━━━━━━━━━━━━━━━━━┓ │ panel │ │ panel │ ┃ panel ┃ │ │ │ │ ┃ ┃ └──────────────────┘ ╰──────────────────╯ ┗━━━━━━━━━━━━━━━━━━┛ Double OuterHalf FullBlock ╔══════════════════╗ ▛▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜ ████████████████████ ║ panel ║ ▌ panel ▐ █ panel █ ║ ║ ▌ ▐ █ █ ╚══════════════════╝ ▙▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▟ ████████████████████
Combining Frames Automatically
When multiple frames intersect, drawing them directly on top of each other would produce broken or overlapping characters.
CharCombinationStyle resolves these overlaps by choosing the
correct combined glyph for each intersection.
auto frameStyle = Char16Style::lightFrame();
auto combination = CharCombinationStyle::commonBoxFrame();
buffer.drawFrame(Rectangle{2, 2, 18, 8}, frameStyle, combination, Color{fg::BrightCyan, bg::Black});
buffer.drawFrame(Rectangle{8, 5, 20, 8}, frameStyle, combination, Color{fg::BrightYellow, bg::Black});
This ensures that intersecting lines produce consistent box-drawing characters instead of visual artifacts.
The difference is easiest to see when the same pair of frames is rendered once with plain overwrite behavior and once with a box-aware combiner:
auto style = Char16Style::lightFrame();
buffer.drawFrame(
Rectangle{2, 2, 17, 6},
style,
CharCombinationStyle::overwrite(),
Color{fg::BrightCyan, bg::Inherited});
buffer.drawFrame(
Rectangle{8, 4, 18, 6},
style,
CharCombinationStyle::overwrite(),
Color{fg::BrightYellow, bg::Inherited});
buffer.drawFrame(
Rectangle{37, 2, 17, 6},
style,
CharCombinationStyle::commonBoxFrame(),
Color{fg::BrightCyan, bg::Inherited});
buffer.drawFrame(
Rectangle{43, 4, 18, 6},
style,
CharCombinationStyle::commonBoxFrame(),
Color{fg::BrightYellow, bg::Inherited});
overwrite() commonBoxFrame() Later frames simply replace earlier Intersections become matching ┌───────────────┐ ┌───────────────┐ │ │ │ │ │ ┌────────────────┐ │ ┌─────────┼──────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └─────│─────────┘ │ └─────┼─────────┘ │ │ │ │ │ └────────────────┘ └────────────────┘
To define your own combination behavior, use
SimpleCharCombinationStyle for straightforward mappings
or MatrixCombinationStyle for full control over all
combinations.
Repeating 9-Tile Styles
Tile9Style fills or frames a rectangle using a repeating 3×3 tile layout.
This lets you define separate characters for corners, edges, and the center while still scaling cleanly to any size.
const auto panel = Rectangle{2, 2, 30, 10};
const auto style = Tile9Style::create("╔═╗║ ║╚═╝");
buffer.fill(panel, style, Color{fg::BrightBlack, bg::Black});
buffer.drawFrame(panel, style, Color{fg::BrightCyan, bg::Black});
The 9-tile layout covers the standard case: corners, edges, and center.
If you also need specialized tiles for degenerate cases such as a single row, a single column, or a single cell, construct the style with 16 characters instead.
The left example below uses a decorative 9-tile pattern. The right side uses letter-coded 16-tile input so the special degenerate tiles are easy to identify:
const auto decorative = Tile9Style::create("╔═╗║·║╚═╝");
buffer.fill(Rectangle{3, 2, 28, 7}, decorative, Color{fg::BrightCyan, bg::Inherited});
const auto degenerate = Tile9Style::create("ABCDEFGHIJKLMNOP");
buffer.fill(Rectangle{39, 2, 10, 5}, degenerate, Color{fg::BrightYellow, bg::Inherited});
buffer.fill(Rectangle{52, 2, 10, 1}, degenerate, Color{fg::BrightYellow, bg::Inherited});
buffer.fill(Rectangle{52, 4, 1, 5}, degenerate, Color{fg::BrightYellow, bg::Inherited});
buffer.fill(Rectangle{57, 4, 1, 1}, degenerate, Color{fg::BrightYellow, bg::Inherited});
9 tiles repeat edges and center 16 tiles cover thin edge cases row ╔══════════════════════════╗ ABBBBBBBBC JKKKKKKKKL ║··························║ DEEEEEEEEF ║··········Repeat··········║ DEEEEEEEEF M P cell ║··························║ DEEEEEEEEF N ║··························║ GHHHHHHHHI N ║··························║ N ╚══════════════════════════╝ normal O column
Configuring Reusable Frame Presets
When a frame configuration goes beyond a simple style and color,
FrameDrawOptions lets you bundle all settings into a reusable object.
auto panelStyle = FrameDrawOptions{};
panelStyle.setStyle(FrameStyle::LightWithRoundedCorners);
panelStyle.setFillBlock(Char{" ", Color{fg::Inherited, bg::Black}});
panelStyle.setFrameColorSequence(
ColorSequence{
Color{fg::BrightBlue, bg::Black},
Color{fg::BrightCyan, bg::Black},
Color{fg::BrightWhite, bg::Black},
},
FrameColorMode::ChasingBorderCW);
panelStyle.setFillColor(Color{fg::Inherited, bg::Blue});
buffer.drawFrame(Rectangle{2, 2, 28, 10}, panelStyle, animationCycle);
buffer.drawFrame(Rectangle{34, 2, 28, 10}, panelStyle, animationCycle + 4);
This approach is especially useful when the same panel style is reused throughout your application, or when you work with animated borders, custom fill behavior, or non-default combination rules.
Because FrameDrawOptions bundles style, fill, and color animation in
one object, it is also a good fit for reusable presets:
auto stripeOptions = FrameDrawOptions{};
stripeOptions.setStyle(FrameStyle::Double);
stripeOptions.setFillBlock(Char{" "});
stripeOptions.setFrameColorSequence(
ColorSequence{
Color{fg::BrightYellow, bg::Inherited},
Color{fg::BrightMagenta, bg::Inherited},
Color{fg::BrightCyan, bg::Inherited},
},
FrameColorMode::VerticalStripes);
stripeOptions.setFillColorSequence(
ColorSequence{
Color{fg::Inherited, bg::Blue},
Color{fg::Inherited, bg::Magenta},
},
FrameColorMode::HorizontalStripes);
auto chasingOptions = FrameDrawOptions{};
chasingOptions.setStyle(FrameStyle::Heavy);
chasingOptions.setFillBlock(Char{"·", Color{fg::BrightBlack, bg::Inherited}});
chasingOptions.setFrameColorSequence(
ColorSequence{
Color{fg::BrightRed, bg::Inherited},
Color{fg::BrightYellow, bg::Inherited},
Color{fg::BrightGreen, bg::Inherited},
Color{fg::BrightCyan, bg::Inherited},
},
FrameColorMode::ChasingBorderCW);
buffer.drawFrame(Rectangle{24, 1, 22, 8}, stripeOptions);
buffer.drawFrame(Rectangle{47, 1, 22, 8}, chasingOptions, 3);
Static fill Striped sequences Chasing border ╭────────────────────╮ ╔════════════════════╗ ┏━━━━━━━━━━━━━━━━━━━━┓ │ │ ║ ║ ┃····················┃ │ │ ║ ║ ┃····················┃ │ │ ║ ║ ┃····················┃ │ │ ║ ║ ┃····················┃ │ │ ║ ║ ┃····················┃ │ │ ║ ║ ┃····················┃ ╰────────────────────╯ ╚════════════════════╝ ┗━━━━━━━━━━━━━━━━━━━━┛ fixed colors stripe modes cycle = 3
Choosing the Right Style
Each drawing style has a slightly different purpose:
Use
FrameStylewhen a predefined border style is enough.Use
Char16Stylewhen each cell should adapt to its neighbors, for example for custom line art or circuit-like rendering.Use
Tile9Stylewhen corners, edges, and center tiles should scale independently.
Choosing the right abstraction early keeps your rendering code simpler and avoids unnecessary post-processing later.
Interface
-
class Char16Style
Defines a style for drawing tiles.
Public Functions
-
inline explicit Char16Style(std::array<Char, 16> tiles) noexcept
Create a new tile 16 style.
Connection points/bits: E:0, S:1, W:2, N:3
-
explicit Char16Style(std::string_view tiles)
Create a new tile 16 style from 16 terminal characters.
Connection points/bits: E:0, S:1, W:2, N:3
- Parameters:
tiles – A sequence of exactly 16 terminal characters.
- Throws:
std::invalid_argument – If
tilesdoes not contain exactly 16 terminal characters.
-
explicit Char16Style(std::u32string_view tiles)
Create a new tile 16 style from 16 terminal characters.
Connection points/bits: E:0, S:1, W:2, N:3
- Parameters:
tiles – A sequence of exactly 16 terminal characters.
- Throws:
std::invalid_argument – If
tilesdoes not contain exactly 16 terminal characters.
Public Static Functions
-
static Char16StylePtr create(std::string_view tiles)
Create a new shared style from 16 terminal characters.
- Parameters:
tiles – A sequence of exactly 16 terminal characters.
- Throws:
std::invalid_argument – If
tilesdoes not contain exactly 16 terminal characters.- Returns:
A shared style instance.
-
static Char16StylePtr create(std::u32string_view tiles)
Create a new shared style from 16 terminal characters.
- Parameters:
tiles – A sequence of exactly 16 terminal characters.
- Throws:
std::invalid_argument – If
tilesdoes not contain exactly 16 terminal characters.- Returns:
A shared style instance.
-
static Char16StylePtr lightFrame()
For drawing light frames.
-
static Char16StylePtr lightDoubleDashFrame()
For drawing light frames with double-dashed lines.
-
static Char16StylePtr lightTripleDashFrame()
For drawing light frames with triple-dashed lines.
-
static Char16StylePtr lightQuadrupleDashFrame()
For drawing light frames with quadruple-dashed lines.
-
static Char16StylePtr lightRoundedFrame()
For drawing light frames with rounded corners.
-
static Char16StylePtr heavyFrame()
For drawing heavy frames.
-
static Char16StylePtr heavyDoubleDashFrame()
For drawing heavy frames with double-dashed lines.
-
static Char16StylePtr heavyTripleDashFrame()
For drawing heavy frames with triple-dashed lines.
-
static Char16StylePtr heavyQuadrupleDashFrame()
For drawing heavy frames with quadruple-dashed lines.
-
static Char16StylePtr doubleFrame()
For drawing double frames.
-
static Char16StylePtr fullBlockFrame()
For drawing solid block frames.
-
static Char16StylePtr fullBlockWithChamferFrame()
For drawing solid block frames with chamfered corners.
-
static Char16StylePtr forStyle(FrameStyle frameStyle)
Get the style for the given frame style.
- Parameters:
frameStyle – The frame style to resolve.
- Returns:
The shared style instance, or
nullptrifframeStylerequiresTile9Style.
-
inline explicit Char16Style(std::array<Char, 16> tiles) noexcept
-
using erbsland::cterm::Char16StylePtr = std::shared_ptr<Char16Style>
Shared pointer for Char16Style.
-
class CharCombinationStyle
A style how two characters are visually combined to a new one.
Subclassed by erbsland::cterm::MatrixCombinationStyle, erbsland::cterm::SimpleCharCombinationStyle
Public Functions
-
inline virtual bool isSurroundingAware() const noexcept
Does this style take the surrounding character into account? If this method returns false,
combinewith current as a single character is called.If this method returns true,
combinewith current and overlay is called.
-
virtual Char combine(const Char ¤t, const Char &overlay) const noexcept
Combines the current char with a new that is placed on top of the current one.
The default implementation just returns the overlay character.
- Parameters:
current – The current (lower) character.
overlay – The new (upper) character that overlays the current one.
- Returns:
The combined character.
-
virtual Char combine(const std::array<const Char*, 9> ¤t, const Char &overlay) const noexcept
Combines the current character situation with a new overlay character that is placed on top of the current one.
The default implementation just returns the overlay character. The matrix starts at (-1, -1) and ends at (1, 1) (left to right, top to bottom).
- Parameters:
current – A 3x3 matrix with nullptr for locations outside the buffer.
overlay – The new (upper) character that overlays the current one.
- Returns:
The combined character.
Public Static Functions
-
static const CharCombinationStylePtr &overwrite() noexcept
Overwrite the character and color.
-
static const CharCombinationStylePtr &colorOverlay() noexcept
Overwrite the character but overlay the color.
-
static const CharCombinationStylePtr &commonBoxFrame() noexcept
Combine light, double, and heavy frames.
In that order: double overwrites light, and heavy overwrites double and light. Colors are overlay.
-
inline virtual bool isSurroundingAware() const noexcept
-
using erbsland::cterm::CharCombinationStylePtr = std::shared_ptr<CharCombinationStyle>
Shared pointer for CharCombinationStyle.
-
class SimpleCharCombinationStyle : public erbsland::cterm::CharCombinationStyle
A class to use a simple map to combine styles.
It uses a map of [current, overlay] -> combined and uses
Color::overlayWithto combine the colors. If a character is missing in the map, the overlay overwrites the current one.Public Types
-
using Map = std::map<std::string, std::string>
The map, where the key is
<current>+<overlay>, and the value is the combined character.
Public Functions
-
SimpleCharCombinationStyle() = default
Create an empty combination style.
-
virtual Char combine(const Char ¤t, const Char &overlay) const noexcept override
Combines the current char with a new that is placed on top of the current one.
The default implementation just returns the overlay character.
- Parameters:
current – The current (lower) character.
overlay – The new (upper) character that overlays the current one.
- Returns:
The combined character.
-
void add(const std::string ¤t, const std::string &overlay, const std::string &combined) noexcept
Add a new entry to the map.
-
using Map = std::map<std::string, std::string>
-
class MatrixCombinationStyle : public erbsland::cterm::CharCombinationStyle
A class that combines characters through an indexed result matrix.
It uses supported Unicode code points and a compact byte matrix of result indexes. Unknown characters fall back to the overlay character.
Public Functions
-
MatrixCombinationStyle(std::u32string characters, std::string_view resultMatrix)
Create a new matrix-based combination style.
- Parameters:
characters – The supported Unicode characters in matrix index order.
resultMatrix – The result matrix in row-major order using result indexes. The matrix size must be
characters.size() * characters.size().
- Throws:
std::invalid_argument – If the matrix size is invalid or the character count exceeds 255.
-
virtual Char combine(const Char ¤t, const Char &overlay) const noexcept override
Combines the current char with a new that is placed on top of the current one.
The default implementation just returns the overlay character.
- Parameters:
current – The current (lower) character.
overlay – The new (upper) character that overlays the current one.
- Returns:
The combined character.
-
MatrixCombinationStyle(std::u32string characters, std::string_view resultMatrix)
-
class Tile9Style
Defines a style for repeating a 3x3 tile pattern across a rectangle.
The 9-tile layout uses this arrangement: top-left, top, top-right, left, center, right, bottom-left, bottom, bottom-right.
Optionally, 7 additional tiles can be provided for degenerate rectangles: single-row left, single-row center, single-row right, single-column top, single-column center, single-column bottom, and the single-cell tile.
Public Functions
-
explicit Tile9Style(std::array<Char, 9> tiles) noexcept
Create a new 9-tile style from the repeating 3x3 tile layout.
- Parameters:
tiles – The 3x3 tiles in row-major order.
-
explicit Tile9Style(std::array<Char, 16> tiles) noexcept
Create a new 9-tile style with explicit tiles for degenerate rectangles.
- Parameters:
tiles – The 3x3 tiles followed by 7 degenerate tiles.
-
explicit Tile9Style(std::string_view tiles)
Create a new 9-tile style from 9 or 16 terminal characters.
- Parameters:
tiles – A sequence of 9 tiles, or 16 tiles including the degenerate cases.
- Throws:
std::invalid_argument – If
tilesdoes not contain exactly 9 or 16 terminal characters.
-
explicit Tile9Style(std::u32string_view tiles)
Create a new 9-tile style from 9 or 16 terminal characters.
- Parameters:
tiles – A sequence of 9 tiles, or 16 tiles including the degenerate cases.
- Throws:
std::invalid_argument – If
tilesdoes not contain exactly 9 or 16 terminal characters.
-
Char block(Rectangle rect, Position pos) const noexcept
Resolve the tile for a given position inside a rectangle.
The center and edge tiles are repeated as needed.
- Parameters:
rect – The styled rectangle.
pos – A position inside
rect.
- Returns:
The resolved tile, or an empty character if
posis outsiderect.
Public Static Functions
-
static Tile9StylePtr create(std::string_view tiles)
Create a new shared style from 9 or 16 terminal characters.
- Parameters:
tiles – A sequence of 9 tiles, or 16 tiles including the degenerate cases.
- Throws:
std::invalid_argument – If
tilesdoes not contain exactly 9 or 16 terminal characters.- Returns:
A shared style instance.
-
static Tile9StylePtr create(std::u32string_view tiles)
Create a new shared style from 9 or 16 terminal characters.
- Parameters:
tiles – A sequence of 9 tiles, or 16 tiles including the degenerate cases.
- Throws:
std::invalid_argument – If
tilesdoes not contain exactly 9 or 16 terminal characters.- Returns:
A shared style instance.
-
static Tile9StylePtr outerHalfBlockFrame()
For drawing half-block frames on the outer cell edges.
-
static Tile9StylePtr innerHalfBlockFrame()
For drawing half-block frames on the inner cell edges.
-
static Tile9StylePtr forStyle(FrameStyle frameStyle)
Get the tile-9 style for a predefined frame style.
- Parameters:
frameStyle – The frame style to resolve.
- Returns:
The matching tile-9 style, or
nullptrif the frame style usesChar16Style.
-
explicit Tile9Style(std::array<Char, 9> tiles) noexcept
-
using erbsland::cterm::Tile9StylePtr = std::shared_ptr<Tile9Style>
Shared pointer for Tile9Style.
-
enum class erbsland::cterm::FrameStyle : uint8_t
Various box styles.
Values:
-
enumerator Light
Light box
┌─┐
-
enumerator LightDoubleDash
Light box with double-dashed lines
┌╌┐
-
enumerator LightTripleDash
Light box with triple-dashed lines
┌┄┐
-
enumerator LightQuadrupleDash
Light box with quadruple-dashed lines
┌┈┐
-
enumerator Heavy
Heavy box
┏━┓
-
enumerator HeavyDoubleDash
Heavy box with double-dashed lines
┏╍┓
-
enumerator HeavyTripleDash
Heavy box with triple-dashed lines
┏┅┓
-
enumerator HeavyQuadrupleDash
Heavy box with quadruple-dashed lines
┏┉┓
-
enumerator Double
Double box
╔═╗
-
enumerator FullBlock
Solid block frame
█
-
enumerator FullBlockWithChamfer
Solid block frame with chamfered corners
◢█◣
-
enumerator OuterHalfBlock
Half-block frame drawn on the outer cell edges.
-
enumerator InnerHalfBlock
Half-block frame drawn on the inner cell edges.
-
enumerator LightWithRoundedCorners
Light box with rounded corners
╭─╮
-
enumerator Light
-
enum class erbsland::cterm::FrameColorMode : uint8_t
The mode how animated colors are applied to frames.
Values:
-
enumerator OneColor
Uses one color from the sequence for the whole frame or fill area.
The selected sequence entry is
animationCycle + animationOffset.
-
enumerator VerticalStripes
Uses the color sequence in vertical stripes.
The selected sequence entry is
x + animationCycle + animationOffset.
-
enumerator HorizontalStripes
Uses the color sequence in horizontal stripes.
The selected sequence entry is
y + animationCycle + animationOffset.
-
enumerator ForwardDiagonalStripes
Uses the color sequence in forward diagonal stripes.
The selected sequence entry is
x + y + animationCycle + animationOffset.
-
enumerator BackwardDiagonalStripes
Uses the color sequence in backward diagonal stripes.
The selected sequence entry is
-x + y + animationCycle + animationOffset.
-
enumerator ChasingBorderCW
Uses the color sequence along the frame border in clockwise order.
Increasing
animationCyclemakes the colors travel clockwise.
-
enumerator ChasingBorderCCW
Uses the color sequence along the frame border in clockwise order.
Increasing
animationCyclemakes the colors travel counter-clockwise.
-
enumerator OneColor
-
class FrameDrawOptions
The options to draw a frame.
These options define the frame style, optional fill, combination style, and animated color behavior for
Buffer::drawFrame(). The style priority istile9Style(), thenchar16Style(), and finallystyle(). If aTile9Styleis active, it also controls the fill area and overridesfillBlock(). Frame colors are overlaid asbuffer -> frameColor -> tile/block color. Fill colors are overlaid asbuffer -> frameColor -> fillColor -> tile/block color.Note
Creating custom option instances is expensive. Reuse them across multiple
drawFrame()calls.Public Functions
-
FrameDrawOptions() = default
Create default frame draw options.
-
template<typename tColor>
inline explicit FrameDrawOptions(tColor frameColor) Create options for one fixed frame color.
- Parameters:
frameColor – The base frame color.
-
explicit FrameDrawOptions(ColorSequence frameColor, FrameColorMode frameColorMode = FrameColorMode::OneColor)
Create options from a frame color sequence.
- Parameters:
frameColor – The base frame colors.
frameColorMode – The mode used to pick colors from the frame sequence.
-
const ColorSequence &frameColor() const noexcept
The frame color sequence.
If this contains only inherited colors, the frame inherits the full color from the buffer below.
-
void setFrameColor(Foreground foreground, Background background) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
void setFrameColor(Foreground foreground) noexcept
Set only a frame foreground color.
-
void setFrameColor(Foreground::Hue foreground) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
void setFrameColor(Background background) noexcept
Set only a frame background color.
-
void setFrameColor(Background::Hue background) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
void setFrameColorSequence(ColorSequence frameColor, FrameColorMode frameColorMode = FrameColorMode::OneColor) noexcept
Set the frame color sequence.
-
const ColorSequence &fillColor() const noexcept
The fill color sequence.
The fill colors are applied after
frameColor(), which allows subtle adjustments on top of animated borders.
-
void setFillColor(Foreground foreground, Background background) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
void setFillColor(Foreground foreground) noexcept
Set only a fill foreground color.
-
void setFillColor(Foreground::Hue foreground) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
void setFillColor(Background background) noexcept
Set only a fill background color.
-
void setFillColor(Background::Hue background) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
void setFillColorSequence(ColorSequence fillColor, FrameColorMode fillColorMode = FrameColorMode::OneColor) noexcept
Set the fill color sequence.
-
const Char &fillBlock() const noexcept
The fill block.
An empty block disables filling when no
Tile9Styleis active.
-
FrameStyle style() const noexcept
The predefined frame style.
-
void setStyle(FrameStyle style) noexcept
Set the predefined frame style.
-
const Char16StylePtr &char16Style() const noexcept
The custom Char16 frame style.
This overrides
style()unlesstile9Style()is also set.
-
void setChar16Style(Char16StylePtr char16Style) noexcept
Set the custom Char16 frame style.
-
const Tile9StylePtr &tile9Style() const noexcept
The custom Tile9 frame style.
This overrides both
char16Style()andstyle(), and also controls the fill area.
-
void setTile9Style(Tile9StylePtr tile9Style) noexcept
Set the custom Tile9 frame style.
-
const CharCombinationStylePtr &combinationStyle() const noexcept
The combination style used for writing the frame and fill blocks.
-
void setCombinationStyle(CharCombinationStylePtr combinationStyle) noexcept
Set the combination style.
-
std::size_t animationOffset() const noexcept
The shared animation offset for frame and fill colors.
This value is added to the
animationCyclepassed todrawFrame().
-
void setAnimationOffset(std::size_t offset) noexcept
Set the animation offset for frame and fill colors.
-
FrameColorMode frameColorMode() const noexcept
The frame color mode.
-
void setFrameColorMode(FrameColorMode frameColorMode) noexcept
Set the frame color mode.
-
FrameColorMode fillColorMode() const noexcept
The fill color mode.
ChasingBorderCWandChasingBorderCCWonly affect frame cells.
-
void setFillColorMode(FrameColorMode fillColorMode) noexcept
Set the fill color mode.
Public Static Functions
-
static const FrameDrawOptions &defaultOptions() noexcept
Access the shared object with the default options.
Default options use a light Unicode frame, inherited colors, no fill, and the common box frame combiner.
-
FrameDrawOptions() = default