• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.4 API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • khtml
  • dom
html_head.cpp
Go to the documentation of this file.
1 
22 // --------------------------------------------------------------------------
23 
24 #include "dom/html_head.h"
25 #include "html/html_headimpl.h"
26 #include "xml/dom_docimpl.h"
27 
28 using namespace DOM;
29 
30 HTMLBaseElement::HTMLBaseElement() : HTMLElement()
31 {
32 }
33 
34 HTMLBaseElement::HTMLBaseElement(const HTMLBaseElement &other) : HTMLElement(other)
35 {
36 }
37 
38 HTMLBaseElement::HTMLBaseElement(HTMLBaseElementImpl *impl) : HTMLElement(impl)
39 {
40 }
41 
42 HTMLBaseElement &HTMLBaseElement::operator = (const Node &other)
43 {
44  assignOther( other, ID_BASE );
45  return *this;
46 }
47 
48 HTMLBaseElement &HTMLBaseElement::operator = (const HTMLBaseElement &other)
49 {
50  HTMLElement::operator = (other);
51  return *this;
52 }
53 
54 HTMLBaseElement::~HTMLBaseElement()
55 {
56 }
57 
58 DOMString HTMLBaseElement::href() const
59 {
60  if(!impl) return DOMString();
61  DOMString href = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_HREF);
62  return !href.isNull() ? impl->document()->completeURL(href.string()) : href;
63 }
64 
65 void HTMLBaseElement::setHref( const DOMString &value )
66 {
67  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
68 }
69 
70 DOMString HTMLBaseElement::target() const
71 {
72  if(!impl) return DOMString();
73  return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
74 }
75 
76 void HTMLBaseElement::setTarget( const DOMString &value )
77 {
78  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
79 }
80 
81 // --------------------------------------------------------------------------
82 
83 HTMLLinkElement::HTMLLinkElement() : HTMLElement()
84 {
85 }
86 
87 HTMLLinkElement::HTMLLinkElement(const HTMLLinkElement &other) : HTMLElement(other)
88 {
89 }
90 
91 HTMLLinkElement::HTMLLinkElement(HTMLLinkElementImpl *impl) : HTMLElement(impl)
92 {
93 }
94 
95 HTMLLinkElement &HTMLLinkElement::operator = (const Node &other)
96 {
97  assignOther( other, ID_LINK );
98  return *this;
99 }
100 
101 HTMLLinkElement &HTMLLinkElement::operator = (const HTMLLinkElement &other)
102 {
103  HTMLElement::operator = (other);
104  return *this;
105 }
106 
107 HTMLLinkElement::~HTMLLinkElement()
108 {
109 }
110 
111 bool HTMLLinkElement::disabled() const
112 {
113  if(!impl) return 0;
114  return !((ElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
115 }
116 
117 void HTMLLinkElement::setDisabled( bool _disabled )
118 {
119  if(impl)
120  ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
121 }
122 
123 DOMString HTMLLinkElement::charset() const
124 {
125  if(!impl) return DOMString();
126  return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
127 }
128 
129 void HTMLLinkElement::setCharset( const DOMString &value )
130 {
131  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
132 }
133 
134 DOMString HTMLLinkElement::href() const
135 {
136  if(!impl) return DOMString();
137  DOMString href = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_HREF);
138  return !href.isNull() ? impl->document()->completeURL(href.string()) : href;
139 }
140 
141 void HTMLLinkElement::setHref( const DOMString &value )
142 {
143  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
144 }
145 
146 DOMString HTMLLinkElement::hreflang() const
147 {
148  if(!impl) return DOMString();
149  return ((ElementImpl *)impl)->getAttribute(ATTR_HREFLANG);
150 }
151 
152 void HTMLLinkElement::setHreflang( const DOMString &value )
153 {
154  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREFLANG, value);
155 }
156 
157 DOMString HTMLLinkElement::media() const
158 {
159  if(!impl) return DOMString();
160  return ((ElementImpl *)impl)->getAttribute(ATTR_MEDIA);
161 }
162 
163 void HTMLLinkElement::setMedia( const DOMString &value )
164 {
165  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MEDIA, value);
166 }
167 
168 DOMString HTMLLinkElement::rel() const
169 {
170  if(!impl) return DOMString();
171  return ((ElementImpl *)impl)->getAttribute(ATTR_REL);
172 }
173 
174 void HTMLLinkElement::setRel( const DOMString &value )
175 {
176  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REL, value);
177 }
178 
179 DOMString HTMLLinkElement::rev() const
180 {
181  if(!impl) return DOMString();
182  return ((ElementImpl *)impl)->getAttribute(ATTR_REV);
183 }
184 
185 void HTMLLinkElement::setRev( const DOMString &value )
186 {
187  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REV, value);
188 }
189 
190 DOMString HTMLLinkElement::target() const
191 {
192  if(!impl) return DOMString();
193  return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
194 }
195 
196 void HTMLLinkElement::setTarget( const DOMString &value )
197 {
198  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
199 }
200 
201 DOMString HTMLLinkElement::type() const
202 {
203  if(!impl) return DOMString();
204  return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
205 }
206 
207 void HTMLLinkElement::setType( const DOMString &value )
208 {
209  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
210 }
211 
212 StyleSheet HTMLLinkElement::sheet() const
213 {
214  if(!impl) return 0;
215  return ((HTMLLinkElementImpl *)impl)->sheet();
216 }
217 
218 // --------------------------------------------------------------------------
219 
220 HTMLMetaElement::HTMLMetaElement() : HTMLElement()
221 {
222 }
223 
224 HTMLMetaElement::HTMLMetaElement(const HTMLMetaElement &other) : HTMLElement(other)
225 {
226 }
227 
228 HTMLMetaElement::HTMLMetaElement(HTMLMetaElementImpl *impl) : HTMLElement(impl)
229 {
230 }
231 
232 HTMLMetaElement &HTMLMetaElement::operator = (const Node &other)
233 {
234  assignOther( other, ID_META );
235  return *this;
236 }
237 
238 HTMLMetaElement &HTMLMetaElement::operator = (const HTMLMetaElement &other)
239 {
240  HTMLElement::operator = (other);
241  return *this;
242 }
243 
244 HTMLMetaElement::~HTMLMetaElement()
245 {
246 }
247 
248 DOMString HTMLMetaElement::content() const
249 {
250  if(!impl) return DOMString();
251  return ((ElementImpl *)impl)->getAttribute(ATTR_CONTENT);
252 }
253 
254 void HTMLMetaElement::setContent( const DOMString &value )
255 {
256  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CONTENT, value);
257 }
258 
259 DOMString HTMLMetaElement::httpEquiv() const
260 {
261  if(!impl) return DOMString();
262  return ((ElementImpl *)impl)->getAttribute(ATTR_HTTP_EQUIV);
263 }
264 
265 void HTMLMetaElement::setHttpEquiv( const DOMString &value )
266 {
267  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HTTP_EQUIV, value);
268 }
269 
270 DOMString HTMLMetaElement::name() const
271 {
272  if(!impl) return DOMString();
273  return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
274 }
275 
276 void HTMLMetaElement::setName( const DOMString &value )
277 {
278  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
279 }
280 
281 DOMString HTMLMetaElement::scheme() const
282 {
283  if(!impl) return DOMString();
284  return ((ElementImpl *)impl)->getAttribute(ATTR_SCHEME);
285 }
286 
287 void HTMLMetaElement::setScheme( const DOMString &value )
288 {
289  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCHEME, value);
290 }
291 
292 // --------------------------------------------------------------------------
293 
294 HTMLScriptElement::HTMLScriptElement() : HTMLElement()
295 {
296 }
297 
298 HTMLScriptElement::HTMLScriptElement(const HTMLScriptElement &other) : HTMLElement(other)
299 {
300 }
301 
302 HTMLScriptElement::HTMLScriptElement(HTMLScriptElementImpl *impl) : HTMLElement(impl)
303 {
304 }
305 
306 HTMLScriptElement &HTMLScriptElement::operator = (const Node &other)
307 {
308  assignOther( other, ID_SCRIPT );
309  return *this;
310 }
311 
312 HTMLScriptElement &HTMLScriptElement::operator = (const HTMLScriptElement &other)
313 {
314  HTMLElement::operator = (other);
315  return *this;
316 }
317 
318 HTMLScriptElement::~HTMLScriptElement()
319 {
320 }
321 
322 DOMString HTMLScriptElement::text() const
323 {
324  if(!impl) return DOMString();
325  return ((HTMLScriptElementImpl *)impl)->text();
326 }
327 
328 void HTMLScriptElement::setText( const DOMString &value )
329 {
330  if(impl) ((HTMLScriptElementImpl *)impl)->setText(value);
331 }
332 
333 DOMString HTMLScriptElement::htmlFor() const
334 {
335  // DOM Level 1 says: reserved for future use...
336  return DOMString();
337 }
338 
339 void HTMLScriptElement::setHtmlFor( const DOMString &/*value*/ )
340 {
341  // DOM Level 1 says: reserved for future use...
342 }
343 
344 DOMString HTMLScriptElement::event() const
345 {
346  // DOM Level 1 says: reserved for future use...
347  return DOMString();
348 }
349 
350 void HTMLScriptElement::setEvent( const DOMString &/*value*/ )
351 {
352  // DOM Level 1 says: reserved for future use...
353 }
354 
355 DOMString HTMLScriptElement::charset() const
356 {
357  if(!impl) return DOMString();
358  return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
359 }
360 
361 void HTMLScriptElement::setCharset( const DOMString &value )
362 {
363  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
364 }
365 
366 bool HTMLScriptElement::defer() const
367 {
368  if(!impl) return 0;
369  return !((ElementImpl *)impl)->getAttribute(ATTR_DEFER).isNull();
370 }
371 
372 void HTMLScriptElement::setDefer( bool _defer )
373 {
374 
375  if(impl)
376  ((ElementImpl *)impl)->setAttribute(ATTR_DEFER,_defer ? "" : 0);
377 }
378 
379 DOMString HTMLScriptElement::src() const
380 {
381  if(!impl) return DOMString();
382  DOMString s = ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
383  return !s.isNull() ? impl->document()->completeURL(s.string()) : s;
384 }
385 
386 void HTMLScriptElement::setSrc( const DOMString &value )
387 {
388  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
389 }
390 
391 DOMString HTMLScriptElement::type() const
392 {
393  if(!impl) return DOMString();
394  return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
395 }
396 
397 void HTMLScriptElement::setType( const DOMString &value )
398 {
399  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
400 }
401 
402 // --------------------------------------------------------------------------
403 
404 HTMLStyleElement::HTMLStyleElement() : HTMLElement()
405 {
406 }
407 
408 HTMLStyleElement::HTMLStyleElement(const HTMLStyleElement &other) : HTMLElement(other)
409 {
410 }
411 
412 HTMLStyleElement::HTMLStyleElement(HTMLStyleElementImpl *impl) : HTMLElement(impl)
413 {
414 }
415 
416 HTMLStyleElement &HTMLStyleElement::operator = (const Node &other)
417 {
418  assignOther( other, ID_STYLE );
419  return *this;
420 }
421 
422 HTMLStyleElement &HTMLStyleElement::operator = (const HTMLStyleElement &other)
423 {
424  HTMLElement::operator = (other);
425  return *this;
426 }
427 
428 HTMLStyleElement::~HTMLStyleElement()
429 {
430 }
431 
432 bool HTMLStyleElement::disabled() const
433 {
434  if(!impl) return 0;
435  return !((HTMLStyleElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
436 }
437 
438 void HTMLStyleElement::setDisabled( bool _disabled )
439 {
440 
441  if(impl)
442  ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED,_disabled ? "" : 0);
443 }
444 
445 DOMString HTMLStyleElement::media() const
446 {
447  if(!impl) return DOMString();
448  return ((ElementImpl *)impl)->getAttribute(ATTR_MEDIA);
449 }
450 
451 void HTMLStyleElement::setMedia( const DOMString &value )
452 {
453  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MEDIA, value);
454 }
455 
456 DOMString HTMLStyleElement::type() const
457 {
458  if(!impl) return DOMString();
459  return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
460 }
461 
462 void HTMLStyleElement::setType( const DOMString &value )
463 {
464  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
465 }
466 
467 StyleSheet HTMLStyleElement::sheet() const
468 {
469  if(!impl) return 0;
470  return ((HTMLStyleElementImpl *)impl)->sheet();
471 }
472 
473 
474 // --------------------------------------------------------------------------
475 
476 HTMLTitleElement::HTMLTitleElement() : HTMLElement()
477 {
478 }
479 
480 HTMLTitleElement::HTMLTitleElement(const HTMLTitleElement &other) : HTMLElement(other)
481 {
482 }
483 
484 HTMLTitleElement::HTMLTitleElement(HTMLTitleElementImpl *impl) : HTMLElement(impl)
485 {
486 }
487 
488 HTMLTitleElement &HTMLTitleElement::operator = (const Node &other)
489 {
490  assignOther( other, ID_TITLE );
491  return *this;
492 }
493 
494 HTMLTitleElement &HTMLTitleElement::operator = (const HTMLTitleElement &other)
495 {
496  HTMLElement::operator = (other);
497  return *this;
498 }
499 
500 HTMLTitleElement::~HTMLTitleElement()
501 {
502 }
503 
504 DOMString HTMLTitleElement::text() const
505 {
506  if(!impl) return DOMString();
507  return ((HTMLTitleElementImpl *)impl)->text();
508 }
509 
510 void HTMLTitleElement::setText( const DOMString &value )
511 {
512  if(impl) ((HTMLTitleElementImpl *)impl)->setText(value);
513 }
514 
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jun 1 2013 12:11:03 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.10.4 API Reference

Skip menu "kdelibs-4.10.4 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal