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  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public License
18  * along with this library; see the file COPYING.LIB.  If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  *
22  */
23 #ifndef HTML_LISTIMPL_H
24 #define HTML_LISTIMPL_H
25 
26 /*
27  * we ignore the deprecated compact attribute. Netscape does so too...
28  */
29 
30 #include "html_elementimpl.h"
31 
32 namespace DOM
33 {
34 
35 class HTMLUListElementImpl : public HTMLElementImpl
36 {
37 public:
HTMLUListElementImpl(DocumentImpl * doc)38     HTMLUListElementImpl(DocumentImpl *doc) : HTMLElementImpl(doc) {}
39 
40     Id id() const override;
41 
42     void parseAttribute(AttributeImpl *) override;
43 
start()44     virtual int start() const
45     {
46         return 1;
47     }
48 };
49 
50 // -------------------------------------------------------------------------
51 
52 class HTMLDirectoryElementImpl : public HTMLElementImpl
53 {
54 public:
HTMLDirectoryElementImpl(DocumentImpl * doc)55     HTMLDirectoryElementImpl(DocumentImpl *doc) : HTMLElementImpl(doc) {}
56 
57     Id id() const override;
58 };
59 
60 // -------------------------------------------------------------------------
61 
62 class HTMLMenuElementImpl : public HTMLElementImpl
63 {
64 public:
HTMLMenuElementImpl(DocumentImpl * doc)65     HTMLMenuElementImpl(DocumentImpl *doc) : HTMLElementImpl(doc) {}
~HTMLMenuElementImpl()66     virtual ~HTMLMenuElementImpl() {}
67 
68     Id id() const override;
69 };
70 
71 // -------------------------------------------------------------------------
72 
73 class HTMLOListElementImpl : public HTMLUListElementImpl
74 {
75 public:
HTMLOListElementImpl(DocumentImpl * doc)76     HTMLOListElementImpl(DocumentImpl *doc)
77         : HTMLUListElementImpl(doc), _start(1) {}
78 
79     Id id() const override;
80     void parseAttribute(AttributeImpl *) override;
81 
start()82     int start() const override
83     {
84         return _start;
85     }
86 private:
87     int _start;
88 };
89 
90 // -------------------------------------------------------------------------
91 
92 class HTMLLIElementImpl : public HTMLElementImpl
93 {
94 public:
HTMLLIElementImpl(DocumentImpl * doc)95     HTMLLIElementImpl(DocumentImpl *doc)
96         : HTMLElementImpl(doc) {}
97 
98     Id id() const override;
99     void parseAttribute(AttributeImpl *attr) override;
100     void attach() override;
101 };
102 
103 // -------------------------------------------------------------------------
104 
105 class HTMLDListElementImpl : public HTMLElementImpl
106 {
107 public:
HTMLDListElementImpl(DocumentImpl * doc)108     HTMLDListElementImpl(DocumentImpl *doc) : HTMLElementImpl(doc) {}
~HTMLDListElementImpl()109     virtual ~HTMLDListElementImpl() {}
110 
111     Id id() const override;
112 };
113 
114 } //namespace
115 
116 #endif
117