⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 html_table.cpp

📁 手机浏览器源码程序,功能强大
💻 CPP
📖 第 1 页 / 共 2 页
字号:
{

    if(impl)
        ((HTMLTableElementImpl *)impl)
	    ->setTFoot( ((HTMLTableSectionElementImpl *)_tFoot.impl) );
}

HTMLCollection HTMLTableElement::rows() const
{
    if(!impl) return HTMLCollection();
    return HTMLCollection(impl, HTMLCollectionImpl::TABLE_ROWS);
}

HTMLCollection HTMLTableElement::tBodies() const
{
    if(!impl) return HTMLCollection();
    return HTMLCollection(impl, HTMLCollectionImpl::TABLE_TBODIES);
}

DOMString HTMLTableElement::align() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
}

void HTMLTableElement::setAlign( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
}

DOMString HTMLTableElement::bgColor() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
}

void HTMLTableElement::setBgColor( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
}

DOMString HTMLTableElement::border() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_BORDER);
}

void HTMLTableElement::setBorder( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BORDER, value);
}

DOMString HTMLTableElement::cellPadding() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_CELLPADDING);
}

void HTMLTableElement::setCellPadding( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CELLPADDING, value);
}

DOMString HTMLTableElement::cellSpacing() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_CELLSPACING);
}

void HTMLTableElement::setCellSpacing( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CELLSPACING, value);
}

DOMString HTMLTableElement::frame() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_FRAME);
}

void HTMLTableElement::setFrame( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAME, value);
}

DOMString HTMLTableElement::rules() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_RULES);
}

void HTMLTableElement::setRules( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_RULES, value);
}

DOMString HTMLTableElement::summary() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_SUMMARY);
}

void HTMLTableElement::setSummary( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SUMMARY, value);
}

DOMString HTMLTableElement::width() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
}

void HTMLTableElement::setWidth( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
}

HTMLElement HTMLTableElement::createTHead(  )
{
    if(!impl) return 0;
    return ((HTMLTableElementImpl *)impl)->createTHead(  );
}

void HTMLTableElement::deleteTHead(  )
{
    if(impl)
        ((HTMLTableElementImpl *)impl)->deleteTHead(  );
}

HTMLElement HTMLTableElement::createTFoot(  )
{
    if(!impl) return 0;
    return ((HTMLTableElementImpl *)impl)->createTFoot(  );
}

void HTMLTableElement::deleteTFoot(  )
{
    if(impl)
        ((HTMLTableElementImpl *)impl)->deleteTFoot(  );
}

HTMLElement HTMLTableElement::createCaption(  )
{
    if(!impl) return 0;
    return ((HTMLTableElementImpl *)impl)->createCaption(  );
}

void HTMLTableElement::deleteCaption(  )
{
    if(impl)
        ((HTMLTableElementImpl *)impl)->deleteCaption(  );
}

HTMLElement HTMLTableElement::insertRow( long index )
{
    if(!impl) return 0;
    int exceptioncode = 0;
    HTMLElementImpl* ret = ((HTMLTableElementImpl *)impl)->insertRow( index, exceptioncode );
    if (exceptioncode)
#if KHTML_NO_EXCEPTIONS    
        { _exceptioncode = exceptioncode; return 0; }
#else
        throw DOMException(exceptioncode);
#endif    
    return ret;
}

void HTMLTableElement::deleteRow( long index )
{
    int exceptioncode = 0;
    if(impl)
        ((HTMLTableElementImpl *)impl)->deleteRow( index, exceptioncode );
    if (exceptioncode)
#if KHTML_NO_EXCEPTIONS    
        { _exceptioncode = exceptioncode; return; }
#else
        throw DOMException(exceptioncode);
#endif    
}

// --------------------------------------------------------------------------

HTMLTableRowElement::HTMLTableRowElement() : HTMLElement()
{
}

HTMLTableRowElement::HTMLTableRowElement(const HTMLTableRowElement &other) : HTMLElement(other)
{
}

HTMLTableRowElement::HTMLTableRowElement(HTMLTableRowElementImpl *impl) : HTMLElement(impl)
{
}

HTMLTableRowElement &HTMLTableRowElement::operator = (const Node &other)
{
    assignOther( other, ID_TR );
    return *this;
}

HTMLTableRowElement &HTMLTableRowElement::operator = (const HTMLTableRowElement &other)
{
    HTMLElement::operator = (other);
    return *this;
}

HTMLTableRowElement::~HTMLTableRowElement()
{
}

long HTMLTableRowElement::rowIndex() const
{
    if(!impl) return 0;
    return ((HTMLTableRowElementImpl *)impl)->rowIndex();
}

void HTMLTableRowElement::setRowIndex( long /*_rowIndex*/ )
{
#if KHTML_NO_EXCEPTIONS    
    { _exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR; return; }
#else
    throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
#endif    
}

