); \
60const char* x_strerror = strerror(x_errno); \
61if ( !x_strerror ) { \
62x_strerror = "Error code is out of range"; \
64string x_strerrno = NStr::IntToString(x_errno); \
65x_err += " {errno=" + x_strerrno + ',' + x_strerror + '}'; \
67NCBI_THROW(CHTMLException, eWrite, x_err); \
77name +=
"(\""+ v1.substr(0,10) +
"\"";
78 if( !
v2.empty() ) {
79name +=
"|\""+
v2.substr(0,10) +
"\"";
93 if( start >= s.size() ) {
96 const char* cstr = s.c_str();
97 const char* p = strstr(cstr + start, target);
98 returnp ? p - cstr :
NPOS;
119 return "ondblclick";
127 return "onmousedown";
131 return "onmousemove";
133 return "onmouseover";
135 return "onmouseout";
143 return "onkeypress";
153 const string&
value)
155 if(
value.empty() ) {
233m_Text(
text), m_EncodeMode(encode_mode)
305 const string& s)
const 324 const string*pstr = &
str;
339 out.write(pstr->data(), pstr->size());
345 #define PRINT_TMP_STR \ 346 if ( enable_buffering ) { \ 347 pstr->write(tmp.data(), tmp.size()); \ 349 PrintString(out, mode, tmp); \ 356 if( tagStart ==
NPOS) {
363 if( enable_buffering ) {
368 string tmp=
text.substr(0, tagStart);
376 if( tagNameEnd ==
NPOS) {
382 if(
last!= tagStart ) {
386 stringname =
text.substr(tagNameStart,tagNameEnd-tagNameStart);
391 if( enable_buffering ) {
396 if(
tag->NeedRepeatTag() ) {
406}
while( tagStart !=
NPOS);
412 if( enable_buffering ) {
437 out<<
' '<<
i->first;
441!
i->second.IsOptional() ||
442!
i->second.GetValue().empty() ) {
443 stringattr =
i->second.GetValue();
445 if( attr.empty() ) {
447 if((
mode==
eXHTML) &&
i->second.IsOptional()) {
451 if( attr.find_first_of(
"\"&") !=
NPOS) {
489 CHECK_STREAM_WRITE(out); 496 CHTMLSingleElement::~CHTMLSingleElement(void) 502 CNcbiOstream& CHTMLSingleElement::PrintBegin(CNcbiOstream& out, TMode mode) 507 CParent::PrintBegin(out, mode); 510 x_PrintBegin(out, mode); 513 CHECK_STREAM_WRITE(out); 520 CHTMLInlineElement::~CHTMLInlineElement(void) 526 CNcbiOstream& CHTMLInlineElement::PrintEnd(CNcbiOstream& out, TMode mode) 534 out << "</" << m_Name << '>
'; 535 CHECK_STREAM_WRITE(out); 542 CHTMLElement::~CHTMLElement(void) 548 CNcbiOstream& CHTMLElement::PrintEnd(CNcbiOstream& out, TMode mode) 550 CParent::PrintEnd(out, mode); 556 const TMode* previous = mode.GetPreviousContext(); 559 CNCBINode* parent = previous->GetNode(); 560 if ( parent && parent->HaveChildren() && 561 parent->Children().size() > 1 ) 562 // separate child nodes by newline 563 out << CHTMLHelper::GetNL(); 565 out << CHTMLHelper::GetNL(); 567 CHECK_STREAM_WRITE(out); 574 CHTMLBlockElement::~CHTMLBlockElement(void) 580 CNcbiOstream& CHTMLBlockElement::PrintEnd(CNcbiOstream& out, TMode mode) 582 CParent::PrintEnd(out, mode); 586 // Add a newline if no node on the path to the last descendant 587 // is also a block element. We only need one break. 588 CNCBINode* node = this; 589 while (node->HaveChildren()) { 590 node = node->Children().back(); 594 if (dynamic_cast<CHTMLBlockElement*>(node)) { 599 out << CHTMLHelper::GetNL(); 600 CHECK_STREAM_WRITE(out); 613 const char CHTMLComment::sm_TagName[] = "comment"; 615 CHTMLComment::~CHTMLComment(void) 620 CNcbiOstream& CHTMLComment::Print(CNcbiOstream& out, TMode mode) 627 CParent::Print(out, mode); 633 CNcbiOstream& CHTMLComment::PrintBegin(CNcbiOstream& out, TMode mode) 642 CHECK_STREAM_WRITE(out); 648 CNcbiOstream& CHTMLComment::PrintEnd(CNcbiOstream& out, TMode mode) 657 CHECK_STREAM_WRITE(out); 663 CHTMLListElement::~CHTMLListElement(void) 668 CHTMLListElement* CHTMLListElement::SetType(const char* type) 670 SetAttribute("type", type); 674 CHTMLListElement* CHTMLListElement::SetType(const string& type) 676 SetAttribute("type", type); 680 CHTMLListElement* CHTMLListElement::SetCompact(void) 682 SetAttribute("compact"); 686 CNcbiOstream& CHTMLListElement::PrintChildren(CNcbiOstream& out, TMode mode) 691 CIndentingOstream out2(out); 692 CHTMLElement::PrintChildren(out2, mode); 697 CHTMLElement::PrintChildren(out, mode); 706 CHTMLSpecialChar::CHTMLSpecialChar(const char* html, const char* plain, 710 m_Name = s_GenerateNodeInternalName("specialchar", html); 716 CHTMLSpecialChar::~CHTMLSpecialChar(void) 722 CNcbiOstream& CHTMLSpecialChar::PrintChildren(CNcbiOstream& out, TMode mode) 726 for ( int i = 0; i < m_Count; i++ ) { 729 CHECK_STREAM_WRITE(out); 734 for ( int i = 0; i < m_Count; i++ ) { 736 out << "&" << m_Html << ";"; 737 CHECK_STREAM_WRITE(out); 747 const char CHTML_html::sm_TagName[] = "html"; 749 CHTML_html::~CHTML_html(void) 754 void CHTML_html::Init(void) 759 CHTML_tr::CHTML_tr(void) 760 : CParent("tr"), m_Parent(0) 765 CHTML_tr::CHTML_tr(CNCBINode* node) 766 : CParent("tr", node), m_Parent(0) 771 CHTML_tr::CHTML_tr(const string& text) 772 : CParent("tr", text), m_Parent(0) 777 void CHTML_tr::DoAppendChild(CNCBINode* node) 779 CHTML_tc* cell = dynamic_cast<CHTML_tc*>(node); 782 _ASSERT(!cell->m_Parent); 784 cell->m_Parent = this; 786 CParent::DoAppendChild(node); 789 void CHTML_tr::AppendCell(CHTML_tc* cell) 791 _ASSERT(!cell->m_Parent); 792 cell->m_Parent = this; 793 CParent::DoAppendChild(cell); 796 void CHTML_tr::ResetTableCache(void) 799 m_Parent->ResetTableCache(); 802 CNcbiOstream& CHTML_tr::PrintEnd(CNcbiOstream& out, TMode mode) 804 CParent::PrintEnd(out, mode); 809 out << CHTMLHelper::GetNL(); 810 if (m_Parent->m_IsRowSep == CHTML_table::ePrintRowSep) { 811 out << string(GetTextLength(mode), m_Parent->m_RowSepChar) 812 << CHTMLHelper::GetNL(); 814 CHECK_STREAM_WRITE(out); 824 CNcbiOstream& CHTML_tr::PrintChildren(CNcbiOstream& out, TMode mode) 826 if ( !HaveChildren() ) { 834 return CParent::PrintChildren(out, mode); 836 out << m_Parent->m_ColSepL; 837 NON_CONST_ITERATE ( TChildren, i, Children() ) { 838 if ( i != Children().begin() ) { 840 out << m_Parent->m_ColSepM; 841 CHECK_STREAM_WRITE(out); 843 Node(i)->Print(out, mode); 846 out << m_Parent->m_ColSepR; 847 CHECK_STREAM_WRITE(out); 852 SIZE_TYPE CHTML_tr::GetTextLength(TMode mode) 854 if ( !HaveChildren() ) { 857 CNcbiOstrstream sout; 860 NON_CONST_ITERATE ( TChildren, i, Children() ) { 861 Node(i)->Print(sout, mode); 864 SIZE_TYPE textlen = (SIZE_TYPE)GetOssSize(sout); 868 textlen += m_Parent->m_ColSepL.length() + 869 m_Parent->m_ColSepR.length(); 871 textlen += m_Parent->m_ColSepM.length() * (cols - 1); 881 CHTML_tc::~CHTML_tc(void) 886 CHTML_tc* CHTML_tc::SetRowSpan(TIndex span) 888 SetAttribute("rowspan", span); 892 CHTML_tc* CHTML_tc::SetColSpan(TIndex span) 894 SetAttribute("colspan", span); 899 CHTML_table::TIndex x_GetSpan(const CHTML_tc* node, 900 const string& attributeName) 902 if ( !node->HaveAttribute(attributeName) ) { 905 const string& value = node->GetAttribute(attributeName); 908 CHTML_table::TIndex span = NStr::StringToUInt(value); 913 catch ( exception& ) { 914 // Error will be posted later 916 ERR_POST_X(1, "Bad attribute: " << attributeName << "=\"" << value << "\""); 920 void CHTML_tc::DoSetAttribute(const string& name, 921 const string& value, bool optional) 923 if (name == "rowspan" || name == "colspan") { 924 // Changing cell size 927 CParent::DoSetAttribute(name, value, optional); 930 void CHTML_tc::ResetTableCache(void) 933 m_Parent->ResetTableCache(); 937 void CHTML_tc_Cache::SetUsed() 940 NCBI_THROW(CHTMLException, eTableCellUse, "overlapped table cells"); 945 void CHTML_tc_Cache::SetCellNode(CHTML_tc* cellNode) 952 CHTML_table::TIndex x_NextSize(CHTML_table::TIndex size, 953 CHTML_table::TIndex limit) 960 } while ( size < limit ); 964 CHTML_tc_Cache& CHTML_tr_Cache::GetCellCache(TIndex col) 966 TIndex count = GetCellCount(); 967 if ( col >= count ) { 968 TIndex newCount = col + 1; 969 TIndex size = m_CellsSize; 970 if ( newCount > size ) { 971 TIndex newSize = x_NextSize(size, newCount); 972 CHTML_tc_Cache* newCells = new CHTML_tc_Cache[newSize]; 973 for ( TIndex i = 0; i < count; ++i ) 974 newCells[i] = m_Cells[i]; 977 m_CellsSize = newSize; 979 m_CellCount = newCount; 984 void CHTML_tr_Cache::SetUsedCells(TIndex colBegin, TIndex colEnd) 986 for ( TIndex col = colBegin; col < colEnd; ++col ) { 987 GetCellCache(col).SetUsed(); 991 void CHTML_tr_Cache::AppendCell(CHTML_tr* rowNode, TIndex col, 992 CHTML_tc* cellNode, TIndex colSpan) 994 _ASSERT(m_FilledCellCount <= col); 995 for ( TIndex i = m_FilledCellCount; i < col; ++i ) { 996 CHTML_tc_Cache& cellCache = GetCellCache(i); 997 if ( !cellCache.IsUsed() ) { 1000 rowNode->AppendCell(cell); 1001 cellCache.SetCellNode(cell); 1004 CHTML_tc_Cache& cellCache = GetCellCache(col); 1005 _ASSERT(!cellCache.IsUsed()); 1006 _ASSERT(x_GetSpan(cellNode, "colspan") == colSpan); 1007 rowNode->AppendCell(cellNode); 1008 cellCache.SetCellNode(cellNode); 1009 if ( colSpan != 1 ) { 1010 SetUsedCells(col + 1, col + colSpan); 1012 m_FilledCellCount = col + colSpan; 1015 void CHTML_tr_Cache::SetUsedCells(CHTML_tc* cellNode, 1016 TIndex colBegin, TIndex colEnd) 1018 GetCellCache(colBegin).SetCellNode(cellNode); 1019 SetUsedCells(colBegin + 1, colEnd); 1020 m_FilledCellCount = colEnd; 1024 CHTML_table_Cache::~CHTML_table_Cache(void) 1026 for ( TIndex i = 0; i < GetRowCount(); ++i ) { 1033 CHTML_tr_Cache& CHTML_table_Cache::GetRowCache(TIndex row) 1035 TIndex count = GetRowCount(); 1036 if ( row >= count ) { 1037 TIndex newCount = row + 1; 1038 TIndex size = m_RowsSize; 1039 if ( newCount > size ) { 1040 TIndex newSize = x_NextSize(size, newCount); 1041 CHTML_tr_Cache** newRows = new CHTML_tr_Cache*[newSize]; 1042 for ( TIndex i = 0; i < count; ++i ) 1043 newRows[i] = m_Rows[i]; 1046 m_RowsSize = newSize; 1048 for ( TIndex i = count; i < newCount; ++i ) 1049 m_Rows[i] = new CHTML_tr_Cache; 1050 m_RowCount = newCount; 1052 return *m_Rows[row]; 1055 void CHTML_table_Cache::InitRow(TIndex row, CHTML_tr* rowNode) 1057 CHTML_tr_Cache& rowCache = GetRowCache(row); 1058 m_Rows[row]->SetRowNode(rowNode); 1059 m_FilledRowCount = row + 1; 1061 // Scan all children (which should be <TH> or <TD> tags) 1062 if ( rowNode->HaveChildren() ) { 1063 // Beginning with column 0 1065 for ( CNCBINode::TChildren::iterator iCol = rowNode->ChildBegin(), 1066 iColEnd = rowNode->ChildEnd(); 1067 iCol != iColEnd; ++iCol ) { 1068 CHTML_tc* cellNode = 1069 dynamic_cast<CHTML_tc*>(rowNode->Node(iCol)); 1075 // Skip all used cells 1076 while ( rowCache.GetCellCache(col).IsUsed() ) { 1080 // Determine current cell size 1081 TIndex rowSpan = x_GetSpan(cellNode, "rowspan"); 1082 TIndex colSpan = x_GetSpan(cellNode, "colspan"); 1084 // End of new cell in columns 1085 rowCache.SetUsedCells(cellNode, col, col + colSpan); 1086 if ( rowSpan > 1 ) { 1087 SetUsedCells(row + 1, row + rowSpan, col, col + colSpan); 1098m_RowCount(0), m_RowsSize(0), m_Rows(0), m_FilledRowCount(0)
1101 if(
table->HaveChildren() ) {
1104 for( CNCBINode::TChildren::iterator iRow =
table->ChildBegin(),
1105iRowEnd =
table->ChildEnd(); iRow != iRowEnd; ++iRow ) {
1141 if( cellCache.
IsNode() ) {
1145 if( !
dynamic_cast<CHTML_th*
>(cell) )
1147 "wrong cell type: TH expected");
1150 if( !
dynamic_cast<CHTML_td*
>(cell) )
1152 "wrong cell type: TD expected");
1159 if( cellCache.
IsUsed() )
1161 "invalid use of big table cell");
1165cell =
newCHTML_th;
1167cell =
newCHTML_td;
1180 if( cellCache.
IsNode() ) {
1184 if( !
dynamic_cast<CHTML_th*
>(cell) )
1186 "wrong cell type: TH expected");
1189 if( !
dynamic_cast<CHTML_td*
>(cell) )
1191 "wrong cell type: TD expected");
1196 if(
x_GetSpan(cell,
"rowspan") != rowSpan ||
1197 x_GetSpan(cell,
"colspan") != colSpan )
1199 "cannot change table cell size");
1202 if( cellCache.
IsUsed() )
1204 "invalid use of big table cell");
1209cell =
newCHTML_th;
1211cell =
newCHTML_td;
1213 if( colSpan != 1 ) {
1216 if( rowSpan != 1 ) {
1220 if( rowSpan != 1 ) {
1228m_CurrentRow(
TIndex(-1)), m_CurrentCol(
TIndex(-1)),
1230m_RowSepChar(
'-'), m_IsRowSep(eSkipRowSep)
1257 row->m_Parent =
this;
1265 row->m_Parent =
this;
1287 type, rowSpan, colSpan);
1322 dynamic_cast<CHTML_tr*
>(&**
i)->GetTextLength(
mode)) >0) {
1342 for( CNCBINode::TChildren::iterator iRow =
ChildBegin(),
1343iRowEnd =
ChildEnd(); iRow != iRowEnd; ++iRow ) {
1363 const string& col_middle,
1364 const string& col_right,
1365 const charrow_sep_char,
1410 "application/x-www-form-urlencoded");
1415 "multipart/form-data");
1438 if( !name.empty() ) {
1452:
CParent(
"legend", legend)
1458:
CParent(
"legend", legend)
1483:
CParent(
"fieldset", legend)
1524 if( !name.empty() ) {
1532 const string&
value)
1551:
CParent(sm_InputType, name)
1557:
CParent(sm_InputType, name)
1563 const string& description)
1564:
CParent(sm_InputType, name)
1572 boolchecked,
const string& description)
1573:
CParent(sm_InputType, name)
1593:
CParent(sm_InputType, name)
1601:
CParent(sm_InputType, name)
1619:
CParent(sm_InputType, name)
1625 boolchecked,
const string& description)
1626:
CParent(sm_InputType, name)
1644:
CParent(sm_InputType, name)
1650:
CParent(sm_InputType, name)
1666:
CParent(sm_InputType, name)
1672 const string&
value)
1673:
CParent(sm_InputType, name)
1680 const string&
value)
1681:
CParent(sm_InputType, name)
1705:
CParent(sm_InputType, name)
1743:
CParent(sm_InputType, name)
1759:
CParent(sm_InputType, name)
1765:
CParent(sm_InputType, name)
1772 const string&
value)
1773:
CParent(sm_InputType, name)
1791:
CParent(sm_InputType, name)
1807 const string& name,
const string&
value)
1815 const string& name,
const string&
value)
1816:
CParent(sm_TagName, contents)
1839 const string&
value)
1899 for(
int i= 1;
i<
count; ++
i) {
1952 if( mapname.find(
"#") ==
NPOS) {
2015 for(
int i= 0;
i<
count;
i++) {
2029 ITERATE(vector<int>, it, coords) {
2030 if( it != coords.begin() ) {
2043 ITERATE(list<int>, it, coords) {
2044 if( it != coords.begin() ) {
2067 if( !definition.empty() )
2083 if( !definition.empty() ) {
2268 new CHTMLPlainText(nl +
"<!--"+ nl + script +
"-->"+ nl,
true));
2275 #define DEFINE_HTML_ELEMENT(Tag) \ 2276 CHTML_NAME(Tag)::~CHTML_NAME(Tag)(void) \ 2279 const char CHTML_NAME(Tag)::sm_TagName[] = #TagCNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
container_type::const_iterator const_iterator
const_iterator end() const
std::ofstream out("events_result.xml")
main entry point for tests
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
static const char * str(char *buf, int n)
static const column_t columns[]
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
static string GetNL(void)
static string HTMLEncode(const string &str, THTMLEncodeFlags flags=fEncodeAll)
HTML encodes a string. E.g. <.
static string StripHTML(const string &str)
Strip all HTML code from a string.
static string HTMLAttributeEncode(const string &str, THTMLEncodeFlags flags=fSkipEntities)
HTML encodes a tag attribute ('&' and '"' symbols).
@ fCheckPreencoded
Print warning if some preencoded entity found in the string.
CHTML_checkbox(const string &name)
virtual CNcbiOstream & PrintBegin(CNcbiOstream &, TMode mode)
CHTML_input(const char *type, const string &name=kEmptyStr)
static const char sm_InputType[]
CHTML_area * DefineRect(int x1, int y1, int x2, int y2)
virtual CNcbiOstream & PrintChildren(CNcbiOstream &out, TMode mode)
CHTMLPlainText(EEncodeMode encode_mode, const string &text)
static const char sm_TagName[]
CHTML_script * AppendScript(const string &script)
CHTML_input_button(const string &label)
const string & GetText(void) const
void SetUsedCells(TIndex rowBegin, TIndex rowEnd, TIndex colBegin, TIndex colEnd)
static const char sm_TagName[]
const string & GetText(void) const
CHTML_tc_Cache & GetCellCache(TIndex col)
virtual void DoAppendChild(CNCBINode *child)
void SetUsedCells(TIndex colBegin, TIndex colEnd)
bool HaveChildren(void) const
CHTMLDualNode(const char *html, const char *plain)
CHTMLNode * SetNameAttribute(const string &name)
CHTML_tr_Cache & GetRowCache(TIndex row)
void SetEventHandler(const EHTML_EH_Attribute event, const string &value)
CHTML_tc * Cell(TIndex row, TIndex column, ECellType type=eAnyCell)
CHTML_textarea(const string &name, int cols, int rows)
unique_ptr< CHTML_table_Cache > m_Cache
CHTML_tc * GetCellNode(TIndex row, TIndex col, CHTML_table::ECellType type)
virtual CNcbiOstream & PrintChildren(CNcbiOstream &out, TMode mode)
virtual CNcbiOstream & PrintBegin(CNcbiOstream &, TMode mode)
CHTML_meta(EType mtype, const string &var, const string &content)
CHTML_tc * SetColSpan(TIndex span)
void SetPlainSeparators(const string &col_left=kEmptyStr, const string &col_middle=" ", const string &col_right=kEmptyStr, const char row_sep_char='-', ERowPlainSep is_row_sep=eSkipRowSep)
CHTML_table_Cache & GetCache(void) const
list< CNodeRef > TChildren
CHTML_text(const string &name, const string &value=kEmptyStr)
~CHTML_input_button(void)
static const char sm_TagName[]
static const char sm_InputType[]
TIndex CalculateNumberOfRows(void) const
static const char sm_TagName[]
static const char sm_TagName[]
CHTML_image(const string &name, const string &src, const string &alt=kEmptyStr)
CHTMLNode * SetWidth(int width)
CHTML_button(const string &text, EButtonType type=eSubmit, const string &name=kEmptyStr, const string &value=kEmptyStr)
static const char sm_InputType[]
virtual CNcbiOstream & PrintBegin(CNcbiOstream &out, TMode mode)
CHTML_radio(const string &name, const string &value)
CHTML_font * SetRelativeSize(int size)
CHTML_submit(const string &label)
bool HaveAttributes(void) const
void AddHidden(const string &name, const string &value)
CHTML_hidden(const string &name, const string &value)
static const char sm_TagName[]
TIndex CalculateNumberOfColumns(void) const
CNodeRef MapTagAll(const string &tagname, const TMode &mode)
CHTML_tc * GetCellNode(void) const
void Init(const string &url, EMethod method=eGet)
static const char sm_TagName[]
string GetEventHandlerName(const EHTML_EH_Attribute event) const
virtual CNcbiOstream & PrintChildren(CNcbiOstream &out, TMode mode)
TIndex GetRowCount(void) const
CNcbiOstream & PrintString(CNcbiOstream &out, TMode mode, const string &s) const
CHTML_area * DefineCircle(int x, int y, int radius)
const string & GetName(void) const
static const char sm_InputType[]
virtual CNcbiOstream & PrintBegin(CNcbiOstream &, TMode mode)
CHTML_button * SetSubmitData(const string &name, const string &value=kEmptyStr)
CHTML_tc * SetRowSpan(TIndex span)
TIndex GetCellCount(void) const
CHTML_tr * GetRowNode(void) const
CHTML_dl * AppendTerm(const string &term, CNCBINode *definition=0)
static const char sm_InputType[]
CHTML_table_Cache(CHTML_table *table)
int TFlags
Bitwise OR of "EFlags".
CHTML_map(const string &name)
CHTML_script(const string &stype)
CHTML_password(const string &name, const string &value=kEmptyStr)
void RepeatTag(bool enable=true)
static const char sm_TagName[]
CHTMLNode * AppendPlainText(const char *text, bool noEncode=false)
static const char sm_InputType[]
static const char sm_TagName[]
CNCBINode * AppendChild(CNCBINode *child)
CHTML_label(const string &text)
virtual void DoAppendChild(CNCBINode *node)
const string & GetNameAttribute(void) const
CHTML_reset(const string &label=kEmptyStr)
TChildren::iterator ChildEnd(void)
CHTML_hr * SetNoShade(void)
CHTML_legend(const string &legend)
CHTML_file(const string &name, const string &value=kEmptyStr)
static const char sm_TagName[]
void SetOptionalAttribute(const string &name, const string &value)
TAttributes & Attributes(void)
TChildren & Children(void)
TChildren::iterator ChildBegin(void)
static const char sm_InputType[]
CHTML_basefont * SetTypeFace(const string &typeface)
CHTML_area * DefinePolygon(int coords[], int count)
CHTML_ol * SetStart(int start)
static const char sm_TagName[]
CHTML_button * SetType(EButtonType type)
virtual CNcbiOstream & Print(CNcbiOstream &out, TMode mode=eHTML)
CHTML_font * SetTypeFace(const string &typeface)
void SetRowNode(CHTML_tr *rowNode)
CHTML_tr * Row(TIndex row)
void SetAttribute(const string &name, const string &value)
CHTMLNode * SetHeight(int height)
friend class CHTML_table_Cache
virtual CNcbiOstream & PrintBegin(CNcbiOstream &, TMode mode)
static const char sm_TagName[]
static const char sm_TagName[]
void UseMap(const string &mapname)
static const char sm_InputType[]
void AppendRow(CHTML_tr *row)
virtual CNcbiOstream & PrintBegin(CNcbiOstream &out, TMode mode)
CHTMLNode * SetSize(int size)
void CheckTable(void) const
void InitRow(TIndex row, CHTML_tr *rowNode)
static const char sm_TagName[]
CNcbiOstream & x_PrintBegin(CNcbiOstream &, TMode mode)
void ResetTableCache(void)
void AppendCell(CHTML_tr *rowNode, TIndex col, CHTML_tc *cellNode, TIndex colSpan)
CHTML_table::TIndex TIndex
CHTMLTagNode(const char *tag)
static const char sm_InputType[]
virtual CNcbiOstream & PrintBegin(CNcbiOstream &, TMode mode)
void SetFor(const string &idRef)
static const char sm_TagName[]
CHTML_tr * GetRowNode(TIndex row)
static const char sm_TagName[]
static const char sm_TagName[]
static const char sm_InputType[]
CHTML_img(const string &url, const string &alt=kEmptyStr)
CHTMLText(const char *text, TFlags flags=fDefault)
void SetNoEncode(bool noEncode=true)
CHTML_dl * SetCompact(void)
@ eJSONEncode
Encode for JSON output.
@ eNoEncode
Do not encode prior to printing.
@ eHTMLEncode
Encode for HTML output.
@ fStripHtmlMode
Strip text in html mode.
@ fDisableBuffering
Disable printout buffering.
@ fEncodeHtmlMode
Encode text in html mode.
@ fEncodeTextMode
Encode text in plain text mode.
@ fStripTextMode
Strip text in plain text mode.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
CNcbistrstream_Base< IO_PREFIX::ostrstream, IOS_BASE::out > CNcbiOstrstream
NCBI_NS_STD::string::size_type SIZE_TYPE
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static string Join(const TContainer &arr, const CTempString &delim)
Join strings using the specified delimiter.
static string JsonEncode(const CTempString str, EJsonEncode encoding=eJsonEnc_UTF8)
Encode a string for JSON.
@ fWithSign
Prefix the output value with a sign ('+'/'-')
static const char label[]
#define CHECK_STREAM_WRITE(out)
const char * kTagStart
Tag delimiters.
#define DEFINE_HTML_ELEMENT(Tag)
const SIZE_TYPE kTagStartLen
static string s_GenerateNodeInternalName(const string &basename, const string &v1, const string &v2=kEmptyStr)
static CHTML_table::TIndex x_GetSpan(const CHTML_tc *node, const string &attributeName)
#define INIT_STREAM_WRITE
const char * kTagEnd
Tag end.
static SIZE_TYPE s_Find(const string &s, const char *target, SIZE_TYPE start=0)
HTML library helper classes and functions.
Definition of all error codes used in html library (xhtml.lib).
Indenting output stream support.
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n th
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n td
static void text(MDB_val *v)
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
#define row(bind, expected)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4