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

tdehtml

  • tdehtml
  • dom
html_list.cpp
1 
22 // --------------------------------------------------------------------------
23 
24 #include "dom/html_list.h"
25 #include "html/html_listimpl.h"
26 #include "misc/htmlhashes.h"
27 
28 using namespace DOM;
29 
30 HTMLDListElement::HTMLDListElement() : HTMLElement()
31 {
32 }
33 
34 HTMLDListElement::HTMLDListElement(const HTMLDListElement &other) : HTMLElement(other)
35 {
36 }
37 
38 HTMLDListElement::HTMLDListElement(HTMLDListElementImpl *impl) : HTMLElement(impl)
39 {
40 }
41 
42 HTMLDListElement &HTMLDListElement::operator = (const Node &other)
43 {
44  assignOther( other, ID_DL );
45  return *this;
46 }
47 
48 HTMLDListElement &HTMLDListElement::operator = (const HTMLDListElement &other)
49 {
50  HTMLElement::operator = (other);
51  return *this;
52 }
53 
54 HTMLDListElement::~HTMLDListElement()
55 {
56 }
57 
58 bool HTMLDListElement::compact() const
59 {
60  if(!impl) return 0;
61  return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
62 }
63 
64 void HTMLDListElement::setCompact( bool _compact )
65 {
66  if(impl)
67  {
68  DOMString str;
69  if( _compact )
70  str = "";
71  ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str);
72  }
73 }
74 
75 // --------------------------------------------------------------------------
76 
77 HTMLDirectoryElement::HTMLDirectoryElement() : HTMLElement()
78 {
79 }
80 
81 HTMLDirectoryElement::HTMLDirectoryElement(const HTMLDirectoryElement &other) : HTMLElement(other)
82 {
83 }
84 
85 HTMLDirectoryElement::HTMLDirectoryElement(HTMLDirectoryElementImpl *impl) : HTMLElement(impl)
86 {
87 }
88 
89 HTMLDirectoryElement &HTMLDirectoryElement::operator = (const Node &other)
90 {
91  assignOther( other, ID_DIR );
92  return *this;
93 }
94 
95 HTMLDirectoryElement &HTMLDirectoryElement::operator = (const HTMLDirectoryElement &other)
96 {
97  HTMLElement::operator = (other);
98  return *this;
99 }
100 
101 HTMLDirectoryElement::~HTMLDirectoryElement()
102 {
103 }
104 
105 bool HTMLDirectoryElement::compact() const
106 {
107  if(!impl) return 0;
108  return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
109 }
110 
111 void HTMLDirectoryElement::setCompact( bool _compact )
112 {
113  if(impl)
114  {
115  DOMString str;
116  if( _compact )
117  str = "";
118  ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str);
119  }
120 }
121 
122 // --------------------------------------------------------------------------
123 
124 HTMLLIElement::HTMLLIElement() : HTMLElement()
125 {
126 }
127 
128 HTMLLIElement::HTMLLIElement(const HTMLLIElement &other) : HTMLElement(other)
129 {
130 }
131 
132 HTMLLIElement::HTMLLIElement(HTMLLIElementImpl *impl) : HTMLElement(impl)
133 {
134 }
135 
136 HTMLLIElement &HTMLLIElement::operator = (const Node &other)
137 {
138  assignOther( other, ID_LI );
139  return *this;
140 }
141 
142 HTMLLIElement &HTMLLIElement::operator = (const HTMLLIElement &other)
143 {
144  HTMLElement::operator = (other);
145  return *this;
146 }
147 
148 HTMLLIElement::~HTMLLIElement()
149 {
150 }
151 
152 DOMString HTMLLIElement::type() const
153 {
154  if(!impl) return DOMString();
155  return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
156 }
157 
158 void HTMLLIElement::setType( const DOMString &value )
159 {
160  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
161 }
162 
163 long HTMLLIElement::value() const
164 {
165  if(!impl) return 0;
166  return ((ElementImpl *)impl)->getAttribute(ATTR_VALUE).toInt();
167 }
168 
169 void HTMLLIElement::setValue( long _value )
170 {
171  if(impl) {
172  DOMString value(TQString::number(_value));
173  ((ElementImpl *)impl)->setAttribute(ATTR_VALUE,value);
174  }
175 }
176 
177 // --------------------------------------------------------------------------
178 
179 HTMLMenuElement::HTMLMenuElement() : HTMLElement()
180 {
181 }
182 
183 HTMLMenuElement::HTMLMenuElement(const HTMLMenuElement &other) : HTMLElement(other)
184 {
185 }
186 
187 HTMLMenuElement::HTMLMenuElement(HTMLMenuElementImpl *impl) : HTMLElement(impl)
188 {
189 }
190 
191 HTMLMenuElement &HTMLMenuElement::operator = (const Node &other)
192 {
193  assignOther( other, ID_MENU );
194  return *this;
195 }
196 
197 HTMLMenuElement &HTMLMenuElement::operator = (const HTMLMenuElement &other)
198 {
199  HTMLElement::operator = (other);
200  return *this;
201 }
202 
203 HTMLMenuElement::~HTMLMenuElement()
204 {
205 }
206 
207 bool HTMLMenuElement::compact() const
208 {
209  if(!impl) return 0;
210  return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
211 }
212 
213 void HTMLMenuElement::setCompact( bool _compact )
214 {
215  if(impl)
216  {
217  DOMString str;
218  if( _compact )
219  str = "";
220  ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str);
221  }
222 }
223 
224 // --------------------------------------------------------------------------
225 
226 HTMLOListElement::HTMLOListElement() : HTMLElement()
227 {
228 }
229 
230 HTMLOListElement::HTMLOListElement(const HTMLOListElement &other) : HTMLElement(other)
231 {
232 }
233 
234 HTMLOListElement::HTMLOListElement(HTMLOListElementImpl *impl) : HTMLElement(impl)
235 {
236 }
237 
238 HTMLOListElement &HTMLOListElement::operator = (const Node &other)
239 {
240  assignOther( other, ID_OL );
241  return *this;
242 }
243 
244 HTMLOListElement &HTMLOListElement::operator = (const HTMLOListElement &other)
245 {
246  HTMLElement::operator = (other);
247  return *this;
248 }
249 
250 HTMLOListElement::~HTMLOListElement()
251 {
252 }
253 
254 bool HTMLOListElement::compact() const
255 {
256  if(!impl) return 0;
257  return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
258 }
259 
260 void HTMLOListElement::setCompact( bool _compact )
261 {
262  if(impl)
263  {
264  DOMString str;
265  if( _compact )
266  str = "";
267  ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str);
268  }
269 }
270 
271 long HTMLOListElement::start() const
272 {
273  if(!impl) return 0;
274  return ((ElementImpl *)impl)->getAttribute(ATTR_START).toInt();
275 }
276 
277 void HTMLOListElement::setStart( long _start )
278 {
279 
280  if(impl) {
281  DOMString value(TQString::number(_start));
282  ((ElementImpl *)impl)->setAttribute(ATTR_START,value);
283  }
284 }
285 
286 DOMString HTMLOListElement::type() const
287 {
288  if(!impl) return DOMString();
289  return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
290 }
291 
292 void HTMLOListElement::setType( const DOMString &value )
293 {
294  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
295 }
296 
297 // --------------------------------------------------------------------------
298 
299 HTMLUListElement::HTMLUListElement() : HTMLElement()
300 {
301 }
302 
303 HTMLUListElement::HTMLUListElement(const HTMLUListElement &other) : HTMLElement(other)
304 {
305 }
306 
307 HTMLUListElement::HTMLUListElement(HTMLUListElementImpl *impl) : HTMLElement(impl)
308 {
309 }
310 
311 HTMLUListElement &HTMLUListElement::operator = (const Node &other)
312 {
313  assignOther( other, ID_UL );
314  return *this;
315 }
316 
317 HTMLUListElement &HTMLUListElement::operator = (const HTMLUListElement &other)
318 {
319  HTMLElement::operator = (other);
320  return *this;
321 }
322 
323 HTMLUListElement::~HTMLUListElement()
324 {
325 }
326 
327 bool HTMLUListElement::compact() const
328 {
329  if(!impl) return 0;
330  return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
331 }
332 
333 void HTMLUListElement::setCompact( bool _compact )
334 {
335  if(impl)
336  {
337  DOMString str;
338  if( _compact )
339  str = "";
340  ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str);
341  }
342 }
343 
344 DOMString HTMLUListElement::type() const
345 {
346  if(!impl) return DOMString();
347  return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
348 }
349 
350 void HTMLUListElement::setType( const DOMString &value )
351 {
352  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
353 }
354 
DOM::HTMLLIElement::type
DOMString type() const
List item bullet style.
Definition: html_list.cpp:152
DOM::HTMLOListElement::setType
void setType(const DOMString &)
see type
Definition: html_list.cpp:292
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:274
DOM::HTMLDirectoryElement
Directory list.
Definition: html_list.h:92
DOM::HTMLOListElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:260
DOM::HTMLLIElement
List item.
Definition: html_list.h:131
DOM::HTMLLIElement::value
long value() const
Reset sequence number when used in OL See the value attribute definition in HTML 4...
Definition: html_list.cpp:163
DOM::HTMLUListElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:333
DOM::HTMLUListElement::type
DOMString type() const
Bullet style.
Definition: html_list.cpp:344
DOM::HTMLUListElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:327
DOM::HTMLOListElement::type
DOMString type() const
Numbering style.
Definition: html_list.cpp:286
DOM::HTMLLIElement::setType
void setType(const DOMString &)
see type
Definition: html_list.cpp:158
DOM::HTMLOListElement
Ordered list.
Definition: html_list.h:226
DOM::HTMLUListElement::setType
void setType(const DOMString &)
see type
Definition: html_list.cpp:350
DOM::HTMLDListElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:58
DOM::HTMLLIElement::setValue
void setValue(long)
see value
Definition: html_list.cpp:169
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::HTMLMenuElement
Menu list.
Definition: html_list.h:186
DOM::HTMLDListElement
Definition list.
Definition: html_list.h:52
DOM::HTMLMenuElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:213
DOM::HTMLDirectoryElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:111
DOM
The Document Object Model (DOM) is divided into two parts, the COREDOM core DOM, specifying some core...
Definition: design.h:56
DOM::HTMLOListElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:254
DOM::HTMLMenuElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:207
DOM::HTMLOListElement::start
long start() const
Starting sequence number.
Definition: html_list.cpp:271
DOM::HTMLDirectoryElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:105
DOM::HTMLOListElement::setStart
void setStart(long)
see start
Definition: html_list.cpp:277
DOM::HTMLUListElement
Unordered list.
Definition: html_list.h:294
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:69
DOM::HTMLDListElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:64

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.8.8
This website is maintained by Timothy Pearson.