# khtml Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# css_rule.h

    00001 /*
    00002  * This file is part of the DOM implementation for KDE.
    00003  *
    00004  * (C) 1999 Lars Knoll (knoll@kde.org)
    00005  *
    00006  * This library is free software; you can redistribute it and/or
    00007  * modify it under the terms of the GNU Library General Public
    00008  * License as published by the Free Software Foundation; either
    00009  * version 2 of the License, or (at your option) any later version.
    00010  *
    00011  * This library is distributed in the hope that it will be useful,
    00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014  * Library General Public License for more details.
    00015  *
    00016  * You should have received a copy of the GNU Library General Public License
    00017  * along with this library; see the file COPYING.LIB.  If not, write to
    00018  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00019  * Boston, MA 02111-1307, USA.
    00020  *
    00021  * This file includes excerpts from the Document Object Model (DOM)
    00022  * Level 2 Specification (Candidate Recommendation)
    00023  * http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/
    00024  * Copyright © 2000 W3C® (MIT, INRIA, Keio), All Rights Reserved.
    00025  *
    00026  * $Id: css_rule.h,v 1.9.2.1 2003/05/18 12:34:37 mueller Exp $
    00027  */
    00028 #ifndef _CSS_css_rule_h_
    00029 #define _CSS_css_rule_h_
    00030
    00031 #include <dom/dom_string.h>
    00032 #include <dom/css_stylesheet.h>
    00033 #include <dom/css_value.h>
    00034
    00035 namespace DOM {
    00036
    00037 class CSSRuleImpl;
    00038
    00053 class CSSRule
    00054 {
    00055 public:
    00056     CSSRule();
    00057     CSSRule(const CSSRule &other);
    00058     CSSRule(CSSRuleImpl *impl);
    00059 public:
    00060
    00061     CSSRule & operator = (const CSSRule &other);
    00062
    00063     ~CSSRule();
    00068     enum RuleType {
    00069         UNKNOWN_RULE = 0,
    00070         STYLE_RULE = 1,
    00071         CHARSET_RULE = 2,
    00072         IMPORT_RULE = 3,
    00073         MEDIA_RULE = 4,
    00074         FONT_FACE_RULE = 5,
    00075         PAGE_RULE = 6
    00076     };
    00077
    00085     unsigned short type() const;
    00086
    00092     DOM::DOMString cssText() const;
    00093
    00111     void setCssText( const DOM::DOMString & );
    00112
    00117     CSSStyleSheet parentStyleSheet() const;
    00118
    00126     CSSRule parentRule() const;
    00127
    00132     CSSRuleImpl *handle() const;
    00133     bool isNull() const;
    00134
    00135 protected:
    00136     CSSRuleImpl *impl;
    00137
    00138     void assignOther( const CSSRule &other, RuleType thisType );
    00139 };
    00140
    00141 class CSSCharsetRuleImpl;
    00142
    00149 class CSSCharsetRule : public CSSRule
    00150 {
    00151 public:
    00152     CSSCharsetRule();
    00153     CSSCharsetRule(const CSSCharsetRule &other);
    00154     CSSCharsetRule(const CSSRule &other);
    00155     CSSCharsetRule(CSSCharsetRuleImpl *impl);
    00156 public:
    00157
    00158     CSSCharsetRule & operator = (const CSSCharsetRule &other);
    00159     CSSCharsetRule & operator = (const CSSRule &other);
    00160
    00161     ~CSSCharsetRule();
    00162
    00168     DOM::DOMString encoding() const;
    00169
    00181     void setEncoding( const DOM::DOMString & );
    00182 };
    00183
    00184
    00185 class CSSFontFaceRuleImpl;
    00193 class CSSFontFaceRule : public CSSRule
    00194 {
    00195 public:
    00196     CSSFontFaceRule();
    00197     CSSFontFaceRule(const CSSFontFaceRule &other);
    00198     CSSFontFaceRule(const CSSRule &other);
    00199     CSSFontFaceRule(CSSFontFaceRuleImpl *impl);
    00200 public:
    00201
    00202     CSSFontFaceRule & operator = (const CSSFontFaceRule &other);
    00203     CSSFontFaceRule & operator = (const CSSRule &other);
    00204
    00205     ~CSSFontFaceRule();
    00206
    00212     CSSStyleDeclaration style() const;
    00213 };
    00214
    00215 class CSSImportRuleImpl;
    00223 class CSSImportRule : public CSSRule
    00224 {
    00225 public:
    00226     CSSImportRule();
    00227     CSSImportRule(const CSSImportRule &other);
    00228     CSSImportRule(const CSSRule &other);
    00229     CSSImportRule(CSSImportRuleImpl *impl);
    00230 public:
    00231
    00232     CSSImportRule & operator = (const CSSImportRule &other);
    00233     CSSImportRule & operator = (const CSSRule &other);
    00234
    00235     ~CSSImportRule();
    00236
    00243     DOM::DOMString href() const;
    00244
    00249     MediaList media() const;
    00250
    00259     CSSStyleSheet styleSheet() const;
    00260 };
    00261
    00262 class CSSMediaRuleImpl;
    00270 class CSSMediaRule : public CSSRule
    00271 {
    00272 public:
    00273     CSSMediaRule();
    00274     CSSMediaRule(const CSSMediaRule &other);
    00275     CSSMediaRule(const CSSRule &other);
    00276     CSSMediaRule(CSSMediaRuleImpl *impl);
    00277 public:
    00278
    00279     CSSMediaRule & operator = (const CSSMediaRule &other);
    00280     CSSMediaRule & operator = (const CSSRule &other);
    00281
    00282     ~CSSMediaRule();
    00283
    00290     MediaList media() const;
    00291
    00296     CSSRuleList cssRules() const;
    00297
    00331     unsigned long insertRule ( const DOM::DOMString &rule, unsigned long index );
    00332
    00349     void deleteRule ( unsigned long index );
    00350 };
    00351
    00352
    00353 class CSSPageRuleImpl;
    00362 class CSSPageRule : public CSSRule
    00363 {
    00364 public:
    00365     CSSPageRule();
    00366     CSSPageRule(const CSSPageRule &other);
    00367     CSSPageRule(const CSSRule &other);
    00368     CSSPageRule(CSSPageRuleImpl *impl);
    00369 public:
    00370
    00371     CSSPageRule & operator = (const CSSPageRule &other);
    00372     CSSPageRule & operator = (const CSSRule &other);
    00373
    00374     ~CSSPageRule();
    00375
    00381     DOM::DOMString selectorText() const;
    00382
    00394     void setSelectorText( const DOM::DOMString & );
    00395
    00401     CSSStyleDeclaration style() const;
    00402 };
    00403
    00404 class CSSStyleRuleImpl;
    00411 class CSSStyleRule : public CSSRule
    00412 {
    00413 public:
    00414     CSSStyleRule();
    00415     CSSStyleRule(const CSSStyleRule &other);
    00416     CSSStyleRule(const CSSRule &other);
    00417     CSSStyleRule(CSSStyleRuleImpl *impl);
    00418 public:
    00419
    00420     CSSStyleRule & operator = (const CSSStyleRule &other);
    00421     CSSStyleRule & operator = (const CSSRule &other);
    00422
    00423     ~CSSStyleRule();
    00424
    00432     DOM::DOMString selectorText() const;
    00433
    00445     void setSelectorText( const DOM::DOMString & );
    00446
    00452     CSSStyleDeclaration style() const;
    00453 };
    00454
    00455 class CSSUnknownRuleImpl;
    00461 class CSSUnknownRule : public CSSRule
    00462 {
    00463 public:
    00464     CSSUnknownRule();
    00465     CSSUnknownRule(const CSSUnknownRule &other);
    00466     CSSUnknownRule(const CSSRule &other);
    00467     CSSUnknownRule(CSSUnknownRuleImpl *impl);
    00468 public:
    00469
    00470     CSSUnknownRule & operator = (const CSSUnknownRule &other);
    00471     CSSUnknownRule & operator = (const CSSRule &other);
    00472
    00473     ~CSSUnknownRule();
    00474 };
    00475
    00476
    00477 class CSSRuleListImpl;
    00478 class StyleListImpl;
    00484 class CSSRuleList
    00485 {
    00486 public:
    00487     CSSRuleList();
    00488     CSSRuleList(const CSSRuleList &other);
    00489     CSSRuleList(CSSRuleListImpl *i);
    00490     CSSRuleList(StyleListImpl *i);
    00491 public:
    00492
    00493     CSSRuleList & operator = (const CSSRuleList &other);
    00494
    00495     ~CSSRuleList();
    00496
    00503     unsigned long length() const;
    00504
    00517     CSSRule item ( unsigned long index );
    00518
    00523     CSSRuleListImpl *handle() const;
    00524     bool isNull() const;
    00525
    00526 protected:
    00527     // we just need a pointer to an implementation here.
    00528     CSSRuleListImpl *impl;
    00529 };
    00530
    00531
    00532 } // namespace
    00533
    00534 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:33:31 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001