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

tdehtml

  • tdehtml
  • dom
html_misc.cpp
1
22// --------------------------------------------------------------------------
23
24#include "dom/html_misc.h"
25#include "html/html_miscimpl.h"
26#include "misc/htmlhashes.h"
27
28using namespace DOM;
29
30HTMLBaseFontElement::HTMLBaseFontElement() : HTMLElement()
31{
32}
33
34HTMLBaseFontElement::HTMLBaseFontElement(const HTMLBaseFontElement &other) : HTMLElement(other)
35{
36}
37
38HTMLBaseFontElement::HTMLBaseFontElement(HTMLBaseFontElementImpl *impl) : HTMLElement(impl)
39{
40}
41
42HTMLBaseFontElement &HTMLBaseFontElement::operator = (const Node &other)
43{
44 assignOther( other, ID_BASEFONT );
45 return *this;
46}
47
48HTMLBaseFontElement &HTMLBaseFontElement::operator = (const HTMLBaseFontElement &other)
49{
50 HTMLElement::operator = (other);
51 return *this;
52}
53
54HTMLBaseFontElement::~HTMLBaseFontElement()
55{
56}
57
58DOMString HTMLBaseFontElement::color() const
59{
60 if(!impl) return DOMString();
61 return ((ElementImpl *)impl)->getAttribute(ATTR_COLOR);
62}
63
64void HTMLBaseFontElement::setColor( const DOMString &value )
65{
66 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLOR, value);
67}
68
69DOMString HTMLBaseFontElement::face() const
70{
71 if(!impl) return DOMString();
72 return ((ElementImpl *)impl)->getAttribute(ATTR_FACE);
73}
74
75void HTMLBaseFontElement::setFace( const DOMString &value )
76{
77 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FACE, value);
78}
79
80DOMString HTMLBaseFontElement::size() const
81{
82 if(!impl) return DOMString();
83 return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE);
84}
85
86void HTMLBaseFontElement::setSize( const DOMString &value )
87{
88 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
89}
90
91long HTMLBaseFontElement::getSize() const
92{
93 if(!impl) return 0;
94 return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE).toInt();
95}
96
97void HTMLBaseFontElement::setSize( long _value )
98{
99 if ( impl )
100 {
101 DOMString value( TQString::number( _value ) );
102 ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
103 }
104}
105
106
107// --------------------------------------------------------------------------
108
109HTMLCollection::HTMLCollection()
110 : impl(0)
111{
112}
113
114HTMLCollection::HTMLCollection(const HTMLCollection &other)
115{
116 impl = other.impl;
117 if(impl) impl->ref();
118}
119
120HTMLCollection::HTMLCollection(NodeImpl *base, int type)
121{
122 impl = new HTMLCollectionImpl(base, type);
123 impl->ref();
124}
125
126HTMLCollection &HTMLCollection::operator = (const HTMLCollection &other)
127{
128 if(impl != other.impl) {
129 if(impl) impl->deref();
130 impl = other.impl;
131 if(impl) impl->ref();
132 }
133 return *this;
134}
135
136HTMLCollection::~HTMLCollection()
137{
138 if(impl) impl->deref();
139}
140
141unsigned long HTMLCollection::length() const
142{
143 if(!impl) return 0;
144 return ((HTMLCollectionImpl *)impl)->length();
145}
146
147Node HTMLCollection::item( unsigned long index ) const
148{
149 if(!impl) return 0;
150 return ((HTMLCollectionImpl *)impl)->item( index );
151}
152
153Node HTMLCollection::namedItem( const DOMString &name ) const
154{
155 if(!impl) return 0;
156 return ((HTMLCollectionImpl *)impl)->namedItem( name );
157}
158
159Node HTMLCollection::base() const
160{
161 if ( !impl )
162 return 0;
163
164 return static_cast<HTMLCollectionImpl*>( impl )->m_refNode;
165}
166
167Node HTMLCollection::firstItem() const
168{
169 if ( !impl )
170 return 0;
171 return static_cast<HTMLCollectionImpl*>( impl )->firstItem();
172}
173
174Node HTMLCollection::nextItem() const
175{
176 if ( !impl )
177 return 0;
178 return static_cast<HTMLCollectionImpl*>( impl )->nextItem();
179}
180
181Node HTMLCollection::nextNamedItem( const DOMString &name ) const
182{
183 if ( !impl )
184 return 0;
185 return static_cast<HTMLCollectionImpl*>( impl )->nextNamedItem( name );
186}
187
188HTMLCollectionImpl *HTMLCollection::handle() const
189{
190 return impl;
191}
192
193bool HTMLCollection::isNull() const
194{
195 return (impl == 0);
196}
197
198
199// -----------------------------------------------------------------------------
200
201HTMLFormCollection::HTMLFormCollection(NodeImpl *base)
202 : HTMLCollection()
203{
204 impl = new HTMLFormCollectionImpl(base);
205 impl->ref();
206}
207
208
209// -----------------------------------------------------------------------------
210HTMLMappedNameCollection::HTMLMappedNameCollection(NodeImpl *base, int type, const DOMString &name )
211{
212 impl = new HTMLMappedNameCollectionImpl(base, type, name);
213 impl->ref();
214}
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::HTMLBaseFontElement
Base font.
Definition: html_misc.h:49
DOM::HTMLBaseFontElement::getSize
long getSize() const
Computed Font size.
Definition: html_misc.cpp:91
DOM::HTMLBaseFontElement::setFace
void setFace(const DOMString &)
see face
Definition: html_misc.cpp:75
DOM::HTMLBaseFontElement::size
DOMString size() const TDE_DEPRECATED
Definition: html_misc.cpp:80
DOM::HTMLBaseFontElement::face
DOMString face() const
Font face identifier.
Definition: html_misc.cpp:69
DOM::HTMLBaseFontElement::color
DOMString color() const
Font color.
Definition: html_misc.cpp:58
DOM::HTMLBaseFontElement::setColor
void setColor(const DOMString &)
see color
Definition: html_misc.cpp:64
DOM::HTMLBaseFontElement::setSize
void setSize(long)
see size
Definition: html_misc.cpp:97
DOM::HTMLCollection
An HTMLCollection is a list of nodes.
Definition: html_misc.h:127
DOM::HTMLCollection::item
Node item(unsigned long index) const
This method retrieves a node specified by ordinal index.
Definition: html_misc.cpp:147
DOM::HTMLCollection::length
unsigned long length() const
This attribute specifies the length or size of the list.
Definition: html_misc.cpp:141
DOM::HTMLCollection::namedItem
Node namedItem(const DOMString &name) const
This method retrieves a Node using a name.
Definition: html_misc.cpp:153
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:70
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:275
DOM
The Document Object Model (DOM) is divided into two parts, the COREDOM core DOM, specifying some core...
Definition: design.h:57

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.9.4
This website is maintained by Timothy Pearson.