KHtml

html_object.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 
30 // --------------------------------------------------------------------------
31 
32 #ifndef HTML_OBJECT_H
33 #define HTML_OBJECT_H
34 
35 #include <dom/html_element.h>
36 #include <dom/html_form.h>
37 
38 namespace DOM
39 {
40 
41 class HTMLAppletElementImpl;
42 
43 /**
44  * An embedded Java applet. See the <a
45  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#edef-APPLET">
46  * APPLET element definition </a> in HTML 4.0. This element is
47  * deprecated in HTML 4.0.
48  *
49  */
50 class KHTML_EXPORT HTMLAppletElement : public HTMLElement
51 {
52 public:
55  HTMLAppletElement(const Node &other) : HTMLElement()
56  {
57  (*this) = other;
58  }
59 protected:
60  HTMLAppletElement(HTMLAppletElementImpl *impl);
61 public:
62 
63  HTMLAppletElement &operator = (const HTMLAppletElement &other);
64  HTMLAppletElement &operator = (const Node &other);
65 
67 
68  /**
69  * Aligns this object (vertically or horizontally) with respect to
70  * its surrounding text. See the <a
71  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-align-IMG">
72  * align attribute definition </a> in HTML 4.0. This attribute is
73  * deprecated in HTML 4.0.
74  *
75  */
76  DOMString align() const;
77 
78  /**
79  * see align
80  */
81  void setAlign(const DOMString &);
82 
83  /**
84  * Alternate text for user agents not rendering the normal content
85  * of this element. See the <a
86  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-alt">
87  * alt attribute definition </a> in HTML 4.0. This attribute is
88  * deprecated in HTML 4.0.
89  *
90  */
91  DOMString alt() const;
92 
93  /**
94  * see alt
95  */
96  void setAlt(const DOMString &);
97 
98  /**
99  * Comma-separated archive list. See the <a
100  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-archive-APPLET">
101  * archive attribute definition </a> in HTML 4.0. This attribute
102  * is deprecated in HTML 4.0.
103  *
104  */
105  DOMString archive() const;
106 
107  /**
108  * see archive
109  */
110  void setArchive(const DOMString &);
111 
112  /**
113  * Applet class file. See the <a
114  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-code">
115  * code attribute definition </a> in HTML 4.0. This attribute is
116  * deprecated in HTML 4.0.
117  *
118  */
119  DOMString code() const;
120 
121  /**
122  * see code
123  */
124  void setCode(const DOMString &);
125 
126  /**
127  * Optional base URI for applet. See the <a
128  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-codebase-APPLET">
129  * codebase attribute definition </a> in HTML 4.0. This attribute
130  * is deprecated in HTML 4.0.
131  *
132  */
133  DOMString codeBase() const;
134 
135  /**
136  * see codeBase
137  */
138  void setCodeBase(const DOMString &value);
139 
140  /**
141  * Override height. See the <a
142  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-height-APPLET">
143  * height attribute definition </a> in HTML 4.0. This attribute is
144  * deprecated in HTML 4.0.
145  *
146  */
147  DOMString height() const;
148 
149  /**
150  * see height
151  */
152  void setHeight(const DOMString &);
153 
154  /**
155  * Horizontal space, in pixels, to the left and right of this image, applet,
156  * or object. See the <a
157  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-hspace">
158  * hspace attribute definition </a> in HTML 4.0. This attribute is
159  * deprecated in HTML 4.0.
160  *
161  */
162  long getHspace() const;
163 
164  /**
165  * see hspace
166  */
167  void setHspace(long);
168 
169  /**
170  * @deprecated
171  */
172 #ifndef KHTML_NO_DEPRECATED
173  KHTML_DEPRECATED DOMString hspace() const;
174 #endif
175 
176  /**
177  * @deprecated
178  */
179 #ifndef KHTML_NO_DEPRECATED
180  KHTML_DEPRECATED void setHspace(const DOMString &value);
181 #endif
182 
183  /**
184  * The name of the applet. See the <a
185  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-name-APPLET">
186  * name attribute definition </a> in HTML 4.0. This attribute is
187  * deprecated in HTML 4.0.
188  *
189  */
190  DOMString name() const;
191 
192  /**
193  * see name
194  */
195  void setName(const DOMString &);
196 
197  /**
198  * Serialized applet file. See the <a
199  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-object">
200  * object attribute definition </a> in HTML 4.0. This attribute is
201  * deprecated in HTML 4.0.
202  *
203  */
204  DOMString object() const;
205 
206  /**
207  * see object
208  */
209  void setObject(const DOMString &);
210 
211  /**
212  * Vertical space, in pixels, above and below this image, applet, or object.
213  * See the <a
214  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-vspace">
215  * vspace attribute definition </a> in HTML 4.0. This attribute is
216  * deprecated in HTML 4.0.
217  *
218  */
219  long getVspace() const;
220 
221  /**
222  * see vspace
223  */
224  void setVspace(long);
225 
226  /**
227  * @deprecated
228  */
229 #ifndef KHTML_NO_DEPRECATED
230  KHTML_DEPRECATED DOMString vspace() const;
231 #endif
232 
233  /**
234  * @deprecated
235  */
236 #ifndef KHTML_NO_DEPRECATED
237  KHTML_DEPRECATED void setVspace(const DOMString &);
238 #endif
239 
240  /**
241  * Override width. See the <a
242  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-width-APPLET">
243  * width attribute definition </a> in HTML 4.0. This attribute is
244  * deprecated in HTML 4.0.
245  *
246  */
247  DOMString width() const;
248 
249  /**
250  * see width
251  */
252  void setWidth(const DOMString &);
253 };
254 
255 // --------------------------------------------------------------------------
256 
257 class HTMLObjectElementImpl;
258 
259 /**
260  * Generic embedded object. Note. In principle, all properties on the
261  * object element are read-write but in some environments some
262  * properties may be read-only once the underlying object is
263  * instantiated. See the <a
264  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#edef-OBJECT">
265  * OBJECT element definition </a> in HTML 4.0.
266  *
267  */
268 class KHTML_EXPORT HTMLObjectElement : public HTMLElement
269 {
270 public:
272  HTMLObjectElement(const HTMLObjectElement &other);
273  HTMLObjectElement(const Node &other) : HTMLElement()
274  {
275  (*this) = other;
276  }
277 protected:
278  HTMLObjectElement(HTMLObjectElementImpl *impl);
279 public:
280 
281  HTMLObjectElement &operator = (const HTMLObjectElement &other);
282  HTMLObjectElement &operator = (const Node &other);
283 
285 
286  /**
287  * Returns the \c FORM element containing this
288  * control. Returns null if this control is not within the context
289  * of a form.
290  *
291  */
292  HTMLFormElement form() const;
293 
294  /**
295  * Applet class file. See the \c code attribute for
296  * HTMLAppletElement.
297  *
298  */
299  DOMString code() const;
300 
301  /**
302  * see code
303  */
304  void setCode(const DOMString &);
305 
306  /**
307  * Aligns this object (vertically or horizontally) with respect to
308  * its surrounding text. See the <a
309  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-align-IMG">
310  * align attribute definition </a> in HTML 4.0. This attribute is
311  * deprecated in HTML 4.0.
312  *
313  */
314  DOMString align() const;
315 
316  /**
317  * see align
318  */
319  void setAlign(const DOMString &);
320 
321  /**
322  * Space-separated list of archives. See the <a
323  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-archive-OBJECT">
324  * archive attribute definition </a> in HTML 4.0.
325  *
326  */
327  DOMString archive() const;
328 
329  /**
330  * see archive
331  */
332  void setArchive(const DOMString &);
333 
334  /**
335  * Width of border around the object. See the <a
336  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-border">
337  * border attribute definition </a> in HTML 4.0. This attribute is
338  * deprecated in HTML 4.0.
339  *
340  */
341  DOMString border() const;
342 
343  /**
344  * see border
345  */
346  void setBorder(const DOMString &);
347 
348  /**
349  * Base URI for \c classid , \c data , and
350  * \c archive attributes. See the <a
351  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-codebase-OBJECT">
352  * codebase attribute definition </a> in HTML 4.0.
353  *
354  */
355  DOMString codeBase() const;
356 
357  /**
358  * see codeBase
359  */
360  void setCodeBase(const DOMString &);
361 
362  /**
363  * Content type for data downloaded via \c classid
364  * attribute. See the <a
365  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-codetype">
366  * codetype attribute definition </a> in HTML 4.0.
367  *
368  */
369  DOMString codeType() const;
370 
371  /**
372  * see codeType
373  */
374  void setCodeType(const DOMString &);
375 
376  /**
377  * A URI specifying the location of the object's data. See the <a
378  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-data">
379  * data attribute definition </a> in HTML 4.0.
380  *
381  */
382  DOMString data() const;
383 
384  /**
385  * see data
386  */
387  void setData(const DOMString &);
388 
389  /**
390  * Declare (for future reference), but do not instantiate, this
391  * object. See the <a
392  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-declare">
393  * declare attribute definition </a> in HTML 4.0.
394  *
395  */
396  bool declare() const;
397 
398  /**
399  * see declare
400  */
401  void setDeclare(bool);
402 
403  /**
404  * Override height. See the <a
405  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-height-IMG">
406  * height attribute definition </a> in HTML 4.0.
407  *
408  */
409  DOMString height() const;
410 
411  /**
412  * see height
413  */
414  void setHeight(const DOMString &);
415 
416  /**
417  * Horizontal space, in pixels, to the left and right of this image, applet,
418  * or object. See the <a
419  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-hspace">
420  * hspace attribute definition </a> in HTML 4.0. This attribute is
421  * deprecated in HTML 4.0.
422  *
423  */
424  long getHspace() const;
425 
426  /**
427  * see hspace
428  */
429  void setHspace(long);
430 
431  /**
432  * @deprecated
433  */
434 #ifndef KHTML_NO_DEPRECATED
435  KHTML_DEPRECATED DOMString hspace() const;
436 #endif
437 
438  /**
439  * @deprecated
440  */
441 #ifndef KHTML_NO_DEPRECATED
442  KHTML_DEPRECATED void setHspace(const DOMString &);
443 #endif
444 
445  /**
446  * Form control or object name when submitted with a form. See the
447  * <a
448  * href="https://www.w3.org/TR/REC-html40/interact/forms.html#adef-name-INPUT">
449  * name attribute definition </a> in HTML 4.0.
450  *
451  */
452  DOMString name() const;
453 
454  /**
455  * see name
456  */
457  void setName(const DOMString &);
458 
459  /**
460  * Message to render while loading the object. See the <a
461  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-standby">
462  * standby attribute definition </a> in HTML 4.0.
463  *
464  */
465  DOMString standby() const;
466 
467  /**
468  * see standby
469  */
470  void setStandby(const DOMString &);
471 
472  /**
473  * Index that represents the element's position in the tabbing
474  * order. See the <a
475  * href="https://www.w3.org/TR/REC-html40/interact/forms.html#adef-tabindex">
476  * tabindex attribute definition </a> in HTML 4.0.
477  *
478  */
479  long tabIndex() const;
480 
481  /**
482  * see tabIndex
483  */
484  void setTabIndex(long);
485 
486  /**
487  * Content type for data downloaded via \c data
488  * attribute. See the <a
489  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-type-OBJECT">
490  * type attribute definition </a> in HTML 4.0.
491  *
492  */
493  DOMString type() const;
494 
495  /**
496  * see type
497  */
498  void setType(const DOMString &);
499 
500  /**
501  * Use client-side image map. See the <a
502  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-usemap">
503  * usemap attribute definition </a> in HTML 4.0.
504  *
505  */
506  DOMString useMap() const;
507 
508  /**
509  * see useMap
510  */
511  void setUseMap(const DOMString &);
512 
513  /**
514  * Vertical space, in pixels, above and below this image, applet, or object.
515  * See the <a
516  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-vspace">
517  * vspace attribute definition </a> in HTML 4.0. This attribute is
518  * deprecated in HTML 4.0.
519  *
520  */
521  long getVspace() const;
522 
523  /**
524  * see vspace
525  */
526  void setVspace(long);
527 
528  /**
529  * @deprecated
530  */
531 #ifndef KHTML_NO_DEPRECATED
532  KHTML_DEPRECATED DOMString vspace() const;
533 #endif
534 
535  /**
536  * @deprecated
537  */
538 #ifndef KHTML_NO_DEPRECATED
539  KHTML_DEPRECATED void setVspace(const DOMString &);
540 #endif
541 
542  /**
543  * Override width. See the <a
544  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-width-IMG">
545  * width attribute definition </a> in HTML 4.0.
546  *
547  */
548  DOMString width() const;
549 
550  /**
551  * see width
552  */
553  void setWidth(const DOMString &);
554 
555  /**
556  * Introduced in DOM Level 2
557  *
558  * Returns the document this iframe contains, if there is any and
559  * it is available, a Null document otherwise. The attribute is
560  * read-only.
561  *
562  * @return The content Document if available.
563  */
564  Document contentDocument() const;
565 };
566 
567 // --------------------------------------------------------------------------
568 
569 class HTMLParamElementImpl;
570 
571 /**
572  * Parameters fed to the \c OBJECT element. See the <a
573  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#edef-PARAM">
574  * PARAM element definition </a> in HTML 4.0.
575  *
576  */
577 class KHTML_EXPORT HTMLParamElement : public HTMLElement
578 {
579 public:
581  HTMLParamElement(const HTMLParamElement &other);
582  HTMLParamElement(const Node &other) : HTMLElement()
583  {
584  (*this) = other;
585  }
586 protected:
587  HTMLParamElement(HTMLParamElementImpl *impl);
588 public:
589 
590  HTMLParamElement &operator = (const HTMLParamElement &other);
591  HTMLParamElement &operator = (const Node &other);
592 
593  ~HTMLParamElement();
594 
595  /**
596  * The name of a run-time parameter. See the <a
597  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-name-PARAM">
598  * name attribute definition </a> in HTML 4.0.
599  *
600  */
601  DOMString name() const;
602 
603  /**
604  * see name
605  */
606  void setName(const DOMString &);
607 
608  /**
609  * Content type for the \c value attribute when
610  * \c valuetype has the value "ref". See the <a
611  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-type-PARAM">
612  * type attribute definition </a> in HTML 4.0.
613  *
614  */
615  DOMString type() const;
616 
617  /**
618  * see type
619  */
620  void setType(const DOMString &);
621 
622  /**
623  * The value of a run-time parameter. See the <a
624  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-value-PARAM">
625  * value attribute definition </a> in HTML 4.0.
626  *
627  */
628  DOMString value() const;
629 
630  /**
631  * see value
632  */
633  void setValue(const DOMString &);
634 
635  /**
636  * Information about the meaning of the \c value
637  * attribute value. See the <a
638  * href="https://www.w3.org/TR/REC-html40/struct/objects.html#adef-valuetype">
639  * valuetype attribute definition </a> in HTML 4.0.
640  *
641  */
642  DOMString valueType() const;
643 
644  /**
645  * see valueType
646  */
647  void setValueType(const DOMString &);
648 };
649 
650 } // namespace
651 
652 #endif
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:278
The FORM element encompasses behavior similar to a collection and an element.
Definition: html_form.h:207
An embedded Java applet.
Definition: html_object.h:50
Parameters fed to the OBJECT element.
Definition: html_object.h:577
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:246
Generic embedded object.
Definition: html_object.h:268
This library provides a full-featured HTML parser and widget.
All HTML element interfaces derive from this class.
Definition: html_element.h:70
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 22:47:54 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.