• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdehtml
 

tdehtml

  • tdehtml
  • dom
html_inline.cpp
1 
23 // --------------------------------------------------------------------------
24 
25 #include "dom/dom_doc.h"
26 #include "dom/html_inline.h"
27 #include "html/html_inlineimpl.h"
28 #include "html/html_baseimpl.h"
29 #include "xml/dom_docimpl.h"
30 #include "misc/htmlhashes.h"
31 
32 using namespace DOM;
33 
34 HTMLAnchorElement::HTMLAnchorElement() : HTMLElement()
35 {
36 }
37 
38 HTMLAnchorElement::HTMLAnchorElement(const HTMLAnchorElement &other) : HTMLElement(other)
39 {
40 }
41 
42 HTMLAnchorElement::HTMLAnchorElement(HTMLAnchorElementImpl *impl) : HTMLElement(impl)
43 {
44 }
45 
46 HTMLAnchorElement &HTMLAnchorElement::operator = (const Node &other)
47 {
48  assignOther( other, ID_A );
49  return *this;
50 }
51 
52 HTMLAnchorElement &HTMLAnchorElement::operator = (const HTMLAnchorElement &other)
53 {
54  HTMLElement::operator = (other);
55  return *this;
56 }
57 
58 HTMLAnchorElement::~HTMLAnchorElement()
59 {
60 }
61 
62 DOMString HTMLAnchorElement::accessKey() const
63 {
64  if(!impl) return DOMString();
65  return ((ElementImpl *)impl)->getAttribute(ATTR_ACCESSKEY);
66 }
67 
68 void HTMLAnchorElement::setAccessKey( const DOMString &value )
69 {
70  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ACCESSKEY, value);
71 }
72 
73 DOMString HTMLAnchorElement::charset() const
74 {
75  if(!impl) return DOMString();
76  return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
77 }
78 
79 void HTMLAnchorElement::setCharset( const DOMString &value )
80 {
81  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
82 }
83 
84 DOMString HTMLAnchorElement::coords() const
85 {
86  if(!impl) return DOMString();
87  return ((ElementImpl *)impl)->getAttribute(ATTR_COORDS);
88 }
89 
90 void HTMLAnchorElement::setCoords( const DOMString &value )
91 {
92  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COORDS, value);
93 }
94 
95 DOMString HTMLAnchorElement::href() const
96 {
97  if(!impl) return DOMString();
98  DOMString href = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_HREF);
99  return !href.isNull() ? impl->getDocument()->completeURL(href.string()) : href;
100 }
101 
102 void HTMLAnchorElement::setHref( const DOMString &value )
103 {
104  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
105 }
106 
107 DOMString HTMLAnchorElement::hreflang() const
108 {
109  if(!impl) return DOMString();
110  return ((ElementImpl *)impl)->getAttribute(ATTR_HREFLANG);
111 }
112 
113 void HTMLAnchorElement::setHreflang( const DOMString &value )
114 {
115  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREFLANG, value);
116 }
117 
118 DOMString HTMLAnchorElement::name() const
119 {
120  if(!impl) return DOMString();
121  return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
122 }
123 
124 void HTMLAnchorElement::setName( const DOMString &value )
125 {
126  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
127 }
128 
129 DOMString HTMLAnchorElement::rel() const
130 {
131  if(!impl) return DOMString();
132  return ((ElementImpl *)impl)->getAttribute(ATTR_REL);
133 }
134 
135 void HTMLAnchorElement::setRel( const DOMString &value )
136 {
137  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REL, value);
138 }
139 
140 DOMString HTMLAnchorElement::rev() const
141 {
142  if(!impl) return DOMString();
143  return ((ElementImpl *)impl)->getAttribute(ATTR_REV);
144 }
145 
146 void HTMLAnchorElement::setRev( const DOMString &value )
147 {
148  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REV, value);
149 }
150 
151 DOMString HTMLAnchorElement::shape() const
152 {
153  if(!impl) return DOMString();
154  return ((ElementImpl *)impl)->getAttribute(ATTR_SHAPE);
155 }
156 
157 void HTMLAnchorElement::setShape( const DOMString &value )
158 {
159  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SHAPE, value);
160 }
161 
162 long HTMLAnchorElement::tabIndex() const
163 {
164  if(!impl) return 0;
165  return ((ElementImpl *)impl)->getAttribute(ATTR_TABINDEX).toInt();
166 }
167 
168 void HTMLAnchorElement::setTabIndex( long _tabIndex )
169 {
170  if(impl) {
171  DOMString value(TQString::number(_tabIndex));
172  ((ElementImpl *)impl)->setAttribute(ATTR_TABINDEX,value);
173  }
174 }
175 
176 DOMString HTMLAnchorElement::target() const
177 {
178  if(!impl) return DOMString();
179  return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
180 }
181 
182 void HTMLAnchorElement::setTarget( const DOMString &value )
183 {
184  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
185 }
186 
187 DOMString HTMLAnchorElement::type() const
188 {
189  if(!impl) return DOMString();
190  return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
191 }
192 
193 void HTMLAnchorElement::setType( const DOMString &value )
194 {
195  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
196 }
197 
198 void HTMLAnchorElement::blur( )
199 {
200  if(impl && impl->getDocument()->focusNode()==impl)
201  impl->getDocument()->setFocusNode(0);
202 }
203 
204 void HTMLAnchorElement::focus( )
205 {
206  if(impl)
207  impl->getDocument()->setFocusNode(static_cast<ElementImpl*>(impl));
208 }
209 
210 void HTMLAnchorElement::click( )
211 {
212  if(impl) ((HTMLAnchorElement *)impl)->click();
213 }
214 
215 
216 // --------------------------------------------------------------------------
217 
218 HTMLBRElement::HTMLBRElement() : HTMLElement()
219 {
220 }
221 
222 HTMLBRElement::HTMLBRElement(const HTMLBRElement &other) : HTMLElement(other)
223 {
224 }
225 
226 HTMLBRElement::HTMLBRElement(HTMLBRElementImpl *impl) : HTMLElement(impl)
227 {
228 }
229 
230 HTMLBRElement &HTMLBRElement::operator = (const Node &other)
231 {
232  assignOther( other, ID_BR );
233  return *this;
234 }
235 
236 HTMLBRElement &HTMLBRElement::operator = (const HTMLBRElement &other)
237 {
238  HTMLElement::operator = (other);
239  return *this;
240 }
241 
242 HTMLBRElement::~HTMLBRElement()
243 {
244 }
245 
246 DOMString HTMLBRElement::clear() const
247 {
248  if(!impl) return DOMString();
249  return ((ElementImpl *)impl)->getAttribute(ATTR_CLEAR);
250 }
251 
252 void HTMLBRElement::setClear( const DOMString &value )
253 {
254  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CLEAR, value);
255 }
256 
257 // --------------------------------------------------------------------------
258 
259 HTMLFontElement::HTMLFontElement() : HTMLElement()
260 {
261 }
262 
263 HTMLFontElement::HTMLFontElement(const HTMLFontElement &other) : HTMLElement(other)
264 {
265 }
266 
267 HTMLFontElement::HTMLFontElement(HTMLFontElementImpl *impl) : HTMLElement(impl)
268 {
269 }
270 
271 HTMLFontElement &HTMLFontElement::operator = (const Node &other)
272 {
273  assignOther( other, ID_FONT );
274  return *this;
275 }
276 
277 HTMLFontElement &HTMLFontElement::operator = (const HTMLFontElement &other)
278 {
279  HTMLElement::operator = (other);
280  return *this;
281 }
282 
283 HTMLFontElement::~HTMLFontElement()
284 {
285 }
286 
287 DOMString HTMLFontElement::color() const
288 {
289  if(!impl) return DOMString();
290  return ((ElementImpl *)impl)->getAttribute(ATTR_COLOR);
291 }
292 
293 void HTMLFontElement::setColor( const DOMString &value )
294 {
295  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLOR, value);
296 }
297 
298 DOMString HTMLFontElement::face() const
299 {
300  if(!impl) return DOMString();
301  return ((ElementImpl *)impl)->getAttribute(ATTR_FACE);
302 }
303 
304 void HTMLFontElement::setFace( const DOMString &value )
305 {
306  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FACE, value);
307 }
308 
309 DOMString HTMLFontElement::size() const
310 {
311  if(!impl) return DOMString();
312  return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE);
313 }
314 
315 void HTMLFontElement::setSize( const DOMString &value )
316 {
317  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
318 }
319 
320 
321 // --------------------------------------------------------------------------
322 
323 HTMLModElement::HTMLModElement() : HTMLElement()
324 {
325 }
326 
327 HTMLModElement::HTMLModElement(const HTMLModElement &other) : HTMLElement(other)
328 {
329 }
330 
331 HTMLModElement::HTMLModElement(HTMLElementImpl *_impl)
332  : HTMLElement()
333 {
334  if (_impl && (_impl->id() == ID_INS || _impl->id() == ID_DEL))
335  impl = _impl;
336  else
337  impl = 0;
338  if ( impl ) impl->ref();
339 }
340 
341 HTMLModElement &HTMLModElement::operator = (const Node &other)
342 {
343  if (other.handle() != handle()) {
344  if( other.elementId() != ID_INS &&
345  other.elementId() != ID_DEL )
346  {
347  if ( impl ) impl->deref();
348  impl = 0;
349  } else {
350  Node::operator = (other);
351  }
352  }
353  return *this;
354 }
355 
356 HTMLModElement &HTMLModElement::operator = (const HTMLModElement &other)
357 {
358  HTMLElement::operator = (other);
359  return *this;
360 }
361 
362 HTMLModElement::~HTMLModElement()
363 {
364 }
365 
366 DOMString HTMLModElement::cite() const
367 {
368  if(!impl) return DOMString();
369  return ((ElementImpl *)impl)->getAttribute(ATTR_CITE);
370 }
371 
372 void HTMLModElement::setCite( const DOMString &value )
373 {
374  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CITE, value);
375 }
376 
377 DOMString HTMLModElement::dateTime() const
378 {
379  if(!impl) return DOMString();
380  return ((ElementImpl *)impl)->getAttribute(ATTR_DATETIME);
381 }
382 
383 void HTMLModElement::setDateTime( const DOMString &value )
384 {
385  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_DATETIME, value);
386 }
387 
388 // --------------------------------------------------------------------------
389 
390 HTMLQuoteElement::HTMLQuoteElement() : HTMLElement()
391 {
392 }
393 
394 HTMLQuoteElement::HTMLQuoteElement(const HTMLQuoteElement &other) : HTMLElement(other)
395 {
396 }
397 
398 HTMLQuoteElement::HTMLQuoteElement(HTMLGenericElementImpl *_impl)
399  : HTMLElement()
400 {
401  if (_impl && _impl->id() == ID_Q)
402  impl = _impl;
403  else
404  impl = 0;
405  if ( impl ) impl->ref();
406 }
407 
408 HTMLQuoteElement &HTMLQuoteElement::operator = (const Node &other)
409 {
410  assignOther( other, ID_Q );
411  return *this;
412 }
413 
414 HTMLQuoteElement &HTMLQuoteElement::operator = (const HTMLQuoteElement &other)
415 {
416  HTMLElement::operator = (other);
417  return *this;
418 }
419 
420 HTMLQuoteElement::~HTMLQuoteElement()
421 {
422 }
423 
424 DOMString HTMLQuoteElement::cite() const
425 {
426  if(!impl) return DOMString();
427  return ((ElementImpl *)impl)->getAttribute(ATTR_CITE);
428 }
429 
430 void HTMLQuoteElement::setCite( const DOMString &value )
431 {
432  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CITE, value);
433 }
434 

tdehtml

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

tdehtml

Skip menu "tdehtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.