KHtml

html_inline.h
1 /*
2  * This file is part of the DOM implementation for KDE.
3  *
4  * Copyright 1999 Lars Knoll ([email protected])
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * This file includes excerpts from the Document Object Model (DOM)
22  * Level 1 Specification (Recommendation)
23  * https://www.w3.org/TR/REC-DOM-Level-1/
24  * Copyright © World Wide Web Consortium , (Massachusetts Institute of
25  * Technology , Institut National de Recherche en Informatique et en
26  * Automatique , Keio University ). All Rights Reserved.
27  *
28  */
29 #ifndef HTML_INLINE_H
30 #define HTML_INLINE_H
31 
32 #include <khtml_export.h>
33 #include <dom/html_element.h>
34 
35 namespace DOM
36 {
37 class HTMLGenericElementImpl;
38 class HTMLAnchorElementImpl;
39 class DOMString;
40 
41 /**
42  * The anchor element. See the <a
43  * href="https://www.w3.org/TR/REC-html40/struct/links.html#edef-A"> A
44  * element definition </a> in HTML 4.0.
45  *
46  */
47 class KHTML_EXPORT HTMLAnchorElement : public HTMLElement
48 {
49 public:
52  HTMLAnchorElement(const Node &other) : HTMLElement()
53  {
54  (*this) = other;
55  }
56 protected:
57  HTMLAnchorElement(HTMLAnchorElementImpl *impl);
58 public:
59 
60  HTMLAnchorElement &operator = (const HTMLAnchorElement &other);
61  HTMLAnchorElement &operator = (const Node &other);
62 
64 
65  /**
66  * A single character access key to give access to the form
67  * control. See the <a
68  * href="https://www.w3.org/TR/REC-html40/interact/forms.html#adef-accesskey">
69  * accesskey attribute definition </a> in HTML 4.0.
70  *
71  */
72  DOMString accessKey() const;
73 
74  /**
75  * see accessKey
76  */
77  void setAccessKey(const DOMString &);
78 
79  /**
80  * The character encoding of the linked resource. See the <a
81  * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-charset">
82  * charset attribute definition </a> in HTML 4.0.
83  *
84  */
85  DOMString charset() const;
86 
87  /**
88  * see charset
89  */
90  void setCharset(const DOMString &);
91 
92  /**
93  * Comma-separated list of lengths, defining an active region
94  * geometry. See also \c shape for the shape of the
95  * region. See the <a
96  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-coords">
97  * coords attribute definition </a> in HTML 4.0.
98  *
99  */
100  DOMString coords() const;
101 
102  /**
103  * see coords
104  */
105  void setCoords(const DOMString &);
106 
107  /**
108  * The URI of the linked resource. See the <a
109  * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-href">
110  * href attribute definition </a> in HTML 4.0.
111  *
112  */
113  DOMString href() const;
114 
115  /**
116  * see href
117  */
118  void setHref(const DOMString &);
119 
120  /**
121  * Language code of the linked resource. See the <a
122  * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-hreflang">
123  * hreflang attribute definition </a> in HTML 4.0.
124  *
125  */
126  DOMString hreflang() const;
127 
128  /**
129  * see hreflang
130  */
131  void setHreflang(const DOMString &);
132 
133  /**
134  * Anchor name. See the <a
135  * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-name-A">
136  * name attribute definition </a> in HTML 4.0.
137  *
138  */
139  DOMString name() const;
140 
141  /**
142  * see name
143  */
144  void setName(const DOMString &);
145 
146  /**
147  * Forward link type. See the <a
148  * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-rel">
149  * rel attribute definition </a> in HTML 4.0.
150  *
151  */
152  DOMString rel() const;
153 
154  /**
155  * see rel
156  */
157  void setRel(const DOMString &);
158 
159  /**
160  * Reverse link type. See the <a
161  * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-rev">
162  * rev attribute definition </a> in HTML 4.0.
163  *
164  */
165  DOMString rev() const;
166 
167  /**
168  * see rev
169  */
170  void setRev(const DOMString &);
171 
172  /**
173  * The shape of the active area. The coordinates are given by
174  * \c coords . See the <a
175  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-shape">
176  * shape attribute definition </a> in HTML 4.0.
177  *
178  */
179  DOMString shape() const;
180 
181  /**
182  * see shape
183  */
184  void setShape(const DOMString &);
185 
186  /**
187  * Index that represents the element's position in the tabbing
188  * order. See the <a
189  * href="https://www.w3.org/TR/REC-html40/interact/forms.html#adef-tabindex">
190  * tabindex attribute definition </a> in HTML 4.0.
191  *
192  */
193  long tabIndex() const;
194 
195  /**
196  * see tabIndex
197  */
198  void setTabIndex(long);
199 
200  /**
201  * Frame to render the resource in. See the <a
202  * href="https://www.w3.org/TR/REC-html40/present/frames.html#adef-target">
203  * target attribute definition </a> in HTML 4.0.
204  *
205  */
206  DOMString target() const;
207 
208  /**
209  * see target
210  */
211  void setTarget(const DOMString &);
212 
213  /**
214  * Advisory content type. See the <a
215  * href="https://www.w3.org/TR/REC-html40/struct/links.html#adef-type-A">
216  * type attribute definition </a> in HTML 4.0.
217  *
218  */
219  DOMString type() const;
220 
221  /**
222  * see type
223  */
224  void setType(const DOMString &);
225 
226  /**
227  * Removes keyboard focus from this element.
228  *
229  * @return
230  *
231  */
232  void blur();
233 
234  /**
235  * Gives keyboard focus to this element.
236  *
237  * @return
238  *
239  */
240  void focus();
241 };
242 
243 // --------------------------------------------------------------------------
244 
245 class HTMLBRElementImpl;
246 
247 /**
248  * Force a line break. See the <a
249  * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-BR"> BR
250  * element definition </a> in HTML 4.0.
251  *
252  */
253 class KHTML_EXPORT HTMLBRElement : public HTMLElement
254 {
255 public:
256  HTMLBRElement();
257  HTMLBRElement(const HTMLBRElement &other);
258  HTMLBRElement(const Node &other) : HTMLElement()
259  {
260  (*this) = other;
261  }
262 protected:
263  HTMLBRElement(HTMLBRElementImpl *impl);
264 public:
265 
266  HTMLBRElement &operator = (const HTMLBRElement &other);
267  HTMLBRElement &operator = (const Node &other);
268 
269  ~HTMLBRElement();
270 
271  /**
272  * Control flow of text around floats. See the <a
273  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-clear">
274  * clear attribute definition </a> in HTML 4.0. This attribute is
275  * deprecated in HTML 4.0.
276  *
277  */
278  DOMString clear() const;
279 
280  /**
281  * see clear
282  */
283  void setClear(const DOMString &);
284 };
285 
286 // --------------------------------------------------------------------------
287 
288 class HTMLFontElementImpl;
289 class DOMString;
290 
291 /**
292  * Local change to font. See the <a
293  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#edef-FONT">
294  * FONT element definition </a> in HTML 4.0. This element is
295  * deprecated in HTML 4.0.
296  *
297  */
298 class KHTML_EXPORT HTMLFontElement : public HTMLElement
299 {
300 public:
301  HTMLFontElement();
302  HTMLFontElement(const HTMLFontElement &other);
303  HTMLFontElement(const Node &other) : HTMLElement()
304  {
305  (*this) = other;
306  }
307 protected:
308  HTMLFontElement(HTMLFontElementImpl *impl);
309 public:
310 
311  HTMLFontElement &operator = (const HTMLFontElement &other);
312  HTMLFontElement &operator = (const Node &other);
313 
314  ~HTMLFontElement();
315 
316  /**
317  * Font color. See the <a
318  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-color-FONT">
319  * color attribute definition </a> in HTML 4.0. This attribute is
320  * deprecated in HTML 4.0.
321  *
322  */
323  DOMString color() const;
324 
325  /**
326  * see color
327  */
328  void setColor(const DOMString &);
329 
330  /**
331  * Font face identifier. See the <a
332  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-face-FONT">
333  * face attribute definition </a> in HTML 4.0. This attribute is
334  * deprecated in HTML 4.0.
335  *
336  */
337  DOMString face() const;
338 
339  /**
340  * see face
341  */
342  void setFace(const DOMString &);
343 
344  /**
345  * Font size. See the <a
346  * href="https://www.w3.org/TR/REC-html40/present/graphics.html#adef-size-FONT">
347  * size attribute definition </a> in HTML 4.0. This attribute is
348  * deprecated in HTML 4.0.
349  *
350  */
351  DOMString size() const;
352 
353  /**
354  * see size
355  */
356  void setSize(const DOMString &);
357 };
358 
359 class DOMString;
360 
361 /**
362  * Notice of modification to part of a document. See the <a
363  * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-ins">
364  * INS </a> and <a
365  * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-del">
366  * DEL </a> element definitions in HTML 4.0.
367  *
368  */
369 class KHTML_EXPORT HTMLModElement : public HTMLElement
370 {
371 public:
372  HTMLModElement();
373  HTMLModElement(const HTMLModElement &other);
374  HTMLModElement(const Node &other) : HTMLElement()
375  {
376  (*this) = other;
377  }
378 protected:
379  HTMLModElement(HTMLElementImpl *impl);
380 public:
381 
382  HTMLModElement &operator = (const HTMLModElement &other);
383  HTMLModElement &operator = (const Node &other);
384 
385  ~HTMLModElement();
386 
387  /**
388  * A URI designating a document that describes the reason for the
389  * change. See the <a href="https://www.w3.org/TR/REC-html40/">
390  * cite attribute definition </a> in HTML 4.0.
391  *
392  */
393  DOMString cite() const;
394 
395  /**
396  * see cite
397  */
398  void setCite(const DOMString &);
399 
400  /**
401  * The date and time of the change. See the <a
402  * href="https://www.w3.org/TR/REC-html40/struct/text.html#adef-datetime">
403  * datetime attribute definition </a> in HTML 4.0.
404  *
405  */
406  DOMString dateTime() const;
407 
408  /**
409  * see dateTime
410  */
411  void setDateTime(const DOMString &);
412 };
413 
414 // --------------------------------------------------------------------------
415 
416 /**
417  * For the \c Q and \c BLOCKQUOTE elements.
418  * See the <a
419  * href="https://www.w3.org/TR/REC-html40/struct/text.html#edef-Q"> Q
420  * element definition </a> in HTML 4.0.
421  *
422  * Note: The DOM is not quite consistent here. They also define the
423  * HTMLBlockQuoteElement interface, to represent the \c BLOCKQUOTE
424  * element. To resolve ambiquities, we use this one for the \c Q
425  * element only.
426  */
427 class KHTML_EXPORT HTMLQuoteElement : public HTMLElement
428 {
429 public:
431  HTMLQuoteElement(const HTMLQuoteElement &other);
432  HTMLQuoteElement(const Node &other) : HTMLElement()
433  {
434  (*this) = other;
435  }
436 protected:
437  HTMLQuoteElement(HTMLGenericElementImpl *impl);
438 public:
439 
440  HTMLQuoteElement &operator = (const HTMLQuoteElement &other);
441  HTMLQuoteElement &operator = (const Node &other);
442 
443  ~HTMLQuoteElement();
444 
445  /**
446  * A URI designating a document that designates a source document
447  * or message. See the <a
448  * href="https://www.w3.org/TR/REC-html40/struct/text.html#adef-cite-Q">
449  * cite attribute definition </a> in HTML 4.0.
450  *
451  */
452  DOMString cite() const;
453 
454  /**
455  * see cite
456  */
457  void setCite(const DOMString &);
458 };
459 
460 } //namespace
461 
462 #endif
All HTML element interfaces derive from this class.
Definition: html_element.h:70
For the Q and BLOCKQUOTE elements.
Definition: html_inline.h:427
This library provides a full-featured HTML parser and widget.
Force a line break.
Definition: html_inline.h:253
Local change to font.
Definition: html_inline.h:298
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:278
void setTarget(const SkyPoint &targetCoord)
The anchor element.
Definition: html_inline.h:47
Notice of modification to part of a document.
Definition: html_inline.h:369
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:55:32 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.