FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
Table Class Reference

#include <table.hpp>

Public Member Functions

 Table ()
 Create an empty table.
 
 Table (std::vector< std::vector< std::string > >)
 Create a table from a vector of vector of string.
 
 Table (std::vector< std::vector< Element > >)
 Create a table from a vector of vector of Element.
 
 Table (std::initializer_list< std::vector< std::string > > init)
 
TableSelection SelectAll ()
 Select all the table.
 
TableSelection SelectCell (int column, int row)
 Select a cell of the table.
 
TableSelection SelectRow (int row_index)
 Select a row of the table.
 
TableSelection SelectRows (int row_min, int row_max)
 Select a range of rows of the table.
 
TableSelection SelectColumn (int column_index)
 Select a column of the table.
 
TableSelection SelectColumns (int column_min, int column_max)
 Select a range of columns of the table.
 
TableSelection SelectRectangle (int column_min, int column_max, int row_min, int row_max)
 Select a rectangle of the table.
 
Element Render ()
 Render the table.
 

Detailed Description

Constructor & Destructor Documentation

◆ Table() [1/4]

Table ( )

Create an empty table.

Definition at line 48 of file src/ftxui/dom/table.cpp.

◆ Table() [2/4]

Table ( std::vector< std::vector< std::string > > input)
explicit

Create a table from a vector of vector of string.

Parameters
inputThe input data.

Definition at line 55 of file src/ftxui/dom/table.cpp.

◆ Table() [3/4]

Table ( std::vector< std::vector< Element > > input)
explicit

Create a table from a vector of vector of Element.

Parameters
inputThe input elements.

Definition at line 72 of file src/ftxui/dom/table.cpp.

◆ Table() [4/4]

Table ( std::initializer_list< std::vector< std::string > > init)

Definition at line 79 of file src/ftxui/dom/table.cpp.

Member Function Documentation

◆ SelectAll()

TableSelection SelectAll ( )

Select all the table.

Examples
examples/dom/style_underlined_double.cpp, and examples/dom/table.cpp.

Definition at line 211 of file src/ftxui/dom/table.cpp.

◆ SelectCell()

TableSelection SelectCell ( int column,
int row )

Select a cell of the table.

Parameters
columnThe column of the cell to select.
rowThe row of the cell to select.
Note
You can use negative index to select from the end.

Definition at line 178 of file src/ftxui/dom/table.cpp.

◆ SelectRow()

TableSelection SelectRow ( int index)

Select a row of the table.

Parameters
indexThe index of the row to select.
Note
You can use negative index to select from the end.

Definition at line 143 of file src/ftxui/dom/table.cpp.

◆ SelectRows()

TableSelection SelectRows ( int row_min,
int row_max )

Select a range of rows of the table.

Parameters
row_minThe first row to select.
row_maxThe last row to select.
Note
You can use negative index to select from the end.

Definition at line 152 of file src/ftxui/dom/table.cpp.

◆ SelectColumn()

TableSelection SelectColumn ( int index)

Select a column of the table.

Parameters
indexThe index of the column to select.
Note
You can use negative index to select from the end.

Definition at line 160 of file src/ftxui/dom/table.cpp.

◆ SelectColumns()

TableSelection SelectColumns ( int column_min,
int column_max )

Select a range of columns of the table.

Parameters
column_minThe first column to select.
column_maxThe last column to select.
Note
You can use negative index to select from the end.

Definition at line 169 of file src/ftxui/dom/table.cpp.

◆ SelectRectangle()

TableSelection SelectRectangle ( int column_min,
int column_max,
int row_min,
int row_max )

Select a rectangle of the table.

Parameters
column_minThe first column to select.
column_maxThe last column to select.
row_minThe first row to select.
row_maxThe last row to select.
Note
You can use negative index to select from the end.

Definition at line 189 of file src/ftxui/dom/table.cpp.

◆ Render()

Element Render ( )

Render the table.

Returns
The rendered table. This is an element you can draw.

Definition at line 224 of file src/ftxui/dom/table.cpp.


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