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

KHTML

  • 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
34namespace DOM {
35
36class CSSRuleImpl;
37
52class KHTML_EXPORT CSSRule
53{
54public:
55 CSSRule();
56 CSSRule(const CSSRule &other);
57 CSSRule(CSSRuleImpl *impl);
58public:
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
136protected:
137 CSSRuleImpl *impl;
138
139 void assignOther( const CSSRule &other, RuleType thisType );
140};
141
142class CSSCharsetRuleImpl;
143
150class KHTML_EXPORT CSSCharsetRule : public CSSRule
151{
152public:
153 CSSCharsetRule();
154 CSSCharsetRule(const CSSCharsetRule &other);
155 CSSCharsetRule(const CSSRule &other);
156 CSSCharsetRule(CSSCharsetRuleImpl *impl);
157public:
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
186class CSSFontFaceRuleImpl;
194class KHTML_EXPORT CSSFontFaceRule : public CSSRule
195{
196public:
197 CSSFontFaceRule();
198 CSSFontFaceRule(const CSSFontFaceRule &other);
199 CSSFontFaceRule(const CSSRule &other);
200 CSSFontFaceRule(CSSFontFaceRuleImpl *impl);
201public:
202
203 CSSFontFaceRule & operator = (const CSSFontFaceRule &other);
204 CSSFontFaceRule & operator = (const CSSRule &other);
205
206 ~CSSFontFaceRule();
207
213 CSSStyleDeclaration style() const;
214};
215
216class CSSImportRuleImpl;
224class KHTML_EXPORT CSSImportRule : public CSSRule
225{
226public:
227 CSSImportRule();
228 CSSImportRule(const CSSImportRule &other);
229 CSSImportRule(const CSSRule &other);
230 CSSImportRule(CSSImportRuleImpl *impl);
231public:
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
263class CSSMediaRuleImpl;
271class KHTML_EXPORT CSSMediaRule : public CSSRule
272{
273public:
274 CSSMediaRule();
275 CSSMediaRule(const CSSMediaRule &other);
276 CSSMediaRule(const CSSRule &other);
277 CSSMediaRule(CSSMediaRuleImpl *impl);
278public:
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
354class CSSPageRuleImpl;
363class KHTML_EXPORT CSSPageRule : public CSSRule
364{
365public:
366 CSSPageRule();
367 CSSPageRule(const CSSPageRule &other);
368 CSSPageRule(const CSSRule &other);
369 CSSPageRule(CSSPageRuleImpl *impl);
370public:
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
405class CSSStyleRuleImpl;
412class KHTML_EXPORT CSSStyleRule : public CSSRule
413{
414public:
415 CSSStyleRule();
416 CSSStyleRule(const CSSStyleRule &other);
417 CSSStyleRule(const CSSRule &other);
418 CSSStyleRule(CSSStyleRuleImpl *impl);
419public:
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
456class CSSNamespaceRuleImpl;
462class KHTML_EXPORT CSSNamespaceRule : public CSSRule
463{
464public:
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;
472public:
473
474 CSSNamespaceRule & operator = (const CSSNamespaceRule &other);
475 CSSNamespaceRule & operator = (const CSSRule &other);
476
477 ~CSSNamespaceRule();
478};
479
480
481
482
483class CSSUnknownRuleImpl;
489class KHTML_EXPORT CSSUnknownRule : public CSSRule
490{
491public:
492 CSSUnknownRule();
493 CSSUnknownRule(const CSSUnknownRule &other);
494 CSSUnknownRule(const CSSRule &other);
495 CSSUnknownRule(CSSUnknownRuleImpl *impl);
496public:
497
498 CSSUnknownRule & operator = (const CSSUnknownRule &other);
499 CSSUnknownRule & operator = (const CSSRule &other);
500
501 ~CSSUnknownRule();
502};
503
504
505class CSSRuleListImpl;
506class StyleListImpl;
512class KHTML_EXPORT CSSRuleList
513{
514public:
515 CSSRuleList();
516 CSSRuleList(const CSSRuleList &other);
517 CSSRuleList(CSSRuleListImpl *i);
518 CSSRuleList(StyleListImpl *i);
519public:
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
554protected:
555 // we just need a pointer to an implementation here.
556 CSSRuleListImpl *impl;
557};
558
559
560} // namespace
561
562#endif
DOM::CSSCharsetRule
The CSSCharsetRule interface a @charset rule in a CSS style sheet.
Definition: css_rule.h:151
DOM::CSSFontFaceRule
The CSSFontFaceRule interface represents a @font-face rule in a CSS style sheet.
Definition: css_rule.h:195
DOM::CSSImportRule
The CSSImportRule interface represents a @import rule within a CSS style sheet.
Definition: css_rule.h:225
DOM::CSSMediaRule
The CSSMediaRule interface represents a @media rule in a CSS style sheet.
Definition: css_rule.h:272
DOM::CSSNamespaceRule
Definition: css_rule.h:463
DOM::CSSPageRule
Definition: css_rule.h:364
DOM::CSSRuleList
The CSSRuleList interface provides the abstraction of an ordered collection of CSS rules.
Definition: css_rule.h:513
DOM::CSSRuleList::impl
CSSRuleListImpl * impl
Definition: css_rule.h:556
DOM::CSSRule
The CSSRule interface is the abstract base interface for any type of CSS statement .
Definition: css_rule.h:53
DOM::CSSRule::RuleType
RuleType
An integer indicating which type of rule this is.
Definition: css_rule.h:67
DOM::CSSRule::impl
CSSRuleImpl * impl
Definition: css_rule.h:137
DOM::CSSStyleDeclaration
The CSSStyleDeclaration interface represents a single CSS declaration block .
Definition: css_value.h:61
DOM::CSSStyleRule
The CSSStyleRule interface represents a single rule set in a CSS style sheet.
Definition: css_rule.h:413
DOM::CSSStyleSheet
The CSSStyleSheet interface is a concrete interface used to represent a CSS style sheet i....
Definition: css_stylesheet.h:219
DOM::CSSUnknownRule
The CSSUnkownRule interface represents an at-rule not supported by this user agent.
Definition: css_rule.h:490
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::MediaList
The MediaList interface provides the abstraction of an ordered collection of media,...
Definition: css_stylesheet.h:378
css_stylesheet.h
css_value.h
dom_string.h
prefix
QString prefix()
DOM
This library provides a full-featured HTML parser and widget.
Definition: design.h:55
rule
The CSSNamespaceRule interface represents an.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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