12 #ifndef EMP_WEB_TABLE_CELL_H 13 #define EMP_WEB_TABLE_CELL_H 28 void DoCSS(
const std::string & setting,
const std::string & value)
override {
34 void DoAttr(
const std::string & setting,
const std::string & value)
override {
40 void DoListen(
const std::string & event_name,
size_t fun_id)
override {
54 std::string
GetCSS(
const std::string & setting)
override {
69 const size_t old_span = datum.rowspan;
70 const size_t col_span = datum.colspan;
71 datum.rowspan = new_span;
74 for (
size_t row =
cur_row + old_span; row <
cur_row + new_span; row++) {
76 Info()->
rows[row].data[col].masked =
true;
81 for (
size_t row =
cur_row + new_span; row <
cur_row + old_span; row++) {
83 Info()->
rows[row].data[col].masked =
false;
99 const size_t old_span = datum.colspan;
100 const size_t row_span = datum.rowspan;
101 datum.colspan = new_span;
105 for (
size_t col =
cur_col + old_span; col <
cur_col + new_span; col++) {
106 Info()->
rows[row].data[col].masked =
true;
112 for (
size_t col =
cur_col + new_span; col <
cur_col + old_span; col++) {
113 Info()->
rows[row].data[col].masked =
false;
void DoAttr(const std::string &setting, const std::string &value) override
Udpate the attributes for this cell (override default Table)
Definition: _TableCell.h:34
TableCell & ClearListen()
Definition: _TableCell.h:48
TableCell & SetSpan(size_t row_span, size_t col_span)
Update both row and column span for this cell.
Definition: _TableCell.h:124
TableCell & SetColSpan(size_t new_span)
Adjust the column span of the current cell.
Definition: _TableCell.h:94
An object that focuses on a single cell in a specified table.
Definition: _TableCell.h:19
TableCell & SetRowSpan(size_t new_span)
Adjust the row span of the current cell.
Definition: _TableCell.h:65
TableCell & ClearChildren()
Definition: _TableCell.h:50
emp::vector< TableRowInfo > rows
Definition: Table.h:113
void DoListen(const std::string &event_name, size_t fun_id) override
Update a listener for this cell (override default Table)
Definition: _TableCell.h:40
TableCell & ClearExtras()
Definition: _TableCell.h:49
TableCell & ClearAttr()
Definition: _TableCell.h:47
TableCell & SetHeader(bool _h=true)
Definition: _TableCell.h:58
TableCell & ClearStyle()
Definition: _TableCell.h:46
TableCell(size_t r, size_t c, const std::string &in_id="")
Definition: _TableCell.h:21
TableCell(const Widget &in)
Definition: _TableCell.h:23
std::string GetCSS(const std::string &setting) override
Get the current CSS value for the specified setting of this Cell.
Definition: _TableCell.h:54
TableCell(internal::TableInfo *in_info, size_t _row=0, size_t _col=0)
Definition: _TableCell.h:24
If we are in emscripten, make sure to include the header.
Definition: array.h:37
#define emp_assert(...)
Definition: assert.h:199
void DoCSS(const std::string &setting, const std::string &value) override
Update the CSS for this cell. (override default Table)
Definition: _TableCell.h:28
void ClearCell(size_t row_id, size_t col_id)
Definition: Table.h:352
void ClearCellChildren(size_t row_id, size_t col_id)
Definition: Table.h:322
void ReplaceHTML() override
Definition: Table.h:462
TableCell & Clear()
Definition: _TableCell.h:45
TableCell(const TableWidget &in)
Definition: _TableCell.h:22
TableCell & ClearCells()
Definition: _TableCell.h:51