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

tdehtml

  • tdehtml
  • dom
css_rule.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_rule_h_
28 #define _CSS_css_rule_h_
29 
30 #include <dom/dom_string.h>
31 #include <dom/css_stylesheet.h>
32 #include <dom/css_value.h>
33 
34 namespace DOM {
35 
36 class CSSRuleImpl;
37 
52 class TDEHTML_EXPORT CSSRule
53 {
54 public:
55  CSSRule();
56  CSSRule(const CSSRule &other);
57  CSSRule(CSSRuleImpl *impl);
58 public:
59 
60  CSSRule & operator = (const CSSRule &other);
61 
62  ~CSSRule();
67  enum RuleType {
68  UNKNOWN_RULE = 0,
69  STYLE_RULE = 1,
70  CHARSET_RULE = 2,
71  IMPORT_RULE = 3,
72  MEDIA_RULE = 4,
73  FONT_FACE_RULE = 5,
74  PAGE_RULE = 6,
75  QUIRKS_RULE = 100 // TDEHTML CSS Extension
76  };
77 
85  unsigned short type() const;
86 
92  DOM::DOMString cssText() const;
93 
111  void setCssText( const DOM::DOMString & );
112 
117  CSSStyleSheet parentStyleSheet() const;
118 
126  CSSRule parentRule() const;
127 
132  CSSRuleImpl *handle() const;
133  bool isNull() const;
134 
135 protected:
136  CSSRuleImpl *impl;
137 
138  void assignOther( const CSSRule &other, RuleType thisType );
139 };
140 
141 class CSSCharsetRuleImpl;
142 
149 class TDEHTML_EXPORT CSSCharsetRule : public CSSRule
150 {
151 public:
152  CSSCharsetRule();
153  CSSCharsetRule(const CSSCharsetRule &other);
154  CSSCharsetRule(const CSSRule &other);
155  CSSCharsetRule(CSSCharsetRuleImpl *impl);
156 public:
157 
158  CSSCharsetRule & operator = (const CSSCharsetRule &other);
159  CSSCharsetRule & operator = (const CSSRule &other);
160 
161  ~CSSCharsetRule();
162 
168  DOM::DOMString encoding() const;
169 
181  void setEncoding( const DOM::DOMString & );
182 };
183 
184 
185 class CSSFontFaceRuleImpl;
193 class TDEHTML_EXPORT CSSFontFaceRule : public CSSRule
194 {
195 public:
196  CSSFontFaceRule();
197  CSSFontFaceRule(const CSSFontFaceRule &other);
198  CSSFontFaceRule(const CSSRule &other);
199  CSSFontFaceRule(CSSFontFaceRuleImpl *impl);
200 public:
201 
202  CSSFontFaceRule & operator = (const CSSFontFaceRule &other);
203  CSSFontFaceRule & operator = (const CSSRule &other);
204 
205  ~CSSFontFaceRule();
206 
212  CSSStyleDeclaration style() const;
213 };
214 
215 class CSSImportRuleImpl;
223 class TDEHTML_EXPORT CSSImportRule : public CSSRule
224 {
225 public:
226  CSSImportRule();
227  CSSImportRule(const CSSImportRule &other);
228  CSSImportRule(const CSSRule &other);
229  CSSImportRule(CSSImportRuleImpl *impl);
230 public:
231 
232  CSSImportRule & operator = (const CSSImportRule &other);
233  CSSImportRule & operator = (const CSSRule &other);
234 
235  ~CSSImportRule();
236 
243  DOM::DOMString href() const;
244 
249  MediaList media() const;
250 
259  CSSStyleSheet styleSheet() const;
260 };
261 
262 class CSSMediaRuleImpl;
270 class TDEHTML_EXPORT CSSMediaRule : public CSSRule
271 {
272 public:
273  CSSMediaRule();
274  CSSMediaRule(const CSSMediaRule &other);
275  CSSMediaRule(const CSSRule &other);
276  CSSMediaRule(CSSMediaRuleImpl *impl);
277 public:
278 
279  CSSMediaRule & operator = (const CSSMediaRule &other);
280  CSSMediaRule & operator = (const CSSRule &other);
281 
282  ~CSSMediaRule();
283 
290  MediaList media() const;
291 
296  CSSRuleList cssRules() const;
297 
331  unsigned long insertRule ( const DOM::DOMString &rule, unsigned long index );
332 
349  void deleteRule ( unsigned long index );
350 };
351 
352 
353 class CSSPageRuleImpl;
362 class TDEHTML_EXPORT CSSPageRule : public CSSRule
363 {
364 public:
365  CSSPageRule();
366  CSSPageRule(const CSSPageRule &other);
367  CSSPageRule(const CSSRule &other);
368  CSSPageRule(CSSPageRuleImpl *impl);
369 public:
370 
371  CSSPageRule & operator = (const CSSPageRule &other);
372  CSSPageRule & operator = (const CSSRule &other);
373 
374  ~CSSPageRule();
375 
381  DOM::DOMString selectorText() const;
382 
394  void setSelectorText( const DOM::DOMString & );
395 
401  CSSStyleDeclaration style() const;
402 };
403 
404 class CSSStyleRuleImpl;
411 class TDEHTML_EXPORT CSSStyleRule : public CSSRule
412 {
413 public:
414  CSSStyleRule();
415  CSSStyleRule(const CSSStyleRule &other);
416  CSSStyleRule(const CSSRule &other);
417  CSSStyleRule(CSSStyleRuleImpl *impl);
418 public:
419 
420  CSSStyleRule & operator = (const CSSStyleRule &other);
421  CSSStyleRule & operator = (const CSSRule &other);
422 
423  ~CSSStyleRule();
424 
432  DOM::DOMString selectorText() const;
433 
445  void setSelectorText( const DOM::DOMString & );
446 
452  CSSStyleDeclaration style() const;
453 };
454 
455 class CSSUnknownRuleImpl;
461 class TDEHTML_EXPORT CSSUnknownRule : public CSSRule
462 {
463 public:
464  CSSUnknownRule();
465  CSSUnknownRule(const CSSUnknownRule &other);
466  CSSUnknownRule(const CSSRule &other);
467  CSSUnknownRule(CSSUnknownRuleImpl *impl);
468 public:
469 
470  CSSUnknownRule & operator = (const CSSUnknownRule &other);
471  CSSUnknownRule & operator = (const CSSRule &other);
472 
473  ~CSSUnknownRule();
474 };
475 
476 
477 class CSSRuleListImpl;
478 class StyleListImpl;
484 class TDEHTML_EXPORT CSSRuleList
485 {
486 public:
487  CSSRuleList();
488  CSSRuleList(const CSSRuleList &other);
489  CSSRuleList(CSSRuleListImpl *i);
490  CSSRuleList(StyleListImpl *i);
491 public:
492 
493  CSSRuleList & operator = (const CSSRuleList &other);
494 
495  ~CSSRuleList();
496 
503  unsigned long length() const;
504 
517  CSSRule item ( unsigned long index );
518 
523  CSSRuleListImpl *handle() const;
524  bool isNull() const;
525 
526 protected:
527  // we just need a pointer to an implementation here.
528  CSSRuleListImpl *impl;
529 };
530 
531 
532 } // namespace
533 
534 #endif
DOM::CSSStyleDeclaration
The CSSStyleDeclaration interface represents a single CSS declaration block .
Definition: css_value.h:60
DOM::CSSRule::RuleType
RuleType
An integer indicating which type of rule this is.
Definition: css_rule.h:67
DOM::CSSImportRule
The CSSImportRule interface represents a @import rule within a CSS style sheet.
Definition: css_rule.h:223
DOM::CSSFontFaceRule
The CSSFontFaceRule interface represents a @font-face rule in a CSS style sheet. ...
Definition: css_rule.h:193
DOM::CSSStyleSheet
The CSSStyleSheet interface is a concrete interface used to represent a CSS style sheet i...
Definition: css_stylesheet.h:207
DOM::CSSUnknownRule
The CSSUnkownRule interface represents an at-rule not supported by this user agent.
Definition: css_rule.h:461
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::CSSStyleRule
The CSSStyleRule interface represents a single rule set in a CSS style sheet.
Definition: css_rule.h:411
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::CSSRule
The CSSRule interface is the abstract base interface for any type of CSS statement ...
Definition: css_rule.h:52
DOM::CSSCharsetRule
The CSSCharsetRule interface a @charset rule in a CSS style sheet.
Definition: css_rule.h:149
DOM::CSSMediaRule
The CSSMediaRule interface represents a @media rule in a CSS style sheet.
Definition: css_rule.h:270

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.