long HTMLTableRowElement::sectionRowIndex() const
{
    if(!impl) return 0;
    return ((HTMLTableRowElementImpl *)impl)->sectionRowIndex();
}

void HTMLTableRowElement::setSectionRowIndex( long /*_sectionRowIndex*/ )
{
#if KHTML_NO_EXCEPTIONS    
    { _exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR; return; }
#else
    throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
#endif    
}

HTMLCollection HTMLTableRowElement::cells() const
{
    if(!impl) return HTMLCollection();
    return HTMLCollection(impl, HTMLCollectionImpl::TR_CELLS);
}

void HTMLTableRowElement::setCells( const HTMLCollection & /*_cells*/ )
{
#if KHTML_NO_EXCEPTIONS    
    { _exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR; return; }
#else
    throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
#endif    
}

DOMString HTMLTableRowElement::align() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
}

void HTMLTableRowElement::setAlign( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
}

DOMString HTMLTableRowElement::bgColor() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
}

void HTMLTableRowElement::setBgColor( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
}

DOMString HTMLTableRowElement::ch() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR);
}

void HTMLTableRowElement::setCh( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value);
}

DOMString HTMLTableRowElement::chOff() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF);
}

void HTMLTableRowElement::setChOff( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value);
}

DOMString HTMLTableRowElement::vAlign() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN);
}

void HTMLTableRowElement::setVAlign( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value);
}

HTMLElement HTMLTableRowElement::insertCell( long index )
{
    if(!impl) return 0;
    int exceptioncode = 0;
    HTMLElementImpl* ret = ((HTMLTableRowElementImpl *)impl)->insertCell( index, exceptioncode );
    if (exceptioncode)
#if KHTML_NO_EXCEPTIONS    
        { _exceptioncode = exceptioncode; return 0; }
#else
        throw DOMException(exceptioncode);
#endif    
    return ret;
}

void HTMLTableRowElement::deleteCell( long index )
{
    int exceptioncode = 0;
    if(impl)
        ((HTMLTableRowElementImpl *)impl)->deleteCell( index, exceptioncode );
    if (exceptioncode)
#if KHTML_NO_EXCEPTIONS    
        { _exceptioncode = exceptioncode; return; }
#else
        throw DOMException(exceptioncode);
#endif    
}

// --------------------------------------------------------------------------

HTMLTableSectionElement::HTMLTableSectionElement() : HTMLElement()
{
}

HTMLTableSectionElement::HTMLTableSectionElement(const HTMLTableSectionElement &other) : HTMLElement(other)
{
}

HTMLTableSectionElement::HTMLTableSectionElement(HTMLTableSectionElementImpl *impl) : HTMLElement(impl)
{
}

HTMLTableSectionElement &HTMLTableSectionElement::operator = (const Node &other)
{
    if(other.elementId() != ID_TBODY &&
       other.elementId() != ID_THEAD &&
       other.elementId() != ID_TFOOT )
    {
	if ( impl ) impl->deref();
	impl = 0;
    } else {
    Node::operator = (other);
    }
    return *this;
}

HTMLTableSectionElement &HTMLTableSectionElement::operator = (const HTMLTableSectionElement &other)
{
    HTMLElement::operator = (other);
    return *this;
}

HTMLTableSectionElement::~HTMLTableSectionElement()
{
}

DOMString HTMLTableSectionElement::align() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
}

void HTMLTableSectionElement::setAlign( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
}

DOMString HTMLTableSectionElement::ch() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR);
}

void HTMLTableSectionElement::setCh( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value);
}

DOMString HTMLTableSectionElement::chOff() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF);
}

void HTMLTableSectionElement::setChOff( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value);
}

DOMString HTMLTableSectionElement::vAlign() const
{
    if(!impl) return DOMString();
    return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN);
}

void HTMLTableSectionElement::setVAlign( const DOMString &value )
{
    if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value);
}

HTMLCollection HTMLTableSectionElement::rows() const
{
    if(!impl) return HTMLCollection();
    return HTMLCollection(impl, HTMLCollectionImpl::TABLE_ROWS);
}

HTMLElement HTMLTableSectionElement::insertRow( long index )
{
    if(!impl) return 0;
    int exceptioncode = 0;
    HTMLElementImpl* ret = ((HTMLTableSectionElementImpl *)impl)->insertRow( index, exceptioncode );
    if (exceptioncode)
#if KHTML_NO_EXCEPTIONS    
        { _exceptioncode = exceptioncode; return 0; }
#else
        throw DOMException(exceptioncode);
#endif    
    return ret;
}

void HTMLTableSectionElement::deleteRow( long index )
{
    int exceptioncode = 0;
    if(impl)
        ((HTMLTableSectionElementImpl *)impl)->deleteRow( index, exceptioncode );
    if (exceptioncode)
#if KHTML_NO_EXCEPTIONS    
        { _exceptioncode = exceptioncode; return; }
#else
        throw DOMException(exceptioncode);
#endif    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -