1 /*
2  * This file is part of the DOM implementation for KDE.
3  *
4  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
5  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
6  *           (C) 2003 Apple Computer, Inc.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public License
19  * along with this library; see the file COPYING.LIB.  If not, write to
20  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  *
23  */
24 
25 // -------------------------------------------------------------------------
26 #ifndef HTML_BLOCKIMPL_H
27 #define HTML_BLOCKIMPL_H
28 
29 #include "html_elementimpl.h"
30 #include "dtd.h"
31 
32 namespace DOM
33 {
34 
35 // -------------------------------------------------------------------------
36 
37 class HTMLDivElementImpl : public HTMLGenericElementImpl
38 {
39 public:
HTMLDivElementImpl(DocumentImpl * doc,ushort _tagid)40     HTMLDivElementImpl(DocumentImpl *doc, ushort _tagid)
41         : HTMLGenericElementImpl(doc, _tagid) {}
42 
43     void parseAttribute(AttributeImpl *token) override;
44 };
45 
46 // -------------------------------------------------------------------------
47 
48 class HTMLHRElementImpl : public HTMLElementImpl
49 {
50 public:
HTMLHRElementImpl(DocumentImpl * doc)51     HTMLHRElementImpl(DocumentImpl *doc)
52         : HTMLElementImpl(doc) {}
53 
54     NodeImpl::Id id() const override;
55     void parseAttribute(AttributeImpl *) override;
56     void attach() override;
57 };
58 
59 // -------------------------------------------------------------------------
60 
61 class HTMLPreElementImpl : public HTMLGenericElementImpl
62 {
63 public:
HTMLPreElementImpl(DocumentImpl * doc,ushort _tagid)64     HTMLPreElementImpl(DocumentImpl *doc, ushort _tagid)
65         : HTMLGenericElementImpl(doc, _tagid) {}
66 
67     long width() const;
68     void setWidth(long w);
69 };
70 
71 // -------------------------------------------------------------------------
72 
73 class HTMLMarqueeElementImpl : public HTMLElementImpl
74 {
75 public:
76     HTMLMarqueeElementImpl(DocumentImpl *doc);
77 
78     NodeImpl::Id id() const override;
79     void parseAttribute(AttributeImpl *token) override;
80 
minimumDelay()81     int minimumDelay() const
82     {
83         return m_minimumDelay;
84     }
85 
86 private:
87     int m_minimumDelay;
88 };
89 
90 // -------------------------------------------------------------------------
91 
92 class HTMLLayerElementImpl : public HTMLDivElementImpl
93 {
94 public:
95     HTMLLayerElementImpl(DocumentImpl *doc, ushort _tagid);
96 
97     void parseAttribute(AttributeImpl *) override;
98     NodeImpl *addChild(NodeImpl *child) override;
99 
100     void removedFromDocument() override;
101     void insertedIntoDocument() override;
102     void addId(const DOMString &id) override;
103     void removeId(const DOMString &id) override;
104 private:
105     DOMString m_name;
106     bool fixed;
107     bool transparent;
108 };
109 
110 } //namespace
111 #endif
112 
113