Overview
TheColumn class represents a single column in a table. It provides methods for accessing cells and applying uniform formatting to all cells in a column.
Constructor
Column objects are created by calling
Table::column(index). They represent a vertical slice of the table.Methods
operator[]
Zero-based row index.
cells
size
format
ColumnFormat object that applies formatting to all cells in the column.
Returns: ColumnFormat object for configuring the column.
Example:
Iterators
begin / end
ColumnFormat Methods
TheColumnFormat class provides a fluent interface for formatting all cells in a column. All methods return a reference to the ColumnFormat object for method chaining.
Dimensions
width(size_t value)- Sets the width for all cells in the columnheight(size_t value)- Sets the height for all cells in the column
Padding
padding(size_t value)- Sets padding on all sides for all cellspadding_left(size_t value)- Sets left paddingpadding_right(size_t value)- Sets right paddingpadding_top(size_t value)- Sets top paddingpadding_bottom(size_t value)- Sets bottom padding
Borders
border(const std::string& value)- Sets all border charactersborder_left(const std::string& value)- Sets left border characterborder_right(const std::string& value)- Sets right border characterborder_top(const std::string& value)- Sets top border characterborder_bottom(const std::string& value)- Sets bottom border character
Border Colors
border_color(Color value)- Sets color for all bordersborder_left_color(Color value)- Sets left border colorborder_right_color(Color value)- Sets right border colorborder_top_color(Color value)- Sets top border colorborder_bottom_color(Color value)- Sets bottom border color
Background Colors
border_background_color(Color value)- Sets background color for all bordersborder_left_background_color(Color value)- Sets left border background colorborder_right_background_color(Color value)- Sets right border background colorborder_top_background_color(Color value)- Sets top border background colorborder_bottom_background_color(Color value)- Sets bottom border background color
Corners
corner(const std::string& value)- Sets all corner characterscorner_color(Color value)- Sets color for all cornerscorner_background_color(Color value)- Sets background color for all corners
Column Separator
column_separator(const std::string& value)- Sets column separator charactercolumn_separator_color(Color value)- Sets column separator colorcolumn_separator_background_color(Color value)- Sets column separator background color
Font Styling
font_align(FontAlign value)- Sets text alignment (left, center, right)font_style(const std::vector<FontStyle>& style)- Sets font styles (bold, italic, etc.)font_color(Color value)- Sets font colorfont_background_color(Color value)- Sets font background color
Convenience Methods
color(Color value)- Sets font, border, and corner colorsbackground_color(Color value)- Sets background colors for font, borders, and corners
Internationalization
multi_byte_characters(bool value)- Enables support for multi-byte characterslocale(const std::string& value)- Sets locale for text processing