• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
  • dom
css_rule.h
Go to the documentation of this file.
1 /*
2  * This file is part of the DOM implementation for KDE.
3  *
4  * Copyright 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 KHTML_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  NAMESPACE_RULE = 10,
76  QUIRKS_RULE = 100 // KHTML CSS Extension
77  };
78 
86  unsigned short type() const;
87 
93  DOM::DOMString cssText() const;
94 
112  void setCssText( const DOM::DOMString & );
113 
118  CSSStyleSheet parentStyleSheet() const;
119 
127  CSSRule parentRule() const;
128 
133  CSSRuleImpl *handle() const;
134  bool isNull() const;
135 
136 protected:
137  CSSRuleImpl *impl;
138 
139  void assignOther( const CSSRule &other, RuleType thisType );
140 };
141 
142 class CSSCharsetRuleImpl;
143 
150 class KHTML_EXPORT CSSCharsetRule : public CSSRule
151 {
152 public:
153  CSSCharsetRule();
154  CSSCharsetRule(const CSSCharsetRule &other);
155  CSSCharsetRule(const CSSRule &other);
156  CSSCharsetRule(CSSCharsetRuleImpl *impl);
157 public:
158 
159  CSSCharsetRule & operator = (const CSSCharsetRule &other);
160  CSSCharsetRule & operator = (const CSSRule &other);
161 
162  ~CSSCharsetRule();
163 
169  DOM::DOMString encoding() const;
170 
182  void setEncoding( const DOM::DOMString & );
183 };
184 
185 
186 class CSSFontFaceRuleImpl;
194 class KHTML_EXPORT CSSFontFaceRule : public CSSRule
195 {
196 public:
197  CSSFontFaceRule();
198  CSSFontFaceRule(const CSSFontFaceRule &other);
199  CSSFontFaceRule(const CSSRule &other);
200  CSSFontFaceRule(CSSFontFaceRuleImpl *impl);
201 public:
202 
203  CSSFontFaceRule & operator = (const CSSFontFaceRule &other);
204  CSSFontFaceRule & operator = (const CSSRule &other);
205 
206  ~CSSFontFaceRule();
207 
213  CSSStyleDeclaration style() const;
214 };
215 
216 class CSSImportRuleImpl;
224 class KHTML_EXPORT CSSImportRule : public CSSRule
225 {
226 public:
227  CSSImportRule();
228  CSSImportRule(const CSSImportRule &other);
229  CSSImportRule(const CSSRule &other);
230  CSSImportRule(CSSImportRuleImpl *impl);
231 public:
232 
233  CSSImportRule & operator = (const CSSImportRule &other);
234  CSSImportRule & operator = (const CSSRule &other);
235 
236  ~CSSImportRule();
237 
244  DOM::DOMString href() const;
245 
250  MediaList media() const;
251 
260  CSSStyleSheet styleSheet() const;
261 };
262 
263 class CSSMediaRuleImpl;
271 class KHTML_EXPORT CSSMediaRule : public CSSRule
272 {
273 public:
274  CSSMediaRule();
275  CSSMediaRule(const CSSMediaRule &other);
276  CSSMediaRule(const CSSRule &other);
277  CSSMediaRule(CSSMediaRuleImpl *impl);
278 public:
279 
280  CSSMediaRule & operator = (const CSSMediaRule &other);
281  CSSMediaRule & operator = (const CSSRule &other);
282 
283  ~CSSMediaRule();
284 
291  MediaList media() const;
292 
297  CSSRuleList cssRules() const;
298 
332  unsigned long insertRule ( const DOM::DOMString &rule, unsigned long index );
333 
350  void deleteRule ( unsigned long index );
351 };
352 
353 
354 class CSSPageRuleImpl;
363 class KHTML_EXPORT CSSPageRule : public CSSRule
364 {
365 public:
366  CSSPageRule();
367  CSSPageRule(const CSSPageRule &other);
368  CSSPageRule(const CSSRule &other);
369  CSSPageRule(CSSPageRuleImpl *impl);
370 public:
371 
372  CSSPageRule & operator = (const CSSPageRule &other);
373  CSSPageRule & operator = (const CSSRule &other);
374 
375  ~CSSPageRule();
376 
382  DOM::DOMString selectorText() const;
383 
395  void setSelectorText( const DOM::DOMString & );
396 
402  CSSStyleDeclaration style() const;
403 };
404 
405 class CSSStyleRuleImpl;
412 class KHTML_EXPORT CSSStyleRule : public CSSRule
413 {
414 public:
415  CSSStyleRule();
416  CSSStyleRule(const CSSStyleRule &other);
417  CSSStyleRule(const CSSRule &other);
418  CSSStyleRule(CSSStyleRuleImpl *impl);
419 public:
420 
421  CSSStyleRule & operator = (const CSSStyleRule &other);
422  CSSStyleRule & operator = (const CSSRule &other);
423 
424  ~CSSStyleRule();
425 
433  DOM::DOMString selectorText() const;
434 
446  void setSelectorText( const DOM::DOMString & );
447 
453  CSSStyleDeclaration style() const;
454 };
455 
456 class CSSNamespaceRuleImpl;
462 class KHTML_EXPORT CSSNamespaceRule : public CSSRule
463 {
464 public:
465  CSSNamespaceRule();
466  CSSNamespaceRule(const CSSNamespaceRule &other);
467  CSSNamespaceRule(const CSSRule &other);
468  CSSNamespaceRule(CSSNamespaceRuleImpl *impl);
469 
470  DOMString namespaceURI() const;
471  DOMString prefix() const;
472 public:
473 
474  CSSNamespaceRule & operator = (const CSSNamespaceRule &other);
475  CSSNamespaceRule & operator = (const CSSRule &other);
476 
477  ~CSSNamespaceRule();
478 };
479 
480 
481 
482 
483 class CSSUnknownRuleImpl;
489 class KHTML_EXPORT CSSUnknownRule : public CSSRule
490 {
491 public:
492  CSSUnknownRule();
493  CSSUnknownRule(const CSSUnknownRule &other);
494  CSSUnknownRule(const CSSRule &other);
495  CSSUnknownRule(CSSUnknownRuleImpl *impl);
496 public:
497 
498  CSSUnknownRule & operator = (const CSSUnknownRule &other);
499  CSSUnknownRule & operator = (const CSSRule &other);
500 
501  ~CSSUnknownRule();
502 };
503 
504 
505 class CSSRuleListImpl;
506 class StyleListImpl;
512 class KHTML_EXPORT CSSRuleList
513 {
514 public:
515  CSSRuleList();
516  CSSRuleList(const CSSRuleList &other);
517  CSSRuleList(CSSRuleListImpl *i);
518  CSSRuleList(StyleListImpl *i);
519 public:
520 
521  CSSRuleList & operator = (const CSSRuleList &other);
522 
523  ~CSSRuleList();
524 
531  unsigned long length() const;
532 
545  CSSRule item ( unsigned long index );
546 
551  CSSRuleListImpl *handle() const;
552  bool isNull() const;
553 
554 protected:
555  // we just need a pointer to an implementation here.
556  CSSRuleListImpl *impl;
557 };
558 
559 
560 } // namespace
561 
562 #endif
dom_string.h
css_value.h
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::CSSPageRule
Definition: css_rule.h:363
DOM::CSSImportRule
The CSSImportRule interface represents a @import rule within a CSS style sheet.
Definition: css_rule.h:224
DOM::CSSFontFaceRule
The CSSFontFaceRule interface represents a @font-face rule in a CSS style sheet. ...
Definition: css_rule.h:194
prefix
QString prefix()
DOM::CSSStyleSheet
The CSSStyleSheet interface is a concrete interface used to represent a CSS style sheet i...
Definition: css_stylesheet.h:218
DOM::CSSUnknownRule
The CSSUnkownRule interface represents an at-rule not supported by this user agent.
Definition: css_rule.h:489
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:377
DOM::CSSStyleRule
The CSSStyleRule interface represents a single rule set in a CSS style sheet.
Definition: css_rule.h:412
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
css_stylesheet.h
DOM::CSSRule::impl
CSSRuleImpl * impl
Definition: css_rule.h:137
DOM::CSSRuleList
The CSSRuleList interface provides the abstraction of an ordered collection of CSS rules...
Definition: css_rule.h:512
DOM::CSSRule
The CSSRule interface is the abstract base interface for any type of CSS statement ...
Definition: css_rule.h:52
DOM::CSSRuleList::impl
CSSRuleListImpl * impl
Definition: css_rule.h:556
DOM::CSSCharsetRule
The CSSCharsetRule interface a @charset rule in a CSS style sheet.
Definition: css_rule.h:150
DOM::CSSNamespaceRule
Definition: css_rule.h:462
DOM::CSSMediaRule
The CSSMediaRule interface represents a @media rule in a CSS style sheet.
Definition: css_rule.h:271
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal