webengine/osswebengine/WebCore/css/StyleSheet.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2  * This file is part of the DOM implementation for KDE.
       
     3  *
       
     4  * (C) 1999-2003 Lars Knoll (knoll@kde.org)
       
     5  * Copyright (C) 2004, 2006 Apple Computer, Inc.
       
     6  *
       
     7  * This library is free software; you can redistribute it and/or
       
     8  * modify it under the terms of the GNU Library General Public
       
     9  * License as published by the Free Software Foundation; either
       
    10  * version 2 of the License, or (at your option) any later version.
       
    11  *
       
    12  * This library is distributed in the hope that it will be useful,
       
    13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    15  * Library General Public License for more details.
       
    16  *
       
    17  * You should have received a copy of the GNU Library General Public License
       
    18  * along with this library; see the file COPYING.LIB.  If not, write to
       
    19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
       
    20  * Boston, MA 02110-1301, USA.
       
    21  */
       
    22 
       
    23 #ifndef StyleSheet_h
       
    24 #define StyleSheet_h
       
    25 
       
    26 #include "StyleList.h"
       
    27 #include "PlatformString.h"
       
    28 
       
    29 namespace WebCore {
       
    30 
       
    31 class Node;
       
    32 class CachedCSSStyleSheet;
       
    33 class MediaList;
       
    34 
       
    35 class StyleSheet : public StyleList {
       
    36 public:
       
    37     StyleSheet(Node* ownerNode, const String& href = String());
       
    38     StyleSheet(StyleSheet* parentSheet, const String& href = String());
       
    39     StyleSheet(StyleBase* owner, const String& href = String());
       
    40     virtual ~StyleSheet();
       
    41 
       
    42     virtual bool isStyleSheet() const { return true; }
       
    43 
       
    44     virtual String type() const { return String(); }
       
    45 
       
    46     bool disabled() const { return m_disabled; }
       
    47     void setDisabled(bool disabled) { m_disabled = disabled; styleSheetChanged(); }
       
    48 
       
    49     Node* ownerNode() const { return m_parentNode; }
       
    50     StyleSheet *parentStyleSheet() const;
       
    51     String href() const { return m_strHref; }
       
    52     void setHref(const String& href) { m_strHref = href; }
       
    53     String title() const { return m_strTitle; }
       
    54     void setTitle(const String& s) { m_strTitle = s; }
       
    55     MediaList* media() const { return m_media.get(); }
       
    56     void setMedia(MediaList*);
       
    57 
       
    58     virtual bool isLoading() { return false; }
       
    59 
       
    60     virtual void styleSheetChanged() { }
       
    61     
       
    62 protected:
       
    63     Node* m_parentNode;
       
    64     String m_strHref;
       
    65     String m_strTitle;
       
    66     RefPtr<MediaList> m_media;
       
    67     bool m_disabled;
       
    68 };
       
    69 
       
    70 } // namespace
       
    71 
       
    72 #endif