Sista v3.0.0-alpha.1
Sista is a C++ lightweight OS-agnostic library for terminal animations and videogames
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
sista::Border Class Reference

Represents a brick of the border with a symbol and ANSI settings. More...

#include <border.hpp>

Collaboration diagram for sista::Border:
Collaboration graph
[legend]

Public Member Functions

 Border (char, const ANSISettings &)
 Constructor to initialize the border with a symbol and ANSI settings.
 
virtual void print (bool=true) const
 Prints the border symbol to the terminal, applying ANSI settings if specified.
 

Protected Attributes

char symbol
 
ANSISettings settings
 

Detailed Description

Represents a brick of the border with a symbol and ANSI settings.

The Border class encapsulates a character symbol and its associated ANSI settings, allowing for the representation and printing of border "bricks" in a terminal.

See also
ANSISettings

Constructor & Destructor Documentation

◆ Border()

sista::Border::Border ( char  symbol_,
const ANSISettings settings_ 
)

Constructor to initialize the border with a symbol and ANSI settings.

The ANSI settings for the border brick.

Parameters
symbol_The character symbol for the border brick.
settings_The ANSISettings for the border brick.

Member Function Documentation

◆ print()

void sista::Border::print ( bool  apply_settings = true) const
virtual

Prints the border symbol to the terminal, applying ANSI settings if specified.

Parameters
apply_settingsIf true, applies the ANSI settings before printing the symbol.

This method prints the border's symbol to the terminal. If apply_settings is true, it first applies the stored ANSI settings (foreground color, background color, and attribute) to ensure the symbol is displayed with the desired formatting.

See also
ANSISettings::apply

Member Data Documentation

◆ settings

ANSISettings sista::Border::settings
protected

The character symbol representing the border brick.

◆ symbol

char sista::Border::symbol
protected

The documentation for this class was generated from the following files: