File indexing completed on 2024-04-28 15:23:02

0001 /*
0002  * This file is part of the DOM implementation for KDE.
0003  *
0004  * Copyright 1999 Lars Knoll (knoll@kde.org)
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Library General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Library General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Library General Public License
0017  * along with this library; see the file COPYING.LIB.  If not, write to
0018  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0019  * Boston, MA 02110-1301, USA.
0020  *
0021  * This file includes excerpts from the Document Object Model (DOM)
0022  * Level 1 Specification (Recommendation)
0023  * https://www.w3.org/TR/REC-DOM-Level-1/
0024  * Copyright © World Wide Web Consortium , (Massachusetts Institute of
0025  * Technology , Institut National de Recherche en Informatique et en
0026  * Automatique , Keio University ). All Rights Reserved.
0027  *
0028  */
0029 #ifndef HTML_LIST_H
0030 #define HTML_LIST_H
0031 
0032 #include <khtml_export.h>
0033 #include <dom/html_element.h>
0034 
0035 namespace DOM
0036 {
0037 
0038 class HTMLDListElementImpl;
0039 class HTMLUListElementImpl;
0040 class HTMLOListElementImpl;
0041 class HTMLDirectoryElementImpl;
0042 class HTMLMenuElementImpl;
0043 class HTMLLIElementImpl;
0044 
0045 class DOMString;
0046 
0047 /**
0048  * Definition list. See the <a
0049  * href="https://www.w3.org/TR/REC-html40/struct/lists.html#edef-DL">
0050  * DL element definition </a> in HTML 4.0.
0051  *
0052  */
0053 class KHTML_EXPORT HTMLDListElement : public HTMLElement
0054 {
0055 public:
0056     HTMLDListElement();
0057     HTMLDListElement(const HTMLDListElement &other);
0058     HTMLDListElement(const Node &other) : HTMLElement()
0059     {
0060         (*this) = other;
0061     }
0062 protected:
0063     HTMLDListElement(HTMLDListElementImpl *impl);
0064 public:
0065 
0066     HTMLDListElement &operator = (const HTMLDListElement &other);
0067     HTMLDListElement &operator = (const Node &other);
0068 
0069     ~HTMLDListElement();
0070 
0071     /**
0072      * Reduce spacing between list items. See the <a
0073      * href="https://www.w3.org/TR/REC-html40/struct/lists.html#adef-compact">
0074      * compact attribute definition </a> in HTML 4.0. This attribute
0075      * is deprecated in HTML 4.0.
0076      *
0077      */
0078     bool compact() const;
0079 
0080     /**
0081      * see compact
0082      */
0083     void setCompact(bool);
0084 };
0085 
0086 // --------------------------------------------------------------------------
0087 
0088 /**
0089  * Directory list. See the <a
0090  * href="https://www.w3.org/TR/REC-html40/struct/lists.html#edef-DIR">
0091  * DIR element definition </a> in HTML 4.0. This element is deprecated
0092  * in HTML 4.0.
0093  *
0094  */
0095 class KHTML_EXPORT HTMLDirectoryElement : public HTMLElement
0096 {
0097 public:
0098     HTMLDirectoryElement();
0099     HTMLDirectoryElement(const HTMLDirectoryElement &other);
0100     HTMLDirectoryElement(const Node &other) : HTMLElement()
0101     {
0102         (*this) = other;
0103     }
0104 protected:
0105     HTMLDirectoryElement(HTMLDirectoryElementImpl *impl);
0106 public:
0107 
0108     HTMLDirectoryElement &operator = (const HTMLDirectoryElement &other);
0109     HTMLDirectoryElement &operator = (const Node &other);
0110 
0111     ~HTMLDirectoryElement();
0112 
0113     /**
0114      * Reduce spacing between list items. See the <a
0115      * href="https://www.w3.org/TR/REC-html40/struct/lists.html#adef-compact">
0116      * compact attribute definition </a> in HTML 4.0. This attribute
0117      * is deprecated in HTML 4.0.
0118      *
0119      */
0120     bool compact() const;
0121 
0122     /**
0123      * see compact
0124      */
0125     void setCompact(bool);
0126 };
0127 
0128 // --------------------------------------------------------------------------
0129 
0130 /**
0131  * List item. See the <a
0132  * href="https://www.w3.org/TR/REC-html40/struct/lists.html#edef-LI">
0133  * LI element definition </a> in HTML 4.0.
0134  *
0135  */
0136 class KHTML_EXPORT HTMLLIElement : public HTMLElement
0137 {
0138 public:
0139     HTMLLIElement();
0140     HTMLLIElement(const HTMLLIElement &other);
0141     HTMLLIElement(const Node &other) : HTMLElement()
0142     {
0143         (*this) = other;
0144     }
0145 
0146 protected:
0147     HTMLLIElement(HTMLLIElementImpl *impl);
0148 public:
0149 
0150     HTMLLIElement &operator = (const HTMLLIElement &other);
0151     HTMLLIElement &operator = (const Node &other);
0152 
0153     ~HTMLLIElement();
0154 
0155     /**
0156      * List item bullet style. See the <a
0157      * href="https://www.w3.org/TR/REC-html40/struct/lists.html#adef-type-LI">
0158      * type attribute definition </a> in HTML 4.0. This attribute is
0159      * deprecated in HTML 4.0.
0160      *
0161      */
0162     DOMString type() const;
0163 
0164     /**
0165      * see type
0166      */
0167     void setType(const DOMString &);
0168 
0169     /**
0170      * Reset sequence number when used in \c OL See the <a
0171      * href="https://www.w3.org/TR/REC-html40/struct/lists.html#adef-value-LI">
0172      * value attribute definition </a> in HTML 4.0. This attribute is
0173      * deprecated in HTML 4.0.
0174      *
0175      */
0176     long value() const;
0177 
0178     /**
0179      * see value
0180      */
0181     void setValue(long);
0182 };
0183 
0184 // --------------------------------------------------------------------------
0185 
0186 /**
0187  * Menu list. See the <a
0188  * href="https://www.w3.org/TR/REC-html40/struct/lists.html#edef-MENU">
0189  * MENU element definition </a> in HTML 4.0. This element is
0190  * deprecated in HTML 4.0.
0191  *
0192  */
0193 class KHTML_EXPORT HTMLMenuElement : public HTMLElement
0194 {
0195 public:
0196     HTMLMenuElement();
0197     HTMLMenuElement(const HTMLMenuElement &other);
0198     HTMLMenuElement(const Node &other) : HTMLElement()
0199     {
0200         (*this) = other;
0201     }
0202 
0203 protected:
0204     HTMLMenuElement(HTMLMenuElementImpl *impl);
0205 public:
0206 
0207     HTMLMenuElement &operator = (const HTMLMenuElement &other);
0208     HTMLMenuElement &operator = (const Node &other);
0209 
0210     ~HTMLMenuElement();
0211 
0212     /**
0213      * Reduce spacing between list items. See the <a
0214      * href="https://www.w3.org/TR/REC-html40/struct/lists.html#adef-compact">
0215      * compact attribute definition </a> in HTML 4.0. This attribute
0216      * is deprecated in HTML 4.0.
0217      *
0218      */
0219     bool compact() const;
0220 
0221     /**
0222      * see compact
0223      */
0224     void setCompact(bool);
0225 };
0226 
0227 // --------------------------------------------------------------------------
0228 
0229 /**
0230  * Ordered list. See the <a
0231  * href="https://www.w3.org/TR/REC-html40/struct/lists.html#edef-OL">
0232  * OL element definition </a> in HTML 4.0.
0233  *
0234  */
0235 class KHTML_EXPORT HTMLOListElement : public HTMLElement
0236 {
0237 public:
0238     HTMLOListElement();
0239     HTMLOListElement(const HTMLOListElement &other);
0240     HTMLOListElement(const Node &other) : HTMLElement()
0241     {
0242         (*this) = other;
0243     }
0244 protected:
0245     HTMLOListElement(HTMLOListElementImpl *impl);
0246 public:
0247 
0248     HTMLOListElement &operator = (const HTMLOListElement &other);
0249     HTMLOListElement &operator = (const Node &other);
0250 
0251     ~HTMLOListElement();
0252 
0253     /**
0254      * Reduce spacing between list items. See the <a
0255      * href="https://www.w3.org/TR/REC-html40/struct/lists.html#adef-compact">
0256      * compact attribute definition </a> in HTML 4.0. This attribute
0257      * is deprecated in HTML 4.0.
0258      *
0259      */
0260     bool compact() const;
0261 
0262     /**
0263      * see compact
0264      */
0265     void setCompact(bool);
0266 
0267     /**
0268      * Starting sequence number. See the <a
0269      * href="https://www.w3.org/TR/REC-html40/struct/lists.html#adef-start">
0270      * start attribute definition </a> in HTML 4.0. This attribute is
0271      * deprecated in HTML 4.0.
0272      *
0273      */
0274     long start() const;
0275 
0276     /**
0277      * see start
0278      */
0279     void setStart(long);
0280 
0281     /**
0282      * Numbering style. See the <a
0283      * href="https://www.w3.org/TR/REC-html40/struct/lists.html#adef-type-OL">
0284      * type attribute definition </a> in HTML 4.0. This attribute is
0285      * deprecated in HTML 4.0.
0286      *
0287      */
0288     DOMString type() const;
0289 
0290     /**
0291      * see type
0292      */
0293     void setType(const DOMString &);
0294 };
0295 
0296 // --------------------------------------------------------------------------
0297 
0298 /**
0299  * Unordered list. See the <a
0300  * href="https://www.w3.org/TR/REC-html40/struct/lists.html#edef-UL">
0301  * UL element definition </a> in HTML 4.0.
0302  *
0303  */
0304 class KHTML_EXPORT HTMLUListElement : public HTMLElement
0305 {
0306 public:
0307     HTMLUListElement();
0308     HTMLUListElement(const HTMLUListElement &other);
0309     HTMLUListElement(const Node &other) : HTMLElement()
0310     {
0311         (*this) = other;
0312     }
0313 protected:
0314     HTMLUListElement(HTMLUListElementImpl *impl);
0315 public:
0316 
0317     HTMLUListElement &operator = (const HTMLUListElement &other);
0318     HTMLUListElement &operator = (const Node &other);
0319 
0320     ~HTMLUListElement();
0321 
0322     /**
0323      * Reduce spacing between list items. See the <a
0324      * href="https://www.w3.org/TR/REC-html40/struct/lists.html#adef-compact">
0325      * compact attribute definition </a> in HTML 4.0. This attribute
0326      * is deprecated in HTML 4.0.
0327      *
0328      */
0329     bool compact() const;
0330 
0331     /**
0332      * see compact
0333      */
0334     void setCompact(bool);
0335 
0336     /**
0337      * Bullet style. See the <a
0338      * href="https://www.w3.org/TR/REC-html40/struct/lists.html#adef-type-UL">
0339      * type attribute definition </a> in HTML 4.0. This attribute is
0340      * deprecated in HTML 4.0.
0341      *
0342      */
0343     DOMString type() const;
0344 
0345     /**
0346      * see type
0347      */
0348     void setType(const DOMString &);
0349 };
0350 
0351 } //namespace
0352 
0353 #endif