css_rule.h
/*
* This file is part of the DOM implementation for KDE.
*
* (C) 1999 Lars Knoll (knoll@kde.org)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* This file includes excerpts from the Document Object Model (DOM)
* Level 2 Specification (Candidate Recommendation)
* http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/
* Copyright © 2000 W3C® (MIT, INRIA, Keio), All Rights Reserved.
*
*/
#ifndef _CSS_css_rule_h_
#define _CSS_css_rule_h_
#include <dom/dom_string.h>
#include <dom/css_stylesheet.h>
#include <dom/css_value.h>
namespace DOM {
class CSSRuleImpl;
class KHTML_EXPORT CSSRule
{
public:
CSSRule();
CSSRule(const CSSRule &other);
CSSRule(CSSRuleImpl *impl);
public:
CSSRule & operator = (const CSSRule &other);
~CSSRule();
enum RuleType {
UNKNOWN_RULE = 0,
STYLE_RULE = 1,
CHARSET_RULE = 2,
IMPORT_RULE = 3,
MEDIA_RULE = 4,
FONT_FACE_RULE = 5,
PAGE_RULE = 6,
QUIRKS_RULE = 100 // KHTML CSS Extension
};
unsigned short type() const;
DOM::DOMString cssText() const;
void setCssText( const DOM::DOMString & );
CSSStyleSheet parentStyleSheet() const;
CSSRule parentRule() const;
CSSRuleImpl *handle() const;
bool isNull() const;
protected:
CSSRuleImpl *impl;
void assignOther( const CSSRule &other, RuleType thisType );
};
class CSSCharsetRuleImpl;
class KHTML_EXPORT CSSCharsetRule : public CSSRule
{
public:
CSSCharsetRule();
CSSCharsetRule(const CSSCharsetRule &other);
CSSCharsetRule(const CSSRule &other);
CSSCharsetRule(CSSCharsetRuleImpl *impl);
public:
CSSCharsetRule & operator = (const CSSCharsetRule &other);
CSSCharsetRule & operator = (const CSSRule &other);
~CSSCharsetRule();
DOM::DOMString encoding() const;
void setEncoding( const DOM::DOMString & );
};
class CSSFontFaceRuleImpl;
class KHTML_EXPORT CSSFontFaceRule : public CSSRule
{
public:
CSSFontFaceRule();
CSSFontFaceRule(const CSSFontFaceRule &other);
CSSFontFaceRule(const CSSRule &other);
CSSFontFaceRule(CSSFontFaceRuleImpl *impl);
public:
CSSFontFaceRule & operator = (const CSSFontFaceRule &other);
CSSFontFaceRule & operator = (const CSSRule &other);
~CSSFontFaceRule();
CSSStyleDeclaration style() const;
};
class CSSImportRuleImpl;
class KHTML_EXPORT CSSImportRule : public CSSRule
{
public:
CSSImportRule();
CSSImportRule(const CSSImportRule &other);
CSSImportRule(const CSSRule &other);
CSSImportRule(CSSImportRuleImpl *impl);
public:
CSSImportRule & operator = (const CSSImportRule &other);
CSSImportRule & operator = (const CSSRule &other);
~CSSImportRule();
DOM::DOMString href() const;
MediaList media() const;
CSSStyleSheet styleSheet() const;
};
class CSSMediaRuleImpl;
class KHTML_EXPORT CSSMediaRule : public CSSRule
{
public:
CSSMediaRule();
CSSMediaRule(const CSSMediaRule &other);
CSSMediaRule(const CSSRule &other);
CSSMediaRule(CSSMediaRuleImpl *impl);
public:
CSSMediaRule & operator = (const CSSMediaRule &other);
CSSMediaRule & operator = (const CSSRule &other);
~CSSMediaRule();
MediaList media() const;
CSSRuleList cssRules() const;
unsigned long insertRule ( const DOM::DOMString &rule, unsigned long index );
void deleteRule ( unsigned long index );
};
class CSSPageRuleImpl;
class KHTML_EXPORT CSSPageRule : public CSSRule
{
public:
CSSPageRule();
CSSPageRule(const CSSPageRule &other);
CSSPageRule(const CSSRule &other);
CSSPageRule(CSSPageRuleImpl *impl);
public:
CSSPageRule & operator = (const CSSPageRule &other);
CSSPageRule & operator = (const CSSRule &other);
~CSSPageRule();
DOM::DOMString selectorText() const;
void setSelectorText( const DOM::DOMString & );
CSSStyleDeclaration style() const;
};
class CSSStyleRuleImpl;
class KHTML_EXPORT CSSStyleRule : public CSSRule
{
public:
CSSStyleRule();
CSSStyleRule(const CSSStyleRule &other);
CSSStyleRule(const CSSRule &other);
CSSStyleRule(CSSStyleRuleImpl *impl);
public:
CSSStyleRule & operator = (const CSSStyleRule &other);
CSSStyleRule & operator = (const CSSRule &other);
~CSSStyleRule();
DOM::DOMString selectorText() const;
void setSelectorText( const DOM::DOMString & );
CSSStyleDeclaration style() const;
};
class CSSUnknownRuleImpl;
class KHTML_EXPORT CSSUnknownRule : public CSSRule
{
public:
CSSUnknownRule();
CSSUnknownRule(const CSSUnknownRule &other);
CSSUnknownRule(const CSSRule &other);
CSSUnknownRule(CSSUnknownRuleImpl *impl);
public:
CSSUnknownRule & operator = (const CSSUnknownRule &other);
CSSUnknownRule & operator = (const CSSRule &other);
~CSSUnknownRule();
};
class CSSRuleListImpl;
class StyleListImpl;
class KHTML_EXPORT CSSRuleList
{
public:
CSSRuleList();
CSSRuleList(const CSSRuleList &other);
CSSRuleList(CSSRuleListImpl *i);
CSSRuleList(StyleListImpl *i);
public:
CSSRuleList & operator = (const CSSRuleList &other);
~CSSRuleList();
unsigned long length() const;
CSSRule item ( unsigned long index );
CSSRuleListImpl *handle() const;
bool isNull() const;
protected:
// we just need a pointer to an implementation here.
CSSRuleListImpl *impl;
};
} // namespace
#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::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

KDE Home | KDE Accessibility Home | Description of Access Keys