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

📄 html_form.cpp

📁 最新Nokia手机浏览器全套源代码完美版。
💻 CPP
📖 第 1 页 / 共 3 页
字号:
}

void HTMLInputElement::setMaxLength( long _maxLength )
{
    if(impl) {
        DOMString value(QString::number(_maxLength));
        ((ElementImpl *)impl)->setAttribute(ATTR_MAXLENGTH,value);
    }
}

DOMString HTMLInputElement::name() const
{
    if(!impl) return DOMString();
    return static_cast<HTMLInputElementImpl* const>(impl)->name();
}

void HTMLInputElement::setName( const DOMString &value )
{
    if(impl) static_cast<HTMLInputElementImpl*>(impl)->setName(value);
}

bool HTMLInputElement::readOnly() const
{
    if(!impl) return 0;
    return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_READONLY).isNull();
}

void HTMLInputElement::setReadOnly( bool _readOnly )
{
    if(impl)
	static_cast<ElementImpl*>(impl)->setAttribute(ATTR_READONLY, _readOnly ? "" : 0);
}

DOMString HTMLInputElement::size() const
{
    if(!impl) return DOMString();
    return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SIZE);
}

void HTMLInputElement::setSize( const DOMString &value )
{
    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SIZE, value);
}

DOMString HTMLInputElement::src() const
{
    if(!impl) return DOMString();
    DOMString s = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SRC);
    if (!s.isNull())
	s = ownerDocument().completeURL( s );
    return s;
}

void HTMLInputElement::setSrc( const DOMString &value )
{
    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SRC, value);
}

long HTMLInputElement::tabIndex() const
{
    if(!impl) return 0;
    return static_cast<ElementImpl*>(impl)->tabIndex();
}

void HTMLInputElement::setTabIndex( long _tabIndex )
{
    if (!impl) return;
    static_cast<ElementImpl*>(impl)->setTabIndex(_tabIndex);
}

DOMString HTMLInputElement::type() const
{
    if(!impl) return DOMString();
    return ((HTMLInputElementImpl *)impl)->type();
}

void HTMLInputElement::setType(const DOMString& _type)
{
    if (!impl) return;
    static_cast<HTMLInputElementImpl*>(impl)->setType(_type);
}

DOMString HTMLInputElement::useMap() const
{
    if(!impl) return DOMString();
    return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_USEMAP);
}

void HTMLInputElement::setUseMap( const DOMString &value )
{
    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_USEMAP, value);
}

DOMString HTMLInputElement::value() const
{
    if(!impl) return DOMString();
    return ((HTMLInputElementImpl*)impl)->value();
}

void HTMLInputElement::setValue( const DOMString &value )
{
    if (impl)
	((HTMLInputElementImpl*)impl)->setValue(value);

}

void HTMLInputElement::blur(  )
{
    if(impl)
	((HTMLInputElementImpl*)impl)->blur();
}

void HTMLInputElement::focus(  )
{
    if(impl)
	((HTMLInputElementImpl*)impl)->focus();
}

void HTMLInputElement::select(  )
{
    if(impl)
	((HTMLInputElementImpl *)impl)->select(  );
}

bool HTMLInputElement::canHaveSelection()
{
    if(!impl) return false;
	return ((HTMLInputElementImpl *)impl)->canHaveSelection(  );
}

long HTMLInputElement::selectionStart()
{
    if(!impl) return 0;
	return ((HTMLInputElementImpl *)impl)->selectionStart(  );
}

long HTMLInputElement::selectionEnd()
{
    if(!impl) return 0;
	return ((HTMLInputElementImpl *)impl)->selectionEnd(  );
}

void HTMLInputElement::setSelectionStart(long start)
{
    if(impl)
	((HTMLInputElementImpl *)impl)->setSelectionStart(start);
}

void HTMLInputElement::setSelectionEnd(long end)
{
    if(impl)
	((HTMLInputElementImpl *)impl)->setSelectionStart(end);
}

void HTMLInputElement::setSelectionRange(long start, long end)
{
    if(impl)
	((HTMLInputElementImpl *)impl)->setSelectionRange(start, end);
}

void HTMLInputElement::click(  )
{
    if(impl)
	((HTMLInputElementImpl *)impl)->click( false );
}

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

HTMLLabelElement::HTMLLabelElement() : HTMLElement()
{
}

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

