Source: dom/html_element.h


Annotated List
Files
Globals
Hierarchy
Index
/*
 * This file is part of the DOM implementation for KDE.
 *
 * (C) 1999 Lars Knoll (knoll@kde.org)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * This file includes excerpts from the Document Object Model (DOM)
 * Level 1 Specification (Recommendation)
 * http://www.w3.org/TR/REC-DOM-Level-1/
 * Copyright © World Wide Web Consortium , (Massachusetts Institute of
 * Technology , Institut National de Recherche en Informatique et en
 * Automatique , Keio University ). All Rights Reserved.
 *
 * $Id: html__element_h.html 149726 2002-04-16 07:39:43Z dfaure $
 */
#ifndef HTML_ELEMENT_H
#define HTML_ELEMENT_H

#include 
class KHTMLView;

namespace DOM {

class HTMLElementImpl;
class DOMString;
class HTMLCollection;

/**
 * All HTML element interfaces derive from this class. Elements that
 * only expose the HTML core attributes are represented by the base
 *  HTMLElement  interface. These elements are as
 * follows:
 *
 *    HEAD
 *
 *    special: SUB, SUP, SPAN, BDO
 *
 *    font: TT, I, B, U, S, STRIKE, BIG, SMALL
 *
 *    phrase: EM, STRONG, DFN, CODE, SAMP, KBD, VAR,
 * CITE, ACRONYM, ABBR
 *
 *    list: DD, DT
 *
 *    NOFRAMES, NOSCRIPT
 *
 *    ADDRESS, CENTER
 *
 *    Note. The  style  attribute for this
 * interface is reserved for future usage.
 *
 */
class HTMLElement : public Element
{
    friend class HTMLDocument;
    friend class ::KHTMLView;
    friend class HTMLTableElement;
    friend class HTMLTableRowElement;
    friend class HTMLTableSectionElement;

public:
    HTMLElement();
    HTMLElement(const HTMLElement &other);
    HTMLElement(const Node &other) : Element()
         {(*this)=other;}

protected:
    HTMLElement(HTMLElementImpl *impl);
public:

    HTMLElement & operator = (const HTMLElement &other);
    HTMLElement & operator = (const Node &other);

    ~HTMLElement();

    /**
     * The element's identifier. See the 
     * id attribute definition  in HTML 4.0.
     *
     */
    DOMString id() const;

    /**
     * see @ref id
     */
    void setId( const DOMString & );

    /**
     * The element's advisory title. See the 
     * title attribute definition  in HTML 4.0.
     *
     */
    DOMString title() const;

    /**
     * see @ref title
     */
    void setTitle( const DOMString & );

    /**
     * Language code defined in RFC 1766. See the 
     * lang attribute definition  in HTML 4.0.
     *
     */
    DOMString lang() const;

    /**
     * see @ref lang
     */
    void setLang( const DOMString & );

    /**
     * Specifies the base direction of directionally neutral text and
     * the directionality of tables. See the 
     * dir attribute definition  in HTML 4.0.
     *
     */
    DOMString dir() const;

    /**
     * see @ref dir
     */
    void setDir( const DOMString & );

    /**
     * The class attribute of the element. This attribute has been
     * renamed due to conflicts with the "class" keyword exposed by
     * many languages. See the 
     * class attribute definition  in HTML 4.0.
     *
     */
    DOMString className() const;

    /**
     * see @ref className
     */
    void setClassName( const DOMString & );

    /**
     * The HTML code contained in this element.
     * This function is not part of the DOM specifications as defined by the w3c.
     */
    DOMString innerHTML() const;

    /**
     * Set the HTML content of this node.
     *
     * @exception DOMException
     * NO_MODIFICATION_ALLOWED_ERR: Raised if there is the element does not allow
     * children.
     */
    void setInnerHTML( const DOMString &html );

    /**
     * The text contained in this element.
     * This function is not part of the DOM specifications as defined by the w3c.
     */
    DOMString innerText() const;

    /**
     * Set the text content of this node.
     *
     * @exception DOMException
     * NO_MODIFICATION_ALLOWED_ERR: Raised if there is the element does not allow
     * children.
     */
    void setInnerText( const DOMString &text );

    /**
     * Retrieves a collection of nodes that are direct descendants of this node.
     * IE-specific extension.
     */
    HTMLCollection children() const;

    /*
     * @internal
     */
    void removeCSSProperty( const DOMString& property );

    /*
     * @internal
     */
    void addCSSProperty( const DOMString &property, const DOMString &value );

};

}; //namespace

#endif

Generated by: dfaure on faure on Tue Apr 16 08:50:42 2002, using kdoc 2.0a53.