css_stylesheet.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _CSS_css_stylesheet_h_
00029 #define _CSS_css_stylesheet_h_
00030
00031 #include <dom/dom_string.h>
00032 #include <dom/dom_node.h>
00033 #include <dom/dom_misc.h>
00034
00035
00036 namespace DOM {
00037
00038 class StyleSheetImpl;
00039 class MediaList;
00040 class NodeImpl;
00041 class DocumentImpl;
00042
00058 class StyleSheet
00059 {
00060 public:
00061 StyleSheet();
00062 StyleSheet(const StyleSheet &other);
00063 StyleSheet(StyleSheetImpl *impl);
00064 public:
00065
00066 StyleSheet & operator = (const StyleSheet &other);
00067
00068 ~StyleSheet();
00069
00086 DOM::DOMString type() const;
00087
00094 bool disabled() const;
00095
00099 void setDisabled( bool );
00100
00109 DOM::Node ownerNode() const;
00110
00119 StyleSheet parentStyleSheet() const;
00120
00132 DOM::DOMString href() const;
00133
00144 DOM::DOMString title() const;
00145
00156 MediaList media() const;
00157
00161 bool isCSSStyleSheet() const;
00162 StyleSheetImpl *handle() const { return impl; }
00163 bool isNull() const;
00164 protected:
00165 StyleSheetImpl *impl;
00166 };
00167
00168
00173 class CSSException
00174 {
00175 public:
00176 CSSException(unsigned short _code) { code = _code; }
00177 CSSException(const CSSException &other) { code = other.code; }
00178
00179 CSSException & operator = (const CSSException &other)
00180 { code = other.code; return *this; }
00181
00182 virtual ~CSSException() {}
00187 unsigned short code;
00188
00189 enum ExceptionCode
00190 {
00191 SYNTAX_ERR = 0,
00192 INVALID_MODIFICATION_ERR = 1,
00193 _EXCEPTION_OFFSET = 1000
00194 };
00195 };
00196
00197 class CSSStyleSheetImpl;
00198 class CSSRule;
00199 class CSSRuleList;
00200
00207 class CSSStyleSheet : public StyleSheet
00208 {
00209 public:
00210 CSSStyleSheet();
00211 CSSStyleSheet(const CSSStyleSheet &other);
00212 CSSStyleSheet(const StyleSheet &other);
00213 CSSStyleSheet(CSSStyleSheetImpl *impl);
00214 public:
00215
00216 CSSStyleSheet & operator = (const CSSStyleSheet &other);
00217 CSSStyleSheet & operator = (const StyleSheet &other);
00218
00219 ~CSSStyleSheet();
00220
00233 CSSRule ownerRule() const;
00234
00244 CSSRuleList cssRules() const;
00245
00280 unsigned long insertRule ( const DOM::DOMString &rule, unsigned long index );
00281
00298 void deleteRule ( unsigned long index );
00299 };
00300
00301
00302 class StyleSheetListImpl;
00303 class StyleSheet;
00304
00310 class StyleSheetList
00311 {
00312 public:
00313 StyleSheetList();
00314 StyleSheetList(const StyleSheetList &other);
00315 StyleSheetList(StyleSheetListImpl *impl);
00316 public:
00317
00318 StyleSheetList & operator = (const StyleSheetList &other);
00319
00320 ~StyleSheetList();
00321
00328 unsigned long length() const;
00329
00340 StyleSheet item ( unsigned long index );
00341
00345 StyleSheetListImpl *handle() const;
00346 bool isNull() const;
00347
00348 protected:
00349 StyleSheetListImpl *impl;
00350 };
00351
00352
00353 class MediaListImpl;
00354 class CSSRule;
00355 class CSSStyleSheet;
00356
00364 class MediaList
00365 {
00366 public:
00367 MediaList();
00368 MediaList(const MediaList &other);
00369 MediaList(MediaListImpl *impl);
00370 public:
00371
00372 MediaList & operator = (const MediaList &other);
00373
00374 ~MediaList();
00375
00386 DOM::DOMString mediaText() const;
00387
00391 void setMediaText(const DOM::DOMString &value);
00392
00396 unsigned long length() const;
00397
00398
00408 DOM::DOMString item(unsigned long index) const;
00409
00420 void deleteMedium(const DOM::DOMString &oldMedium);
00421
00434 void appendMedium(const DOM::DOMString &newMedium);
00435
00439 MediaListImpl *handle() const;
00440 bool isNull() const;
00441
00442 protected:
00443 MediaListImpl *impl;
00444 };
00445
00446 class LinkStyleImpl;
00447
00448 class LinkStyle
00449 {
00450 public:
00451 LinkStyle();
00452 LinkStyle(const LinkStyle &other);
00453
00454 LinkStyle & operator = (const LinkStyle &other);
00455 LinkStyle & operator = (const Node &other);
00456
00457 ~LinkStyle();
00458
00459 StyleSheet sheet();
00460
00461 bool isNull() const;
00462
00463 protected:
00464 DOM::NodeImpl *node;
00465 LinkStyleImpl *impl;
00466 };
00467
00468 class DocumentStyleImpl;
00469
00470 class DocumentStyle
00471 {
00472 public:
00473 DocumentStyle();
00474 DocumentStyle(const DocumentStyle &other);
00475
00476 DocumentStyle & operator = (const DocumentStyle &other);
00477 DocumentStyle & operator = (const Document &other);
00478
00479 ~DocumentStyle();
00480
00481 StyleSheetList styleSheets();
00482
00483 bool isNull() const;
00484
00485 protected:
00486 DOM::DocumentImpl *doc;
00487 DocumentStyleImpl *impl;
00488 };
00489
00490 }
00491
00492 #endif
This file is part of the documentation for kdelibs Version 3.1.5.