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

tdehtml

  • tdehtml
  • dom
css_stylesheet.h
1 /*
2  * This file is part of the DOM implementation for KDE.
3  *
4  * (C) 1999 Lars Knoll (knoll@kde.org)
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 2 Specification (Candidate Recommendation)
23  * http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/
24  * Copyright © 2000 W3C® (MIT, INRIA, Keio), All Rights Reserved.
25  *
26  */
27 #ifndef _CSS_css_stylesheet_h_
28 #define _CSS_css_stylesheet_h_
29 
30 #include <dom/dom_string.h>
31 #include <dom/dom_node.h>
32 #include <dom/dom_misc.h>
33 
34 #include <tdelibs_export.h>
35 
36 namespace DOM {
37 
38 class StyleSheetImpl;
39 class MediaList;
40 class NodeImpl;
41 class DocumentImpl;
42 
58 class TDEHTML_EXPORT StyleSheet
59 {
60 public:
61  StyleSheet();
62  StyleSheet(const StyleSheet &other);
63  StyleSheet(StyleSheetImpl *impl);
64 public:
65 
66  StyleSheet & operator = (const StyleSheet &other);
67 
68  ~StyleSheet();
69 
86  DOM::DOMString type() const;
87 
94  bool disabled() const;
95 
99  void setDisabled( bool );
100 
109  DOM::Node ownerNode() const;
110 
119  StyleSheet parentStyleSheet() const;
120 
132  DOM::DOMString href() const;
133 
144  DOM::DOMString title() const;
145 
156  MediaList media() const;
157 
161  bool isCSSStyleSheet() const;
162  StyleSheetImpl *handle() const { return impl; }
163  bool isNull() const { return !impl; }
164 protected:
165  StyleSheetImpl *impl;
166 };
167 
168 
173 class TDEHTML_EXPORT CSSException
174 {
175 public:
176  CSSException(unsigned short _code) { code = _code; }
177  CSSException(const CSSException &other) { code = other.code; }
178 
179  CSSException & operator = (const CSSException &other)
180  { code = other.code; return *this; }
181 
182  virtual ~CSSException() {}
187  unsigned short code;
188 
189  enum ExceptionCode
190  {
191  SYNTAX_ERR = 0,
192  INVALID_MODIFICATION_ERR = 1,
193  _EXCEPTION_OFFSET = 1000
194  };
195 };
196 
197 class CSSStyleSheetImpl;
198 class CSSRule;
199 class CSSRuleList;
200 
207 class TDEHTML_EXPORT CSSStyleSheet : public StyleSheet
208 {
209 public:
210  CSSStyleSheet();
211  CSSStyleSheet(const CSSStyleSheet &other);
212  CSSStyleSheet(const StyleSheet &other);
213  CSSStyleSheet(CSSStyleSheetImpl *impl);
214 public:
215 
216  CSSStyleSheet & operator = (const CSSStyleSheet &other);
217  CSSStyleSheet & operator = (const StyleSheet &other);
218 
219  ~CSSStyleSheet();
220 
232  CSSRule ownerRule() const;
233 
243  CSSRuleList cssRules() const;
244 
279  unsigned long insertRule ( const DOM::DOMString &rule, unsigned long index );
280 
297  void deleteRule ( unsigned long index );
298 };
299 
300 
301 class StyleSheetListImpl;
302 class StyleSheet;
303 
309 class TDEHTML_EXPORT StyleSheetList
310 {
311 public:
312  StyleSheetList();
313  StyleSheetList(const StyleSheetList &other);
314  StyleSheetList(StyleSheetListImpl *impl);
315 public:
316 
317  StyleSheetList & operator = (const StyleSheetList &other);
318 
319  ~StyleSheetList();
320 
327  unsigned long length() const;
328 
339  StyleSheet item ( unsigned long index );
340 
344  StyleSheetListImpl *handle() const;
345  bool isNull() const;
346 
347 protected:
348  StyleSheetListImpl *impl;
349 };
350 
351 
352 class MediaListImpl;
353 class CSSRule;
354 class CSSStyleSheet;
355 
363 class TDEHTML_EXPORT MediaList
364 {
365 public:
366  MediaList();
367  MediaList(const MediaList &other);
368  MediaList(MediaListImpl *impl);
369 public:
370 
371  MediaList & operator = (const MediaList &other);
372 
373  ~MediaList();
374 
385  DOM::DOMString mediaText() const;
386 
390  void setMediaText(const DOM::DOMString &value);
391 
395  unsigned long length() const;
396 
397 
407  DOM::DOMString item(unsigned long index) const;
408 
419  void deleteMedium(const DOM::DOMString &oldMedium);
420 
433  void appendMedium(const DOM::DOMString &newMedium);
434 
438  MediaListImpl *handle() const;
439  bool isNull() const;
440 
441 protected:
442  MediaListImpl *impl;
443 };
444 
445 class LinkStyleImpl;
446 
447 class TDEHTML_EXPORT LinkStyle
448 {
449 public:
450  LinkStyle();
451  LinkStyle(const LinkStyle &other);
452 
453  LinkStyle & operator = (const LinkStyle &other);
454  LinkStyle & operator = (const Node &other);
455 
456  ~LinkStyle();
457 
458  StyleSheet sheet();
459 
460  bool isNull() const;
461 
462 protected:
463  DOM::NodeImpl *node;
464  LinkStyleImpl *impl;
465 };
466 
467 class DocumentStyleImpl;
468 
469 class TDEHTML_EXPORT DocumentStyle
470 {
471 public:
472  DocumentStyle();
473  DocumentStyle(const DocumentStyle &other);
474 
475  DocumentStyle & operator = (const DocumentStyle &other);
476  DocumentStyle & operator = (const Document &other);
477 
478  ~DocumentStyle();
479 
480  // KDE 4:: make const
481  StyleSheetList styleSheets();
482 
483  DOMString preferredStylesheetSet() const;
484  DOMString selectedStylesheetSet() const;
485  void setSelectedStylesheetSet( const DOMString& aString );
486 
487  bool isNull() const { return !impl; }
488 
489 protected:
490  DOM::DocumentImpl *doc;
491  DocumentStyleImpl *impl;
492 };
493 
494 } // namespace
495 
496 #endif
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:274
DOM::CSSStyleSheet
The CSSStyleSheet interface is a concrete interface used to represent a CSS style sheet i...
Definition: css_stylesheet.h:207
DOM::MediaList
The MediaList interface provides the abstraction of an ordered collection of media, without defining or constraining how this collection is implemented.
Definition: css_stylesheet.h:363
DOM::StyleSheetList
The StyleSheetList interface provides the abstraction of an ordered collection of style sheets...
Definition: css_stylesheet.h:309
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM
The Document Object Model (DOM) is divided into two parts, the COREDOM core DOM, specifying some core...
Definition: design.h:56
DOM::CSSRuleList
The CSSRuleList interface provides the abstraction of an ordered collection of CSS rules...
Definition: css_rule.h:484
DOM::StyleSheet
The StyleSheet interface is the abstract base interface for any type of style sheet.
Definition: css_stylesheet.h:58
DOM::CSSRule
The CSSRule interface is the abstract base interface for any type of CSS statement ...
Definition: css_rule.h:52
DOM::CSSException
This exception is raised when a specific CSS operation is impossible to perform.
Definition: css_stylesheet.h:173
DOM::CSSException::code
unsigned short code
An integer indicating the type of error generated.
Definition: css_stylesheet.h:187

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.