14 HtmlTable::HtmlTable() {}
16 HtmlTable::HtmlTable(TString
id, TString className, TString style) : HtmlObject(id, className, style) {}
18 if (obj.InheritsFrom(
"Hal::HtmlRow")) { HtmlObject::AddContent(obj); }
21 HtmlTable::~HtmlTable() {}
23 TString HtmlTable::ToString()
const {
return GetDefaultString(
"table"); }
27 HtmlRow::HtmlRow(TString
id, TString className, TString style) : HtmlObject(id, className, style) {}
35 HtmlRow::~HtmlRow() {}
37 HtmlCell::HtmlCell() : fColSpan(0), fRowSpan(0) {}
43 res = res + GetProperties();
45 res = res + Form(
" colspan=\"%i\">", fColSpan);
46 }
else if (fRowSpan > 0) {
47 res = res + Form(
" rowspan=\"%i\">", fRowSpan);
51 res = res + GetContent();
55 HtmlCell::~HtmlCell() {}
57 HtmlCell::HtmlCell(TString content) : HtmlCell() { SetStringContent(content); }
59 HtmlCell::HtmlCell(TString
id, TString className, TString style) : HtmlObject(id, className, style), fColSpan(0), fRowSpan(0) {}
61 HtmlCellCol::HtmlCellCol() {}
63 HtmlCellCol::HtmlCellCol(TString name, Int_t colspan) : HtmlCell(name) { SetColSpan(colspan); }
65 HtmlCellCol::~HtmlCellCol() {}
67 HtmlCellRow::HtmlCellRow() {}
69 HtmlCellRow::HtmlCellRow(TString name, Int_t colspan) : HtmlCell(name) { SetRowSpan(colspan); }
71 HtmlCellRow::~HtmlCellRow() {}
73 namespace HtmlTableRowClass {
74 TString LightBlue() {
return "light_blue"; }
75 TString MedBlue() {
return "med_blue"; }
76 TString DarkBlue() {
return "dark_blue"; }
77 TString LightGreen() {
return "green_"; }
78 TString Green() {
return "med_green"; }
79 TString DarkGreen() {
return "dark_green"; }
80 TString Yellow() {
return "yellow_"; }
81 TString Grey() {
return "grey_"; }
82 TString Red() {
return "red_"; }
83 TString Violet() {
return "violet_"; }
85 TString DefStyle() {
return LightBlue(); }
86 TString LegendStyle() {
return LightGreen(); }
87 TString TitleStyle() {
return DarkBlue(); }
88 TString ExtraStyle() {
return MedBlue(); }
89 TString TaskStyle() {
return Red(); }
90 TString ExpandableStyle() {
return Yellow(); }
91 TString SummaryStyle() {
return Violet(); }
94 void HtmlRow::AddSimpleCells(std::initializer_list<TString> cels) {
95 for (
auto str : cels) {
virtual void AddContent(const HtmlObject &obj)
TString GetDefaultString(TString tag) const
virtual void AddContent(const HtmlObject &obj)
virtual void AddContent(const HtmlObject &obj)