FTXUI  5.0.0
C++ functional terminal UI.
Table Class Reference

Public Member Functions

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

Detailed Description

Examples
examples/dom/table.cpp.

Definition at line 37 of file table.hpp.

Constructor & Destructor Documentation

◆ Table() [1/3]

Table ( )

Create an empty table.

Definition at line 46 of file table.cpp.

◆ Table() [2/3]

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

Create a table from a vector of vector of string.

Parameters
inputThe input data.

Definition at line 53 of file table.cpp.

◆ Table() [3/3]

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

Create a table from a vector of vector of Element.

Parameters
inputThe input elements.

Definition at line 70 of file table.cpp.

Member Function Documentation

◆ SelectAll()

TableSelection SelectAll ( )

Select all the table.

Examples
examples/dom/table.cpp.

Definition at line 193 of file 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 160 of file 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 125 of file 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 134 of file 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 142 of file 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 151 of file 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 171 of file table.cpp.

◆ Render()

Element Render ( )

Render the table.

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

Definition at line 206 of file table.cpp.


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