HTMLLabelElement::HTMLLabelElement(HTMLLabelElementImpl *impl) : HTMLElement(impl)
{
}

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

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

HTMLLabelElement::~HTMLLabelElement()
{
}


HTMLFormElement HTMLLabelElement::form() const
{
    if(!impl) return 0;
    ElementImpl *formElement = ((HTMLLabelElementImpl *)impl)->formElement();
    if (!formElement)
	return 0;
    return ((HTMLGenericFormElementImpl *)formElement)->form();
}

DOMString HTMLLabelElement::accessKey() const
{
    if(!impl) return DOMString();
    return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);
}

void HTMLLabelElement::setAccessKey( const DOMString &value )
{
    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);
}

DOMString HTMLLabelElement::htmlFor() const
{
    if(!impl) return DOMString();
    return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_FOR);
}

void HTMLLabelElement::setHtmlFor( const DOMString &value )
{
    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_FOR, value);
}

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

HTMLLegendElement::HTMLLegendElement() : HTMLElement()
{
}

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

HTMLLegendElement::HTMLLegendElement(HTMLLegendElementImpl *impl) : HTMLElement(impl)
{
}

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

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

HTMLLegendElement::~HTMLLegendElement()
{
}

HTMLFormElement HTMLLegendElement::form() const
{
    if(!impl) return 0;
    return ((HTMLLegendElementImpl *)impl)->form();
}

DOMString HTMLLegendElement::accessKey() const
{
    if(!impl) return DOMString();
    return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);
}

void HTMLLegendElement::setAccessKey( const DOMString &value )
{
    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);
}

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

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

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

HTMLOptGroupElement::HTMLOptGroupElement() : HTMLElement()
{
}

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

HTMLOptGroupElement::HTMLOptGroupElement(HTMLOptGroupElementImpl *impl) : HTMLElement(impl)
{
}

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

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

HTMLOptGroupElement::~HTMLOptGroupElement()
{
}

bool HTMLOptGroupElement::disabled() const
{
    if(!impl) return 0;
    return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
}

void HTMLOptGroupElement::setDisabled( bool _disabled )
{
    if(impl)
	static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
}

DOMString HTMLOptGroupElement::label() const
{
    if(!impl) return DOMString();
    return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_LABEL);
}

void HTMLOptGroupElement::setLabel( const DOMString &value )
{
    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_LABEL, value);
}

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

HTMLSelectElement::HTMLSelectElement() : HTMLElement()
{
}

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

HTMLSelectElement::HTMLSelectElement(HTMLSelectElementImpl *impl) : HTMLElement(impl)
{
}

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

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

HTMLSelectElement::~HTMLSelectElement()
{
}

DOMString HTMLSelectElement::type() const
{
    if(!impl) return DOMString();
    return ((HTMLSelectElementImpl *)impl)->type();
}

long HTMLSelectElement::selectedIndex() const
{
    if(!impl) return 0;
    return ((HTMLSelectElementImpl *)impl)->selectedIndex();
}

void HTMLSelectElement::setSelectedIndex( long _selectedIndex )
{
    if(impl)
        ((HTMLSelectElementImpl *)impl)->setSelectedIndex(_selectedIndex);
}

DOMString HTMLSelectElement::value() const
{
    if(!impl) return DOMString();
    return static_cast<HTMLSelectElementImpl*>(impl)->value();
}

void HTMLSelectElement::setValue( const DOMString &value )
{
    if(!impl || value.isNull()) return;
    static_cast<HTMLSelectElementImpl*>(impl)->setValue(value.implementation());
}

long HTMLSelectElement::length() const
{
    if(!impl) return 0;
    return ((HTMLSelectElementImpl *)impl)->length();
}

HTMLFormElement HTMLSelectElement::form() const
{
    if(!impl) return 0;
    return ((HTMLSelectElementImpl *)impl)->form();
}

HTMLCollection HTMLSelectElement::options() const
{
    if(!impl) return HTMLCollection();
    return HTMLCollection(impl, HTMLCollectionImpl::SELECT_OPTIONS);
}

bool HTMLSelectElement::disabled() const
{
    if(!impl) return 0;
    return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();
}

void HTMLSelectElement::setDisabled( bool _disabled )
{
    if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
}


bool HTMLSelectElement::multiple() const

⌨️ 快捷键说明

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