本文整理汇总了C++中RenderTable::setIsAnonymousBox方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderTable::setIsAnonymousBox方法的具体用法?C++ RenderTable::setIsAnonymousBox怎么用?C++ RenderTable::setIsAnonymousBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderTable
的用法示例。
在下文中一共展示了RenderTable::setIsAnonymousBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addChild
void RenderObject::addChild(RenderObject *newChild, RenderObject *beforeChild)
{
#ifdef DEBUG_LAYOUT
kdDebug( 6040 ) << renderName() << "(RenderObject)::addChild( " << newChild->renderName() << ", "
(beforeChild ? beforeChild->renderName() : "0") << " )" << endl;
#endif
newChild->m_root = m_root;
if(parsing())
newChild->setParsing();
bool needsTable = false;
if(!newChild->isText()) {
switch(newChild->style()->display()) {
case INLINE:
case BLOCK:
case LIST_ITEM:
case RUN_IN:
case COMPACT:
case MARKER:
case TABLE:
case INLINE_TABLE:
break;
case TABLE_COLUMN_GROUP:
case TABLE_COLUMN:
case TABLE_CAPTION:
case TABLE_ROW_GROUP:
case TABLE_HEADER_GROUP:
case TABLE_FOOTER_GROUP:
//kdDebug( 6040 ) << "adding section" << endl;
if ( !isTable() )
needsTable = true;
break;
case TABLE_ROW:
//kdDebug( 6040 ) << "adding row" << endl;
if ( !isTableSection() )
needsTable = true;
break;
case TABLE_CELL:
//kdDebug( 6040 ) << "adding cell" << endl;
if ( !isTableRow() )
needsTable = true;
break;
case NONE:
kdDebug( 6000 ) << "error in RenderObject::addChild()!!!!" << endl;
break;
}
}
if ( needsTable ) {
RenderTable *table;
if( !beforeChild )
beforeChild = lastChild();
if( beforeChild && beforeChild->isAnonymousBox() && beforeChild->isTable() )
table = static_cast<RenderTable *>(beforeChild);
else {
// kdDebug( 6040 ) << "creating anonymous table" << endl;
table = new RenderTable;
RenderStyle *newStyle = new RenderStyle(m_style);
newStyle->setDisplay(TABLE);
table->setStyle(newStyle);
table->setIsAnonymousBox(true);
addChild(table, beforeChild);
}
table->addChild(newChild);
return;
}
// just add it...
insertChildNode(newChild, beforeChild);
}