![]() |
UtilsLite
Utilities for C++ programming
|
Represents a cell in a table with alignment, content, and optional column span. More...
#include <Table.hxx>
Public Member Functions | |
Cell ()=default | |
Default constructor for an empty cell. | |
Cell (Table *table, string_view val="", integer col_span=1) | |
Constructs a cell with a value and optional column span. | |
string_view | value () const |
void | value (string_view val) |
Alignment | alignment () const |
void | alignment (Alignment const &align) |
integer | col_span () const |
void | col_span (integer col_span) |
integer | width (integer col) const |
integer | height () const |
integer | maximum_line_width () const |
string | line (integer idx) const |
string | render (integer line, integer col) const |
Static Public Member Functions | |
static void | trim_line (std::string &line) |
Represents a cell in a table with alignment, content, and optional column span.
The Cell
class manages the content of a single cell in the table. It allows specification of alignment, column span, and other properties.
|
default |
Default constructor for an empty cell.
Constructs a cell with a value and optional column span.
table | Pointer to the table containing the cell. |
val | The string value to be displayed in the cell. |
col_span | The number of columns the cell should span. |
|
inline |
|
inline |
|
inline |
|
inline |
integer Utils::Table::Cell::height | ( | ) | const |
integer Utils::Table::Cell::maximum_line_width | ( | ) | const |
|
static |
|
inline |
|
inline |