File indexing completed on 2024-05-05 16:10:08

0001 /*
0002  * This file is part of the DOM implementation for KDE.
0003  *
0004  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
0005  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
0006  *           (C) 2003 Apple Computer, Inc.
0007  *
0008  * This library is free software; you can redistribute it and/or
0009  * modify it under the terms of the GNU Library General Public
0010  * License as published by the Free Software Foundation; either
0011  * version 2 of the License, or (at your option) any later version.
0012  *
0013  * This library is distributed in the hope that it will be useful,
0014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0016  * Library General Public License for more details.
0017  *
0018  * You should have received a copy of the GNU Library General Public License
0019  * along with this library; see the file COPYING.LIB.  If not, write to
0020  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0021  * Boston, MA 02110-1301, USA.
0022  *
0023  */
0024 
0025 // -------------------------------------------------------------------------
0026 #ifndef HTML_BLOCKIMPL_H
0027 #define HTML_BLOCKIMPL_H
0028 
0029 #include "html_elementimpl.h"
0030 #include "dtd.h"
0031 
0032 namespace DOM
0033 {
0034 
0035 // -------------------------------------------------------------------------
0036 
0037 class HTMLDivElementImpl : public HTMLGenericElementImpl
0038 {
0039 public:
0040     HTMLDivElementImpl(DocumentImpl *doc, ushort _tagid)
0041         : HTMLGenericElementImpl(doc, _tagid) {}
0042 
0043     void parseAttribute(AttributeImpl *token) override;
0044 };
0045 
0046 // -------------------------------------------------------------------------
0047 
0048 class HTMLHRElementImpl : public HTMLElementImpl
0049 {
0050 public:
0051     HTMLHRElementImpl(DocumentImpl *doc)
0052         : HTMLElementImpl(doc) {}
0053 
0054     NodeImpl::Id id() const override;
0055     void parseAttribute(AttributeImpl *) override;
0056     void attach() override;
0057 };
0058 
0059 // -------------------------------------------------------------------------
0060 
0061 class HTMLPreElementImpl : public HTMLGenericElementImpl
0062 {
0063 public:
0064     HTMLPreElementImpl(DocumentImpl *doc, ushort _tagid)
0065         : HTMLGenericElementImpl(doc, _tagid) {}
0066 
0067     long width() const;
0068     void setWidth(long w);
0069 };
0070 
0071 // -------------------------------------------------------------------------
0072 
0073 class HTMLMarqueeElementImpl : public HTMLElementImpl
0074 {
0075 public:
0076     HTMLMarqueeElementImpl(DocumentImpl *doc);
0077 
0078     NodeImpl::Id id() const override;
0079     void parseAttribute(AttributeImpl *token) override;
0080 
0081     int minimumDelay() const
0082     {
0083         return m_minimumDelay;
0084     }
0085 
0086 private:
0087     int m_minimumDelay;
0088 };
0089 
0090 // -------------------------------------------------------------------------
0091 
0092 class HTMLLayerElementImpl : public HTMLDivElementImpl
0093 {
0094 public:
0095     HTMLLayerElementImpl(DocumentImpl *doc, ushort _tagid);
0096 
0097     void parseAttribute(AttributeImpl *) override;
0098     NodeImpl *addChild(NodeImpl *child) override;
0099 
0100     void removedFromDocument() override;
0101     void insertedIntoDocument() override;
0102     void addId(const DOMString &id) override;
0103     void removeId(const DOMString &id) override;
0104 private:
0105     DOMString m_name;
0106     bool fixed;
0107     bool transparent;
0108 };
0109 
0110 } //namespace
0111 #endif
0112