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

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_TABLE_H
0030 #define HTML_TABLE_H
0031 
0032 // --------------------------------------------------------------------------
0033 #include <khtml_export.h>
0034 #include <dom/html_element.h>
0035 
0036 namespace DOM
0037 {
0038 
0039 class HTMLTableCaptionElementImpl;
0040 class DOMString;
0041 
0042 /**
0043  * Table caption See the <a
0044  * href="https://www.w3.org/TR/REC-html40/struct/tables.html#edef-CAPTION">
0045  * CAPTION element definition </a> in HTML 4.0.
0046  *
0047  */
0048 class KHTML_EXPORT HTMLTableCaptionElement : public HTMLElement
0049 {
0050     friend class HTMLTableElement;
0051 
0052 public:
0053     HTMLTableCaptionElement();
0054     HTMLTableCaptionElement(const HTMLTableCaptionElement &other);
0055     HTMLTableCaptionElement(const Node &other) : HTMLElement()
0056     {
0057         (*this) = other;
0058     }
0059 protected:
0060     HTMLTableCaptionElement(HTMLTableCaptionElementImpl *impl);
0061 public:
0062 
0063     HTMLTableCaptionElement &operator = (const HTMLTableCaptionElement &other);
0064     HTMLTableCaptionElement &operator = (const Node &other);
0065 
0066     ~HTMLTableCaptionElement();
0067 
0068     /**
0069      * Caption alignment with respect to the table. See the <a
0070      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-align-CAPTION">
0071      * align attribute definition </a> in HTML 4.0. This attribute is
0072      * deprecated in HTML 4.0.
0073      *
0074      */
0075     DOMString align() const;
0076 
0077     /**
0078      * see align
0079      */
0080     void setAlign(const DOMString &);
0081 };
0082 
0083 // --------------------------------------------------------------------------
0084 
0085 class HTMLTableCellElementImpl;
0086 
0087 /**
0088  * The object used to represent the \c TH and \c TD
0089  * elements. See the <a
0090  * href="https://www.w3.org/TR/REC-html40/struct/tables.html#edef-TD">
0091  * TD element definition </a> in HTML 4.0.
0092  *
0093  */
0094 class KHTML_EXPORT HTMLTableCellElement : public HTMLElement
0095 {
0096     friend class HTMLTableElement;
0097 
0098 public:
0099     HTMLTableCellElement();
0100     HTMLTableCellElement(const HTMLTableCellElement &other);
0101     HTMLTableCellElement(const Node &other) : HTMLElement()
0102     {
0103         (*this) = other;
0104     }
0105 protected:
0106     HTMLTableCellElement(HTMLTableCellElementImpl *impl);
0107 public:
0108 
0109     HTMLTableCellElement &operator = (const HTMLTableCellElement &other);
0110     HTMLTableCellElement &operator = (const Node &other);
0111 
0112     ~HTMLTableCellElement();
0113 
0114     /**
0115      * The index of this cell in the row.
0116      *
0117      */
0118     long cellIndex() const;
0119 
0120     /**
0121      * see cellIndex
0122      *
0123      * This function is obsolete - the cellIndex property is actually supposed to be read-only
0124      * (https://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html)
0125      */
0126     void setCellIndex(long);
0127 
0128     /**
0129      * Abbreviation for header cells. See the <a
0130      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-abbr">
0131      * abbr attribute definition </a> in HTML 4.0.
0132      *
0133      */
0134     DOMString abbr() const;
0135 
0136     /**
0137      * see abbr
0138      */
0139     void setAbbr(const DOMString &);
0140 
0141     /**
0142      * Horizontal alignment of data in cell. See the <a
0143      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-align-TD">
0144      * align attribute definition </a> in HTML 4.0.
0145      *
0146      */
0147     DOMString align() const;
0148 
0149     /**
0150      * see align
0151      */
0152     void setAlign(const DOMString &);
0153 
0154     /**
0155      * Names group of related headers. See the <a
0156      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-axis">
0157      * axis attribute definition </a> in HTML 4.0.
0158      *
0159      */
0160     DOMString axis() const;
0161 
0162     /**
0163      * see axis
0164      */
0165     void setAxis(const DOMString &);
0166 
0167     /**
0168      * Cell background color. See the <a
0169      * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-bgcolor">
0170      * bgcolor attribute definition </a> in HTML 4.0. This attribute
0171      * is deprecated in HTML 4.0.
0172      *
0173      */
0174     DOMString bgColor() const;
0175 
0176     /**
0177      * see bgColor
0178      */
0179     void setBgColor(const DOMString &);
0180 
0181     /**
0182      * Alignment character for cells in a column. See the <a
0183      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-char">
0184      * char attribute definition </a> in HTML 4.0.
0185      *
0186      */
0187     DOMString ch() const;
0188 
0189     /**
0190      * see ch
0191      */
0192     void setCh(const DOMString &);
0193 
0194     /**
0195      * Offset of alignment character. See the <a
0196      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-charoff">
0197      * charoff attribute definition </a> in HTML 4.0.
0198      *
0199      */
0200     DOMString chOff() const;
0201 
0202     /**
0203      * see chOff
0204      */
0205     void setChOff(const DOMString &);
0206 
0207     /**
0208      * Number of columns spanned by cell. See the <a
0209      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-colspan">
0210      * colspan attribute definition </a> in HTML 4.0.
0211      *
0212      */
0213     long colSpan() const;
0214 
0215     /**
0216      * see colSpan
0217      */
0218     void setColSpan(long);
0219 
0220     /**
0221      * List of \c id attribute values for header cells.
0222      * See the <a
0223      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-headers">
0224      * headers attribute definition </a> in HTML 4.0.
0225      *
0226      */
0227     DOMString headers() const;
0228 
0229     /**
0230      * see headers
0231      */
0232     void setHeaders(const DOMString &);
0233 
0234     /**
0235      * Cell height. See the <a
0236      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-height-TH">
0237      * height attribute definition </a> in HTML 4.0. This attribute is
0238      * deprecated in HTML 4.0.
0239      *
0240      */
0241     DOMString height() const;
0242 
0243     /**
0244      * see height
0245      */
0246     void setHeight(const DOMString &);
0247 
0248     /**
0249      * Suppress word wrapping. See the <a
0250      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-nowrap">
0251      * nowrap attribute definition </a> in HTML 4.0. This attribute is
0252      * deprecated in HTML 4.0.
0253      *
0254      */
0255     bool noWrap() const;
0256 
0257     /**
0258      * see noWrap
0259      */
0260     void setNoWrap(bool);
0261 
0262     /**
0263      * Number of rows spanned by cell. See the <a
0264      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-rowspan">
0265      * rowspan attribute definition </a> in HTML 4.0.
0266      *
0267      */
0268     long rowSpan() const;
0269 
0270     /**
0271      * see rowSpan
0272      */
0273     void setRowSpan(long);
0274 
0275     /**
0276      * Scope covered by header cells. See the <a
0277      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-scope">
0278      * scope attribute definition </a> in HTML 4.0.
0279      *
0280      */
0281     DOMString scope() const;
0282 
0283     /**
0284      * see scope
0285      */
0286     void setScope(const DOMString &);
0287 
0288     /**
0289      * Vertical alignment of data in cell. See the <a
0290      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-valign">
0291      * valign attribute definition </a> in HTML 4.0.
0292      *
0293      */
0294     DOMString vAlign() const;
0295 
0296     /**
0297      * see vAlign
0298      */
0299     void setVAlign(const DOMString &);
0300 
0301     /**
0302      * Cell width. See the <a
0303      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-width-TH">
0304      * width attribute definition </a> in HTML 4.0. This attribute is
0305      * deprecated in HTML 4.0.
0306      *
0307      */
0308     DOMString width() const;
0309 
0310     /**
0311      * see width
0312      */
0313     void setWidth(const DOMString &);
0314 };
0315 
0316 // --------------------------------------------------------------------------
0317 
0318 class HTMLTableColElementImpl;
0319 
0320 /**
0321  * Regroups the \c COL and \c COLGROUP
0322  * elements. See the <a
0323  * href="https://www.w3.org/TR/REC-html40/struct/tables.html#edef-COL">
0324  * COL element definition </a> in HTML 4.0.
0325  *
0326  */
0327 class KHTML_EXPORT HTMLTableColElement : public HTMLElement
0328 {
0329     friend class HTMLTableElement;
0330 
0331 public:
0332     HTMLTableColElement();
0333     HTMLTableColElement(const HTMLTableColElement &other);
0334     HTMLTableColElement(const Node &other) : HTMLElement()
0335     {
0336         (*this) = other;
0337     }
0338 protected:
0339     HTMLTableColElement(HTMLTableColElementImpl *impl);
0340 public:
0341 
0342     HTMLTableColElement &operator = (const HTMLTableColElement &other);
0343     HTMLTableColElement &operator = (const Node &other);
0344 
0345     ~HTMLTableColElement();
0346 
0347     /**
0348      * Horizontal alignment of cell data in column. See the <a
0349      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-align-TD">
0350      * align attribute definition </a> in HTML 4.0.
0351      *
0352      */
0353     DOMString align() const;
0354 
0355     /**
0356      * see align
0357      */
0358     void setAlign(const DOMString &);
0359 
0360     /**
0361      * Alignment character for cells in a column. See the <a
0362      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-char">
0363      * char attribute definition </a> in HTML 4.0.
0364      *
0365      */
0366     DOMString ch() const;
0367 
0368     /**
0369      * see ch
0370      */
0371     void setCh(const DOMString &);
0372 
0373     /**
0374      * Offset of alignment character. See the <a
0375      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-charoff">
0376      * charoff attribute definition </a> in HTML 4.0.
0377      *
0378      */
0379     DOMString chOff() const;
0380 
0381     /**
0382      * see chOff
0383      */
0384     void setChOff(const DOMString &);
0385 
0386     /**
0387      * Indicates the number of columns in a group or affected by a
0388      * grouping. See the <a
0389      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-span-COL">
0390      * span attribute definition </a> in HTML 4.0.
0391      *
0392      */
0393     long span() const;
0394 
0395     /**
0396      * see span
0397      */
0398     void setSpan(long);
0399 
0400     /**
0401      * Vertical alignment of cell data in column. See the <a
0402      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-valign">
0403      * valign attribute definition </a> in HTML 4.0.
0404      *
0405      */
0406     DOMString vAlign() const;
0407 
0408     /**
0409      * see vAlign
0410      */
0411     void setVAlign(const DOMString &);
0412 
0413     /**
0414      * Default column width. See the <a
0415      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-width-COL">
0416      * width attribute definition </a> in HTML 4.0.
0417      *
0418      */
0419     DOMString width() const;
0420 
0421     /**
0422      * see width
0423      */
0424     void setWidth(const DOMString &);
0425 };
0426 
0427 // --------------------------------------------------------------------------
0428 
0429 class HTMLTableElementImpl;
0430 class HTMLCollection;
0431 class HTMLTableSectionElement;
0432 class HTMLTableCaptionElement;
0433 class HTMLElement;
0434 class DOMString;
0435 
0436 /**
0437  * The create* and delete* methods on the table allow authors to
0438  * construct and modify tables. HTML 4.0 specifies that only one of
0439  * each of the \c CAPTION , \c THEAD , and
0440  * \c TFOOT elements may exist in a table. Therefore, if
0441  * one exists, and the createTHead() or createTFoot() method is
0442  * called, the method returns the existing THead or TFoot element. See
0443  * the <a
0444  * href="https://www.w3.org/TR/REC-html40/struct/tables.html#edef-TABLE">
0445  * TABLE element definition </a> in HTML 4.0.
0446  *
0447  */
0448 class KHTML_EXPORT HTMLTableElement : public HTMLElement
0449 {
0450 public:
0451     HTMLTableElement();
0452     HTMLTableElement(const HTMLTableElement &other);
0453     HTMLTableElement(const Node &other) : HTMLElement()
0454     {
0455         (*this) = other;
0456     }
0457 
0458 protected:
0459     HTMLTableElement(HTMLTableElementImpl *impl);
0460 public:
0461 
0462     HTMLTableElement &operator = (const HTMLTableElement &other);
0463     HTMLTableElement &operator = (const Node &other);
0464 
0465     ~HTMLTableElement();
0466 
0467     /**
0468      * Returns the table's \c CAPTION , or void if none
0469      * exists.
0470      *
0471      */
0472     HTMLTableCaptionElement caption() const;
0473 
0474     /**
0475      * see caption
0476      */
0477     void setCaption(const HTMLTableCaptionElement &);
0478 
0479     /**
0480      * Returns the table's \c THEAD , or \c null
0481      * if none exists.
0482      *
0483      */
0484     HTMLTableSectionElement tHead() const;
0485 
0486     /**
0487      * see tHead
0488      */
0489     void setTHead(const HTMLTableSectionElement &);
0490 
0491     /**
0492      * Returns the table's \c TFOOT , or \c null
0493      * if none exists.
0494      *
0495      */
0496     HTMLTableSectionElement tFoot() const;
0497 
0498     /**
0499      * see tFoot
0500      */
0501     void setTFoot(const HTMLTableSectionElement &);
0502 
0503     /**
0504      * Returns a collection of all the rows in the table, including
0505      * all in \c THEAD , \c TFOOT , all
0506      * \c TBODY elements.
0507      *
0508      */
0509     HTMLCollection rows() const;
0510 
0511     /**
0512      * Returns a collection of the table bodies (including implicit ones).
0513      *
0514      */
0515     HTMLCollection tBodies() const;
0516 
0517     /**
0518      * Specifies the table's position with respect to the rest of the
0519      * document. See the <a
0520      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-align-TABLE">
0521      * align attribute definition </a> in HTML 4.0. This attribute is
0522      * deprecated in HTML 4.0.
0523      *
0524      */
0525     DOMString align() const;
0526 
0527     /**
0528      * see align
0529      */
0530     void setAlign(const DOMString &);
0531 
0532     /**
0533      * Cell background color. See the <a
0534      * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-bgcolor">
0535      * bgcolor attribute definition </a> in HTML 4.0. This attribute
0536      * is deprecated in HTML 4.0.
0537      *
0538      */
0539     DOMString bgColor() const;
0540 
0541     /**
0542      * see bgColor
0543      */
0544     void setBgColor(const DOMString &);
0545 
0546     /**
0547      * The width of the border around the table. See the <a
0548      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-border-TABLE">
0549      * border attribute definition </a> in HTML 4.0.
0550      *
0551      */
0552     DOMString border() const;
0553 
0554     /**
0555      * see border
0556      */
0557     void setBorder(const DOMString &);
0558 
0559     /**
0560      * Specifies the horizontal and vertical space between cell
0561      * content and cell borders. See the <a
0562      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-cellpadding">
0563      * cellpadding attribute definition </a> in HTML 4.0.
0564      *
0565      */
0566     DOMString cellPadding() const;
0567 
0568     /**
0569      * see cellPadding
0570      */
0571     void setCellPadding(const DOMString &);
0572 
0573     /**
0574      * Specifies the horizontal and vertical separation between cells.
0575      * See the <a
0576      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-cellspacing">
0577      * cellspacing attribute definition </a> in HTML 4.0.
0578      *
0579      */
0580     DOMString cellSpacing() const;
0581 
0582     /**
0583      * see cellSpacing
0584      */
0585     void setCellSpacing(const DOMString &);
0586 
0587     /**
0588      * Specifies which external table borders to render. See the <a
0589      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-frame">
0590      * frame attribute definition </a> in HTML 4.0.
0591      *
0592      */
0593     DOMString frame() const;
0594 
0595     /**
0596      * see frame
0597      */
0598     void setFrame(const DOMString &);
0599 
0600     /**
0601      * Specifies which internal table borders to render. See the <a
0602      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-rules">
0603      * rules attribute definition </a> in HTML 4.0.
0604      *
0605      */
0606     DOMString rules() const;
0607 
0608     /**
0609      * see rules
0610      */
0611     void setRules(const DOMString &);
0612 
0613     /**
0614      * Supplementary description about the purpose or structure of a
0615      * table. See the <a
0616      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-summary">
0617      * summary attribute definition </a> in HTML 4.0.
0618      *
0619      */
0620     DOMString summary() const;
0621 
0622     /**
0623      * see summary
0624      */
0625     void setSummary(const DOMString &);
0626 
0627     /**
0628      * Specifies the desired table width. See the <a
0629      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-width-TABLE">
0630      * width attribute definition </a> in HTML 4.0.
0631      *
0632      */
0633     DOMString width() const;
0634 
0635     /**
0636      * see width
0637      */
0638     void setWidth(const DOMString &);
0639 
0640     /**
0641      * Create a table header row or return an existing one.
0642      *
0643      * @return A new table header element ( \c THEAD ).
0644      *
0645      */
0646     HTMLElement createTHead();
0647 
0648     /**
0649      * Delete the header from the table, if one exists.
0650      *
0651      * @return
0652      *
0653      */
0654     void deleteTHead();
0655 
0656     /**
0657      * Create a table footer row or return an existing one.
0658      *
0659      * @return A footer element ( \c TFOOT ).
0660      *
0661      */
0662     HTMLElement createTFoot();
0663 
0664     /**
0665      * Delete the footer from the table, if one exists.
0666      *
0667      * @return
0668      *
0669      */
0670     void deleteTFoot();
0671 
0672     /**
0673      * Create a new table caption object or return an existing one.
0674      *
0675      * @return A \c CAPTION element.
0676      *
0677      */
0678     HTMLElement createCaption();
0679 
0680     /**
0681      * Delete the table caption, if one exists.
0682      *
0683      * @return
0684      *
0685      */
0686     void deleteCaption();
0687 
0688     /**
0689      * Insert a new empty row in the table.
0690      * The new row is inserted immediately before and in the same section
0691      * as the current indexth row in the table. If index is -1 or equal
0692      * to the number of rows, the new row is appended. In addition, when
0693      * the table is empty the row is inserted into a TBODY which is created
0694      * and inserted into the table.
0695      *  Note. A table row cannot
0696      *  be empty according to HTML 4.0 Recommendation.
0697      *
0698      * @param index The row number where to insert a new row.
0699      * The index starts from 0 and is relative to the logical order
0700      * (not document order) of all the rows contained inside the table.
0701      *
0702      * @return The newly created row.
0703      *
0704      */
0705     HTMLElement insertRow(long index);
0706 
0707     /**
0708      * Delete a table row.
0709      *
0710      * @param index The index of the row to be deleted.
0711      * This index starts from 0 and is relative to the logical order
0712      * (not document order) of all the rows contained inside the table.
0713      * If the index is -1 the last row in the table is deleted.
0714      *
0715      * @return
0716      *
0717      */
0718     void deleteRow(long index);
0719 };
0720 
0721 // --------------------------------------------------------------------------
0722 
0723 class HTMLTableRowElementImpl;
0724 class HTMLCollection;
0725 class HTMLElement;
0726 class DOMString;
0727 
0728 /**
0729  * A row in a table. See the <a
0730  * href="https://www.w3.org/TR/REC-html40/struct/tables.html#edef-TR">
0731  * TR element definition </a> in HTML 4.0.
0732  *
0733  */
0734 class KHTML_EXPORT HTMLTableRowElement : public HTMLElement
0735 {
0736     friend class HTMLTableElement;
0737 
0738 public:
0739     HTMLTableRowElement();
0740     HTMLTableRowElement(const HTMLTableRowElement &other);
0741     HTMLTableRowElement(const Node &other) : HTMLElement()
0742     {
0743         (*this) = other;
0744     }
0745 
0746 protected:
0747     HTMLTableRowElement(HTMLTableRowElementImpl *impl);
0748 public:
0749 
0750     HTMLTableRowElement &operator = (const HTMLTableRowElement &other);
0751     HTMLTableRowElement &operator = (const Node &other);
0752 
0753     ~HTMLTableRowElement();
0754 
0755     /**
0756      * The index of this row, relative to the entire table.
0757      * This is in logical order and not in document order.
0758      * The rowIndex does take into account sections
0759      * (THEAD, TFOOT or TBODY) within the table,
0760      * placing THEAD rows first in the index, followed by
0761      * TBODY rows, followed by TFOOT rows.
0762      */
0763     long rowIndex() const;
0764 
0765     /**
0766      * see rowIndex
0767      *
0768      * This function is obsolete - the rowIndex property is actually supposed to be read-only
0769      * (https://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html)
0770      */
0771     void setRowIndex(long);
0772 
0773     /**
0774      * The index of this row, relative to the current section (
0775      * \c THEAD , \c TFOOT , or \c TBODY
0776      * ).
0777      *
0778      */
0779     long sectionRowIndex() const;
0780 
0781     /**
0782      * see sectionRowIndex
0783      *
0784      * This function is obsolete - the sectionRowIndex property is actually supposed to be read-only
0785      * (https://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html)
0786      */
0787     void setSectionRowIndex(long);
0788 
0789     /**
0790      * The collection of cells in this row.
0791      *
0792      */
0793     HTMLCollection cells() const;
0794 
0795     /**
0796      * see cells
0797      *
0798      * This function is obsolete - the cells property is actually supposed to be read-only
0799      * (https://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html)
0800      */
0801     void setCells(const HTMLCollection &);
0802 
0803     /**
0804      * Horizontal alignment of data within cells of this row. See the
0805      * <a
0806      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-align-TD">
0807      * align attribute definition </a> in HTML 4.0.
0808      *
0809      */
0810     DOMString align() const;
0811 
0812     /**
0813      * see align
0814      */
0815     void setAlign(const DOMString &);
0816 
0817     /**
0818      * Background color for rows. See the <a
0819      * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-bgcolor">
0820      * bgcolor attribute definition </a> in HTML 4.0. This attribute
0821      * is deprecated in HTML 4.0.
0822      *
0823      */
0824     DOMString bgColor() const;
0825 
0826     /**
0827      * see bgColor
0828      */
0829     void setBgColor(const DOMString &);
0830 
0831     /**
0832      * Alignment character for cells in a column. See the <a
0833      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-char">
0834      * char attribute definition </a> in HTML 4.0.
0835      *
0836      */
0837     DOMString ch() const;
0838 
0839     /**
0840      * see ch
0841      */
0842     void setCh(const DOMString &);
0843 
0844     /**
0845      * Offset of alignment character. See the <a
0846      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-charoff">
0847      * charoff attribute definition </a> in HTML 4.0.
0848      *
0849      */
0850     DOMString chOff() const;
0851 
0852     /**
0853      * see chOff
0854      */
0855     void setChOff(const DOMString &);
0856 
0857     /**
0858      * Vertical alignment of data within cells of this row. See the <a
0859      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-valign">
0860      * valign attribute definition </a> in HTML 4.0.
0861      *
0862      */
0863     DOMString vAlign() const;
0864 
0865     /**
0866      * see vAlign
0867      */
0868     void setVAlign(const DOMString &);
0869 
0870     /**
0871      * Insert an empty \c TD cell into this row.
0872      * If index is -1 or equal to the number of cells, the new
0873      * cell is appended.
0874      *
0875      * @param index The place to insert the cell.
0876      *
0877      * @return The newly created cell.
0878      *
0879      */
0880     HTMLElement insertCell(long index);
0881 
0882     /**
0883      * Delete a cell from the current row.
0884      *
0885      * @param index The index of the cell to delete, starting from 0.
0886      * If the index is -1 the last cell in the row is deleted.
0887      *
0888      * @return
0889      *
0890      */
0891     void deleteCell(long index);
0892 };
0893 
0894 // --------------------------------------------------------------------------
0895 
0896 class HTMLTableSectionElementImpl;
0897 class HTMLCollection;
0898 class HTMLElement;
0899 class DOMString;
0900 
0901 /**
0902  * The \c THEAD , \c TFOOT , and \c TBODY
0903  * elements.
0904  *
0905  */
0906 class KHTML_EXPORT HTMLTableSectionElement : public HTMLElement
0907 {
0908     friend class HTMLTableElement;
0909 
0910 public:
0911     HTMLTableSectionElement();
0912     HTMLTableSectionElement(const HTMLTableSectionElement &other);
0913     HTMLTableSectionElement(const Node &other) : HTMLElement()
0914     {
0915         (*this) = other;
0916     }
0917 
0918 protected:
0919     HTMLTableSectionElement(HTMLTableSectionElementImpl *impl);
0920 public:
0921 
0922     HTMLTableSectionElement &operator = (const HTMLTableSectionElement &other);
0923     HTMLTableSectionElement &operator = (const Node &other);
0924 
0925     ~HTMLTableSectionElement();
0926 
0927     /**
0928      * Horizontal alignment of data in cells. See the \c align
0929      * attribute for HTMLTheadElement for details.
0930      *
0931      */
0932     DOMString align() const;
0933 
0934     /**
0935      * see align
0936      */
0937     void setAlign(const DOMString &);
0938 
0939     /**
0940      * Alignment character for cells in a column. See the <a
0941      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-char">
0942      * char attribute definition </a> in HTML 4.0.
0943      *
0944      */
0945     DOMString ch() const;
0946 
0947     /**
0948      * see ch
0949      */
0950     void setCh(const DOMString &);
0951 
0952     /**
0953      * Offset of alignment character. See the <a
0954      * href="https://www.w3.org/TR/REC-html40/struct/tables.html#adef-charoff">
0955      * charoff attribute definition </a> in HTML 4.0.
0956      *
0957      */
0958     DOMString chOff() const;
0959 
0960     /**
0961      * see chOff
0962      */
0963     void setChOff(const DOMString &);
0964 
0965     /**
0966      * Vertical alignment of data in cells. See the \c valign
0967      * attribute for HTMLTheadElement for details.
0968      *
0969      */
0970     DOMString vAlign() const;
0971 
0972     /**
0973      * see vAlign
0974      */
0975     void setVAlign(const DOMString &);
0976 
0977     /**
0978      * The collection of rows in this table section.
0979      *
0980      */
0981     HTMLCollection rows() const;
0982 
0983     /**
0984      * Insert a row into this section.
0985      * The new row is inserted immediately before the current indexth
0986      * row in this section. If index is -1 or equal to the number of rows
0987      * in this sectino, the new row is appended.
0988      *
0989      * @param index The row number where to insert a new row.
0990      *
0991      * @return The newly created row.
0992      *
0993      */
0994     HTMLElement insertRow(long index);
0995 
0996     /**
0997      * Delete a row from this section.
0998      *
0999      * @param index The index of the row to be deleted,
1000      * or -1 to delete the last row. This index starts from 0 and is relative only
1001      * to the rows contained inside this section, not all the rows in the table.
1002      *
1003      */
1004     void deleteRow(long index);
1005 };
1006 
1007 } //namespace
1008 
1009 #endif